mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-08 08:26:08 +00:00
follouwp: reduce duplicate code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
abffa1a6dc
commit
e7c0216d2e
@ -293,16 +293,12 @@ Ext.define('PVE.storage.Upload', {
|
|||||||
if (xhr.responseText !== "") {
|
if (xhr.responseText !== "") {
|
||||||
var result = Ext.decode(xhr.responseText);
|
var result = Ext.decode(xhr.responseText);
|
||||||
result.message = msg;
|
result.message = msg;
|
||||||
var htmlStatus = Proxmox.Utils.extractRequestError(result, true);
|
msg = Proxmox.Utils.extractRequestError(result, true);
|
||||||
Ext.Msg.alert(gettext('Error'), htmlStatus, function(btn) {
|
}
|
||||||
me.close();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
Ext.Msg.alert(gettext('Error'), msg, function(btn) {
|
Ext.Msg.alert(gettext('Error'), msg, function(btn) {
|
||||||
me.close();
|
me.close();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
xhr.addEventListener("error", function(e) {
|
xhr.addEventListener("error", function(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user