ui: login: cleanups, mostly openID related

similar to what was done in PVE.

 - factor out openid_login_param to widget-toolkit as
   getOpenIDRedirectionAuthorization and use it
 - use camel case to match our JS style guide and our framework (and
   basically the rest of the JS world)
 - minor cleanups like moving variable definition into the single if
   branch their used

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2021-07-03 01:46:20 +02:00
parent 1ce1a5e5cc
commit e1d85f1840
2 changed files with 17 additions and 26 deletions

View File

@ -326,14 +326,6 @@ Ext.define('PBS.Utils', {
};
},
openid_login_param: function() {
let param = Ext.Object.fromQueryString(window.location.search);
if (param.state !== undefined && param.code !== undefined) {
return param;
}
return undefined;
},
calculate_dedup_factor: function(gcstatus) {
let dedup = 1.0;
if (gcstatus['disk-bytes'] > 0) {