mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
more progress on some experimental stuff
This commit is contained in:
@@ -30,6 +30,10 @@ function pluginDirectiveLoader($compile, datasourceSrv) {
|
||||
case "metrics-query-editor": {
|
||||
let datasource = scope.target.datasource || scope.ctrl.panel.datasource;
|
||||
return datasourceSrv.get(datasource).then(ds => {
|
||||
if (!scope.target.refId) {
|
||||
scope.target.refId = 'A';
|
||||
}
|
||||
|
||||
return System.import(ds.meta.module).then(dsModule => {
|
||||
return {
|
||||
name: 'metrics-query-editor-' + ds.meta.id,
|
||||
|
||||
@@ -3,24 +3,8 @@
|
||||
import angular from 'angular';
|
||||
import {GrafanaDatasource} from './datasource';
|
||||
|
||||
var module = angular.module('grafana.directives');
|
||||
|
||||
function grafanaMetricsQueryEditor() {
|
||||
return {templateUrl: 'app/plugins/datasource/grafana/partials/query.editor.html'};
|
||||
}
|
||||
|
||||
export class MetricsQueryEditor {
|
||||
panelCtrl: any;
|
||||
target: any;
|
||||
}
|
||||
|
||||
class GrafanaMetricsQueryEditor extends MetricsQueryEditor {
|
||||
class GrafanaMetricsQueryEditor {
|
||||
static templateUrl = 'app/plugins/datasource/grafana/partials/query.editor.html';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
console.log('this is a metrics editor', this.panelCtrl, this.target);
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="min-width: 15px; text-align: center">
|
||||
{{target.refId}}
|
||||
{{ctrl.target.refId}}
|
||||
</li>
|
||||
<li>
|
||||
<a class="tight-form-item" ng-click="target.hide = !target.hide; get_data();" role="menuitem">
|
||||
|
||||
Reference in New Issue
Block a user