more progress on some experimental stuff

pull/3757/head
Torkel Ödegaard 9 years ago
parent 2f78584cdb
commit c843637a6a
  1. 4
      public/app/features/panel/query_editor.ts
  2. 18
      public/app/plugins/datasource/grafana/module.ts
  3. 2
      public/app/plugins/datasource/grafana/partials/query.editor.html

@ -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">

Loading…
Cancel
Save