mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
ui: confirm dialog only when deleting key directories #521
This commit is contained in:
parent
99e572cffb
commit
d0994d2fce
@ -221,15 +221,14 @@ App.KvEditController = KvBaseController.extend({
|
||||
},
|
||||
|
||||
deleteKey: function() {
|
||||
|
||||
this.set('isLoading', true);
|
||||
|
||||
var controller = this;
|
||||
var dc = controller.get('dc').get('datacenter');
|
||||
var key = controller.get("model");
|
||||
var parent = controller.getParentKeyRoute();
|
||||
var token = App.get('settings.token');
|
||||
|
||||
if (window.confirm("Are you sure you want to delete this key?")) {
|
||||
// Delete the key
|
||||
Ember.$.ajax({
|
||||
url: (formatUrl("/v1/kv/" + key.get('Key'), dc, token)),
|
||||
@ -242,7 +241,6 @@ App.KvEditController = KvBaseController.extend({
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user