mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-11 21:29:58 +00:00
apt repos: make add-repo a checked command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
994fe897b7
commit
0e79ce21c1
@ -438,25 +438,27 @@ Ext.define('Proxmox.node.APTRepositories', {
|
|||||||
disabled: status !== undefined && status !== null,
|
disabled: status !== undefined && status !== null,
|
||||||
repoHandle: handle,
|
repoHandle: handle,
|
||||||
handler: function(menuItem) {
|
handler: function(menuItem) {
|
||||||
let params = {
|
Proxmox.Utils.checked_command(() => {
|
||||||
handle: menuItem.repoHandle,
|
let params = {
|
||||||
};
|
handle: menuItem.repoHandle,
|
||||||
|
};
|
||||||
|
|
||||||
if (me.digest !== undefined) {
|
if (me.digest !== undefined) {
|
||||||
params.digest = me.digest;
|
params.digest = me.digest;
|
||||||
}
|
}
|
||||||
|
|
||||||
Proxmox.Utils.API2Request({
|
Proxmox.Utils.API2Request({
|
||||||
url: `/nodes/${me.nodename}/apt/repositories`,
|
url: `/nodes/${me.nodename}/apt/repositories`,
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
params: params,
|
params: params,
|
||||||
failure: function(response, opts) {
|
failure: function(response, opts) {
|
||||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||||
me.reload();
|
me.reload();
|
||||||
},
|
},
|
||||||
success: function(response, opts) {
|
success: function(response, opts) {
|
||||||
me.reload();
|
me.reload();
|
||||||
},
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user