diff --git a/app/components/ng-justgage/ng-justgage.js b/app/components/ng-justgage/ng-justgage.js new file mode 100644 index 0000000..b6f6e3c --- /dev/null +++ b/app/components/ng-justgage/ng-justgage.js @@ -0,0 +1,45 @@ +angular.module("ngJustGage", []) + .directive('justGage', ['$timeout', function ($timeout) { + return { + restrict: 'EA', + scope: { + id: '@', + class: '@', + min: '=', + max: '=', + title: '@', + value: '=', + options: '=' + }, + template: '
', + link: function (scope,element,attrs) { + $timeout(function () { + var options = { + id: scope.id + '-justgage', + min: scope.min, + max: scope.max, + title: scope.title, + value: scope.value + } + if ( scope.options ) { + for (var key in scope.options) { + options[key]=scope.options[key]; + } + } + var graph = new JustGage(options); + + scope.$watch('max', function (updatedMax) { + if (updatedMax !== undefined) { + graph.refresh(scope.value, updatedMax); + } + }, true); + + scope.$watch('value', function (updatedValue) { + if (updatedValue !== undefined) { + graph.refresh(updatedValue); + } + }, true); + }); + } + }; + }]); diff --git a/app/index.html b/app/index.html index 2c73a4d..ea51d8d 100644 --- a/app/index.html +++ b/app/index.html @@ -21,17 +21,29 @@ - + + + - > - - - - - - + > + + + + + + + + + + + + + + + + diff --git a/app/tactical/current_health/current_health.html b/app/tactical/current_health/current_health.html new file mode 100644 index 0000000..433dfcb --- /dev/null +++ b/app/tactical/current_health/current_health.html @@ -0,0 +1,17 @@ ++ Current Health + | +
---|
+ Status overview + | ++ # + | ++ + | +
---|---|---|
+ HOSTS + | ++ {{ hosts.count }} + | ++ {{ hosts.problems }} + | +
+ SERVICES + | ++ {{ services.count }} + | ++ {{ services.problems }} + | +
+ Top Alert Producers + | ++ + | +
---|---|
+ {{ host.host_name }} + | ++ {{ host.problems }} + | +
This is the partial for view 1.
diff --git a/app/view1/view1.js b/app/view1/view1.js deleted file mode 100644 index 4ce0b4f..0000000 --- a/app/view1/view1.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -angular.module('myApp.view1', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/view1', { - templateUrl: 'view1/view1.html', - controller: 'View1Ctrl' - }); -}]) - -.controller('View1Ctrl', [function() { - -}]); \ No newline at end of file diff --git a/app/view1/view1_test.js b/app/view1/view1_test.js deleted file mode 100644 index 14ba79b..0000000 --- a/app/view1/view1_test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -describe('myApp.view1 module', function() { - - beforeEach(module('myApp.view1')); - - describe('view1 controller', function(){ - - it('should ....', inject(function($controller) { - //spec body - var view1Ctrl = $controller('View1Ctrl'); - expect(view1Ctrl).toBeDefined(); - })); - - }); -}); \ No newline at end of file diff --git a/app/view2/view2.html b/app/view2/view2.html deleted file mode 100644 index b6503ee..0000000 --- a/app/view2/view2.html +++ /dev/null @@ -1,5 +0,0 @@ -This is the partial for view 2.
-- Showing of 'interpolate' filter: - {{ 'Current version is v%VERSION%.' | interpolate }} -
diff --git a/app/view2/view2.js b/app/view2/view2.js deleted file mode 100644 index a0ff97d..0000000 --- a/app/view2/view2.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -angular.module('myApp.view2', ['ngRoute']) - -.config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/view2', { - templateUrl: 'view2/view2.html', - controller: 'View2Ctrl' - }); -}]) - -.controller('View2Ctrl', [function() { - -}]); \ No newline at end of file diff --git a/app/view2/view2_test.js b/app/view2/view2_test.js deleted file mode 100644 index 07b34d6..0000000 --- a/app/view2/view2_test.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict'; - -describe('myApp.view2 module', function() { - - beforeEach(module('myApp.view2')); - - describe('view2 controller', function(){ - - it('should ....', inject(function($controller) { - //spec body - var view2Ctrl = $controller('View2Ctrl'); - expect(view2Ctrl).toBeDefined(); - })); - - }); -}); \ No newline at end of file diff --git a/bower.json b/bower.json index ba32dac..c0ca983 100644 --- a/bower.json +++ b/bower.json @@ -12,6 +12,7 @@ "angular-mocks": "~1.2.x", "html5-boilerplate": "~4.3.0", "bootstrap-sass-official": "3.3.1", - "fontawesome": "4.2.0" + "fontawesome": "4.2.0", + "justgage-toorshia" : "master" } }