()
| 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 */ |
no test coverage detected