diff --git a/gui/app.js b/gui/app.js index c5a430da..3f80135d 100644 --- a/gui/app.js +++ b/gui/app.js @@ -118,6 +118,22 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) { return "minus"; }; + $scope.nodeStatus = function (nodeCfg) { + if ($scope.connections[nodeCfg.NodeID]) { + return "Connected"; + } + + return "Disconnected"; + }; + + $scope.nodeIcon = function (nodeCfg) { + if ($scope.connections[nodeCfg.NodeID]) { + return "ok"; + } + + return "minus"; + }; + $scope.nodeClass = function (nodeCfg) { var conn = $scope.connections[nodeCfg.NodeID]; if (conn) { diff --git a/gui/index.html b/gui/index.html index 284f79a3..31e09255 100644 --- a/gui/index.html +++ b/gui/index.html @@ -76,35 +76,35 @@ html, body { - + - + This node - + {{myID | short}} - {{version}} - this node - + {{version}} + + {{inbps | metric}}bps - + {{outbps | metric}}bps - + - + {{nodeStatus(nodeCfg)}}