node events notifications

This commit is contained in:
cubedro
2015-02-18 08:06:41 +02:00
parent 71b1f7503a
commit 1959e77407
6 changed files with 36 additions and 7 deletions

View File

@@ -69,6 +69,11 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
case "info":
$scope.nodes[findIndex({id: data.id})].info = data.info;
break;
case "inactive":
$scope.nodes[findIndex({id: data.id})].stats = data.stats;
toastr['error']("Node went away!", "Node connection was lost!");
break;
}
updateStats();

View File

@@ -32,7 +32,7 @@ app.factory('toastr', function ($rootScope) {
toastr.options = {
"closeButton": false,
"debug": false,
"progressBar": true,
"progressBar": false,
"newestOnTop": true,
"positionClass": "toast-top-right",
"preventDuplicates": false,