Browse Source

infobox: add autoupdater state

Nils Schneider 9 years ago
parent
commit
7cc653f20a
1 changed files with 9 additions and 0 deletions
  1. 9 0
      lib/infobox/node.js

+ 9 - 0
lib/infobox/node.js

@@ -24,6 +24,7 @@ define(function () {
     attributeEntry(attributes, "Teil des Netzes", showFirstseen(d))
     attributeEntry(attributes, "Arbeitsspeicher", showRAM(d))
     attributeEntry(attributes, "IP Adressen", showIPs(d))
+    attributeEntry(attributes, "Autom. Updates", showAutoupdate(d))
     attributeEntry(attributes, "Clients", showClients(d))
     el.appendChild(attributes)
 
@@ -192,5 +193,13 @@ define(function () {
 
       return span
     }
+
+    function showAutoupdate(d) {
+      var au = dictGet(d.nodeinfo, ["software", "autoupdater"])
+      if (!au)
+        return
+
+      return au.enabled ? "aktiviert (" + au.branch + ")" : "deaktiviert"
+    }
   }
 })