mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 04:04:03 +03:00
Merge pull request #653 from nclsHart/disconnected
[Web UI] Warn user if the server is down/disconnected
This commit is contained in:
commit
01d1531d40
@ -1,3 +1,4 @@
|
||||
<span ng-if="is_disconnected" class="critical">Disconnected from</span>
|
||||
<span class="title">{{ result["system"].hostname }}</span>
|
||||
<span ng-if="is_linux" class="hidden-xs hidden-sm">({{ result["system"].hr_name }} / {{ result["system"].os_name }} {{ result["system"].os_version }})</span>
|
||||
<span ng-if="!is_linux" class="hidden-xs hidden-sm">({{ result["system"].os_name }} {{ result["system"].os_version }} {{ result["system"].platform }})</span>
|
||||
|
@ -150,10 +150,13 @@ glancesApp.controller('statsController', function($scope, $http, $interval, $q,
|
||||
$scope.is_mac = response['system'].os_name === 'Darwin';
|
||||
$scope.is_windows = response['system'].os_name === 'Windows';
|
||||
|
||||
$scope.is_disconnected = false;
|
||||
|
||||
$scope.result = response;
|
||||
canceler.resolve()
|
||||
}).error(function(d, status, headers, config) {
|
||||
console.log('error status:' + status + " - headers = " + headers);
|
||||
$scope.is_disconnected = true;
|
||||
|
||||
canceler.resolve()
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user