Changed getNodeListByName to add params obj in parameters.

This commit is contained in:
Aditya Toshniwal 2021-07-07 14:08:47 +05:30 committed by Akshay Joshi
parent 78ac1ee69c
commit 873deaa92d
3 changed files with 3 additions and 7 deletions

View File

@ -337,7 +337,7 @@ define('pgadmin.node.database', [
return res;
}),
spcname:
()=>getNodeListByName('tablespace', treeNodeInfo, itemNodeData, (m)=>{
()=>getNodeListByName('tablespace', treeNodeInfo, itemNodeData, {}, (m)=>{
return (m.label != 'pg_global');
}),
datcollate:

View File

@ -12,21 +12,19 @@ import BaseUISchema from 'sources/SchemaView/base_schema.ui';
import { getNodeListByName } from '../../../../static/js/node_ajax';
export function getNodePrivilegeRoleSchema(nodeObj, treeNodeInfo, itemNodeData, privileges) {
let keys = ['grantee', 'privileges', 'grantor'];
return new PrivilegeRoleSchema(
()=>getNodeListByName('role', treeNodeInfo, itemNodeData, ()=>true, (res)=>{
()=>getNodeListByName('role', treeNodeInfo, itemNodeData, {}, ()=>true, (res)=>{
res.unshift({label: 'PUBLIC', value: 'PUBLIC'});
return res;
}),
()=>getNodeListByName('role', treeNodeInfo, itemNodeData),
keys,
treeNodeInfo,
privileges
);
}
export default class PrivilegeRoleSchema extends BaseUISchema {
constructor(granteeOptions, grantorOptions, keys, nodeInfo, supportedPrivs) {
constructor(granteeOptions, grantorOptions, nodeInfo, supportedPrivs) {
super({
grantee: undefined,
grantor: nodeInfo?.server?.user?.name,
@ -36,7 +34,6 @@ export default class PrivilegeRoleSchema extends BaseUISchema {
this.grantorOptions = grantorOptions;
this.nodeInfo = nodeInfo;
this.supportedPrivs = supportedPrivs || [];
this.keys = keys;
}
get baseFields() {

View File

@ -16,7 +16,6 @@ export default class SecLabelSchema extends BaseUISchema {
provider: undefined,
label: undefined,
});
this.keys = ['provider', 'label'];
}
get baseFields() {