From d431fa0355d81db740f046f9e14daca408ed3557 Mon Sep 17 00:00:00 2001 From: Alexandr Dubovikov Date: Sat, 26 Dec 2015 23:17:16 +0100 Subject: [PATCH] add grouping to add widget popup --- js/controller.js | 2 +- js/widgets/adminalias/adminalias.js | 2 ++ js/widgets/adminnode/adminnode.js | 2 ++ js/widgets/adminuser/adminuser.js | 2 ++ js/widgets/alarm/alarm.js | 2 ++ js/widgets/alarmlist/alarmlist.js | 2 ++ js/widgets/clock/clock.js | 4 +++- js/widgets/elasticaggs/elasticaggs.js | 4 +++- js/widgets/elasticap/elasticap.js | 4 +++- js/widgets/github/github.js | 2 ++ js/widgets/linklist/linklist.js | 6 ++++-- js/widgets/markdown/markdown.js | 4 +++- js/widgets/news/news.js | 6 ++++-- js/widgets/querycap/querycap.js | 4 +++- js/widgets/quicksearch/quicksearch.js | 2 ++ js/widgets/randommsg/randommsg.js | 4 +++- js/widgets/ripesearch/ripesearch.js | 8 +++++--- js/widgets/ripewhois/ripewhois.js | 2 ++ js/widgets/sipcapture/sipcapture.js | 4 +++- js/widgets/weather/weather.js | 10 ++++++---- 20 files changed, 57 insertions(+), 19 deletions(-) diff --git a/js/controller.js b/js/controller.js index 01ad6fac..62e35b3e 100644 --- a/js/controller.js +++ b/js/controller.js @@ -2,7 +2,7 @@ "use strict"; defineHomerAngularModule(homer.modules.app.name).controller("homerAppController", [ "$scope", "$rootScope", "eventbus", "$state", homer.modules.auth.services.authentication, "$location", "dialogs", homer.modules.core.services.profile, function($scope, $rootScope, eventbus, $state, authentication, $location, $dialogs, userProfile) { $rootScope.homerApp = "HOMER"; - $rootScope.homerVersion = "5.0.1 RC3"; + $rootScope.homerVersion = "5.0.1 Release"; console.log("HOMER INIT:", $rootScope.homerVersion); $scope.header = "templates/empty.html"; $scope.menu = "templates/empty.html"; diff --git a/js/widgets/adminalias/adminalias.js b/js/widgets/adminalias/adminalias.js index 5ef12281..be39aa18 100644 --- a/js/widgets/adminalias/adminalias.js +++ b/js/widgets/adminalias/adminalias.js @@ -15,6 +15,8 @@ angular.module('homer.widgets.adminalias', ['adf.provider']) dashboardProvider .widget('adminalias', { title: 'Admin Alias', + group: 'Admin', + name: 'adminalias', description: 'Manage IP:PORT Aliases', templateUrl: 'js/widgets/adminalias/adminalias.html', controller: 'adminaliasCtrl', diff --git a/js/widgets/adminnode/adminnode.js b/js/widgets/adminnode/adminnode.js index 3ab4ce02..d023225a 100644 --- a/js/widgets/adminnode/adminnode.js +++ b/js/widgets/adminnode/adminnode.js @@ -15,6 +15,8 @@ angular.module('homer.widgets.adminnode', ['adf.provider']) dashboardProvider .widget('adminnode', { title: 'Admin Node', + group: 'Admin', + name: 'adminnode', description: 'Manage Database Nodes', templateUrl: 'js/widgets/adminnode/adminnode.html', controller: 'adminnodeCtrl', diff --git a/js/widgets/adminuser/adminuser.js b/js/widgets/adminuser/adminuser.js index d0cf2ead..42535761 100644 --- a/js/widgets/adminuser/adminuser.js +++ b/js/widgets/adminuser/adminuser.js @@ -15,6 +15,8 @@ angular.module('homer.widgets.adminuser', ['adf.provider']) dashboardProvider .widget('adminuser', { title: 'Admin User', + group: 'Admin', + name: 'adminuser', description: 'Manage Local Users', templateUrl: 'js/widgets/adminuser/adminuser.html', controller: 'adminuserCtrl', diff --git a/js/widgets/alarm/alarm.js b/js/widgets/alarm/alarm.js index 283223a9..6e1ede76 100644 --- a/js/widgets/alarm/alarm.js +++ b/js/widgets/alarm/alarm.js @@ -15,6 +15,8 @@ angular.module('homer.widgets.alarm', ['adf.provider']) dashboardProvider .widget('alarm', { title: 'Alarm Settings', + group: 'Admin', + name: 'alarm', description: 'Configure Alarm Triggers', templateUrl: 'js/widgets/alarm/alarm.html', controller: 'alarmCtrl', diff --git a/js/widgets/alarmlist/alarmlist.js b/js/widgets/alarmlist/alarmlist.js index 0b672e1b..79dbf562 100644 --- a/js/widgets/alarmlist/alarmlist.js +++ b/js/widgets/alarmlist/alarmlist.js @@ -15,6 +15,8 @@ angular.module('homer.widgets.alarmlist', ['adf.provider']) dashboardProvider .widget('alarmlist', { title: 'Alarm List', + group: 'Admin', + name: 'alarmlist', description: 'Display Alarm Detections', templateUrl: 'js/widgets/alarmlist/alarmlist.html', controller: 'alarmListCtrl', diff --git a/js/widgets/clock/clock.js b/js/widgets/clock/clock.js index 92865504..98125202 100644 --- a/js/widgets/clock/clock.js +++ b/js/widgets/clock/clock.js @@ -13,7 +13,9 @@ angular.module('homer.widget.clock', ['adf.provider']) .config(function(dashboardProvider){ dashboardProvider .widget('clock', { - title: 'Tool: Clock', + title: 'World Clock', + group: 'Tools', + name: 'clock', description: 'Displays date and time', templateUrl: 'js/widgets/clock/view.html', controller: 'clockController', diff --git a/js/widgets/elasticaggs/elasticaggs.js b/js/widgets/elasticaggs/elasticaggs.js index 2407fcfc..d01d1c6f 100644 --- a/js/widgets/elasticaggs/elasticaggs.js +++ b/js/widgets/elasticaggs/elasticaggs.js @@ -49,7 +49,9 @@ angular.module('homer.widgets.elasticaggs', ['adf.provider', 'highcharts-ng','ba // register elasticaggs template by extending the template object dashboardProvider .widget('elasticaggsChart', angular.extend({ - title: 'Chart: Elastic Aggs', + title: 'Elastic Aggs', + group: 'Charts', + name: 'elasticaggsChart', description: 'Display Elasticsearch Aggs', controller: 'elasticaggsCtrl' }, widget)); diff --git a/js/widgets/elasticap/elasticap.js b/js/widgets/elasticap/elasticap.js index 1c87e1bd..080aeaf9 100644 --- a/js/widgets/elasticap/elasticap.js +++ b/js/widgets/elasticap/elasticap.js @@ -35,7 +35,9 @@ angular.module('homer.widgets.elasticap', ['adf.provider', 'highcharts-ng','base // register elasticap template by extending the template object dashboardProvider .widget('elasticapChart', angular.extend({ - title: 'Chart: Elastic Facets', + title: 'Elastic Facets', + group: 'Charts', + name: 'elasticapChart', description: 'Display Elasticsearch Facets', controller: 'elasticapCtrl' }, widget)); diff --git a/js/widgets/github/github.js b/js/widgets/github/github.js index b8454e43..b7320bf1 100644 --- a/js/widgets/github/github.js +++ b/js/widgets/github/github.js @@ -47,6 +47,8 @@ angular.module('sample.widgets.github', ['adf.provider', 'highcharts-ng']) dashboardProvider .widget('githubHistory', angular.extend({ title: 'Github History', + group: 'Tools', + name: 'githubHistory', description: 'Display the commit history of a GitHub project as chart', controller: 'githubHistoryCtrl' }, widget)) diff --git a/js/widgets/linklist/linklist.js b/js/widgets/linklist/linklist.js index af226b34..c9ce4c34 100644 --- a/js/widgets/linklist/linklist.js +++ b/js/widgets/linklist/linklist.js @@ -28,8 +28,10 @@ angular.module('adf.widgets.linklist', ['adf.provider']) .config(function(dashboardProvider){ dashboardProvider .widget('linklist', { - title: 'Tool: Links', - description: 'Displays a list of links', + title: 'URL Links', + group: 'Tools', + name: 'linklist', + description: 'Display a list of links', controller: 'linklistCtrl', controllerAs: 'list', templateUrl: 'js/widgets/linklist/linklist.html', diff --git a/js/widgets/markdown/markdown.js b/js/widgets/markdown/markdown.js index a91f24ab..a4b31f86 100644 --- a/js/widgets/markdown/markdown.js +++ b/js/widgets/markdown/markdown.js @@ -28,7 +28,9 @@ angular.module('adf.widgets.markdown', ['adf.provider', 'btford.markdown']) .config(function(dashboardProvider){ dashboardProvider .widget('markdown', { - title: 'Tool: Markdown', + title: 'Markdown', + group: 'Tools', + name: 'markdown', description: 'Display a Markdown widget', controller: 'markdownCtrl', templateUrl: 'js/widgets/markdown/markdown.html', diff --git a/js/widgets/news/news.js b/js/widgets/news/news.js index 0a4c5c6f..9e817328 100644 --- a/js/widgets/news/news.js +++ b/js/widgets/news/news.js @@ -29,8 +29,10 @@ angular.module('adf.widgets.news', ['adf.provider']) .config(function(dashboardProvider){ dashboardProvider .widget('news', { - title: 'Tool: Newsfeed', - description: 'Displays a RSS/Atom feed', + title: 'Newsfeed', + group: 'Tools', + name: 'news', + description: 'Display an RSS/Atom feed', templateUrl: 'js/widgets/news/news.html', controller: 'newsCtrl', resolve: { diff --git a/js/widgets/querycap/querycap.js b/js/widgets/querycap/querycap.js index 03932bed..2f736805 100644 --- a/js/widgets/querycap/querycap.js +++ b/js/widgets/querycap/querycap.js @@ -53,7 +53,9 @@ angular.module('homer.widgets.querycap', ['adf.provider', 'highcharts-ng']) // register querycap template by extending the template object dashboardProvider .widget('querycapChart', angular.extend({ - title: 'QueryCapture Charts', + title: 'QueryCapture', + group: 'Charts', + name: 'querycapChart', description: 'Display QueryCapture API data as charts', controller: 'querycapCtrl' }, widget)); diff --git a/js/widgets/quicksearch/quicksearch.js b/js/widgets/quicksearch/quicksearch.js index 93fe6f58..0bed8a7d 100644 --- a/js/widgets/quicksearch/quicksearch.js +++ b/js/widgets/quicksearch/quicksearch.js @@ -14,6 +14,8 @@ angular.module('homer.widgets.quicksearch', ['adf.provider']) dashboardProvider .widget('quicksearch', { title: 'Search Form Builder', + group: 'Search', + name: 'quicksearch', description: 'Display Search Form component', templateUrl: 'js/widgets/quicksearch/quicksearch.html', controller: 'quicksearchCtrl', diff --git a/js/widgets/randommsg/randommsg.js b/js/widgets/randommsg/randommsg.js index 8428d3fe..c0a32f9c 100644 --- a/js/widgets/randommsg/randommsg.js +++ b/js/widgets/randommsg/randommsg.js @@ -13,7 +13,9 @@ angular.module('homer.widgets.randommsg', ['adf.provider']) .config(function(dashboardProvider){ dashboardProvider .widget('randommsg', { - title: 'Tool: Random SIP RFC', + title: 'Random SIP RFC', + group: 'Tools', + name: 'randommsg', description: 'Display a random SIP Method definition and RFC', templateUrl: 'js/widgets/randommsg/randommsg.html', controller: 'randommsgCtrl', diff --git a/js/widgets/ripesearch/ripesearch.js b/js/widgets/ripesearch/ripesearch.js index deea0e0d..377cf36f 100644 --- a/js/widgets/ripesearch/ripesearch.js +++ b/js/widgets/ripesearch/ripesearch.js @@ -15,15 +15,17 @@ angular.module('homer.widgets.ripesearch', ['adf.provider']) dashboardProvider .widget('ripesearch', { title: 'RIPE DB Search', + group: 'Tools', + name: 'ripesearch', description: 'Display RIPE Visibility for a given IP/AS', templateUrl: 'js/widgets/ripesearch/ripesearch.html', controller: 'ripeCtrl', reload: true, resolve: { - data: function(weatcherService, config){ + data: function(ripesearchService, config){ if (!config.rscount){ config.rscount = 4; } if (config.location){ - return weatcherService.get(config.location,config.rscount); + return ripesearchService.get(config.location,config.rscount); } } }, @@ -32,7 +34,7 @@ angular.module('homer.widgets.ripesearch', ['adf.provider']) } }); }) - .service('weatcherService', function($q, $http, RIPEServiceUrl){ + .service('ripesearchService', function($q, $http, RIPEServiceUrl){ return { get: function(location,counter){ var deferred = $q.defer(); diff --git a/js/widgets/ripewhois/ripewhois.js b/js/widgets/ripewhois/ripewhois.js index 74b27475..3e1feb2b 100644 --- a/js/widgets/ripewhois/ripewhois.js +++ b/js/widgets/ripewhois/ripewhois.js @@ -15,6 +15,8 @@ angular.module('homer.widgets.ripewhois', ['adf.provider']) dashboardProvider .widget('ripewhois', { title: 'RIPE Whois Search', + group: 'Tools', + name: 'ripewhois', description: 'Display RIPE WHOIS Data for a given IP/AS', templateUrl: 'js/widgets/ripewhois/ripewhois.html', controller: 'ripewhoCtrl', diff --git a/js/widgets/sipcapture/sipcapture.js b/js/widgets/sipcapture/sipcapture.js index fc91d50b..dc384c50 100644 --- a/js/widgets/sipcapture/sipcapture.js +++ b/js/widgets/sipcapture/sipcapture.js @@ -27,7 +27,9 @@ angular.module("homer.widgets.sipcapture", [ "adf.provider", "highcharts-ng", "a refresh: true }; dashboardProvider.widget("sipcaptureChart", angular.extend({ - title: "Charts: Sipcapture", + title: "Sipcapture Stats", + group: "Charts", + name: 'sipcaptureChart', description: "Display SIPCapture API data", controller: "sipcaptureCtrl" }, widget)); diff --git a/js/widgets/weather/weather.js b/js/widgets/weather/weather.js index 48432e91..fb9101ad 100644 --- a/js/widgets/weather/weather.js +++ b/js/widgets/weather/weather.js @@ -30,14 +30,16 @@ angular.module('sample.widgets.weather', ['adf.provider']) dashboardProvider .widget('weather', { title: 'Weather', + group: 'Tools', + name: 'weather', description: 'Display the current temperature of a city', templateUrl: 'js/widgets/weather/weather.html', controller: 'weatherCtrl', reload: true, resolve: { - data: function(weatcherService, config){ + data: function(weatherService, config){ if (config.location){ - return weatcherService.get(config.location); + return weatherService.get(config.location); } } }, @@ -46,7 +48,7 @@ angular.module('sample.widgets.weather', ['adf.provider']) } }); }) - .service('weatcherService', function($q, $http, weatherServiceUrl){ + .service('weatherService', function($q, $http, weatherServiceUrl){ return { get: function(location){ var deferred = $q.defer(); @@ -68,4 +70,4 @@ angular.module('sample.widgets.weather', ['adf.provider']) }) .controller('weatherCtrl', function($scope, data){ $scope.data = data; - }); \ No newline at end of file + });