Issue #72 - changed plugin.json files and fixed templates path

for new plugin model. Can load plugins from any place.
This commit is contained in:
Alexander Zobnin
2015-12-28 14:00:03 +03:00
parent 72ad872397
commit acedb806d9
4 changed files with 20 additions and 10 deletions

View File

@@ -7,15 +7,15 @@ define([
var module = angular.module('grafana.directives'); var module = angular.module('grafana.directives');
module.directive('metricQueryEditorZabbix', function() { module.directive('metricQueryEditorZabbix', function() {
return {controller: 'ZabbixAPIQueryCtrl', templateUrl: 'app/plugins/datasource/zabbix/partials/query.editor.html'}; return {controller: 'ZabbixAPIQueryCtrl', templateUrl: 'public/plugins/zabbix/partials/query.editor.html'};
}); });
module.directive('metricQueryOptionsZabbix', function() { module.directive('metricQueryOptionsZabbix', function() {
return {templateUrl: 'app/plugins/datasource/zabbix/partials/query.options.html'}; return {templateUrl: 'public/plugins/zabbix/partials/query.options.html'};
}); });
module.directive('annotationsQueryEditorZabbix', function() { module.directive('annotationsQueryEditorZabbix', function() {
return {templateUrl: 'app/plugins/datasource/zabbix/partials/annotations.editor.html'}; return {templateUrl: 'public/plugins/zabbix/partials/annotations.editor.html'};
}); });
}); });

View File

@@ -5,10 +5,15 @@
"type": "zabbix", "type": "zabbix",
"serviceName": "ZabbixAPIDatasource", "serviceName": "ZabbixAPIDatasource",
"module": "app/plugins/datasource/zabbix/datasource", "module": "plugins/zabbix/datasource",
"partials": { "partials": {
"config": "app/plugins/datasource/zabbix/partials/config.html" "config": "public/plugins/zabbix/partials/config.html"
},
"staticRoot": {
"url": "zabbix",
"path": "."
}, },
"metrics": true, "metrics": true,

View File

@@ -18,7 +18,7 @@ define([
'jquery', 'jquery',
'app/core/config', 'app/core/config',
'app/features/panel/panel_meta', 'app/features/panel/panel_meta',
'app/plugins/datasource/zabbix/helperFunctions', '../zabbix/helperFunctions',
], ],
function (angular, app, _, $, config, PanelMeta) { function (angular, app, _, $, config, PanelMeta) {
'use strict'; 'use strict';
@@ -29,7 +29,7 @@ function (angular, app, _, $, config, PanelMeta) {
module.directive('grafanaPanelTriggers', function() { module.directive('grafanaPanelTriggers', function() {
return { return {
controller: 'TriggersPanelCtrl', controller: 'TriggersPanelCtrl',
templateUrl: 'app/plugins/panels/triggers/module.html', templateUrl: 'public/plugins/triggers/module.html',
}; };
}); });
@@ -42,7 +42,7 @@ function (angular, app, _, $, config, PanelMeta) {
fullscreen: true, fullscreen: true,
}); });
$scope.panelMeta.addEditorTab('Options', 'app/plugins/panels/triggers/editor.html'); $scope.panelMeta.addEditorTab('Options', 'public/plugins/triggers/editor.html');
$scope.ackFilters = [ $scope.ackFilters = [
'all triggers', 'all triggers',
@@ -257,7 +257,7 @@ function (angular, app, _, $, config, PanelMeta) {
popoverSrv.show({ popoverSrv.show({
element: el, element: el,
placement: 'top', placement: 'top',
templateUrl: 'app/plugins/panels/triggers/trigger.colorpicker.html', templateUrl: 'public/plugins/triggers/trigger.colorpicker.html',
scope: popoverScope scope: popoverScope
}); });
}; };

View File

@@ -4,5 +4,10 @@
"name": "Zabbix triggers", "name": "Zabbix triggers",
"type": "triggers", "type": "triggers",
"module": "app/plugins/panels/triggers/module" "module": "plugins/triggers/module",
"staticRoot": {
"url": "triggers",
"path": "."
}
} }