mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 17:38:54 +00:00
Merge pull request #1851 from getredash/fix/alerts
Don't allow saving dashboard with empty name
This commit is contained in:
commit
fae1e7152a
@ -17,5 +17,5 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.dismiss()">Close</button>
|
||||
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress" ng-click="$ctrl.saveDashboard()">Save</button>
|
||||
<button type="button" class="btn btn-primary" ng-disabled="$ctrl.saveInProgress || !$ctrl.isFormValid()" ng-click="$ctrl.saveDashboard()">Save</button>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sortBy } from 'underscore';
|
||||
import { isEmpty, sortBy } from 'underscore';
|
||||
import template from './edit-dashboard-dialog.html';
|
||||
|
||||
const EditDashboardDialog = {
|
||||
@ -45,6 +45,8 @@ const EditDashboardDialog = {
|
||||
});
|
||||
}
|
||||
|
||||
this.isFormValid = () => !isEmpty(this.dashboard.name);
|
||||
|
||||
this.saveDashboard = () => {
|
||||
this.saveInProgress = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user