Skip to content

Commit

Permalink
Migrated schema, table, view, job, listener, access, roles and websoc…
Browse files Browse the repository at this point in the history
…ket editors. Fixed SQL execution

Signed-off-by: StanZGenchev <stan.z.genchev@gmail.com>
  • Loading branch information
StanZGenchev committed Jan 8, 2025
1 parent 4a21ede commit ebaa6af
Show file tree
Hide file tree
Showing 82 changed files with 5,077 additions and 39 deletions.
24 changes: 24 additions & 0 deletions components/group/group-platform-ide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,34 @@
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-image</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-data-structures</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-extensions</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-jobs</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-listeners</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-schema</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-security</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-websockets</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.dirigible</groupId>
Expand Down
17 changes: 17 additions & 0 deletions components/platform-ide/editor-data-structures/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# folders
dist/
.settings/
target/
derby/
dirigible_local/

# files
.DS_Store
.project
.classpath
*.bak
*.class
*.jar
derby.log
/bin/
/target/
29 changes: 29 additions & 0 deletions components/platform-ide/editor-data-structures/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>

<p>April 25, 2020</p>
<h3>License</h3>

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

<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party (&quot;Redistributor&quot;) 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 <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>

</body>
</html>
20 changes: 20 additions & 0 deletions components/platform-ide/editor-data-structures/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-parent</artifactId>
<version>11.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<name>Components - IDE - Data Structures - Editor</name>
<artifactId>dirigible-components-editor-data-structures</artifactId>
<packaging>jar</packaging>

<properties>
<license.header.location>../../../licensing-header.txt</license.header.location>
<parent.pom.folder>../../../</parent.pom.folder>
</properties>

</project>
Original file line number Diff line number Diff line change
@@ -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 editorData = {
id: 'table',
label: 'Table',
region: 'center',
path: '/services/web/editor-data-structures/editors/table/editor.html',
contentTypes: ['application/json+table'],
};
if (typeof exports !== 'undefined') {
exports.getEditor = () => editorData;
}
Original file line number Diff line number Diff line change
@@ -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 editorData = {
id: 'view',
label: 'View',
region: 'center',
path: '/services/web/editor-data-structures/editors/view/editor.html',
contentTypes: ['application/json+view'],
};
if (typeof exports !== 'undefined') {
exports.getEditor = () => editorData;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!--
Copyright (c) 2010-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
-->
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" ng-app="page" ng-controller="PageController">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" sizes="any" href="data:;base64,iVBORw0KGgo=">
<title config-title></title>
<script type="text/javascript" src="/services/web/editor-data-structures/configs/table-editor.js"></script>
<script type="text/javascript" src="/services/js/platform-core/services/loader.js?id=editor-js"></script>
<link type="text/css" rel="stylesheet" href="/services/js/platform-core/services/loader.js?id=view-css" />
<script type="text/javascript" src="/services/web/editor-data-structures/editors/table/editor.js"></script>
</head>

<body class="bk-vbox" shortcut="'ctrl+s'" shortcut-action="save">
<bk-busy-indicator-extended class="bk-fill-parent" ng-hide="state.error || !state.isBusy" size="l">{{state.busyText}}</bk-busy-indicator-extended>
<bk-toolbar has-title="true" ng-show="!state.error && !state.isBusy">
<bk-toolbar-title>Table:</bk-toolbar-title>
<bk-toolbar-spacer></bk-toolbar-spacer>
<bk-button compact="true" state="emphasized" label="Save" ng-click="save()" ng-disabled="!(forms.editor.$valid && changed)"></bk-button>
</bk-toolbar>
<bk-scrollbar class="bk-full-width" ng-show="!state.error && !state.isBusy">
<bk-fieldset class="fd-margin--sm" ng-form="forms.editor">
<bk-form-group name="entityForm">
<bk-form-item horizontal="false">
<bk-form-label for="Name" required="true" colon="true">Name</bk-form-label>
<bk-form-input-message state="{{ forms.editor['name'].$valid ? '' : 'error' }}" message="::inputErrorMessage">
<bk-input id="idName" name="name" state="{{ forms.editor['name'].$valid ? '' : 'error' }}" ng-required="true" ng-model="table.name" ng-maxlength="255" input-rules="nameRegex" type="text" placeholder="Enter name">
</bk-input>
</bk-form-input-message>
</bk-form-item>
</bk-form-group>
</bk-fieldset>
<bk-toolbar has-title="true">
<bk-toolbar-title>Columns:</bk-toolbar-title>
<bk-toolbar-spacer></bk-toolbar-spacer>
<bk-button compact="true" label="Add" ng-click="addColumn()"></bk-button>
</bk-toolbar>
<table bk-table outer-borders="bottom">
<thead bk-table-header>
<tr bk-table-row>
<th bk-table-header-cell>Name</th>
<th bk-table-header-cell>Type</th>
<th bk-table-header-cell>Length</th>
<th bk-table-header-cell>Primary Key</th>
<th bk-table-header-cell>Unique</th>
<th bk-table-header-cell>Nullable</th>
<th bk-table-header-cell>Default</th>
<th bk-table-header-cell>Precision</th>
<th bk-table-header-cell>Scale</th>
<th bk-table-header-cell></th>
</tr>
</thead>
<tbody bk-table-body>
<tr ng-if="table.columns.length === 0" bk-table-row>
<td bk-table-cell no-data="true">Table has no columns</td>
</tr>
<tr bk-table-row hoverable="false" activable="false" ng-repeat="item in table.columns track by $index">
<td bk-table-cell>{{item.name}}</td>
<td bk-table-cell>{{item.type}}</td>
<td bk-table-cell>{{item.length}}</td>
<td bk-table-cell>
<span bk-object-status status="{{ item.primaryKey ? 'positive' : 'negative' }}" text="{{ item.primaryKey ? 'True' : 'False' }}"></span>
</td>
<td bk-table-cell>
<span bk-object-status status="{{ item.unique ? 'positive' : 'negative' }}" text="{{ item.unique ? 'True' : 'False' }}"></span>
</td>
<td bk-table-cell>
<span bk-object-status status="{{ item.nullable ? 'positive' : 'negative' }}" text="{{ item.nullable ? 'True' : 'False' }}"></span>
</td>
<td bk-table-cell>{{item.defaultValue}}</td>
<td bk-table-cell>{{item.precision}}</td>
<td bk-table-cell>{{item.scale}}</td>
<td bk-table-cell fit-content="true">
<bk-button compact="true" glyph="sap-icon--edit" state="transparent" aria-label="Edit" ng-click="editColumn($index)"></bk-button>
<bk-button compact="true" glyph="sap-icon--delete" state="transparent" aria-label="Delete" ng-click="deleteColumn($index)"></bk-button>
</td>
</tr>
</tbody>
</table>
</bk-scrollbar>
<bk-message-page glyph="sap-icon--error" ng-if="state.error">
<bk-message-page-title>Editor encounterd an error!</bk-message-page-title>
<bk-message-page-subtitle>{{errorMessage}}</bk-message-page-subtitle>
</bk-message-page>
<theme></theme>
</body>

</html>
Loading

0 comments on commit ebaa6af

Please sign in to comment.