From 0e5d12ec236444c51219cf31161a4e35e6a5fb8c Mon Sep 17 00:00:00 2001 From: StanZGenchev Date: Tue, 31 Dec 2024 16:20:40 +0200 Subject: [PATCH] Migrated all views in the operations perspective, extensions service, publish and unpublish actions Signed-off-by: StanZGenchev --- components/group/group-platform-ide/pom.xml | 40 ++ .../dirigible/ide-registry/js/registry.js | 1 - .../dirigible/editor-monaco/js/editor.js | 3 +- .../service-extensions/.gitignore | 17 + .../service-extensions/about.html | 29 + .../platform-ide/service-extensions/pom.xml | 20 + .../service-extensions/extensionPoints.mjs | 22 + .../dirigible/service-extensions/project.json | 5 + .../view-artefacts/configs/artefacts-view.js | 4 +- .../view-data-structures/.gitignore | 17 + .../view-data-structures/about.html | 29 + .../platform-ide/view-data-structures/pom.xml | 20 + .../configs/tables-view.js | 22 + .../configs/views-view.js | 22 + .../extensions/tables.extension | 5 + .../extensions/views.extension | 5 + .../view-data-structures/project.json | 3 + .../view-data-structures/tables.html | 63 ++ .../dirigible/view-data-structures/views.html | 63 ++ .../platform-ide/view-extensions/.gitignore | 17 + .../platform-ide/view-extensions/about.html | 29 + .../platform-ide/view-extensions/pom.xml | 20 + .../configs/extensions-view.js | 22 + .../dirigible/view-extensions/extensions.html | 61 ++ .../extensions/extensions.extension | 5 + .../dirigible/view-extensions/project.json | 5 + .../view-git-projects/git-projects.html | 21 +- .../view-git-projects/js/git-projects.js | 6 +- components/platform-ide/view-jobs/.gitignore | 17 + components/platform-ide/view-jobs/about.html | 29 + components/platform-ide/view-jobs/pom.xml | 20 + .../view-jobs/configs/job-assign-window.js | 19 + .../view-jobs/configs/job-logs-window.js | 19 + .../view-jobs/configs/job-trigger-window.js | 19 + .../dirigible/view-jobs/configs/jobs-view.js | 22 + .../view-jobs/dialogs/job-assign.html | 106 ++++ .../dirigible/view-jobs/dialogs/job-logs.html | 140 +++++ .../view-jobs/dialogs/job-trigger.html | 165 +++++ .../view-jobs/extensions/job-assign.extension | 5 + .../view-jobs/extensions/job-logs.extension | 5 + .../extensions/job-trigger.extension | 5 + .../view-jobs/extensions/jobs.extension | 5 + .../META-INF/dirigible/view-jobs/jobs.html | 74 +++ .../META-INF/dirigible/view-jobs/js/jobs.js | 87 +++ .../META-INF/dirigible/view-jobs/project.json | 5 + .../platform-ide/view-listeners/.gitignore | 17 + .../platform-ide/view-listeners/about.html | 29 + .../platform-ide/view-listeners/pom.xml | 20 + .../view-listeners/configs/listeners-view.js | 22 + .../extensions/listeners.extension | 5 + .../dirigible/view-listeners/listeners.html | 65 ++ .../dirigible/view-listeners/project.json | 5 + .../platform-ide/view-loggers/.gitignore | 17 + .../platform-ide/view-loggers/about.html | 29 + components/platform-ide/view-loggers/pom.xml | 20 + .../view-loggers/configs/loggers-view.js | 22 + .../view-loggers/extensions/loggers.extension | 5 + .../dirigible/view-loggers/js/loggers.js | 96 +++ .../dirigible/view-loggers/loggers.html | 101 +++ .../dirigible/view-loggers/project.json | 5 + components/platform-ide/view-logs/.gitignore | 17 + components/platform-ide/view-logs/about.html | 29 + components/platform-ide/view-logs/pom.xml | 20 + .../dirigible/view-logs/configs/logs-view.js | 22 + .../view-logs/extensions/logs.extension | 5 + .../META-INF/dirigible/view-logs/js/logs.js | 32 + .../META-INF/dirigible/view-logs/logs.html | 38 ++ .../META-INF/dirigible/view-logs/project.json | 5 + .../dirigible/view-projects/js/projects.js | 8 + .../dirigible/view-projects/projects.html | 30 +- .../platform-ide/view-registry/.gitignore | 17 + .../platform-ide/view-registry/about.html | 29 + components/platform-ide/view-registry/pom.xml | 20 + .../view-registry/configs/registry-view.js | 21 + .../extensions/registry-view.extension | 5 + .../workspace-after-publish.extension | 2 +- .../workspace-after-unpublish.extension | 2 +- .../dirigible/view-registry/js/registry.js | 574 +++++++++++++++++ .../dirigible/view-registry/project.json | 5 + .../dirigible/view-registry/registry.html | 51 ++ .../services/compile-typescript.js | 0 .../services/unpublish-typescript.js | 0 .../platform-ide/view-repository/.gitignore | 17 + .../platform-ide/view-repository/about.html | 29 + .../platform-ide/view-repository/pom.xml | 20 + .../configs/repository-view.js | 21 + .../extensions/repository.extension | 5 + .../view-repository/js/repository.js | 585 ++++++++++++++++++ .../dirigible/view-repository/project.json | 5 + .../dirigible/view-repository/repository.html | 54 ++ .../platform-ide/view-websockets/.gitignore | 17 + .../platform-ide/view-websockets/about.html | 29 + .../platform-ide/view-websockets/pom.xml | 20 + .../configs/websockets-view.js | 22 + .../extensions/websockets.extension | 5 + .../dirigible/view-websockets/project.json | 5 + .../dirigible/view-websockets/websockets.html | 61 ++ components/pom.xml | 60 ++ 98 files changed, 3621 insertions(+), 42 deletions(-) create mode 100644 components/platform-ide/service-extensions/.gitignore create mode 100644 components/platform-ide/service-extensions/about.html create mode 100644 components/platform-ide/service-extensions/pom.xml create mode 100644 components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/extensionPoints.mjs create mode 100644 components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/project.json create mode 100644 components/platform-ide/view-data-structures/.gitignore create mode 100644 components/platform-ide/view-data-structures/about.html create mode 100644 components/platform-ide/view-data-structures/pom.xml create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/tables-view.js create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/views-view.js create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/tables.extension create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/views.extension create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/project.json create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/tables.html create mode 100644 components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/views.html create mode 100644 components/platform-ide/view-extensions/.gitignore create mode 100644 components/platform-ide/view-extensions/about.html create mode 100644 components/platform-ide/view-extensions/pom.xml create mode 100644 components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/configs/extensions-view.js create mode 100644 components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions.html create mode 100644 components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions/extensions.extension create mode 100644 components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/project.json create mode 100644 components/platform-ide/view-jobs/.gitignore create mode 100644 components/platform-ide/view-jobs/about.html create mode 100644 components/platform-ide/view-jobs/pom.xml create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-assign-window.js create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-logs-window.js create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-trigger-window.js create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/jobs-view.js create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-assign.html create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-logs.html create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-trigger.html create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-assign.extension create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-logs.extension create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-trigger.extension create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/jobs.extension create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/jobs.html create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/js/jobs.js create mode 100644 components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/project.json create mode 100644 components/platform-ide/view-listeners/.gitignore create mode 100644 components/platform-ide/view-listeners/about.html create mode 100644 components/platform-ide/view-listeners/pom.xml create mode 100644 components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/configs/listeners-view.js create mode 100644 components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/extensions/listeners.extension create mode 100644 components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/listeners.html create mode 100644 components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/project.json create mode 100644 components/platform-ide/view-loggers/.gitignore create mode 100644 components/platform-ide/view-loggers/about.html create mode 100644 components/platform-ide/view-loggers/pom.xml create mode 100644 components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/configs/loggers-view.js create mode 100644 components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/extensions/loggers.extension create mode 100644 components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/js/loggers.js create mode 100644 components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/loggers.html create mode 100644 components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/project.json create mode 100644 components/platform-ide/view-logs/.gitignore create mode 100644 components/platform-ide/view-logs/about.html create mode 100644 components/platform-ide/view-logs/pom.xml create mode 100644 components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/configs/logs-view.js create mode 100644 components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/extensions/logs.extension create mode 100644 components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/js/logs.js create mode 100644 components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/logs.html create mode 100644 components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/project.json create mode 100644 components/platform-ide/view-registry/.gitignore create mode 100644 components/platform-ide/view-registry/about.html create mode 100644 components/platform-ide/view-registry/pom.xml create mode 100644 components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/configs/registry-view.js create mode 100644 components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/registry-view.extension rename components/{ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry => platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry}/extensions/workspace-after-publish.extension (60%) rename components/{ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry => platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry}/extensions/workspace-after-unpublish.extension (60%) create mode 100644 components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/js/registry.js create mode 100644 components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/project.json create mode 100644 components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/registry.html rename components/{ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry => platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry}/services/compile-typescript.js (100%) rename components/{ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry => platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry}/services/unpublish-typescript.js (100%) create mode 100644 components/platform-ide/view-repository/.gitignore create mode 100644 components/platform-ide/view-repository/about.html create mode 100644 components/platform-ide/view-repository/pom.xml create mode 100644 components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/configs/repository-view.js create mode 100644 components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/extensions/repository.extension create mode 100644 components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/js/repository.js create mode 100644 components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/project.json create mode 100644 components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/repository.html create mode 100644 components/platform-ide/view-websockets/.gitignore create mode 100644 components/platform-ide/view-websockets/about.html create mode 100644 components/platform-ide/view-websockets/pom.xml create mode 100644 components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/configs/websockets-view.js create mode 100644 components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/extensions/websockets.extension create mode 100644 components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/project.json create mode 100644 components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/websockets.html diff --git a/components/group/group-platform-ide/pom.xml b/components/group/group-platform-ide/pom.xml index 7255940bf52..2635ad33873 100644 --- a/components/group/group-platform-ide/pom.xml +++ b/components/group/group-platform-ide/pom.xml @@ -123,6 +123,42 @@ org.eclipse.dirigible dirigible-components-view-configurations + + org.eclipse.dirigible + dirigible-components-view-data-structures + + + org.eclipse.dirigible + dirigible-components-view-extensions + + + org.eclipse.dirigible + dirigible-components-view-jobs + + + org.eclipse.dirigible + dirigible-components-view-listeners + + + org.eclipse.dirigible + dirigible-components-view-loggers + + + org.eclipse.dirigible + dirigible-components-view-logs + + + org.eclipse.dirigible + dirigible-components-view-registry + + + org.eclipse.dirigible + dirigible-components-view-repository + + + org.eclipse.dirigible + dirigible-components-view-websockets + org.eclipse.dirigible @@ -160,6 +196,10 @@ org.eclipse.dirigible dirigible-components-service-git + + org.eclipse.dirigible + dirigible-components-service-extensions + org.eclipse.dirigible diff --git a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/js/registry.js b/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/js/registry.js index 298ae442f84..488dc103643 100644 --- a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/js/registry.js +++ b/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/js/registry.js @@ -106,7 +106,6 @@ registryView.controller('RegistryController', [ $scope.jstreeWidget.on('dblclick.jstree', function (event) { let node = $scope.jstreeWidget.jstree(true).get_node(event.target); if (node.type === 'file') { - console.log(node); openFile(node, 'monaco'); // Temporarily set monaco } }); diff --git a/components/platform-ide/editor-monaco/src/main/resources/META-INF/dirigible/editor-monaco/js/editor.js b/components/platform-ide/editor-monaco/src/main/resources/META-INF/dirigible/editor-monaco/js/editor.js index a258c493974..f6a157e2fa9 100644 --- a/components/platform-ide/editor-monaco/src/main/resources/META-INF/dirigible/editor-monaco/js/editor.js +++ b/components/platform-ide/editor-monaco/src/main/resources/META-INF/dirigible/editor-monaco/js/editor.js @@ -58,7 +58,7 @@ function getViewParameters() { const params = JSON.parse(dataParameters); const resourcePath = params["filePath"] || ""; return { - resourceType: params["params"] && params["params"]["resourceType"] || "/services/ide/workspaces", + resourceType: params["resourceType"] ?? "workspace", contentType: params["contentType"] || "", readOnly: params["readOnly"] || false, gitName: params["gitName"] || "", @@ -363,7 +363,6 @@ class FileIO { #buildFileRequestMetadata(filePath, loadGitMetadata) { let url; let isGitProject = false; - switch (this.#getResourceType()) { case "registry": url = this.#buildRegistryUrl(filePath); diff --git a/components/platform-ide/service-extensions/.gitignore b/components/platform-ide/service-extensions/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/service-extensions/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/service-extensions/about.html b/components/platform-ide/service-extensions/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/service-extensions/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/service-extensions/pom.xml b/components/platform-ide/service-extensions/pom.xml new file mode 100644 index 00000000000..6ed30c38a94 --- /dev/null +++ b/components/platform-ide/service-extensions/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Extensions - Service + dirigible-components-service-extensions + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/extensionPoints.mjs b/components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/extensionPoints.mjs new file mode 100644 index 00000000000..074e8bca4d3 --- /dev/null +++ b/components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/extensionPoints.mjs @@ -0,0 +1,22 @@ +import { response } from "sdk/http"; +import { database } from "sdk/db"; + +let extensionPoints = []; + +let connection = null; +try { + connection = database.getConnection("SystemDB"); + let statement = connection.prepareStatement("SELECT ARTEFACT_NAME FROM DIRIGIBLE_EXTENSION_POINTS ORDER BY ARTEFACT_NAME"); + let resultSet = statement.executeQuery(); + while (resultSet.next()) { + extensionPoints.push(resultSet.getString("ARTEFACT_NAME")); + } +} finally { + if (connection != null) { + connection.close(); + } +} +response.setContentType("application/json"); +response.println(JSON.stringify(extensionPoints)); +response.flush(); +response.close(); \ No newline at end of file diff --git a/components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/project.json b/components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/project.json new file mode 100644 index 00000000000..b1830d38156 --- /dev/null +++ b/components/platform-ide/service-extensions/src/main/resources/META-INF/dirigible/service-extensions/project.json @@ -0,0 +1,5 @@ +{ + "guid": "service-registry", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-artefacts/src/main/resources/META-INF/dirigible/view-artefacts/configs/artefacts-view.js b/components/platform-ide/view-artefacts/src/main/resources/META-INF/dirigible/view-artefacts/configs/artefacts-view.js index e6cdd6fd123..513ce48eedf 100644 --- a/components/platform-ide/view-artefacts/src/main/resources/META-INF/dirigible/view-artefacts/configs/artefacts-view.js +++ b/components/platform-ide/view-artefacts/src/main/resources/META-INF/dirigible/view-artefacts/configs/artefacts-view.js @@ -12,9 +12,9 @@ const viewData = { id: 'artefacts', label: 'Artefacts', - region: 'bottom', + region: 'center', lazyLoad: false, - autoFocusTab: false, + autoFocusTab: true, path: '/services/web/view-artefacts/artefacts.html' }; if (typeof exports !== 'undefined') { diff --git a/components/platform-ide/view-data-structures/.gitignore b/components/platform-ide/view-data-structures/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-data-structures/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/about.html b/components/platform-ide/view-data-structures/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-data-structures/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-data-structures/pom.xml b/components/platform-ide/view-data-structures/pom.xml new file mode 100644 index 00000000000..84e0eaf6521 --- /dev/null +++ b/components/platform-ide/view-data-structures/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Data Structures - View + dirigible-components-view-data-structures + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/tables-view.js b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/tables-view.js new file mode 100644 index 00000000000..f8e4f9cef40 --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/tables-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'tables', + label: 'Table Structures', + region: 'bottom', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/view-data-structures/tables.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/views-view.js b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/views-view.js new file mode 100644 index 00000000000..401a64d8103 --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/configs/views-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'views', + label: 'View Structures', + region: 'bottom', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/view-data-structures/views.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/tables.extension b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/tables.extension new file mode 100644 index 00000000000..e305384d8cb --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/tables.extension @@ -0,0 +1,5 @@ +{ + "module": "view-data-structures/configs/tables-view.js", + "extensionPoint": "platform-views", + "description": "Tables Structures View" +} \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/views.extension b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/views.extension new file mode 100644 index 00000000000..2ca7955918f --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/extensions/views.extension @@ -0,0 +1,5 @@ +{ + "module": "view-data-structures/configs/views-view.js", + "extensionPoint": "platform-views", + "description": "Views Structures View" +} \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/project.json b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/project.json new file mode 100644 index 00000000000..41880a7354f --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/project.json @@ -0,0 +1,3 @@ +{ + "guid": "ide-data-structures" +} \ No newline at end of file diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/tables.html b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/tables.html new file mode 100644 index 00000000000..54a9b760114 --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/tables.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameLocationHandlerTypeCreatedCreator
{::table.name}}{{::table.location}}{{::table.handler}}{{::table.type}}{{::table.createdAt}}{{::table.createdBy}}
No Table Data
+ + + + + diff --git a/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/views.html b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/views.html new file mode 100644 index 00000000000..3a346aae0ba --- /dev/null +++ b/components/platform-ide/view-data-structures/src/main/resources/META-INF/dirigible/view-data-structures/views.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameLocationHandlerTypeCreatedCreator
{::view.name}}{{::view.location}}{{::view.handler}}{{::view.type}}{{::view.createdAt}}{{::view.createdBy}}
No Views Data
+ + + + + diff --git a/components/platform-ide/view-extensions/.gitignore b/components/platform-ide/view-extensions/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-extensions/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-extensions/about.html b/components/platform-ide/view-extensions/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-extensions/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-extensions/pom.xml b/components/platform-ide/view-extensions/pom.xml new file mode 100644 index 00000000000..ce5121c161f --- /dev/null +++ b/components/platform-ide/view-extensions/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Extensions - View + dirigible-components-view-extensions + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/configs/extensions-view.js b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/configs/extensions-view.js new file mode 100644 index 00000000000..26f7940b66b --- /dev/null +++ b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/configs/extensions-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'extensions', + label: 'Extensions', + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/view-extensions/extensions.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions.html b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions.html new file mode 100644 index 00000000000..23805015ecc --- /dev/null +++ b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LocationModuleRoleDescription
{{::next.name}}: {{::next.location}}
{{::$index + 1}}{{::extension.location}}{{::extension.module}}{{::extension.role}}{{::extension.description}}
+ + + + + diff --git a/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions/extensions.extension b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions/extensions.extension new file mode 100644 index 00000000000..b035ad7ca6d --- /dev/null +++ b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/extensions/extensions.extension @@ -0,0 +1,5 @@ +{ + "module": "view-extensions/configs/extensions-view.js", + "extensionPoint": "platform-views", + "description": "Extensions View" +} \ No newline at end of file diff --git a/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/project.json b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/project.json new file mode 100644 index 00000000000..79b38f8cef8 --- /dev/null +++ b/components/platform-ide/view-extensions/src/main/resources/META-INF/dirigible/view-extensions/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-extensions", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/git-projects.html b/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/git-projects.html index 3ab64d676a1..33d270dd742 100644 --- a/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/git-projects.html +++ b/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/git-projects.html @@ -20,11 +20,9 @@ - + - - - + @@ -39,33 +37,28 @@ - - + - - + - - + - - +
Something went wrong! {{errorMessage}} - - + diff --git a/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/js/git-projects.js b/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/js/git-projects.js index ca3d48d6289..ec77e7231d7 100644 --- a/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/js/git-projects.js +++ b/components/platform-ide/view-git-projects/src/main/resources/META-INF/dirigible/view-git-projects/js/git-projects.js @@ -883,8 +883,12 @@ gitProjectsView.controller('GitProjectsController', ($scope, StatusBar, Dialogs, }; let to = 0; - $scope.search = () => { + $scope.search = (event) => { if (to) { clearTimeout(to); } + if (event.originalEvent.key === 'Escape') { + $scope.toggleSearch(); + return; + } to = setTimeout(() => { jstreeWidget.jstree(true).search($scope.searchField.text); }, 250); diff --git a/components/platform-ide/view-jobs/.gitignore b/components/platform-ide/view-jobs/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-jobs/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-jobs/about.html b/components/platform-ide/view-jobs/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-jobs/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-jobs/pom.xml b/components/platform-ide/view-jobs/pom.xml new file mode 100644 index 00000000000..cedde89902b --- /dev/null +++ b/components/platform-ide/view-jobs/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Jobs - View + dirigible-components-view-jobs + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-assign-window.js b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-assign-window.js new file mode 100644 index 00000000000..ce4c4ecbe9a --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-assign-window.js @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'job-assign', + label: 'Assign Job', + path: '/services/web/view-jobs/dialogs/job-assign.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-logs-window.js b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-logs-window.js new file mode 100644 index 00000000000..ac65ee953fd --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-logs-window.js @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'job-logs', + label: 'Job Execution Logs', + path: '/services/web/view-jobs/dialogs/job-logs.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-trigger-window.js b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-trigger-window.js new file mode 100644 index 00000000000..2b84e848bff --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/job-trigger-window.js @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'job-trigger', + label: 'Trigger Job', + path: '/services/web/view-jobs/dialogs/job-trigger.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/jobs-view.js b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/jobs-view.js new file mode 100644 index 00000000000..b9d383feea9 --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/configs/jobs-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'jobs', + label: 'Jobs', + region: 'center', + lazyLoad: false, + autoFocusTab: true, + path: '/services/web/view-jobs/jobs.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-assign.html b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-assign.html new file mode 100644 index 00000000000..1e24f0a3eda --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-assign.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + {{ job.name }} + + + + + + + + + + + + + {{email.email}} + + + + + This list is empty + Enter an email address of the administrators who will be notified for this jobs events + + + + + + + diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-logs.html b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-logs.html new file mode 100644 index 00000000000..3eeda2d73a4 --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-logs.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + {{ jobName }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StatusIdHandlerTenant IdTriggeredCorrelationFinishedMessage
{{next.id}}{{next.handler}}{{next.tenantId}}{{next.triggeredAt | date:'yyyy-MM-dd hh:mm:ss'}}{{next.triggeredId}}{{next.finishedAt | date:'yyyy-MM-dd hh:mm:ss'}}{{next.message}}
{{ getMessageRow() }}
+
+ + + + + + diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-trigger.html b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-trigger.html new file mode 100644 index 00000000000..45b902493b6 --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/dialogs/job-trigger.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + {{ jobName }} + + + + + + + + + + + + + + + + + + + + +
NameValue
{{parameter.name}} + + + + + + + + + + + +
{{ getMessageRow() }}
+
+
+ +

Result

+ + + +
+ + + + + + + + + + + + + + + + + +
{{ item.result }}
{{ param.name }}{{ param.value }}
No parameters
The job has not been triggered yet
+
+
+ + + + + + diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-assign.extension b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-assign.extension new file mode 100644 index 00000000000..51a62a22dab --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-assign.extension @@ -0,0 +1,5 @@ +{ + "module": "view-jobs/configs/job-assign-window.js", + "extensionPoint": "platform-windows", + "description": "Assign job window" +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-logs.extension b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-logs.extension new file mode 100644 index 00000000000..8c59eee9fc2 --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-logs.extension @@ -0,0 +1,5 @@ +{ + "module": "view-jobs/configs/job-logs-window.js", + "extensionPoint": "platform-windows", + "description": "Job logs window" +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-trigger.extension b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-trigger.extension new file mode 100644 index 00000000000..f69d204c31b --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/job-trigger.extension @@ -0,0 +1,5 @@ +{ + "module": "view-jobs/configs/job-trigger-window.js", + "extensionPoint": "platform-windows", + "description": "Trigger job window" +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/jobs.extension b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/jobs.extension new file mode 100644 index 00000000000..141bc662f9d --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/extensions/jobs.extension @@ -0,0 +1,5 @@ +{ + "module": "view-jobs/configs/jobs-view.js", + "extensionPoint": "platform-views", + "description": "Jobs View" +} \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/jobs.html b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/jobs.html new file mode 100644 index 00000000000..cabd84ed49f --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/jobs.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StatusEnabledNameExpressionHandlerTimestampMessageLogsTriggerAssign
+ + + + + {{next.name}}{{next.expression}}{{next.handler}}{{next.executedAt}}{{next.message}} + + + + + +
+ + + + diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/js/jobs.js b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/js/jobs.js new file mode 100644 index 00000000000..226a9e08c90 --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/js/jobs.js @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2024 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 + */ +const jobsView = angular.module('jobs', ['blimpKit', 'platformView']); +jobsView.constant('Dialogs', new DialogHub()); +jobsView.controller('JobsController', ($scope, $http, Dialogs) => { + $http.get('/services/jobs').then((response) => { + $scope.list = response.data; + }); + + $scope.getIconClasses = (status) => { + let classes = 'sap-icon '; + switch (status) { + case 'TRIGGRED': + classes += 'sap-icon--play'; + break; + case 'FINISHED': + classes += 'sap-icon--status-positive sap-icon--color-positive'; + break; + case 'FAILED': + classes += 'sap-icon--status-error sap-icon--color-negative'; + break; + case 'LOGGED': + classes += 'sap-icon--information'; + break; + case 'ERROR': + classes += 'sap-icon--status-error sap-icon--color-negative'; + break; + case 'WARN': + classes += 'sap-icon--status-critical sap-icon--color-critical'; + break; + case 'INFO': + classes += 'sap-icon--information sap-icon--color-information'; + break; + default: + classes += 'sap-icon--question-mark'; + } + return classes; + }; + + $scope.toggle = (job) => { + if (job.enabled) $http.post('/services/jobs/enable/' + job.name).then((response) => { + console.info(response.data.name + " has been enabled."); + job.enabled = true; + }, (response) => { + console.error(response.data); + }); + else $http.post('/services/jobs/disable/' + job.name).then((response) => { + console.info(response.data.name + " has been disabled."); + job.enabled = false; + }, (response) => { + console.error(response.data); + }); + }; + + $scope.showLogsWindow = (job) => { + Dialogs.showWindow({ + hasHeader: true, + id: 'job-logs', + params: job + }); + }; + + $scope.showTriggerWindow = (job) => { + Dialogs.showWindow({ + hasHeader: true, + id: 'job-trigger', + params: job + }); + }; + + $scope.showAssignWindow = (job) => { + Dialogs.showWindow({ + hasHeader: true, + id: 'job-assign', + params: job + }); + }; +}); \ No newline at end of file diff --git a/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/project.json b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/project.json new file mode 100644 index 00000000000..b0dbb8cdad3 --- /dev/null +++ b/components/platform-ide/view-jobs/src/main/resources/META-INF/dirigible/view-jobs/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-jobs", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-listeners/.gitignore b/components/platform-ide/view-listeners/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-listeners/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-listeners/about.html b/components/platform-ide/view-listeners/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-listeners/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-listeners/pom.xml b/components/platform-ide/view-listeners/pom.xml new file mode 100644 index 00000000000..baadc98ac2b --- /dev/null +++ b/components/platform-ide/view-listeners/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Listeners - View + dirigible-components-view-listeners + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/configs/listeners-view.js b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/configs/listeners-view.js new file mode 100644 index 00000000000..447ca3ed1b7 --- /dev/null +++ b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/configs/listeners-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'listeners', + label: 'Listeners', + region: 'bottom', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/view-listeners/listeners.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/extensions/listeners.extension b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/extensions/listeners.extension new file mode 100644 index 00000000000..8a938ee80d1 --- /dev/null +++ b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/extensions/listeners.extension @@ -0,0 +1,5 @@ +{ + "module": "view-listeners/configs/listeners-view.js", + "extensionPoint": "platform-views", + "description": "Listeners View" +} \ No newline at end of file diff --git a/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/listeners.html b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/listeners.html new file mode 100644 index 00000000000..9ff61f55f82 --- /dev/null +++ b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/listeners.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameLocationHandlerDescriptionTypeCreatedCreator
{{::listener.name}}{{::listener.location}}{{::listener.handler}}{{::listener.description}}{{::listener.type === 'Q' ? 'Queue' : 'Topic'}}{{::view.createdAt}}{{::view.createdBy}}
No Listeners
+ + + + + diff --git a/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/project.json b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/project.json new file mode 100644 index 00000000000..3a9bc7b0cc1 --- /dev/null +++ b/components/platform-ide/view-listeners/src/main/resources/META-INF/dirigible/view-listeners/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-listeners", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-loggers/.gitignore b/components/platform-ide/view-loggers/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-loggers/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-loggers/about.html b/components/platform-ide/view-loggers/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-loggers/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-loggers/pom.xml b/components/platform-ide/view-loggers/pom.xml new file mode 100644 index 00000000000..6092ac896f9 --- /dev/null +++ b/components/platform-ide/view-loggers/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Loggers - View + dirigible-components-view-loggers + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/configs/loggers-view.js b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/configs/loggers-view.js new file mode 100644 index 00000000000..824a7ab4975 --- /dev/null +++ b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/configs/loggers-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'loggers', + label: 'Loggers', + region: 'bottom', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/view-loggers/loggers.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/extensions/loggers.extension b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/extensions/loggers.extension new file mode 100644 index 00000000000..de9ddd44582 --- /dev/null +++ b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/extensions/loggers.extension @@ -0,0 +1,5 @@ +{ + "module": "view-loggers/configs/loggers-view.js", + "extensionPoint": "platform-views", + "description": "Loggers View" +} \ No newline at end of file diff --git a/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/js/loggers.js b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/js/loggers.js new file mode 100644 index 00000000000..748bda8e288 --- /dev/null +++ b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/js/loggers.js @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2024 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 + */ +const loggersView = angular.module('loggers', ['blimpKit', 'platformView']); +loggersView.constant('Dialogs', new DialogHub()); +loggersView.controller('LoggersController', ($scope, $http, $document, Dialogs) => { + $scope.state = { + isBusy: true, + error: false, + busyText: 'Loading...', + }; + + $scope.search = { + name: '', + searching: false + }; + + const loggersApi = '/services/ide/loggers/'; + + $scope.clearSearch = () => { + $scope.search.name = ''; + $scope.search.searching = false; + }; + + const findByName = () => { + if ($scope.search.name !== '') { + $scope.search.searching = true; + for (let i = 0; i < $scope.loggers.length; i++) { + if ($scope.loggers[i].name.toLowerCase().includes($scope.search.name.toLowerCase())) { + $scope.loggers[i].hidden = false; + } else { + $scope.loggers[i].hidden = true; + } + } + } else $scope.search.searching = false; + }; + + let to = 0; + $scope.searchContent = () => { + if (to) { clearTimeout(to); } + to = setTimeout(() => { + $scope.$evalAsync(() => findByName()); + }, 300); + }; + + $scope.setSeverity = (loggerIndex, loggerLevel) => { + if ($scope.loggers[loggerIndex].name === 'ROOT' && $scope.loggers[loggerIndex].severity === loggerLevel) { + Dialogs.showAlert({ + title: 'Action blocked', + message: 'The \'ROOT\' logger cannot be disabled, you can only choose a different log level. This does not apply to other loggers.', + type: AlertTypes.Warning, + preformatted: false, + }); + } else { + $http({ + method: 'POST', + url: loggersApi + 'severity/' + $scope.loggers[loggerIndex].name, + data: loggerLevel, + headers: { 'Content-Type': 'text/plain' } + }).then((data) => { + if ($scope.loggers[loggerIndex].severity === loggerLevel) { + $scope.loggers[loggerIndex].severity = ''; + } else { + $scope.loggers[loggerIndex].severity = data.data; + } + }, (errorData) => { + console.error(errorData); + Dialogs.showAlert({ + title: 'Error while setting severity level', + message: `There was an error while setting '${loggerLevel}' level to '${$scope.loggers[loggerIndex].name}'.`, + type: AlertTypes.Warning, + preformatted: false, + }); + }) + } + }; + + angular.element($document[0]).ready(() => { + $http.get(loggersApi) + .then((data) => { + $scope.loggers = data.data; + $scope.state.isBusy = false; + }, (errorData) => { + console.error(errorData); + $scope.state.error = true; + }); + }); +}); \ No newline at end of file diff --git a/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/loggers.html b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/loggers.html new file mode 100644 index 00000000000..42fafce692d --- /dev/null +++ b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/loggers.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + {{::state.busyText}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#NameSeverityTraceDebugInfoWarningError
{{::$index + 1}}{{::logger.name}}{{logger.severity || '-'}} + + + + + + + + + + + + + + +
+
+ + Something went wrong! + {{errorMessage}} + + + + + diff --git a/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/project.json b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/project.json new file mode 100644 index 00000000000..268f637adc3 --- /dev/null +++ b/components/platform-ide/view-loggers/src/main/resources/META-INF/dirigible/view-loggers/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-logs", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-logs/.gitignore b/components/platform-ide/view-logs/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-logs/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-logs/about.html b/components/platform-ide/view-logs/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-logs/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-logs/pom.xml b/components/platform-ide/view-logs/pom.xml new file mode 100644 index 00000000000..6cc40430976 --- /dev/null +++ b/components/platform-ide/view-logs/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Logs - View + dirigible-components-view-logs + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/configs/logs-view.js b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/configs/logs-view.js new file mode 100644 index 00000000000..3f4cad62603 --- /dev/null +++ b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/configs/logs-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'logs', + label: 'Logs', + region: 'bottom', + lazyLoad: false, + autoFocusTab: false, + path: '/services/web/view-logs/logs.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/extensions/logs.extension b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/extensions/logs.extension new file mode 100644 index 00000000000..1915a5ddab5 --- /dev/null +++ b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/extensions/logs.extension @@ -0,0 +1,5 @@ +{ + "module": "view-logs/configs/logs-view.js", + "extensionPoint": "platform-views", + "description": "Logs View" +} \ No newline at end of file diff --git a/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/js/logs.js b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/js/logs.js new file mode 100644 index 00000000000..41e8eda8321 --- /dev/null +++ b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/js/logs.js @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 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 + */ +const logsView = angular.module('logs', ['blimpKit', 'platformView']); +logsView.controller('LogsController', ($scope, $http) => { + $scope.log = { + selectedLog: null, + logsList: [] + }; + + $http.get('/services/ide/logs/').then((response) => { + $scope.log.logsList = response.data.map(x => ({ text: x, value: x })); + }); + + $scope.logChanged = () => { + if ($scope.log.selectedLog) { + $http.get('/services/ide/logs/' + $scope.log.selectedLog).then((response) => { + $scope.logContent = response.data; + }); + } else { + $scope.logContent = ''; + } + }; +}); \ No newline at end of file diff --git a/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/logs.html b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/logs.html new file mode 100644 index 00000000000..df3ccc98286 --- /dev/null +++ b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/logs.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + Log File + + + + {{ logContent }} + + + + diff --git a/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/project.json b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/project.json new file mode 100644 index 00000000000..268f637adc3 --- /dev/null +++ b/components/platform-ide/view-logs/src/main/resources/META-INF/dirigible/view-logs/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-logs", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/js/projects.js b/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/js/projects.js index 6c22bb32cf2..524674693c8 100644 --- a/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/js/projects.js +++ b/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/js/projects.js @@ -435,9 +435,11 @@ projectsView.controller('ProjectsViewController', function ( items: [{ id: 'file', label: 'File', + leftIconClass: 'sap-icon--add-document', }, { id: 'folder', label: 'Folder', + leftIconClass: 'sap-icon--add-folder', separator: true, }], separator: true, @@ -1735,6 +1737,12 @@ projectsView.controller('ProjectsViewController', function ( } }, (error) => { console.error(error); + Dialogs.showAlert({ + title: 'Create folder error', + message: 'There was an error while processing the new folder data.', + type: AlertTypes.Error, + preformatted: false, + }); }); } diff --git a/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/projects.html b/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/projects.html index 1c63eba7f16..a454945db9a 100644 --- a/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/projects.html +++ b/components/platform-ide/view-projects/src/main/resources/META-INF/dirigible/view-projects/projects.html @@ -40,47 +40,37 @@ - - + - - + - - + - - - - - - + + + - - - - + + - - +
Something went wrong! {{errorMessage}} - - + diff --git a/components/platform-ide/view-registry/.gitignore b/components/platform-ide/view-registry/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-registry/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-registry/about.html b/components/platform-ide/view-registry/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-registry/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-registry/pom.xml b/components/platform-ide/view-registry/pom.xml new file mode 100644 index 00000000000..20fa665a815 --- /dev/null +++ b/components/platform-ide/view-registry/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Registry - View + dirigible-components-view-registry + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/configs/registry-view.js b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/configs/registry-view.js new file mode 100644 index 00000000000..a064777728e --- /dev/null +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/configs/registry-view.js @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'registry', + label: 'Registry', + region: 'left', + autoFocusTab: false, + path: '/services/web/view-registry/registry.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/registry-view.extension b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/registry-view.extension new file mode 100644 index 00000000000..cb2218fa899 --- /dev/null +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/registry-view.extension @@ -0,0 +1,5 @@ +{ + "module": "view-registry/configs/registry-view.js", + "extensionPoint": "platform-views", + "description": "Registry View" +} \ No newline at end of file diff --git a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/extensions/workspace-after-publish.extension b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/workspace-after-publish.extension similarity index 60% rename from components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/extensions/workspace-after-publish.extension rename to components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/workspace-after-publish.extension index 9abc36bb0df..4c4fdc1cc5c 100644 --- a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/extensions/workspace-after-publish.extension +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/workspace-after-publish.extension @@ -1,5 +1,5 @@ { - "module": "/ide-registry/services/compile-typescript.js", + "module": "/view-registry/services/compile-typescript.js", "extensionPoint": "ide-workspace-after-publish", "description": "Compile TypeScript" } \ No newline at end of file diff --git a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/extensions/workspace-after-unpublish.extension b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/workspace-after-unpublish.extension similarity index 60% rename from components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/extensions/workspace-after-unpublish.extension rename to components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/workspace-after-unpublish.extension index 6dd34631412..127ad4fce6e 100644 --- a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/extensions/workspace-after-unpublish.extension +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/extensions/workspace-after-unpublish.extension @@ -1,5 +1,5 @@ { - "module": "/ide-registry/services/unpublish-typescript.js", + "module": "/view-registry/services/unpublish-typescript.js", "extensionPoint": "ide-workspace-after-unpublish", "description": "Unpublish TypeScript" } \ No newline at end of file diff --git a/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/js/registry.js b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/js/registry.js new file mode 100644 index 00000000000..bf4e466f80a --- /dev/null +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/js/registry.js @@ -0,0 +1,574 @@ +/* + * Copyright (c) 2024 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 + */ +const registryView = angular.module('registry', ['blimpKit', 'platformView', 'platformShortcuts', 'RepositoryService', 'RegistryService']); +registryView.constant('StatusBar', new StatusBarHub()); +registryView.constant('Layout', new LayoutHub()); +registryView.constant('Dialogs', new DialogHub()); +registryView.constant('Notifications', new NotificationHub()); +registryView.constant('Repository', new RepositoryHub()); +registryView.constant('ContextMenu', new ContextMenuHub()); +registryView.controller('RegistryController', ($scope, $document, clientOS, StatusBar, Layout, Dialogs, Notifications, ViewParameters, ContextMenu, Repository, RepositoryService, RegistryService, ButtonStates) => { + $scope.state = { + isBusy: true, + error: false, + busyText: 'Loading...', + }; + const inMacOS = clientOS.isMac(); + $scope.searchVisible = false; + $scope.searchField = { text: '' }; + let newNodeData = { + parent: '', + path: '', + }; + const imageFileExts = ['ico', 'bmp', 'png', 'jpg', 'jpeg', 'gif', 'svg']; + const modelFileExts = ['extension', 'extensionpoint', 'edm', 'model', 'dsm', 'schema', 'bpmn', 'job', 'listener', 'websocket', 'roles', 'constraints', 'table', 'view']; + + const treeData = []; + $scope.basePath = '/'; + + const jstreeWidget = angular.element('#dgRegistry'); + const jstreeConfig = { + core: { + check_callback: true, + themes: { + name: 'fiori', + variant: 'compact', + }, + data: (_node, cb) => { + cb(treeData); + }, + keyboard: { // We have to have this in order to disable the default behavior. + 'enter': () => { }, + 'f2': () => { }, + } + }, + search: { + case_sensitive: false, + }, + plugins: ['wholerow', 'search', 'state', 'types', 'sort'], + dnd: { + large_drop_target: true, + large_drag_target: true, + }, + sort: function (firstNodeId, secondNodeId) { + const firstNode = this.get_node(firstNodeId); + const secondNode = this.get_node(secondNodeId); + if (firstNode.type === 'spinner') return -1; + else if (secondNode.type === 'spinner') return 1; + else if (firstNode.type === secondNode.type) { + const res = firstNode.text.localeCompare(secondNode.text, 'en-GB', { numeric: true, sensitivity: 'base' }); + if (res < 0) return -1; + else if (res > 0) return 1; + return 0; + } else if (firstNode.type === 'folder') return -1; + else if (secondNode.type === 'folder') return 1; + else { + const res = firstNode.text.localeCompare(secondNode.text, 'en-GB', { numeric: true, sensitivity: 'base' }); + if (res < 0) return -1; + else if (res > 0) return 1; + return 0; + } + }, + state: { key: `${brandingInfo.keyPrefix}.view-registry.state` }, + types: { + 'default': { + icon: 'sap-icon--question-mark', + valid_children: [], + }, + file: { + icon: 'jstree-file', + valid_children: [], + }, + folder: { + icon: 'jstree-folder', + valid_children: ['folder', 'file', 'spinner'], + }, + spinner: { + icon: 'jstree-spinner', + valid_children: [], + }, + }, + }; + + $scope.keyboardShortcuts = (keySet, event) => { + event.preventDefault(); + switch (keySet) { + case 'enter': + const focused = jstreeWidget.jstree(true).get_node($document[0].activeElement); + if (focused) { + if (!focused.state.selected) { + jstreeWidget.jstree(true).deselect_all(); + jstreeWidget.jstree(true).select_node(focused); + } + if (focused.type === 'folder') { + if (focused.state.opened) jstreeWidget.jstree(true).close_node(focused); + else jstreeWidget.jstree(true).open_node(focused); + } else openFile(focused, 'monaco'); + } + break; + case 'shift+enter': + const toSelect = jstreeWidget.jstree(true).get_node(document.activeElement); + if (toSelect && !toSelect.state.selected) jstreeWidget.jstree(true).select_node(toSelect); + else jstreeWidget.jstree(true).deselect_node(toSelect); + break; + case 'delete': + case 'meta+backspace': + const nodes = jstreeWidget.jstree(true).get_top_selected(true); + if (nodes.length === 1) openDeleteDialog(nodes[0]); + break; + case 'ctrl+f': + $scope.$evalAsync(() => $scope.toggleSearch()); + break; + default: + break; + } + }; + + jstreeWidget.on('dblclick.jstree', (event) => { + const node = jstreeWidget.jstree(true).get_node(event.target); + if (node.type === 'file') { + openFile(node, 'monaco'); // Temporarily set monaco + } + }); + + function getChildrenNames(node, type = '') { + let root = jstreeWidget.jstree(true).get_node(node); + let names = []; + if (type) { + for (let i = 0; i < root.children.length; i++) { + let child = jstreeWidget.jstree(true).get_node(root.children[i]); + if (child.type === type) names.push(child.text); + } + } else { + for (let i = 0; i < root.children.length; i++) { + names.push(jstreeWidget.jstree(true).get_text(root.children[i])); + } + } + return names; + } + + $scope.toggleSearch = () => { + $scope.searchField.text = ''; + jstreeWidget.jstree(true).clear_search(); + $scope.searchVisible = !$scope.searchVisible; + }; + + $scope.deleteFileFolder = (path, callback) => { + RepositoryService.remove(path).then(() => { + StatusBar.showMessage(`Deleted '${path}'.`); + if (callback) callback(); + }, (error) => { + console.log(error); + StatusBar.showError(`Unable to delete '${path}'.`); + }); + }; + + $scope.reloadFileTree = (basePath, setConfig = false) => { + treeData.length = 0; + $scope.state.isBusy = true; + RegistryService.load(basePath).then((response) => { + treeData.push(...processChildren(response.data.collections)); + treeData.push(...processChildren(response.data.resources)); + if (setConfig) jstreeWidget.jstree(jstreeConfig); + else jstreeWidget.jstree(true).refresh(); + $scope.$evalAsync(() => { + $scope.state.isBusy = false; + $scope.state.error = false; + }); + }, (error) => { + console.error(error); + $scope.$evalAsync(() => { + $scope.state.isBusy = false; + $scope.state.error = false; + $scope.errorMessage = 'Unable to load registry list'; + }); + Notifications.show({ + type: 'negative', + title: 'Unable to load registry list', + description: 'There was an error while trying to load the registry list.' + }); + }); + }; + + let selectedNode; + + $scope.showContextMenu = (event) => { + selectedNode = undefined; + const items = []; + const folder = { + id: 'folder', + label: 'New Folder', + leftIconClass: 'sap-icon--add-folder', + }; + const file = { + id: 'file', + label: 'New File', + leftIconClass: 'sap-icon--add-document', + }; + if (jstreeWidget[0].contains(event.target)) { + event.preventDefault(); + let id; + if (event.target.tagName !== 'LI') { + let closest = event.target.closest('li'); + if (closest) id = closest.id; + else items.push(folder, file); + } else { + id = event.target.id; + } + if (id) { + selectedNode = jstreeWidget.jstree(true).get_node(id); + if (!selectedNode.state.selected) { + jstreeWidget.jstree(true).deselect_all(); + jstreeWidget.jstree(true).select_node(selectedNode, false, true); + } + if (selectedNode.type === 'folder') { + items.push({ + id: 'new', + label: 'New', + iconClass: 'sap-icon--create', + items: [file, folder], + separator: true, + }); + } else if (selectedNode.type === 'file') { + items.push({ + id: 'open', + label: 'Open', + leftIconClass: 'sap-icon--action', + separator: true, + }); + } + items.push({ + id: 'delete', + label: 'Delete', + shortcut: inMacOS ? '⌘⌫' : 'Del', + leftIconClass: 'sap-icon--delete', + }); + } + ContextMenu.showContextMenu({ + ariaLabel: 'registry view contextmenu', + posX: event.clientX, + posY: event.clientY, + icons: true, + items: items + }).then((id) => { + if (id === 'open') { + openFile(selectedNode, 'monaco'); + } else if (id === 'file') { + newNodeData.parent = selectedNode.id; + if (newNodeData.parent === '#') { + newNodeData.path = '/registry/public'; + } else newNodeData.path = selectedNode.data.path; + Dialogs.showFormDialog({ + title: 'Create a new file', + form: { + 'fdti1': { + label: 'Name', + controlType: 'input', + type: 'text', + placeholder: 'new file.txt', + inputRules: { + excluded: getChildrenNames(newNodeData.parent, 'file'), + patterns: ['^[^/:]*$'], + }, + submitOnEnter: true, + focus: true, + required: true + }, + }, + submitLabel: 'Create', + cancelLabel: 'Cancel' + }).then((form) => { + if (form) createFile(newNodeData.parent, form['fdti1'], newNodeData.path); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Create file error', + message: 'There was an error while processing the new file data.', + type: AlertTypes.Error, + preformatted: false, + }); + }); + } else if (id === 'folder') { + newNodeData.parent = selectedNode ? selectedNode.id : '#'; + if (newNodeData.parent === '#') { + newNodeData.path = '/registry/public'; + } else newNodeData.path = selectedNode.data.path; + Dialogs.showFormDialog({ + title: 'Create new folder', + form: { + 'fdti1': { + label: 'Name', + controlType: 'input', + type: 'text', + inputRules: { + excluded: getChildrenNames(newNodeData.parent, 'folder'), + patterns: ['^[^/:]*$'], + }, + submitOnEnter: true, + focus: true, + required: true + } + }, + submitLabel: 'Create', + cancelLabel: 'Cancel' + }).then((form) => { + if (form) createFolder(newNodeData.parent, form['fdti1'], newNodeData.path); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Create folder error', + message: 'There was an error while processing the new folder data.', + type: AlertTypes.Error, + preformatted: false, + }); + }); + } else if (id === 'delete') { + openDeleteDialog(selectedNode); + } + }, (error) => { + console.error(error); + StatusBar.showError('Unable to process context menu data'); + }); + }; + }; + + function openDeleteDialog(selected) { + Dialogs.showDialog({ + title: `Delete '${selected.text}'?`, + message: 'This action cannot be undone. It is recommended that you unpublish and delete.', + buttons: [ + { id: 'b1', label: 'Delete', state: ButtonStates.Negative }, + { id: 'b3', label: 'Cancel', state: ButtonStates.Transparent }, + ] + }).then((buttonId) => { + if (buttonId === 'b1') { + $scope.deleteFileFolder(selected.data.path, () => { + jstreeWidget.jstree(true).delete_node(selected); + Layout.closeEditor({ path: selected.data.path }); + }); + } + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Delete error', + message: `Error while deleting '${selected.text}'.`, + type: AlertTypes.Error, + preformatted: false, + }); + }); + } + + let to = 0; + $scope.search = (event) => { + if (to) { clearTimeout(to); } + if (event.originalEvent.key === 'Escape') { + $scope.toggleSearch(); + return; + } + to = setTimeout(() => { + jstreeWidget.jstree(true).search($scope.searchField.text); + }, 250); + }; + + function processChildren(children) { + const treeChildren = []; + for (let i = 0; i < children.length; i++) { + let child = { + text: children[i].name, + type: (children[i].type === 'collection' ? 'folder' : 'file'), + data: { + path: `/registry/public${children[i].path.slice(9)}`, + } + }; + if (children[i].type === 'resource') { + child.data.contentType = children[i].contentType; + let icon = getFileIcon(children[i].name); + if (icon) child.icon = icon; + } + if (children[i].collections && children[i].resources) { + child['children'] = processChildren(children[i].collections.concat(children[i].resources)); + } else if (children[i].collections) { + child['children'] = processChildren(children[i].collections); + } else if (children[i].resources) { + child['children'] = processChildren(children[i].resources); + } + treeChildren.push(child); + } + return treeChildren; + } + + function getFileExtension(fileName) { + return fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase(); + } + + function getFileIcon(fileName) { + const ext = getFileExtension(fileName); + let icon; + if (ext === 'js' || ext === 'mjs' || ext === 'xsjs' || ext === 'ts' || ext === 'tsx' || ext === 'py' || ext === 'json') { + icon = 'sap-icon--syntax'; + } else if (ext === 'css' || ext === 'less' || ext === 'scss') { + icon = 'sap-icon--number-sign'; + } else if (ext === 'txt') { + icon = 'sap-icon--text'; + } else if (ext === 'pdf') { + icon = 'sap-icon--pdf-attachment'; + } else if (ext === 'md') { + icon = 'sap-icon--information'; + } else if (ext === 'access') { + icon = 'sap-icon--locked'; + } else if (ext === 'zip') { + icon = 'sap-icon--attachment-zip-file'; + } else if (ext === 'extensionpoint') { + icon = 'sap-icon--puzzle'; + } else if (imageFileExts.indexOf(ext) !== -1) { + icon = 'sap-icon--picture'; + } else if (modelFileExts.indexOf(ext) !== -1) { + icon = 'sap-icon--document-text'; + } else { + icon = 'jstree-file'; + } + return icon; + } + + function openFile(node, editor) { + Layout.openEditor({ + path: node.data.path, + contentType: node.data.contentType, + editorId: editor, + params: { + readOnly: $scope.parameters.perspectiveId !== 'workbench', + resourceType: 'repository', + }, + }); + } + + function createFile(parent, name, path) { + RepositoryService.createResource(path, name).then(() => { + jstreeWidget.jstree(true).deselect_all(true); + jstreeWidget.jstree(true).select_node( + jstreeWidget.jstree(true).create_node( + parent, + { + text: name, + type: 'file', + data: { + path: (path.endsWith('/') ? path + name : `${path}/${name}`), + contentType: 'text/plain', + } + }, + ) + ); + // Bug #1948 + // RepositoryService.getMetadata(response.data).then(function (metadata) { + // if (metadata.status === 200) { + // jstreeWidget.jstree(true).deselect_all(true); + // jstreeWidget.jstree(true).select_node( + // jstreeWidget.jstree(true).create_node( + // parent, + // { + // text: metadata.data.name, + // type: 'file', + // data: { + // path: metadata.data.path, + // contentType: metadata.data.contentType, + // } + // }, + // ) + // ); + // } else { + // messageHub.showAlertError('Could not get metadata', `There was an error while getting metadata for '${name}'`); + // } + // }); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Could not create a file', + message: error.message || `There was an error while creating '${name}'`, + type: AlertTypes.Error, + preformatted: false, + }); + }); + } + + function createFolder(parent, name, path) { + RepositoryService.createCollection(path, name).then(() => { + jstreeWidget.jstree(true).deselect_all(true); + jstreeWidget.jstree(true).select_node( + jstreeWidget.jstree(true).create_node( + parent, + { + text: name, + type: 'folder', + data: { + path: (path.endsWith('/') ? path + name : `${path}/${name}`), + } + }, + ) + ); + // Bug #1948 + // RepositoryService.getMetadata(response.data).then(function (metadata) { + // if (metadata.status === 200) { + // jstreeWidget.jstree(true).deselect_all(true); + // jstreeWidget.jstree(true).select_node( + // jstreeWidget.jstree(true).create_node( + // parent, + // { + // text: metadata.data.name, + // type: 'folder', + // data: { + // path: metadata.data.path, + // } + // }, + // ) + // ); + // } else { + // messageHub.showAlertError('Could not get metadata', `There was an error while getting metadata for '${name}'`); + // } + // }); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Could not create a folder', + message: error.message || `There was an error while creating '${name}'`, + type: AlertTypes.Error, + preformatted: false, + }); + }); + } + + Repository.onRepositoryModified(() => { + $scope.reloadFileTree(); + }); + + Repository.addMessageListener({ + topic: 'registry.tree.select', + handler: (data) => { + const objects = jstreeWidget.jstree(true).get_json('#', { + no_state: true, + no_li_attr: true, + no_a_attr: true, + flat: true + }); + for (let i = 0; i < objects.length; i++) { + if (objects[i].data.path === data.filePath) { + jstreeWidget.jstree(true).select_node(objects[i]); + break; + } + } + } + }); + + angular.element($document[0]).ready(() => { + $scope.reloadFileTree($scope.basePath, true); + }); + $scope.parameters = ViewParameters.get(); +}); \ No newline at end of file diff --git a/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/project.json b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/project.json new file mode 100644 index 00000000000..6bdf07343e3 --- /dev/null +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-registry", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/registry.html b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/registry.html new file mode 100644 index 00000000000..d1584aa4434 --- /dev/null +++ b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/registry.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + {{::state.busyText}} + + + + + + + + + +
+ + Something went wrong! + {{errorMessage}} + + + + + + + + diff --git a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/services/compile-typescript.js b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/services/compile-typescript.js similarity index 100% rename from components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/services/compile-typescript.js rename to components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/services/compile-typescript.js diff --git a/components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/services/unpublish-typescript.js b/components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/services/unpublish-typescript.js similarity index 100% rename from components/ide/ide-ui-registry/src/main/resources/META-INF/dirigible/ide-registry/services/unpublish-typescript.js rename to components/platform-ide/view-registry/src/main/resources/META-INF/dirigible/view-registry/services/unpublish-typescript.js diff --git a/components/platform-ide/view-repository/.gitignore b/components/platform-ide/view-repository/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-repository/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-repository/about.html b/components/platform-ide/view-repository/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-repository/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-repository/pom.xml b/components/platform-ide/view-repository/pom.xml new file mode 100644 index 00000000000..ddfda7e5b8a --- /dev/null +++ b/components/platform-ide/view-repository/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Repository - View + dirigible-components-view-repository + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/configs/repository-view.js b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/configs/repository-view.js new file mode 100644 index 00000000000..85ef4eb1108 --- /dev/null +++ b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/configs/repository-view.js @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'repository', + label: 'Repository', + region: 'left', + autoFocusTab: false, + path: '/services/web/view-repository/repository.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/extensions/repository.extension b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/extensions/repository.extension new file mode 100644 index 00000000000..2dc052dc1bf --- /dev/null +++ b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/extensions/repository.extension @@ -0,0 +1,5 @@ +{ + "module": "view-repository/configs/repository-view.js", + "extensionPoint": "platform-views", + "description": "Repository View" +} \ No newline at end of file diff --git a/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/js/repository.js b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/js/repository.js new file mode 100644 index 00000000000..8eca0a76a47 --- /dev/null +++ b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/js/repository.js @@ -0,0 +1,585 @@ +/* + * Copyright (c) 2024 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 + */ +const repositoryView = angular.module('repository', ['blimpKit', 'platformView', 'platformShortcuts', 'RepositoryService', 'TransportService']); +repositoryView.constant('StatusBar', new StatusBarHub()); +repositoryView.constant('Layout', new LayoutHub()); +repositoryView.constant('Dialogs', new DialogHub()); +repositoryView.constant('Notifications', new NotificationHub()); +repositoryView.constant('Repository', new RepositoryHub()); +repositoryView.constant('ContextMenu', new ContextMenuHub()); +repositoryView.controller('RepositoryViewController', ($scope, $document, clientOS, StatusBar, Layout, Dialogs, Notifications, ContextMenu, TransportService, Repository, RepositoryService, ButtonStates) => { + $scope.state = { + isBusy: true, + error: false, + busyText: 'Loading...', + }; + const inMacOS = clientOS.isMac(); + $scope.searchVisible = false; + $scope.searchField = { text: '' }; + let newNodeData = { + parent: '', + path: '', + }; + const imageFileExts = ['ico', 'bmp', 'png', 'jpg', 'jpeg', 'gif', 'svg']; + const modelFileExts = ['extension', 'extensionpoint', 'edm', 'model', 'dsm', 'schema', 'bpmn', 'job', 'listener', 'websocket', 'roles', 'constraints', 'table', 'view']; + + treeData = []; + $scope.basePath = '/'; + + const jstreeWidget = angular.element('#dgRepository'); + const jstreeConfig = { + core: { + check_callback: true, + themes: { + name: 'fiori', + variant: 'compact', + }, + data: (_node, cb) => { + cb(treeData); + }, + keyboard: { // We have to have this in order to disable the default behavior. + 'enter': () => { }, + 'f2': () => { }, + } + }, + search: { + case_sensitive: false, + }, + plugins: ['wholerow', 'search', 'state', 'types', 'sort'], + dnd: { + large_drop_target: true, + large_drag_target: true, + }, + sort: function (firstNodeId, secondNodeId) { + const firstNode = this.get_node(firstNodeId); + const secondNode = this.get_node(secondNodeId); + if (firstNode.type === 'spinner') return -1; + else if (secondNode.type === 'spinner') return 1; + else if (firstNode.type === secondNode.type) { + const res = firstNode.text.localeCompare(secondNode.text, 'en-GB', { numeric: true, sensitivity: 'base' }); + if (res < 0) return -1; + else if (res > 0) return 1; + return 0; + } else if (firstNode.type === 'folder') return -1; + else if (secondNode.type === 'folder') return 1; + else { + const res = firstNode.text.localeCompare(secondNode.text, 'en-GB', { numeric: true, sensitivity: 'base' }); + if (res < 0) return -1; + else if (res > 0) return 1; + return 0; + } + }, + state: { key: `${brandingInfo.keyPrefix}.view-repository.state` }, + types: { + 'default': { + icon: 'sap-icon--question-mark', + valid_children: [], + }, + file: { + icon: 'jstree-file', + valid_children: [], + }, + folder: { + icon: 'jstree-folder', + valid_children: ['folder', 'file', 'spinner'], + }, + spinner: { + icon: 'jstree-spinner', + valid_children: [], + }, + }, + }; + + $scope.keyboardShortcuts = (keySet, event) => { + event.preventDefault(); + switch (keySet) { + case 'enter': + const focused = jstreeWidget.jstree(true).get_node($document[0].activeElement); + if (focused) { + if (!focused.state.selected) { + jstreeWidget.jstree(true).deselect_all(); + jstreeWidget.jstree(true).select_node(focused); + } + if (focused.type === 'folder') { + if (focused.state.opened) jstreeWidget.jstree(true).close_node(focused); + else jstreeWidget.jstree(true).open_node(focused); + } else openFile(focused, 'monaco'); + } + break; + case 'shift+enter': + const toSelect = jstreeWidget.jstree(true).get_node(document.activeElement); + if (toSelect && !toSelect.state.selected) jstreeWidget.jstree(true).select_node(toSelect); + else jstreeWidget.jstree(true).deselect_node(toSelect); + break; + case 'delete': + case 'meta+backspace': + const nodes = jstreeWidget.jstree(true).get_top_selected(true); + if (nodes.length === 1) openDeleteDialog(nodes[0]); + break; + case 'ctrl+f': + $scope.$evalAsync(() => $scope.toggleSearch()); + break; + default: + break; + } + }; + + jstreeWidget.on('dblclick.jstree', (event) => { + const node = jstreeWidget.jstree(true).get_node(event.target); + if (node.type === 'file') { + openFile(node, 'monaco'); // Temporarily set monaco + } + }); + + $scope.importRepository = () => { + Dialogs.showWindow({ + hasHeader: true, + id: 'import', + params: { importRepository: true } + }); + }; + + $scope.exportRepository = () => { + TransportService.exportRepository(); + }; + + function getChildrenNames(node, type = '') { + let root = jstreeWidget.jstree(true).get_node(node); + let names = []; + if (type) { + for (let i = 0; i < root.children.length; i++) { + let child = jstreeWidget.jstree(true).get_node(root.children[i]); + if (child.type === type) names.push(child.text); + } + } else { + for (let i = 0; i < root.children.length; i++) { + names.push(jstreeWidget.jstree(true).get_text(root.children[i])); + } + } + return names; + } + + $scope.toggleSearch = () => { + $scope.searchField.text = ''; + jstreeWidget.jstree(true).clear_search(); + $scope.searchVisible = !$scope.searchVisible; + }; + + $scope.deleteFileFolder = (path, callback) => { + RepositoryService.remove(path).then(() => { + StatusBar.showMessage(`Deleted '${path}'.`); + if (callback) callback(); + }, (error) => { + console.log(error); + StatusBar.showError(`Unable to delete '${path}'.`); + }); + }; + + $scope.reloadFileTree = (basePath, setConfig = false) => { + treeData.length = 0; + $scope.state.isBusy = true; + RepositoryService.load(basePath).then((response) => { + treeData.push(...processChildren(response.data.collections)); + treeData.push(...processChildren(response.data.resources)); + if (setConfig) jstreeWidget.jstree(jstreeConfig); + else jstreeWidget.jstree(true).refresh(); + $scope.$evalAsync(() => { + $scope.state.isBusy = false; + $scope.state.error = false; + }); + }, (error) => { + console.error(error); + $scope.$evalAsync(() => { + $scope.state.isBusy = false; + $scope.state.error = false; + $scope.errorMessage = 'Unable to load registry list'; + }); + Notifications.show({ + type: 'negative', + title: 'Unable to load registry list', + description: 'There was an error while trying to load the registry list.' + }); + }); + }; + + let selectedNode; + + $scope.showContextMenu = (event) => { + selectedNode = undefined; + const items = []; + const folder = { + id: 'folder', + label: 'New Folder', + leftIconClass: 'sap-icon--add-folder', + }; + const file = { + id: 'file', + label: 'New File', + leftIconClass: 'sap-icon--add-document', + }; + if (jstreeWidget[0].contains(event.target)) { + event.preventDefault(); + let id; + if (event.target.tagName !== 'LI') { + let closest = event.target.closest('li'); + if (closest) id = closest.id; + else items.push(folder, file); + } else { + id = event.target.id; + } + if (id) { + selectedNode = jstreeWidget.jstree(true).get_node(id); + if (!selectedNode.state.selected) { + jstreeWidget.jstree(true).deselect_all(); + jstreeWidget.jstree(true).select_node(selectedNode, false, true); + } + if (selectedNode.type === 'folder') { + items.push({ + id: 'new', + label: 'New', + iconClass: 'sap-icon--create', + items: [file, folder], + separator: true, + }); + } else if (selectedNode.type === 'file') { + items.push({ + id: 'open', + label: 'Open', + leftIconClass: 'sap-icon--action', + separator: true, + }); + } + items.push({ + id: 'delete', + label: 'Delete', + shortcut: inMacOS ? '⌘⌫' : 'Del', + leftIconClass: 'sap-icon--delete', + }); + } + ContextMenu.showContextMenu({ + ariaLabel: 'registry view contextmenu', + posX: event.clientX, + posY: event.clientY, + icons: true, + items: items + }).then((id) => { + if (id === 'open') { + openFile(selectedNode, 'monaco'); + } else if (id === 'file') { + newNodeData.parent = selectedNode.id; + if (newNodeData.parent === '#') { + newNodeData.path = '/registry/public'; + } else newNodeData.path = selectedNode.data.path; + Dialogs.showFormDialog({ + title: 'Create a new file', + form: { + 'fdti1': { + label: 'Name', + controlType: 'input', + type: 'text', + placeholder: 'new file.txt', + inputRules: { + excluded: getChildrenNames(newNodeData.parent, 'file'), + patterns: ['^[^/:]*$'], + }, + submitOnEnter: true, + focus: true, + required: true + }, + }, + submitLabel: 'Create', + cancelLabel: 'Cancel' + }).then((form) => { + if (form) createFile(newNodeData.parent, form['fdti1'], newNodeData.path); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Create file error', + message: 'There was an error while processing the new file data.', + type: AlertTypes.Error, + preformatted: false, + }); + }); + } else if (id === 'folder') { + newNodeData.parent = selectedNode ? selectedNode.id : '#'; + if (newNodeData.parent === '#') { + newNodeData.path = '/registry/public'; + } else newNodeData.path = selectedNode.data.path; + Dialogs.showFormDialog({ + title: 'Create new folder', + form: { + 'fdti1': { + label: 'Name', + controlType: 'input', + type: 'text', + inputRules: { + excluded: getChildrenNames(newNodeData.parent, 'folder'), + patterns: ['^[^/:]*$'], + }, + submitOnEnter: true, + focus: true, + required: true + } + }, + submitLabel: 'Create', + cancelLabel: 'Cancel' + }).then((form) => { + if (form) createFolder(newNodeData.parent, form['fdti1'], newNodeData.path); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Create folder error', + message: 'There was an error while processing the new folder data.', + type: AlertTypes.Error, + preformatted: false, + }); + }); + } else if (id === 'delete') { + openDeleteDialog(selectedNode); + } + }, (error) => { + console.error(error); + StatusBar.showError('Unable to process context menu data'); + }); + }; + }; + + function openDeleteDialog(selected) { + Dialogs.showDialog({ + title: `Delete '${selected.text}'?`, + message: 'This action cannot be undone. It is recommended that you unpublish and delete.', + buttons: [ + { id: 'b1', label: 'Delete', state: ButtonStates.Negative }, + { id: 'b3', label: 'Cancel', state: ButtonStates.Transparent }, + ] + }).then((buttonId) => { + if (buttonId === 'b1') { + $scope.deleteFileFolder(selected.data.path, () => { + jstreeWidget.jstree(true).delete_node(selected); + Layout.closeEditor({ path: selected.data.path }); + }); + } + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Delete error', + message: `Error while deleting '${selected.text}'.`, + type: AlertTypes.Error, + preformatted: false, + }); + }); + } + + let to = 0; + $scope.search = (event) => { + if (to) { clearTimeout(to); } + if (event.originalEvent.key === 'Escape') { + $scope.toggleSearch(); + return; + } + to = setTimeout(() => { + jstreeWidget.jstree(true).search($scope.searchField.text); + }, 250); + }; + + function processChildren(children) { + let treeChildren = []; + for (let i = 0; i < children.length; i++) { + let child = { + text: children[i].name, + type: (children[i].type === 'collection' ? 'folder' : 'file'), + data: { + path: children[i].path, + } + }; + if (children[i].type === 'resource') { + child.data.contentType = children[i].contentType; + let icon = getFileIcon(children[i].name); + if (icon) child.icon = icon; + } + if (children[i].collections && children[i].resources) { + child['children'] = processChildren(children[i].collections.concat(children[i].resources)); + } else if (children[i].collections) { + child['children'] = processChildren(children[i].collections); + } else if (children[i].resources) { + child['children'] = processChildren(children[i].resources); + } + treeChildren.push(child); + } + return treeChildren; + } + + function getFileExtension(fileName) { + return fileName.substring(fileName.lastIndexOf('.') + 1, fileName.length).toLowerCase(); + } + + function getFileIcon(fileName) { + const ext = getFileExtension(fileName); + let icon; + if (ext === 'js' || ext === 'mjs' || ext === 'xsjs' || ext === 'ts' || ext === 'tsx' || ext === 'py' || ext === 'json') { + icon = 'sap-icon--syntax'; + } else if (ext === 'css' || ext === 'less' || ext === 'scss') { + icon = 'sap-icon--number-sign'; + } else if (ext === 'txt') { + icon = 'sap-icon--text'; + } else if (ext === 'pdf') { + icon = 'sap-icon--pdf-attachment'; + } else if (ext === 'md') { + icon = 'sap-icon--information'; + } else if (ext === 'access') { + icon = 'sap-icon--locked'; + } else if (ext === 'zip') { + icon = 'sap-icon--attachment-zip-file'; + } else if (ext === 'extensionpoint') { + icon = 'sap-icon--puzzle'; + } else if (imageFileExts.indexOf(ext) !== -1) { + icon = 'sap-icon--picture'; + } else if (modelFileExts.indexOf(ext) !== -1) { + icon = 'sap-icon--document-text'; + } else { + icon = 'jstree-file'; + } + return icon; + } + + function openFile(node, editor) { + Layout.openEditor({ + path: node.data.path, + contentType: node.data.contentType, + editorId: editor, + params: { + readOnly: true, + resourceType: 'repository', + }, + }); + } + + function createFile(parent, name, path) { + RepositoryService.createResource(path, name).then(() => { + jstreeWidget.jstree(true).deselect_all(true); + jstreeWidget.jstree(true).select_node( + jstreeWidget.jstree(true).create_node( + parent, + { + text: name, + type: 'file', + data: { + path: (path.endsWith('/') ? path + name : `${path}/${name}`), + contentType: 'text/plain', + } + }, + ) + ); + // Bug #1948 + // RepositoryService.getMetadata(response.data).then(function (metadata) { + // if (metadata.status === 200) { + // jstreeWidget.jstree(true).deselect_all(true); + // jstreeWidget.jstree(true).select_node( + // jstreeWidget.jstree(true).create_node( + // parent, + // { + // text: metadata.data.name, + // type: 'file', + // data: { + // path: metadata.data.path, + // contentType: metadata.data.contentType, + // } + // }, + // ) + // ); + // } else { + // messageHub.showAlertError('Could not get metadata', `There was an error while getting metadata for '${name}'`); + // } + // }); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Could not create a file', + message: error.message || `There was an error while creating '${name}'`, + type: AlertTypes.Error, + preformatted: false, + }); + }); + } + + function createFolder(parent, name, path) { + RepositoryService.createCollection(path, name).then(() => { + jstreeWidget.jstree(true).deselect_all(true); + jstreeWidget.jstree(true).select_node( + jstreeWidget.jstree(true).create_node( + parent, + { + text: name, + type: 'folder', + data: { + path: (path.endsWith('/') ? path + name : `${path}/${name}`), + } + }, + ) + ); + // Bug #1948 + // RepositoryService.getMetadata(response.data).then(function (metadata) { + // if (metadata.status === 200) { + // jstreeWidget.jstree(true).deselect_all(true); + // jstreeWidget.jstree(true).select_node( + // jstreeWidget.jstree(true).create_node( + // parent, + // { + // text: metadata.data.name, + // type: 'folder', + // data: { + // path: metadata.data.path, + // } + // }, + // ) + // ); + // } else { + // messageHub.showAlertError('Could not get metadata', `There was an error while getting metadata for '${name}'`); + // } + // }); + }, (error) => { + console.error(error); + Dialogs.showAlert({ + title: 'Could not create a folder', + message: error.message || `There was an error while creating '${name}'`, + type: AlertTypes.Error, + preformatted: false, + }); + }); + } + + Repository.onRepositoryModified(() => { + $scope.reloadFileTree(); + }); + + Repository.addMessageListener({ + topic: 'registry.tree.select', + handler: (data) => { + const objects = jstreeWidget.jstree(true).get_json('#', { + no_state: true, + no_li_attr: true, + no_a_attr: true, + flat: true + }); + for (let i = 0; i < objects.length; i++) { + if (objects[i].data.path === data.filePath) { + jstreeWidget.jstree(true).select_node(objects[i]); + break; + } + } + } + }); + + angular.element($document[0]).ready(() => { + $scope.reloadFileTree($scope.basePath, true); + }); +}); \ No newline at end of file diff --git a/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/project.json b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/project.json new file mode 100644 index 00000000000..6832842e11e --- /dev/null +++ b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/project.json @@ -0,0 +1,5 @@ +{ + "guid": "view-repository", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/repository.html b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/repository.html new file mode 100644 index 00000000000..74058020e71 --- /dev/null +++ b/components/platform-ide/view-repository/src/main/resources/META-INF/dirigible/view-repository/repository.html @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + {{::state.busyText}} + + + + + + + + + + + + +
+ + Something went wrong! + {{errorMessage}} + + + + + + + + diff --git a/components/platform-ide/view-websockets/.gitignore b/components/platform-ide/view-websockets/.gitignore new file mode 100644 index 00000000000..686cef860bd --- /dev/null +++ b/components/platform-ide/view-websockets/.gitignore @@ -0,0 +1,17 @@ +# folders +dist/ +.settings/ +target/ +derby/ +dirigible_local/ + +# files +.DS_Store +.project +.classpath +*.bak +*.class +*.jar +derby.log +/bin/ +/target/ \ No newline at end of file diff --git a/components/platform-ide/view-websockets/about.html b/components/platform-ide/view-websockets/about.html new file mode 100644 index 00000000000..bcb03d59e0f --- /dev/null +++ b/components/platform-ide/view-websockets/about.html @@ -0,0 +1,29 @@ + + + + + +About + + +

About This Content

+ +

April 25, 2020

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v20.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + + diff --git a/components/platform-ide/view-websockets/pom.xml b/components/platform-ide/view-websockets/pom.xml new file mode 100644 index 00000000000..c7be128ef14 --- /dev/null +++ b/components/platform-ide/view-websockets/pom.xml @@ -0,0 +1,20 @@ + + 4.0.0 + + + org.eclipse.dirigible + dirigible-components-parent + 11.0.0-SNAPSHOT + ../../pom.xml + + + Components - IDE - Websockets - View + dirigible-components-view-websockets + jar + + + ../../../licensing-header.txt + ../../../ + + + \ No newline at end of file diff --git a/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/configs/websockets-view.js b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/configs/websockets-view.js new file mode 100644 index 00000000000..5361c0c0dfd --- /dev/null +++ b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/configs/websockets-view.js @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2024 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 + */ +const viewData = { + id: 'websockets', + label: 'WebSockets', + region: 'bottom', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/view-websockets/websockets.html' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/extensions/websockets.extension b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/extensions/websockets.extension new file mode 100644 index 00000000000..5a51702e198 --- /dev/null +++ b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/extensions/websockets.extension @@ -0,0 +1,5 @@ +{ + "module": "view-websockets/configs/websockets-view.js", + "extensionPoint": "platform-views", + "description": "Websockets View" +} \ No newline at end of file diff --git a/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/project.json b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/project.json new file mode 100644 index 00000000000..00b41394f7b --- /dev/null +++ b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/project.json @@ -0,0 +1,5 @@ +{ + "guid": "ide-websockets", + "dependencies": [], + "actions": [] +} \ No newline at end of file diff --git a/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/websockets.html b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/websockets.html new file mode 100644 index 00000000000..0f6bf5acfc8 --- /dev/null +++ b/components/platform-ide/view-websockets/src/main/resources/META-INF/dirigible/view-websockets/websockets.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LocationEndpointHandlerCreatedCreator
{{::websocket.location}}{{::websocket.endpoint}}{{::websocket.handler}}{{::websocket.createdAt}}{{::websocket.createdBy}}
No Websocket Data
+ + + + + diff --git a/components/pom.xml b/components/pom.xml index ddff42d62fe..12782a06be7 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -223,6 +223,15 @@ platform-ide/view-transfer platform-ide/view-artefacts platform-ide/view-configurations + platform-ide/view-data-structures + platform-ide/view-extensions + platform-ide/view-jobs + platform-ide/view-listeners + platform-ide/view-loggers + platform-ide/view-logs + platform-ide/view-registry + platform-ide/view-repository + platform-ide/view-websockets platform-ide/service-workspace platform-ide/service-transport platform-ide/service-template @@ -232,6 +241,7 @@ platform-ide/service-generate platform-ide/service-actions platform-ide/service-git + platform-ide/service-extensions platform-ide/editor-monaco platform-ide/editor-monaco-extensions platform-ide/editor-bpm @@ -1262,6 +1272,51 @@ dirigible-components-view-configurations ${project.version}
+ + org.eclipse.dirigible + dirigible-components-view-data-structures + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-extensions + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-jobs + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-listeners + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-loggers + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-logs + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-registry + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-repository + ${project.version} + + + org.eclipse.dirigible + dirigible-components-view-websockets + ${project.version} + org.eclipse.dirigible @@ -1308,6 +1363,11 @@ dirigible-components-service-git ${project.version} + + org.eclipse.dirigible + dirigible-components-service-extensions + ${project.version} + org.eclipse.dirigible