mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Revert "Show liveness indicator (beating heart)"
This reverts commit 84c4298cd5
.
Conflicts:
gui/app.js
gui/index.html
This commit is contained in:
parent
a8c510cc72
commit
1aef03288a
File diff suppressed because one or more lines are too long
27
gui/app.js
27
gui/app.js
@ -5,13 +5,12 @@
|
||||
|
||||
var syncthing = angular.module('syncthing', []);
|
||||
var urlbase = 'rest';
|
||||
var refreshInterval = 10000; // ms
|
||||
|
||||
syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
||||
var prevDate = 0;
|
||||
var getOK = true;
|
||||
var restarting = false;
|
||||
|
||||
$scope.getOK = true;
|
||||
$scope.connections = {};
|
||||
$scope.config = {};
|
||||
$scope.myID = '';
|
||||
@ -21,8 +20,6 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
||||
$scope.seenError = '';
|
||||
$scope.model = {};
|
||||
$scope.repos = {};
|
||||
$scope.lastUpdated = new Date();
|
||||
$scope.heartbeat = 0;
|
||||
|
||||
// Strings before bools look better
|
||||
$scope.settings = [
|
||||
@ -46,11 +43,10 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
||||
];
|
||||
|
||||
function getSucceeded() {
|
||||
$scope.lastUpdated = new Date();
|
||||
if (!$scope.getOK) {
|
||||
if (!getOK) {
|
||||
$scope.init();
|
||||
$('#networkError').modal('hide');
|
||||
$scope.getOK = true;
|
||||
getOK = true;
|
||||
}
|
||||
if (restarting) {
|
||||
$scope.init();
|
||||
@ -63,18 +59,9 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
||||
if (restarting) {
|
||||
return;
|
||||
}
|
||||
if ($scope.getOK) {
|
||||
if (getOK) {
|
||||
$('#networkError').modal({backdrop: 'static', keyboard: false});
|
||||
$scope.getOK = false;
|
||||
$scope.heartbeat = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function heartbeat() {
|
||||
if ($scope.getOK){
|
||||
$scope.$apply(function () {
|
||||
$scope.heartbeat = ($scope.heartbeat + 1) % 5;
|
||||
});
|
||||
getOK = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -458,9 +445,7 @@ syncthing.controller('SyncthingCtrl', function ($scope, $http) {
|
||||
};
|
||||
|
||||
$scope.init();
|
||||
|
||||
setInterval($scope.refresh, refreshInterval);
|
||||
setInterval(heartbeat, 650);
|
||||
setInterval($scope.refresh, 10000);
|
||||
});
|
||||
|
||||
function nodeCompare(a, b) {
|
||||
|
@ -88,10 +88,6 @@
|
||||
.ng-cloak {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
margin-top: 14px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@ -102,10 +98,7 @@
|
||||
<nav class="navbar navbar-top navbar-default" role="navigation">
|
||||
<div class="container">
|
||||
<span class="navbar-brand"><img class="logo" src="st-logo-128.png" width="32" height="32" /> Syncthing<small> | {{thisNodeName()}}</small></span>
|
||||
<div class="navbar-right">
|
||||
<p class="navbar-text" title="Time of last contact with backend"><small><span ng-class="{'text-muted': heartbeat == 0}" class="glyphicon glyphicon-heart"></span> {{lastUpdated | date:'HH:mm'}}</small></p>
|
||||
<button type="button" class="btn btn-primary btn-sm navbar-btn" ng-click="editSettings()"><span class="glyphicon glyphicon-cog"></span> Settings</button>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right navbar-btn" ng-click="editSettings()"><span class="glyphicon glyphicon-cog"></span> Settings</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@ -233,7 +226,7 @@
|
||||
<h5>This Node</h5>
|
||||
<ul class="list-unstyled" ng-repeat="nodeCfg in thisNode()">
|
||||
<li>
|
||||
<span class="text-monospace">{{nodeName(nodeCfg)}}</span>
|
||||
<span class="text-monospace">{{nodeName(nodeCfg)}}</span> 
|
||||
<ul class="list-no-bullet">
|
||||
<li>
|
||||
<div class="li-column" title="Current RAM utilization">
|
||||
|
Loading…
Reference in New Issue
Block a user