enhancement
major
minor
defect
critical
major
minor
major
#30059
Administration of the React UI: maintenance functions of the classic maintenance pages (database export/import/history compaction, SQL console, reload, search index, security storage, encryption)
Split off #30047. Follow-up to #29767, related: #29108, #30057, #30058.
Context
The administration of the React UI is admin/admin.view.xml of tl-layout-view (sections Access control, Monitoring, System; further sections contributed by same-path overlays, see the developer article view-layer/overlays).
The classic UI has the tab Administration -> Technical -> Maintenance pages (admin/technical/maintenancePages/maintenanceView.layout.xml). It lists every JSP in /jsp/administration/maintenance/ (MaintenanceTableModelBuilder) and shows the selected one in an IFRAME. The JSPs are tools of very different kinds (export of the database, raw SQL, reload of resources, test pages, templates). Most of them are a command with some input. The classic tab and its JSPs stay, they still serve the classic UI.
Feature
The still useful maintenance functions are available in the React administration. A function that is a command acting on something is a command where that something is shown, not a page of its own. A command with input opens a dialog.
System -> Database (new view):
- The state of the database: product and version, JDBC driver, SQL dialect, current revision and oldest revision kept in the history, each with its commit time.
- Export dump: downloads a dump of the whole database (gzipped XML). The dump leaves out the security storage and the runtime state of the installation (tables CLUSTER_NODE, CLUSTER_VALUE).
- Import dump: uploads a dump and shows its data version and the migration it needs. It converts the dump into an SQL script or an Oracle SQL*Loader script for download, or replaces the whole data of the application with it. Replacing requires an active maintenance window and a single running cluster node, is confirmed twice, runs while the persistency layer is restarted and keeps the runtime state of the installation (the maintenance window stays active).
- Compact history: dialog with a date (default one year ago), Analyze and Compact. Compacting requires an active maintenance window and a single running cluster node and is confirmed; it runs as a background job and restarts the persistency layer afterwards.
System -> SQL console (new view): SQL input, Execute query (result as table with the columns of the result, limited to a maximum number of rows), Execute update (with confirmation; the caches of the knowledge base do not see changed rows until the persistency layer is restarted), Simulate update (executed and rolled back), the statements executed in the window (activating one puts it back into the input), Clear history. The statements are written to the application log, the results are not.
System -> Reload (new view): the registered reloadable resources (ReloadableManager) with a filter, the command Reload for the selected ones. A failed reload is reported per entry with its reason.
System -> Services, detail page of a service: commands for one kind of service, shown only when the running service is of that kind (TL-Script serviceInstanceOf($module, '<class or interface>')). Further modules add commands for their services with a same-path overlay of admin/system/services/service-detail.view.xml (panel detail). The commands run as background jobs with a job status on the page.
- Indexing service: Rebuild index (with confirmation), Reindex types (dialog: types to index, only objects not yet indexed). Starting and stopping the index is starting and stopping the service.
- Access manager with security storage: Rebuild security storage (with confirmation).
System -> Secrets: Encrypt value and Decrypt value (dialog: value, format) for the two encrypted forms a configuration accepts: the configuration encryption ({gcm}..., every encrypted configuration property) and the RSA encoding of CryptSupport (LDAP master-credential, <crypt-support-secret>). Errors are reported without revealing the value; values are never logged.
Access control -> Accounts: column Last login (read for all accounts with one query). The export of the table writes date-time columns with their time of day.
Not ported
- Covered elsewhere: ActiveModules.jsp (System -> Services), CheckMemory.jsp (Monitoring -> Application), ReleaseMemory.jsp (memory chart, #30058), TriggerTask.jsp and ActivateMailServerDaemon.jsp (scheduler, #30057).
- Settings.jsp (runtime flags), the mail pages (SendTestMail.jsp, TestMailServer.jsp, TestMailConnect.jsp).
- Templates and test pages: Dummy.jsp, Migration_Template_DeleteAttributes.jsp, DeleteSpareWebfolders.jsp, FixWebFolders.jsp, TestJDBCAccess.jsp, PerformanceTest.jsp, benchmark/.
Fixed on the way
The functions above did not work reliably in a running application because of the following defects, which affect the classic UI as well:
- After a history compaction every change of an object last changed before the compaction failed as lost update until the next restart of the JVM: the compaction rewrites the start revision of the current rows, the cached objects still knew the old one. The cached objects are now adapted to the compaction (DBKnowledgeBase.historyCompacted).
- A dump written after a history compaction lacked all objects created in the compaction revision (ItemEventReader skipped them as branch copies of the trunk); importing it left an empty database.
- The restart of the persistency layer after a compaction or an import left the application unusable: the session service stopped ending sessions at the first failing logout, it did not invalidate the HTTP sessions (a still open window then used objects of the old knowledge base), and it ended them after the person manager had stopped. Instantiated React views kept model parts of the old knowledge base. Requests arriving during the restart got an error instead of the busy page (which now reloads itself until the application is available again).
- In a cluster, entering maintenance mode without delay waited the minimum waiting time of the cluster even if no other node was running.
- The dump left the security storage in although the documentation said otherwise; it also contained the runtime state of the installation, so that importing a dump restored the maintenance state of the moment of the export.
- <close-dialog> was ignored when it ran after an action that held the command (<start-job>, <confirm>, <verify-identity>), e.g. in the dialogs for changing the password and the deputies.
- A finished job kept showing its last progress message next to its result.
- ReloadableManager reported a failed reload only at INFO and without its reason.
Verification
tl-demo-react (/view/, root / root1234), Administration -> System -> Database / SQL console / Reload / Services (access manager; indexing service with tl-search-lucene) / Secrets, Administration -> Access control -> Accounts. Tests: TestHistoryCompaction, TestKBLoad, TestSqlFunctions, TestSecretFunctionsEncryption, TestReloadableManager, TestReloadableFunctions, TestAccountFunctions, TestColumnExport, TestSuspendedCommands, TestDatabaseState.
Migration
- Die View admin/system/logs.view.xml (Modul tl-layout-view) liegt jetzt unter admin/monitoring/logs.view.xml. Ein gleichnamiges Overlay einer Anwendung (WEB-INF/views/admin/system/logs.view.xml) oder ein <view-ref view="admin/system/logs.view.xml"/> muss auf den neuen Pfad umgestellt werden; ein Overlay auf den alten Pfad hat keine Basis mehr.