MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / init

Method init

web/pgadmin/tools/erd/static/js/ERDModule.js:45–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43
44
45 init() {
46 if (this.initialized)
47 return;
48
49 this.initialized = true;
50
51 // Define the nodes on which the menus to be appear
52 this.pgBrowser.add_menus([{
53 name: 'erd',
54 module: this,
55 applies: ['tools'],
56 callback: 'showErdTool',
57 priority: 1,
58 label: gettext('ERD Tool'),
59 enable: this.erdToolEnabled,
60 data: {
61 data_disabled: gettext('The selected tree node does not support this option.'),
62 },
63 permission: AllPermissionTypes.TOOLS_ERD_TOOL,
64 }]);
65 return this;
66 }
67
68 erdToolEnabled(obj) {
69 /* Same as query tool */

Callers 1

loadComponentMethod · 0.45

Calls 1

gettextFunction · 0.85

Tested by

no test coverage detected