| 105 | |
| 106 | |
| 107 | class BrowserModule(PgAdminModule): |
| 108 | LABEL = gettext('Browser') |
| 109 | |
| 110 | def register_preferences(self): |
| 111 | register_browser_preferences(self) |
| 112 | register_editor_preferences(self) |
| 113 | |
| 114 | def get_exposed_url_endpoints(self): |
| 115 | """ |
| 116 | Returns: |
| 117 | list: a list of url endpoints exposed to the client. |
| 118 | """ |
| 119 | return [BROWSER_INDEX, 'browser.nodes', |
| 120 | 'browser.check_corrupted_db_file', |
| 121 | 'browser.check_master_password', |
| 122 | 'browser.set_master_password', |
| 123 | 'browser.reset_master_password', |
| 124 | ] |
| 125 | |
| 126 | def register(self, app, options): |
| 127 | """ |
| 128 | Override the default register function to automagically register |
| 129 | sub-modules at once. |
| 130 | """ |
| 131 | from .server_groups import blueprint as module |
| 132 | self.submodules.append(module) |
| 133 | super().register(app, options) |
| 134 | |
| 135 | |
| 136 | blueprint = BrowserModule(MODULE_NAME, __name__) |