refactoring
This commit is contained in:
parent
b347f825a4
commit
f5005434c6
@ -52,20 +52,14 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
|||||||
case "init":
|
case "init":
|
||||||
$scope.nodes = data;
|
$scope.nodes = data;
|
||||||
|
|
||||||
if($scope.nodes.length > 0)
|
if($scope.nodes.length > 0) toastr['success']("Got nodes list", "Got nodes!");
|
||||||
{
|
|
||||||
toastr['success']("Got nodes list", "Got nodes!");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "add":
|
case "add":
|
||||||
if(addNewNode(data))
|
if(addNewNode(data))
|
||||||
{
|
|
||||||
toastr['success']("New node connected!", "New node!");
|
toastr['success']("New node connected!", "New node!");
|
||||||
} else {
|
else
|
||||||
toastr['info']("Node reconnected!", "Node is back!");
|
toastr['info']("Node reconnected!", "Node is back!");
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "update":
|
case "update":
|
||||||
|
@ -32,6 +32,7 @@ app.factory('toastr', function ($rootScope) {
|
|||||||
toastr.options = {
|
toastr.options = {
|
||||||
"closeButton": false,
|
"closeButton": false,
|
||||||
"debug": false,
|
"debug": false,
|
||||||
|
"progressBar": true,
|
||||||
"newestOnTop": true,
|
"newestOnTop": true,
|
||||||
"progressBar": false,
|
"progressBar": false,
|
||||||
"positionClass": "toast-top-right",
|
"positionClass": "toast-top-right",
|
||||||
|
Loading…
Reference in New Issue
Block a user