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

@ -192,13 +192,11 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
var bar = document.createElement("span")
if (v >= 1) {
bar.style.width = ((v * 100) % 100) + "%"
bar.style.background = "rgba(255, 50, 50, 0.9)"
span.style.background = "rgba(255, 50, 50, 0.6)"
span.appendChild(bar)
}
else
{
bar.style.width = ((v * 100) % 100) + "%"
bar.style.background = "rgba(255, 50, 50, 0.9)"
span.style.background = "rgba(255, 50, 50, 0.6)"
span.appendChild(bar)
} else {
bar.style.width = (v * 100) + "%"
span.appendChild(bar)
}
@ -309,7 +307,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
content.classList.add("nodeImg")
content.src = o.thumbnail.replace("{MODELHASH}", modelhash)
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"
}
}
@ -325,7 +323,7 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
p.appendChild(content)
return content
}
}
function showStatImg(o, d) {
var subst = {}
@ -342,14 +340,11 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
config.hwImg.forEach(function(hwImg) {
try {
top.appendChild(showNodeImg(hwImg, d.nodeinfo.hardware.model))
}
catch (err) {
} catch (err) {
console.log(err.message)
}
})
else
{
else {
var localpic = [] // create fallback-config-data
localpic.push({
thumbnail: "./nodes/{MODELHASH}.svg",
@ -358,14 +353,12 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
localpic.forEach(function(localpic) {
try {
top.appendChild(showNodeImg(localpic, d.nodeinfo.hardware.model))
}
catch (err) {
} catch (err) {
console.log(err.message)
}
})
}
}
catch (err) {
} catch (err) {
console.log(err.message)
}