Compare commits

...

1 commit

Author SHA1 Message Date
Milan Pssler 28eacf8a79 router-pics: some indention and cosmetic fixes 2016-07-04 11:58:54 +02:00

View file

@ -196,9 +196,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
bar.style.background = "rgba(255, 50, 50, 0.9)" bar.style.background = "rgba(255, 50, 50, 0.9)"
span.style.background = "rgba(255, 50, 50, 0.6)" span.style.background = "rgba(255, 50, 50, 0.6)"
span.appendChild(bar) span.appendChild(bar)
} } else {
else
{
bar.style.width = (v * 100) + "%" bar.style.width = (v * 100) + "%"
span.appendChild(bar) span.appendChild(bar)
} }
@ -309,7 +307,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
content.classList.add("nodeImg") content.classList.add("nodeImg")
content.src = o.thumbnail.replace("{MODELHASH}", modelhash) content.src = o.thumbnail.replace("{MODELHASH}", modelhash)
content.onerror = function() { content.onerror = function() {
console.log("Router-Bild nicht vorhanden !!! create an issue @ https://github.com/Moorviper/Freifunk-Router-Anleitungen/issues") console.log("picture not found - if you have configured router pictures create an issue at https://github.com/Moorviper/meshviewer_hwpics/issues")
document.getElementById("routerpicdiv").outerHTML = "Knotenname" document.getElementById("routerpicdiv").outerHTML = "Knotenname"
} }
} }
@ -325,7 +323,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
p.appendChild(content) p.appendChild(content)
return content return content
} }
function showStatImg(o, d) { function showStatImg(o, d) {
var subst = {} var subst = {}
@ -342,14 +340,11 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
config.hwImg.forEach(function(hwImg) { config.hwImg.forEach(function(hwImg) {
try { try {
top.appendChild(showNodeImg(hwImg, d.nodeinfo.hardware.model)) top.appendChild(showNodeImg(hwImg, d.nodeinfo.hardware.model))
} } catch (err) {
catch (err) {
console.log(err.message) console.log(err.message)
} }
}) })
else {
else
{
var localpic = [] // create fallback-config-data var localpic = [] // create fallback-config-data
localpic.push({ localpic.push({
thumbnail: "./nodes/{MODELHASH}.svg", thumbnail: "./nodes/{MODELHASH}.svg",
@ -358,14 +353,12 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
localpic.forEach(function(localpic) { localpic.forEach(function(localpic) {
try { try {
top.appendChild(showNodeImg(localpic, d.nodeinfo.hardware.model)) top.appendChild(showNodeImg(localpic, d.nodeinfo.hardware.model))
} } catch (err) {
catch (err) {
console.log(err.message) console.log(err.message)
} }
}) })
} }
} } catch (err) {
catch (err) {
console.log(err.message) console.log(err.message)
} }