Merge branch 'app-zabbix' into develop

Conflicts:
	src/datasource-zabbix/plugin.json
	src/panel-triggers/plugin.json
This commit is contained in:
Alexander Zobnin
2016-03-31 19:24:18 +03:00
8 changed files with 73 additions and 5 deletions

View File

@@ -17,6 +17,8 @@ module.exports = function(grunt) {
'**/*', '**/*',
'!datasource-zabbix/*.js', '!datasource-zabbix/*.js',
'!panel-triggers/*.js', '!panel-triggers/*.js',
'!components/*.js',
'!module.js',
'!**/*.scss' '!**/*.scss'
], ],
dest: 'dist/' dest: 'dist/'
@@ -49,6 +51,8 @@ module.exports = function(grunt) {
src: [ src: [
'datasource-zabbix/*.js', 'datasource-zabbix/*.js',
'panel-triggers/*.js', 'panel-triggers/*.js',
'components/*.js',
'module.js',
], ],
dest: 'dist/' dest: 'dist/'
}] }]

View File

@@ -0,0 +1,13 @@
<h3 class="page-heading">Zabbix App Config</h3>
<div class="gf-form-group">
<div class="gf-form-inline">
<div class="gf-form">
<span class="gf-form-label">json Data property</span>
<input type="text" class="gf-form-input" ng-model="ctrl.appModel.jsonData.customText" >
</div>
<div class="gf-form">
<editor-checkbox text="Custom value" model="ctrl.appModel.jsonData.customCheckbox"></editor-checkbox>
</div>
</div>
</div>

4
src/components/config.js Normal file
View File

@@ -0,0 +1,4 @@
export class ZabbixAppConfigCtrl {
constructor() { }
}
ZabbixAppConfigCtrl.templateUrl = 'components/config.html';

View File

@@ -2,13 +2,13 @@ import {ZabbixAPIDatasource} from './datasource';
import {ZabbixQueryController} from './query.controller'; import {ZabbixQueryController} from './query.controller';
class ZabbixConfigController {} class ZabbixConfigController {}
ZabbixConfigController.templateUrl = 'partials/config.html'; ZabbixConfigController.templateUrl = 'datasource-zabbix/partials/config.html';
class ZabbixQueryOptionsController {} class ZabbixQueryOptionsController {}
ZabbixQueryOptionsController.templateUrl = 'partials/query.options.html'; ZabbixQueryOptionsController.templateUrl = 'datasource-zabbix/partials/query.options.html';
class ZabbixAnnotationsQueryController {} class ZabbixAnnotationsQueryController {}
ZabbixAnnotationsQueryController.templateUrl = 'partials/annotations.editor.html'; ZabbixAnnotationsQueryController.templateUrl = 'datasource-zabbix/partials/annotations.editor.html';
export { export {
ZabbixAPIDatasource as Datasource, ZabbixAPIDatasource as Datasource,

View File

@@ -288,7 +288,7 @@ export class ZabbixQueryController extends QueryCtrl {
} }
// Set templateUrl as static property // 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 // Get list of metric names for bs-typeahead directive
function getMetricNames(scope, metricList) { function getMetricNames(scope, metricList) {

5
src/module.js Normal file
View File

@@ -0,0 +1,5 @@
import {ZabbixAppConfigCtrl} from './components/config';
export {
ZabbixAppConfigCtrl as ConfigCtrl
};

View File

@@ -212,7 +212,7 @@ class TriggerPanelCtrl extends MetricsPanelCtrl {
} }
} }
TriggerPanelCtrl.templateUrl = 'module.html'; TriggerPanelCtrl.templateUrl = 'panel-triggers/module.html';
function filterTriggers(triggers, triggerFilter) { function filterTriggers(triggers, triggerFilter) {
if (isRegex(triggerFilter)) { if (isRegex(triggerFilter)) {

42
src/plugin.json Normal file
View File

@@ -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": []
}
}