feat(plugins): more work on plugin directives and isolation

This commit is contained in:
Torkel Ödegaard 2016-02-01 23:32:12 +01:00
parent 12f487e223
commit 0583ec0f93
5 changed files with 8 additions and 6 deletions

View File

@ -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);

View File

@ -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) {

View File

@ -46,8 +46,6 @@
</plugin-directive-loader>
</div>
<!-- <ds&#45;config&#45;view ds&#45;meta="datasourceMeta" current="current"></ds&#45;config&#45;view> -->
<div ng-if="testing" style="margin-top: 25px">
<h5 ng-show="!testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
<h5 ng-show="testing.done">Test results</h5>

View File

@ -1,2 +1,3 @@
<datasource-http-settings></datasource-http-settings>
<datasource-http-settings current="ctrl.current">
</datasource-http-settings>

View File

@ -1,2 +1,3 @@
<datasource-http-settings></datasource-http-settings>
<datasource-http-settings current="ctrl.current">
</datasource-http-settings>