diff --git a/Gruntfile.js b/Gruntfile.js index 3e7ff36..85b623d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,6 +17,8 @@ module.exports = function(grunt) { '**/*', '!datasource-zabbix/*.js', '!panel-triggers/*.js', + '!components/*.js', + '!module.js', '!**/*.scss' ], dest: 'dist/' @@ -49,6 +51,8 @@ module.exports = function(grunt) { src: [ 'datasource-zabbix/*.js', 'panel-triggers/*.js', + 'components/*.js', + 'module.js', ], dest: 'dist/' }] diff --git a/src/components/config.html b/src/components/config.html new file mode 100644 index 0000000..89eea1a --- /dev/null +++ b/src/components/config.html @@ -0,0 +1,13 @@ +

Zabbix App Config

+ +
+
+
+ json Data property + +
+
+ +
+
+
diff --git a/src/components/config.js b/src/components/config.js new file mode 100644 index 0000000..fe9c1ef --- /dev/null +++ b/src/components/config.js @@ -0,0 +1,4 @@ +export class ZabbixAppConfigCtrl { + constructor() { } +} +ZabbixAppConfigCtrl.templateUrl = 'components/config.html'; diff --git a/src/datasource-zabbix/module.js b/src/datasource-zabbix/module.js index a7cc1d9..35bb3af 100644 --- a/src/datasource-zabbix/module.js +++ b/src/datasource-zabbix/module.js @@ -2,13 +2,13 @@ import {ZabbixAPIDatasource} from './datasource'; import {ZabbixQueryController} from './query.controller'; class ZabbixConfigController {} -ZabbixConfigController.templateUrl = 'partials/config.html'; +ZabbixConfigController.templateUrl = 'datasource-zabbix/partials/config.html'; class ZabbixQueryOptionsController {} -ZabbixQueryOptionsController.templateUrl = 'partials/query.options.html'; +ZabbixQueryOptionsController.templateUrl = 'datasource-zabbix/partials/query.options.html'; class ZabbixAnnotationsQueryController {} -ZabbixAnnotationsQueryController.templateUrl = 'partials/annotations.editor.html'; +ZabbixAnnotationsQueryController.templateUrl = 'datasource-zabbix/partials/annotations.editor.html'; export { ZabbixAPIDatasource as Datasource, diff --git a/src/datasource-zabbix/query.controller.js b/src/datasource-zabbix/query.controller.js index 3e270e1..d4a62f4 100644 --- a/src/datasource-zabbix/query.controller.js +++ b/src/datasource-zabbix/query.controller.js @@ -288,7 +288,7 @@ export class ZabbixQueryController extends QueryCtrl { } // Set templateUrl as static property -ZabbixQueryController.templateUrl = 'partials/query.editor.html'; +ZabbixQueryController.templateUrl = 'datasource-zabbix/partials/query.editor.html'; // Get list of metric names for bs-typeahead directive function getMetricNames(scope, metricList) { diff --git a/src/module.js b/src/module.js new file mode 100644 index 0000000..34ff163 --- /dev/null +++ b/src/module.js @@ -0,0 +1,5 @@ +import {ZabbixAppConfigCtrl} from './components/config'; + +export { + ZabbixAppConfigCtrl as ConfigCtrl +}; diff --git a/src/panel-triggers/module.js b/src/panel-triggers/module.js index 103b281..73d6afa 100644 --- a/src/panel-triggers/module.js +++ b/src/panel-triggers/module.js @@ -212,7 +212,7 @@ class TriggerPanelCtrl extends MetricsPanelCtrl { } } -TriggerPanelCtrl.templateUrl = 'module.html'; +TriggerPanelCtrl.templateUrl = 'panel-triggers/module.html'; function filterTriggers(triggers, triggerFilter) { if (isRegex(triggerFilter)) { diff --git a/src/plugin.json b/src/plugin.json new file mode 100644 index 0000000..fc35402 --- /dev/null +++ b/src/plugin.json @@ -0,0 +1,42 @@ +{ + "type": "app", + "name": "Zabbix App", + "id": "zabbix-app", + + "pages": [], + + "css": { + "dark": "css/dark.css", + "light": "css/light.css" + }, + + "info": { + "description": "Zabbix bundle for Grafana", + "author": { + "name": "Alexander Zobnin", + "url": "http://grafana-zabbix.org" + }, + "keywords": ["zabbix"], + "logos": { + "small": "/src/img/small_logo.png", + "large": "/src/img/large_logo.png" + }, + "links": [ + {"name": "Project site", "url": "https://github.com/alexanderzobnin/grafana-zabbix"}, + {"name": "License & Terms", "url": "https://github.com/alexanderzobnin/grafana-zabbix/blob/master/LICENSE.md"} + ], + "version": "1.0.0", + "updated": "2016-03-28" + }, + + "includes": [ + {"type": "dashboard", "name": "Example Zabbix Dashboard", "path": "dashboards/example_zabbix_dashboard.json"}, + {"type": "panel", "name": "Triggers Panel"}, + {"type": "datasource", "name": "Zabbix Datasource"} + ], + + "dependencies": { + "grafanaVersion": "3.x.x", + "plugins": [] + } +}