pve-manager/www/manager6/data/model/Realm.js
Dominik Csapak 0f74857efe add missing idProperty for pve-domains model
without this, we could not delete realms

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-03-12 15:19:06 +01:00

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"
}
});