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

This commit is contained in:
Torkel Ödegaard 2016-03-12 00:16:08 +01:00
parent d2b0bad1cf
commit 28f4f3a8c8
2 changed files with 9 additions and 8 deletions

View File

@ -24,6 +24,7 @@ export class DataSourceEditCtrl {
datasourceMeta: any;
tabIndex: number;
hasDashboards: boolean;
editForm: any;
/** @ngInject */
constructor(
@ -114,7 +115,7 @@ export class DataSourceEditCtrl {
}
saveChanges(test) {
if (!this.$scope.editForm.$valid) {
if (!this.editForm.$valid) {
return;
}

View File

@ -25,7 +25,7 @@
<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">
<span class="gf-form-label width-7">Name</span>
@ -52,12 +52,12 @@
</plugin-component>
</rebuild-on-change>
<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>
<div class="alert-{{testing.status}} alert">
<div class="alert-title">{{testing.title}}</div>
<div ng-bind='testing.message'></div>
<div ng-if="ctrl.testing" style="margin-top: 25px">
<h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
<h5 ng-show="ctrl.testing.done">Test results</h5>
<div class="alert-{{ctrl.testing.status}} alert">
<div class="alert-title">{{ctrl.testing.title}}</div>
<div ng-bind='ctrl.testing.message'></div>
</div>
</div>