From 39a6f4d6348ea67adc9a6d388bdc3614957c7ab1 Mon Sep 17 00:00:00 2001 From: StanZGenchev Date: Wed, 25 Mar 2026 16:01:25 +0200 Subject: [PATCH] Fixed Signed-off-by: StanZGenchev --- .../src/main/resources/platform-links.json | 4 + .../extension-services/editors.js | 2 +- .../extension-services/locales.js | 2 +- .../platform-core/extension-services/menus.js | 2 +- .../modules/perspectives.mjs | 2 +- .../extension-services/modules/shells.mjs | 2 +- .../extension-services/modules/views.mjs | 2 +- .../modules/window-menu.mjs | 2 +- .../extension-services/perspectives.js | 2 +- .../extension-services/shells.js | 2 +- .../extension-services/templates.js | 2 +- .../extension-services/themes.js | 2 +- .../platform-core/extension-services/views.js | 2 +- .../platform-core/services/clear-cache.js | 2 +- .../platform-core/services/user-name.js | 2 +- .../ui/jstree/indicator.plugin.js | 2 +- .../ui/platform/contextmenu-hub.js | 2 +- .../platform-core/ui/platform/contextmenu.js | 2 +- .../platform-core/ui/platform/dialog-hub.js | 2 +- .../platform-core/ui/platform/dialogs.js | 2 +- .../platform-core/ui/platform/editors.js | 2 +- .../platform-core/ui/platform/exports-hub.js | 28 +++++ .../platform-core/ui/platform/extensions.js | 2 +- .../platform-core/ui/platform/layout-hub.js | 2 +- .../platform-core/ui/platform/layout.js | 2 +- .../platform-core/ui/platform/locale.js | 2 +- .../platform-core/ui/platform/message-hub.js | 2 +- .../ui/platform/notification-hub.js | 2 +- .../platform-core/ui/platform/shell-hub.js | 2 +- .../platform-core/ui/platform/shell.js | 110 +++++++++++++++++- .../platform-core/ui/platform/shortcuts.js | 2 +- .../platform-core/ui/platform/split.js | 2 +- .../ui/platform/status-bar-hub.js | 2 +- .../platform-core/ui/platform/theming-hub.js | 2 +- .../platform-core/ui/platform/theming.js | 2 +- .../platform-core/ui/platform/user.js | 2 +- .../platform-core/ui/platform/view.js | 2 +- .../platform-core/ui/styles/jstree.css | 2 +- .../platform-core/ui/styles/layout.css | 2 +- .../platform-core/ui/styles/shell.css | 24 +++- .../platform-core/ui/styles/split.css | 2 +- .../platform-core/ui/templates/dialogs.html | 2 +- .../platform-core/ui/templates/header.html | 50 +++++++- .../platform-core/ui/templates/layout.html | 2 +- .../ui/templates/splitted-tabs.html | 2 +- .../dirigible/platform-core/utilities/view.js | 2 +- .../dashboard/translations/bg-BG/common.json | 16 ++- .../translations/en-US/common.json | 16 ++- .../dirigible/view-sql/configs/sql.js | 2 +- .../META-INF/dirigible/view-sql/js/sql.js | 99 +--------------- .../META-INF/dirigible/view-sql/sql.html | 36 +----- .../dirigible/view-sql/styles/sql.css | 29 +---- 52 files changed, 286 insertions(+), 210 deletions(-) create mode 100644 components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/exports-hub.js diff --git a/components/engine/engine-web/src/main/resources/platform-links.json b/components/engine/engine-web/src/main/resources/platform-links.json index f3063677c74..07903e16fc6 100644 --- a/components/engine/engine-web/src/main/resources/platform-links.json +++ b/components/engine/engine-web/src/main/resources/platform-links.json @@ -76,6 +76,10 @@ "type": "SCRIPT", "path": "/services/web/platform-core/ui/platform/dialogs.js" }, + { + "type": "SCRIPT", + "path": "/services/web/platform-core/ui/platform/exports-hub.js" + }, { "type": "SCRIPT", "path": "/services/web/platform-core/ui/platform/notification-hub.js" diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/editors.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/editors.js index 6e4096ec613..9dd58275440 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/editors.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/editors.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/locales.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/locales.js index 69a2fb6a4d6..117ca239bf2 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/locales.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/locales.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/menus.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/menus.js index b450e6f7cca..55f32b632eb 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/menus.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/menus.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/perspectives.mjs b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/perspectives.mjs index 00cb7da7796..e551ea444bf 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/perspectives.mjs +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/perspectives.mjs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/shells.mjs b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/shells.mjs index 910ddeb0366..1e45953a404 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/shells.mjs +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/shells.mjs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/views.mjs b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/views.mjs index 123b3a0d43b..3d8ac934b5e 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/views.mjs +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/views.mjs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/window-menu.mjs b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/window-menu.mjs index 4e307fb924e..77272d82480 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/window-menu.mjs +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/modules/window-menu.mjs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/perspectives.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/perspectives.js index 33fefd3f6de..50586de2d35 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/perspectives.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/perspectives.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/shells.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/shells.js index 4988a5fc6bb..b76f782b00a 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/shells.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/shells.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/templates.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/templates.js index 7bae35834a8..78dac37389d 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/templates.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/templates.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/themes.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/themes.js index 3485ffcf770..68cdb38ef18 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/themes.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/themes.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/views.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/views.js index 94826bb8651..96219c33f5f 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/views.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/extension-services/views.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/clear-cache.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/clear-cache.js index 209e25b6b46..15a2b17f423 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/clear-cache.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/clear-cache.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/user-name.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/user-name.js index 512f8cb30a4..38e78813697 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/user-name.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/services/user-name.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/jstree/indicator.plugin.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/jstree/indicator.plugin.js index 4eb50769a35..5294c401731 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/jstree/indicator.plugin.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/jstree/indicator.plugin.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu-hub.js index 76df328ca43..4713f959144 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu.js index 5cffaea0744..bcc7b38c93b 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/contextmenu.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialog-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialog-hub.js index a9f5f9807d0..eb9380ced67 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialog-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialog-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialogs.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialogs.js index 8817417e9fb..cc164707a1a 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialogs.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/dialogs.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/editors.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/editors.js index 65b4cf02c7e..c2f51351227 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/editors.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/editors.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/exports-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/exports-hub.js new file mode 100644 index 00000000000..e2eafc7f06c --- /dev/null +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/exports-hub.js @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2010-2026 Eclipse Dirigible contributors + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v20.html + * + * SPDX-FileCopyrightText: Eclipse Dirigible contributors + * SPDX-License-Identifier: EPL-2.0 + */ +class ExportsHub extends MessageHubApi { + /** + * Event to refresh the exports list. + */ + refresh() { + this.triggerEvent('platform.shell.exports.refresh'); + } + + /** + * Triggered when the exports should be refreshed. + * @param handler - Callback function. + * @returns - A reference to the listener. In order to remove/disable the listener, you need to use this reference and pass it to the 'removeMessageListener' function. + */ + onRefresh(handler) { + return this.addMessageListener({ topic: 'platform.shell.exports.refresh', handler: handler }); + } +} \ No newline at end of file diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/extensions.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/extensions.js index 606c4e43c04..9f3a9c1a7fb 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/extensions.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/extensions.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout-hub.js index 28b3e8a19b6..cea41540f75 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout.js index 0853e9150ba..edeaae4eca6 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/layout.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/locale.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/locale.js index 798f32ef300..e43d6cf65e0 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/locale.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/locale.js @@ -1,6 +1,6 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/message-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/message-hub.js index 3a7800fa32c..96ef285f452 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/message-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/message-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/notification-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/notification-hub.js index 26c43ad7fb0..e5ef6250641 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/notification-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/notification-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell-hub.js index db0c43d85b4..a31d0ba3765 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell.js index c2df95088f6..7e600e51dd4 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shell.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -64,13 +64,23 @@ if (window !== top) { $compileProvider.debugInfoEnabled(false); $compileProvider.commentDirectivesEnabled(false); $compileProvider.cssClassDirectivesEnabled(false); - }).directive('shellHeader', ($window, User, Extensions, shellState, notifications, MessageHub, Shell) => ({ + }).directive('shellHeader', ($window, $timeout, $http, User, Extensions, shellState, notifications, MessageHub, Shell, LocaleService) => ({ restrict: 'E', replace: true, link: (scope, element) => { + let exportButton; scope.branding = getBrandingInfo(); const notificationStateKey = `${scope.branding.prefix}.notifications`; const dialogHub = new DialogHub(); + const exportsHub = new ExportsHub(); + const DB_EXPORT_SERVICE_URL = '/services/data/export-async/'; + scope.EXPORT_BASE_URL = '/public/cms/__EXPORTS/'; + scope.ExportStatus = { + TRIGGRED: 'TRIGGRED', + FINISHED: 'FINISHED', + FAILED: 'FAILED', + UNKNOWN: 'UNKNOWN' + }; scope.perspectiveId = shellState.perspective.id; shellState.registerStateListener((data) => { scope.perspectiveId = data.id; @@ -85,6 +95,7 @@ if (window !== top) { scope.saveNotifications = () => { localStorage.setItem(notificationStateKey, JSON.stringify(scope.notifications)); }; + scope.exports = []; scope.selectedNotification = ''; scope.username = undefined; User.getName().then((data) => { @@ -186,9 +197,104 @@ if (window !== top) { return true; }; + scope.deleteExport = (id) => { + $http({ + method: 'DELETE', + url: DB_EXPORT_SERVICE_URL + encodeURIComponent(id), + headers: { 'X-Requested-With': 'Fetch' } + }).then(() => { + for (let i = 0; i < scope.exports.length; i++) { + if (scope.exports[i].id === id) { + scope.exports.splice(i, 1); + break; + } + } + }, (reject) => { + dialogHub.showAlert({ + type: AlertTypes.Error, + title: LocaleService.t('exports.error.delTitle', 'Could not delete export'), + message: LocaleService.t('exports.error.genericMsg', 'Please check the console log for more information.'), + }); + console.error(reject); + }); + }; + + scope.deleteExports = () => { + $http({ + method: 'DELETE', + url: DB_EXPORT_SERVICE_URL, + headers: { 'X-Requested-With': 'Fetch' } + }).then(() => { + scope.exports.length = 0; + }, (reject) => { + dialogHub.showAlert({ + type: AlertTypes.Error, + title: LocaleService.t('exports.error.delTitle', 'Could not delete export'), + message: LocaleService.t('exports.error.genericMsg', 'Please check the console log for more information.'), + }); + console.error(reject); + }); + }; + + scope.getExportDate = (date) => { + return new Intl.DateTimeFormat(undefined, { + dateStyle: 'short', + timeStyle: 'short', + }).format(new Date(date)); + }; + scope.logout = () => { location.replace('/logout'); }; + + let to = 0; + function getExports(open = true) { + if (to) $timeout.cancel(to); + $http({ + method: 'GET', + url: DB_EXPORT_SERVICE_URL, + headers: { 'X-Requested-With': 'Fetch' } + }).then((result) => { + scope.exports.length = 0; + scope.exports.push(...result.data.reverse()); + if (open) { + scope.$evalAsync(() => { + if (!exportButton) exportButton = element[0].querySelector(`#exports`); + exportButton.focus(); + exportButton.click(); + }); + } + if (open && !scope.exports.length) { + to = $timeout(() => { getExports(false) }, 500); + } else { + for (let i = 0; i < scope.exports.length; i++) { + if (scope.exports[i].status === scope.ExportStatus.TRIGGRED) { + to = $timeout(() => { getExports(false) }, 2000); + break; + } + } + } + }, (reject) => { + dialogHub.showAlert({ + type: AlertTypes.Error, + title: LocaleService.t('exports.error.fetchTitle', 'Could not get export list'), + message: LocaleService.t('exports.error.genericMsg', 'Please check the console log for more information.'), + }); + console.error(reject); + }); + } + + LocaleService.onInit(() => { + getExports(false); + }); + + const exportListener = exportsHub.onRefresh(() => { + getExports(true); + }); + + scope.$on('$destroy', () => { + exportsHub.removeMessageListener(exportListener); + }); }, templateUrl: '/services/web/platform-core/ui/templates/header.html', })).directive('submenu', () => ({ diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shortcuts.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shortcuts.js index caaf34a4e78..911918f4058 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shortcuts.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/shortcuts.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/split.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/split.js index 2eab42e5dbd..e474cf29781 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/split.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/split.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/status-bar-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/status-bar-hub.js index a96a4ad4322..4b77f7feff9 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/status-bar-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/status-bar-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming-hub.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming-hub.js index 8ab3f20357b..0fb6bae31d7 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming-hub.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming-hub.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming.js index f00bb42c8a2..0cb56f8d0f3 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/theming.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/user.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/user.js index 862f88c7d3c..da84255af46 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/user.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/user.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/view.js b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/view.js index 8afe4336051..1d6d9d5e4ef 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/view.js +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/platform/view.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2025 Eclipse Dirigible contributors + * Copyright (c) 2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/jstree.css b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/jstree.css index 1f0572139bf..e76df812042 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/jstree.css +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/jstree.css @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/layout.css b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/layout.css index 145fa5d1a72..3e39ce9eb22 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/layout.css +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/layout.css @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/shell.css b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/shell.css index 8eea2ef0b59..69e516c923a 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/shell.css +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/shell.css @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -196,7 +196,7 @@ body { background-color: var(--sapButton_Attention_Background, #e97119); } -/* Notification overlay */ +/* Notification and Exports overlay */ .notification-overlay { position: fixed; width: 100%; @@ -229,4 +229,24 @@ body { -webkit-line-clamp: none; line-clamp: none; max-height: none; +} + +.notification-popover [bk-list-button]:first-of-type { + margin-left: 0.5rem; +} + +.notification-popover span.bk-center { + width: 3rem; + height: 3rem; + margin-inline-end: .75rem; +} + +.notification-popover li:last-child { + border-bottom: none !important; +} + +.notification-popover .is-error-message { + color: var(--sapNegativeColor) !important; + word-wrap: break-word; + white-space: wrap; } \ No newline at end of file diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/split.css b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/split.css index f1464f9fda6..c83b12a7a6d 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/split.css +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/styles/split.css @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2025 Eclipse Dirigible contributors + * Copyright (c) 2010-2026 Eclipse Dirigible contributors * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 diff --git a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/templates/dialogs.html b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/templates/dialogs.html index 8caa4e22c6a..1d6c8acc2d8 100644 --- a/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/templates/dialogs.html +++ b/components/resources/platform-core/src/main/resources/META-INF/dirigible/platform-core/ui/templates/dialogs.html @@ -1,6 +1,6 @@