Commit 28f4f3a8 by Torkel Ödegaard

fix(datasource edit): Editing datasources broken earlier today, fixes #4343

parent d2b0bad1
...@@ -24,6 +24,7 @@ export class DataSourceEditCtrl { ...@@ -24,6 +24,7 @@ export class DataSourceEditCtrl {
datasourceMeta: any; datasourceMeta: any;
tabIndex: number; tabIndex: number;
hasDashboards: boolean; hasDashboards: boolean;
editForm: any;
/** @ngInject */ /** @ngInject */
constructor( constructor(
...@@ -114,7 +115,7 @@ export class DataSourceEditCtrl { ...@@ -114,7 +115,7 @@ export class DataSourceEditCtrl {
} }
saveChanges(test) { saveChanges(test) {
if (!this.$scope.editForm.$valid) { if (!this.editForm.$valid) {
return; return;
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div ng-if="ctrl.tabIndex === 0" class="tab-content"> <div ng-if="ctrl.tabIndex === 0" class="tab-content">
<form name="editForm"> <form name="ctrl.editForm">
<div class="gf-form-group"> <div class="gf-form-group">
<div class="gf-form"> <div class="gf-form">
<span class="gf-form-label width-7">Name</span> <span class="gf-form-label width-7">Name</span>
...@@ -52,12 +52,12 @@ ...@@ -52,12 +52,12 @@
</plugin-component> </plugin-component>
</rebuild-on-change> </rebuild-on-change>
<div ng-if="testing" style="margin-top: 25px"> <div ng-if="ctrl.testing" style="margin-top: 25px">
<h5 ng-show="!testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5> <h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
<h5 ng-show="testing.done">Test results</h5> <h5 ng-show="ctrl.testing.done">Test results</h5>
<div class="alert-{{testing.status}} alert"> <div class="alert-{{ctrl.testing.status}} alert">
<div class="alert-title">{{testing.title}}</div> <div class="alert-title">{{ctrl.testing.title}}</div>
<div ng-bind='testing.message'></div> <div ng-bind='ctrl.testing.message'></div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment