mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 00:25:46 -06:00
26 lines
589 B
TypeScript
26 lines
589 B
TypeScript
///<reference path="../../headers/common.d.ts" />
|
|
|
|
import angular from 'angular';
|
|
|
|
/** @ngInject */
|
|
function dsConfigView(dynamicDirectiveSrv) {
|
|
return dynamicDirectiveSrv.create({
|
|
scope: {
|
|
dsMeta: "=",
|
|
current: "="
|
|
},
|
|
watchPath: "dsMeta.module",
|
|
directive: scope => {
|
|
return System.import(scope.dsMeta.module).then(function(dsModule) {
|
|
return {
|
|
name: 'ds-config-' + scope.dsMeta.id,
|
|
fn: dsModule.configView,
|
|
};
|
|
});
|
|
},
|
|
});
|
|
}
|
|
|
|
|
|
angular.module('grafana.directives').directive('dsConfigView', dsConfigView);
|