mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
updated
This commit is contained in:
parent
f1efce56aa
commit
9c1217cd2c
@ -1,5 +0,0 @@
|
|||||||
<h2 class="text-center">
|
|
||||||
Test panel!
|
|
||||||
panel.id: {{ctrl.panel.id}}
|
|
||||||
data: {{ctrl.data}}
|
|
||||||
</h2>
|
|
@ -1,35 +0,0 @@
|
|||||||
///<reference path="../../../headers/common.d.ts" />
|
|
||||||
|
|
||||||
import {PanelDirective, MetricsPanelCtrl} from '../../../features/panel/panel';
|
|
||||||
|
|
||||||
function optionsTab() {
|
|
||||||
return {template: '<h2>options!</h2>' };
|
|
||||||
}
|
|
||||||
|
|
||||||
export class TestPanelCtrl extends MetricsPanelCtrl {
|
|
||||||
data: any;
|
|
||||||
|
|
||||||
constructor($scope, $injector) {
|
|
||||||
super($scope, $injector);
|
|
||||||
}
|
|
||||||
|
|
||||||
refreshData(data) {
|
|
||||||
return this.issueQueries().then(res => {
|
|
||||||
this.data = res.data[0].target;
|
|
||||||
console.log('issueQueries', res);
|
|
||||||
}).catch(err => {
|
|
||||||
console.log('Errrrr! in test panel', err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class TestPanel extends PanelDirective {
|
|
||||||
templateUrl = `app/plugins/panel/test/module.html`;
|
|
||||||
controller = TestPanelCtrl;
|
|
||||||
|
|
||||||
link(scope, elem) {
|
|
||||||
console.log('test panel linking:', scope);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export {TestPanel as Panel}
|
|
@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "panel",
|
|
||||||
"name": "Test",
|
|
||||||
"id": "test",
|
|
||||||
|
|
||||||
"info": {
|
|
||||||
"description": "Test panel",
|
|
||||||
"author": {
|
|
||||||
"name": "Core Grafana Team.",
|
|
||||||
"url": "http://grafana.org"
|
|
||||||
},
|
|
||||||
"logos": {
|
|
||||||
"icon": "fa fa-fw th-large",
|
|
||||||
"small": "img/logo_small.png",
|
|
||||||
"large": "img/logo_large.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -22,9 +22,7 @@ export class TextPanelCtrl extends PanelCtrl {
|
|||||||
|
|
||||||
initEditMode() {
|
initEditMode() {
|
||||||
this.icon = 'fa fa-text-width';
|
this.icon = 'fa fa-text-width';
|
||||||
this.addEditorTab('Options', () => {
|
this.addEditorTab('Options', 'public/app/plugins/panel/text/editor.html');
|
||||||
return { templateUrl: 'public/app/plugins/panel/text/editor.html' };
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh() {
|
refresh() {
|
||||||
|
Loading…
Reference in New Issue
Block a user