initial commit

This commit is contained in:
Erik Sundell
2018-11-22 18:22:15 +01:00
parent 1fb686cafa
commit eaf9a0b39a
5 changed files with 131 additions and 19 deletions

View File

@@ -0,0 +1,23 @@
import coreModule from 'app/core/core_module';
/** @ngInject */
export function metricsWrapperDirective() {
'use strict';
return {
restrict: 'E',
scope: true,
template: `<plugin-component type="query-ctrl"> </plugin-component>`,
link: $scope => {
$scope.panelCtrl = $scope.ctrl;
$scope.ctrl = $scope.panelCtrl;
$scope.panel = $scope.panelCtrl.panel;
$scope.panel.datasource = $scope.panel.datasource || null;
$scope.panel.targets = $scope.panel.targets || [{}];
$scope.events = $scope.panelCtrl.events;
$scope.refresh = $scope.panelCtrl.refresh;
$scope.dashboard = $scope.panelCtrl.dashboard;
},
};
}
coreModule.directive('metricsWrapper', metricsWrapperDirective);