mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 08:16:25 +00:00
www: use render_u2f_error from wtk
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
358d3efd1d
commit
d35665de6c
@ -1302,17 +1302,6 @@ Ext.define('PVE.Utils', {
|
|||||||
return Ext.htmlEncode(first + " " + last);
|
return Ext.htmlEncode(first + " " + last);
|
||||||
},
|
},
|
||||||
|
|
||||||
render_u2f_error: function(error) {
|
|
||||||
var ErrorNames = {
|
|
||||||
'1': gettext('Other Error'),
|
|
||||||
'2': gettext('Bad Request'),
|
|
||||||
'3': gettext('Configuration Unsupported'),
|
|
||||||
'4': gettext('Device Ineligible'),
|
|
||||||
'5': gettext('Timeout'),
|
|
||||||
};
|
|
||||||
return "U2F Error: " + ErrorNames[error] || Proxmox.Utils.unknownText;
|
|
||||||
},
|
|
||||||
|
|
||||||
windowHostname: function() {
|
windowHostname: function() {
|
||||||
return window.location.hostname.replace(Proxmox.Utils.IP6_bracket_match,
|
return window.location.hostname.replace(Proxmox.Utils.IP6_bracket_match,
|
||||||
function(m, addr, offset, original) { return addr; });
|
function(m, addr, offset, original) { return addr; });
|
||||||
|
@ -44,7 +44,7 @@ Ext.define('PVE.window.TFAEdit', {
|
|||||||
showError: function(error) {
|
showError: function(error) {
|
||||||
Ext.Msg.alert(
|
Ext.Msg.alert(
|
||||||
gettext('Error'),
|
gettext('Error'),
|
||||||
PVE.Utils.render_u2f_error(error),
|
Proxmox.Utils.render_u2f_error(error),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ Ext.define('PVE.window.LoginWindow', {
|
|||||||
msg.close();
|
msg.close();
|
||||||
if (res.errorCode) {
|
if (res.errorCode) {
|
||||||
Proxmox.Utils.authClear();
|
Proxmox.Utils.authClear();
|
||||||
Ext.Msg.alert(gettext('Error'), PVE.Utils.render_u2f_error(res.errorCode));
|
Ext.Msg.alert(gettext('Error'), Proxmox.Utils.render_u2f_error(res.errorCode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delete res.errorCode;
|
delete res.errorCode;
|
||||||
|
Loading…
Reference in New Issue
Block a user