pgadmin4/web/pgadmin/tools/grant_wizard/static/js/privilege_schema.ui.js
Nikhil Mohite 7aa213a5ce 1) Port Grant Wizard to react. Fixes #6687
2) Fixed an issue where grant wizard is unresponsive if the database size is huge. Fixes #2097
2021-09-20 13:02:41 +05:30

35 lines
772 B
JavaScript

import gettext from 'sources/gettext';
import BaseUISchema from 'sources/SchemaView/base_schema.ui';
export default class PrivilegeSchema extends BaseUISchema {
constructor(getPrivilegeRoleSchema, fieldOptions = {}, initValues) {
super({
oid: null,
privilege: [],
...initValues
});
this.privilegeRoleSchema = getPrivilegeRoleSchema([]);
this.fieldOptions = {
...fieldOptions,
};
}
get idAttribute() {
return 'oid';
}
get baseFields() {
return [
{
id: 'privilege', label: gettext('Privileges'), type: 'collection',
schema: this.privilegeRoleSchema,
uniqueCol: ['grantee'],
editable: false, mode: ['create'],
canAdd: true, canDelete: true,
}
];
}
}