diff --git a/public/app/core/services/alert_srv.js b/public/app/core/services/alert_srv.js index d833a0667ac..70965d2947f 100644 --- a/public/app/core/services/alert_srv.js +++ b/public/app/core/services/alert_srv.js @@ -66,6 +66,7 @@ function (angular, _, coreModule) { scope.title = payload.title; scope.text = payload.text; + scope.text2 = payload.text2; scope.onConfirm = payload.onConfirm; scope.icon = payload.icon || "fa-check"; scope.yesText = payload.yesText || "Yes"; @@ -74,7 +75,7 @@ function (angular, _, coreModule) { var confirmModal = $modal({ template: 'public/app/partials/confirm_modal.html', persist: false, - modalClass: 'modal-no-header confirm-modal', + modalClass: 'confirm-modal', show: false, scope: scope, keyboard: false diff --git a/public/app/features/admin/adminListOrgsCtrl.js b/public/app/features/admin/adminListOrgsCtrl.js index c3f727191fc..d68e92955ee 100644 --- a/public/app/features/admin/adminListOrgsCtrl.js +++ b/public/app/features/admin/adminListOrgsCtrl.js @@ -20,8 +20,9 @@ function (angular) { $scope.deleteOrg = function(org) { $scope.appEvent('confirm-modal', { - title: 'Do you want to delete organization ' + org.name + '?', - text: 'All dashboards for this organization will be removed!', + title: 'Delete', + text: 'Do you want to delete organization ' + org.name + '?', + text2: 'All dashboards for this organization will be removed!', icon: 'fa-trash', yesText: 'Delete', onConfirm: function() { diff --git a/public/app/features/admin/adminListUsersCtrl.js b/public/app/features/admin/adminListUsersCtrl.js index c89deafaf0f..721adcfb98c 100644 --- a/public/app/features/admin/adminListUsersCtrl.js +++ b/public/app/features/admin/adminListUsersCtrl.js @@ -20,7 +20,8 @@ function (angular) { $scope.deleteUser = function(user) { $scope.appEvent('confirm-modal', { - title: 'Do you want to delete ' + user.login + '?', + title: 'Delete', + text: 'Do you want to delete ' + user.login + '?', icon: 'fa-trash', yesText: 'Delete', onConfirm: function() { diff --git a/public/app/features/dashboard/dashnav/dashnav.ts b/public/app/features/dashboard/dashnav/dashnav.ts index 6cddafc03b8..dcc2f40d0dc 100644 --- a/public/app/features/dashboard/dashnav/dashnav.ts +++ b/public/app/features/dashboard/dashnav/dashnav.ts @@ -108,8 +108,9 @@ export class DashNavCtrl { err.isHandled = true; $scope.appEvent('confirm-modal', { - title: 'Someone else has updated this dashboard!', - text: "Would you still like to save this dashboard?", + title: 'Conflict', + text: 'Someone else has updated this dashboard.', + text2: 'Would you still like to save this dashboard?', yesText: "Save & Overwrite", icon: "fa-warning", onConfirm: function() { @@ -122,8 +123,9 @@ export class DashNavCtrl { err.isHandled = true; $scope.appEvent('confirm-modal', { - title: 'Another dashboard with the same name exists', - text: "Would you still like to save this dashboard?", + title: 'Conflict', + text: 'Dashboard with the same name exists.', + text2: 'Would you still like to save this dashboard?', yesText: "Save & Overwrite", icon: "fa-warning", onConfirm: function() { @@ -135,7 +137,9 @@ export class DashNavCtrl { $scope.deleteDashboard = function() { $scope.appEvent('confirm-modal', { - title: 'Do you want to delete dashboard ' + $scope.dashboard.title + '?', + title: 'Delete dashboard', + text: 'Do you want to delete dashboard?', + text2: $scope.dashboard.title, icon: 'fa-trash', yesText: 'Delete', onConfirm: function() { diff --git a/public/app/features/dashboard/rowCtrl.js b/public/app/features/dashboard/rowCtrl.js index d7ccc22603f..ece5ebdfbf7 100644 --- a/public/app/features/dashboard/rowCtrl.js +++ b/public/app/features/dashboard/rowCtrl.js @@ -52,7 +52,8 @@ function (angular, _, config) { } $scope.appEvent('confirm-modal', { - title: 'Are you sure you want to delete this row?', + title: 'Delete', + text: 'Are you sure you want to delete this row?', icon: 'fa-trash', yesText: 'Delete', onConfirm: function() { diff --git a/public/app/features/dashboard/unsavedChangesSrv.js b/public/app/features/dashboard/unsavedChangesSrv.js index 0b9ef4e18f4..ffc82e198cd 100644 --- a/public/app/features/dashboard/unsavedChangesSrv.js +++ b/public/app/features/dashboard/unsavedChangesSrv.js @@ -140,7 +140,7 @@ function(angular, _) { $rootScope.appEvent('show-modal', { src: 'public/app/partials/unsaved-changes.html', - modalClass: 'modal-no-header confirm-modal', + modalClass: 'confirm-modal', scope: modalScope, }); }; diff --git a/public/app/features/datasources/list_ctrl.ts b/public/app/features/datasources/list_ctrl.ts index b1f93f1a158..d7b08dcd312 100644 --- a/public/app/features/datasources/list_ctrl.ts +++ b/public/app/features/datasources/list_ctrl.ts @@ -37,10 +37,10 @@ export class DataSourcesCtrl { removeDataSource(ds) { this.$scope.appEvent('confirm-modal', { - title: 'Confirm delete datasource', + title: 'Delete', text: 'Are you sure you want to delete datasource ' + ds.name + '?', yesText: "Delete", - icon: "fa-warning", + icon: "fa-trash", onConfirm: () => { this.removeDataSourceConfirmed(ds); } diff --git a/public/app/features/org/org_users_ctrl.ts b/public/app/features/org/org_users_ctrl.ts index 16c1cce268b..9e70328f345 100644 --- a/public/app/features/org/org_users_ctrl.ts +++ b/public/app/features/org/org_users_ctrl.ts @@ -38,7 +38,7 @@ export class OrgUsersCtrl { removeUser(user) { this.$scope.appEvent('confirm-modal', { - title: 'Confirm delete user', + title: 'Delete', text: 'Are you sure you want to delete user ' + user.login + '?', yesText: "Delete", icon: "fa-warning", diff --git a/public/app/features/panel/panel_ctrl.ts b/public/app/features/panel/panel_ctrl.ts index 87fdb2390fa..96c6e04e349 100644 --- a/public/app/features/panel/panel_ctrl.ts +++ b/public/app/features/panel/panel_ctrl.ts @@ -136,9 +136,10 @@ export class PanelCtrl { removePanel() { this.publishAppEvent('confirm-modal', { - title: 'Are you sure you want to remove this panel?', + title: 'Remove Panel', + text: 'Are you sure you want to remove this panel?', icon: 'fa-trash', - yesText: 'Delete', + yesText: 'Remove', onConfirm: () => { this.row.panels = _.without(this.row.panels, this.panel); } diff --git a/public/app/features/playlist/playlists_ctrl.ts b/public/app/features/playlist/playlists_ctrl.ts index 10d6d86d309..59758f0db1f 100644 --- a/public/app/features/playlist/playlists_ctrl.ts +++ b/public/app/features/playlist/playlists_ctrl.ts @@ -30,10 +30,10 @@ export class PlaylistsCtrl { removePlaylist(playlist) { this.$scope.appEvent('confirm-modal', { - title: 'Confirm delete playlist', + title: 'Delete', text: 'Are you sure you want to delete playlist ' + playlist.name + '?', yesText: "Delete", - icon: "fa-warning", + icon: "fa-trash", onConfirm: () => { this.removePlaylistConfirmed(playlist); } diff --git a/public/app/features/snapshot/snapshot_ctrl.ts b/public/app/features/snapshot/snapshot_ctrl.ts index 7b38f9ad8eb..7085c058046 100644 --- a/public/app/features/snapshot/snapshot_ctrl.ts +++ b/public/app/features/snapshot/snapshot_ctrl.ts @@ -27,10 +27,10 @@ export class SnapshotsCtrl { removeSnapshot(snapshot) { this.$rootScope.appEvent('confirm-modal', { - title: 'Confirm delete snapshot', + title: 'Delete', text: 'Are you sure you want to delete snapshot ' + snapshot.name + '?', yesText: "Delete", - icon: "fa-warning", + icon: "fa-trash", onConfirm: () => { this.removeSnapshotConfirmed(snapshot); } diff --git a/public/app/partials/confirm_modal.html b/public/app/partials/confirm_modal.html index 24802814be1..d9da8bdacc4 100644 --- a/public/app/partials/confirm_modal.html +++ b/public/app/partials/confirm_modal.html @@ -1,24 +1,30 @@