瀏覽代碼

remove "Gateway-Feature"

Nils Schneider 8 年之前
父節點
當前提交
c13e648cc6
共有 3 個文件被更改,包括 2 次插入26 次删除
  1. 0 1
      lib/infobox/node.js
  2. 2 6
      lib/meshstats.js
  3. 0 19
      lib/proportions.js

+ 0 - 1
lib/infobox/node.js

@@ -182,7 +182,6 @@ define(["moment", "numeral", "tablesort", "tablesort.numeric"],
     attributes.classList.add("attributes")
 
     attributeEntry(attributes, "Status", showStatus(d))
-    attributeEntry(attributes, "Gateway", d.flags.gateway ? "ja" : null)
     attributeEntry(attributes, "Koordinaten", showGeoURI(d))
 
     if (config.showContact)

+ 2 - 6
lib/meshstats.js

@@ -11,9 +11,6 @@ define(function () {
       var totalClients = sum(d.nodes.all.filter(online).map( function (d) {
         return d.statistics.clients
       }))
-      var totalGateways = sum(d.nodes.all.filter(online).filter( function (d) {
-        return d.flags.gateway
-      }).map(one))
 
       var nodetext = [{ count: totalOnlineNodes, label: "online" },
                       { count: totalNewNodes, label: "neu" },
@@ -23,9 +20,8 @@ define(function () {
                       .join(", ")
 
       stats.textContent = totalNodes + " Knoten " +
-                          "(" + nodetext + "), " +
-                          totalClients + " Clients, " +
-                          totalGateways + " Gateways"
+                          "(" + nodetext + ") mit " +
+                          totalClients + " Clients"
 
       timestamp.textContent = "Diese Daten sind von " + d.timestamp.format("LLLL") + "."
     }

+ 0 - 19
lib/proportions.js

@@ -20,9 +20,6 @@ define(["chroma-js", "virtual-dom", "numeral-intl"],
     var autoTable = document.createElement("table")
     autoTable.classList.add("proportion")
 
-    var gwTable = document.createElement("table")
-    gwTable.classList.add("proportion")
-
     function showStatGlobal(o) {
       var content, caption
 
@@ -130,22 +127,11 @@ define(["chroma-js", "virtual-dom", "numeral-intl"],
           return "(deaktiviert)"
       })
 
-      var gwDict = count(onlineNodes, ["statistics", "gateway"], function (d) {
-        if (d === null)
-          return null
-
-        if (d in nodeDict)
-          return nodeDict[d].nodeinfo.hostname
-
-        return d
-      })
-
       fillTable(statusTable, statusDict.sort(function (a, b) { return b[1] - a[1] }))
       fillTable(fwTable, fwDict.sort(function (a, b) { return b[1] - a[1] }))
       fillTable(hwTable, hwDict.sort(function (a, b) { return b[1] - a[1] }))
       fillTable(geoTable, geoDict.sort(function (a, b) { return b[1] - a[1] }))
       fillTable(autoTable, autoDict.sort(function (a, b) { return b[1] - a[1] }))
-      fillTable(gwTable, gwDict.sort(function (a, b) { return b[1] - a[1] }))
     }
 
     self.render = function (el) {
@@ -175,11 +161,6 @@ define(["chroma-js", "virtual-dom", "numeral-intl"],
       el.appendChild(h2)
       el.appendChild(autoTable)
 
-      h2 = document.createElement("h2")
-      h2.textContent = "Gewählter Gateway"
-      el.appendChild(h2)
-      el.appendChild(gwTable)
-
       if (config.globalInfos)
           config.globalInfos.forEach( function (globalInfo) {
             h2 = document.createElement("h2")