mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-13 16:05:47 +00:00

without this, we could not delete realms Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
31 lines
613 B
JavaScript
31 lines
613 B
JavaScript
Ext.define('pve-domains', {
|
|
extend: "Ext.data.Model",
|
|
fields: [
|
|
'realm', 'type', 'comment', 'default', 'tfa',
|
|
{
|
|
name: 'descr',
|
|
// Note: We use this in the RealmComboBox.js (see Bug #125)
|
|
convert: function(value, record) {
|
|
if (value) {
|
|
return value;
|
|
}
|
|
|
|
var info = record.data;
|
|
// return realm if there is no comment
|
|
var text = info.comment || info.realm;
|
|
|
|
if (info.tfa) {
|
|
text += " (+ " + info.tfa + ")";
|
|
}
|
|
|
|
return Ext.String.htmlEncode(text);
|
|
}
|
|
}
|
|
],
|
|
idProperty: 'realm',
|
|
proxy: {
|
|
type: 'proxmox',
|
|
url: "/api2/json/access/domains"
|
|
}
|
|
});
|