From 0583ec0f933874ae330f46fdbb44d50d5fc6b0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 1 Feb 2016 23:32:12 +0100 Subject: [PATCH] feat(plugins): more work on plugin directives and isolation --- public/app/core/directives/plugin_directive_loader.ts | 1 - public/app/features/datasources/edit_ctrl.js | 5 ++++- public/app/features/datasources/partials/edit.html | 2 -- public/app/plugins/datasource/graphite/partials/config.html | 3 ++- .../app/plugins/datasource/prometheus/partials/config.html | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/public/app/core/directives/plugin_directive_loader.ts b/public/app/core/directives/plugin_directive_loader.ts index b6abb91b065..4456afacbe1 100644 --- a/public/app/core/directives/plugin_directive_loader.ts +++ b/public/app/core/directives/plugin_directive_loader.ts @@ -56,7 +56,6 @@ function pluginDirectiveLoader($compile, datasourceSrv) { } function appendAndCompile(scope, elem, componentInfo) { - console.log('compile', elem, componentInfo); var child = angular.element(document.createElement(componentInfo.name)); _.each(componentInfo.attrs, (value, key) => { child.attr(key, value); diff --git a/public/app/features/datasources/edit_ctrl.js b/public/app/features/datasources/edit_ctrl.js index 2bd86e5f385..c3242f5b565 100644 --- a/public/app/features/datasources/edit_ctrl.js +++ b/public/app/features/datasources/edit_ctrl.js @@ -10,7 +10,10 @@ function (angular, _, config) { var datasourceTypes = []; module.directive('datasourceHttpSettings', function() { - return {templateUrl: 'public/app/features/datasources/partials/http_settings.html'}; + return { + scope: {current: "="}, + templateUrl: 'public/app/features/datasources/partials/http_settings.html' + }; }); module.controller('DataSourceEditCtrl', function($scope, $q, backendSrv, $routeParams, $location, datasourceSrv) { diff --git a/public/app/features/datasources/partials/edit.html b/public/app/features/datasources/partials/edit.html index 5b9facb83a8..c27be475bd5 100644 --- a/public/app/features/datasources/partials/edit.html +++ b/public/app/features/datasources/partials/edit.html @@ -46,8 +46,6 @@ - -
Testing....
Test results
diff --git a/public/app/plugins/datasource/graphite/partials/config.html b/public/app/plugins/datasource/graphite/partials/config.html index 9f5259cb2ea..d7a0f739ccb 100644 --- a/public/app/plugins/datasource/graphite/partials/config.html +++ b/public/app/plugins/datasource/graphite/partials/config.html @@ -1,2 +1,3 @@ - + + diff --git a/public/app/plugins/datasource/prometheus/partials/config.html b/public/app/plugins/datasource/prometheus/partials/config.html index 9f5259cb2ea..d7a0f739ccb 100644 --- a/public/app/plugins/datasource/prometheus/partials/config.html +++ b/public/app/plugins/datasource/prometheus/partials/config.html @@ -1,2 +1,3 @@ - + +