config_view.ts 589 B

12345678910111213141516171819202122232425
  1. ///<reference path="../../headers/common.d.ts" />
  2. import angular from 'angular';
  3. /** @ngInject */
  4. function dsConfigView(dynamicDirectiveSrv) {
  5. return dynamicDirectiveSrv.create({
  6. scope: {
  7. dsMeta: "=",
  8. current: "="
  9. },
  10. watchPath: "dsMeta.module",
  11. directive: scope => {
  12. return System.import(scope.dsMeta.module).then(function(dsModule) {
  13. return {
  14. name: 'ds-config-' + scope.dsMeta.id,
  15. fn: dsModule.configView,
  16. };
  17. });
  18. },
  19. });
  20. }
  21. angular.module('grafana.directives').directive('dsConfigView', dsConfigView);