Skip to content

Commit

Permalink
Merge branch 'eclipse:master' into spring-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyan-velichkov authored Dec 7, 2023
2 parents 3df5402 + 73765af commit 3ad5146
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -802,10 +802,10 @@ angular.module('ui.entity-data.modeler', ["ideUI", "ideView", "ideWorkspace", "i
// Filter Entity ----------------------------------------------

// Adds sidebar icon for the filter entity object
let filterObject = new Entity('FilterEntityName');
let filter = new mxCell(filterObject, new mxGeometry(0, 0, 200, 28), 'filter');
filter.setVertex(true);
addSidebarIcon($scope.graph, sidebar, filter, ICON_FILTER, 'Drag this to the diagram to create a new Filter Entity', $scope);
let reportFilterObject = new Entity('ReportFilterEntityName');
let reportFilter = new mxCell(reportFilterObject, new mxGeometry(0, 0, 200, 28), 'filter');
reportFilter.setVertex(true);
addSidebarIcon($scope.graph, sidebar, reportFilter, ICON_FILTER, 'Drag this to the diagram to create a new Report Filter Entity', $scope);

// Adds primary key field into entity
firstProperty = property.clone();
Expand All @@ -814,7 +814,7 @@ angular.module('ui.entity-data.modeler', ["ideUI", "ideView", "ideWorkspace", "i
firstProperty.value.dataLength = 0;
firstProperty.value.dataPrimaryKey = 'true';
firstProperty.value.dataAutoIncrement = 'true';
filter.insert(firstProperty);
reportFilter.insert(firstProperty);

// Setting Entity ----------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function addSidebarIcon(graph, sidebar, prototype, image, hint, $scope) {
$scope.$cell.value.entityType = "REPORT";
} else if (prototype.style === 'filter') {
$scope.$cell = graph.getSelectionCell();
$scope.$cell.value.entityType = "FILTER";
$scope.$cell.value.entityType = "REPORT_FILTER";
} else if (prototype.style === 'setting') {
$scope.$cell = graph.getSelectionCell();
$scope.$cell.value.entityType = "SETTING";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
* SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors
* SPDX-License-Identifier: EPL-2.0
*/
let transformer = require("ide-entity/template/transform-edm");
let workspaceManager = require("platform/workspace");
const transformer = require("ide-entity/template/transform-edm");
const workspaceManager = require("platform/workspace");

let workspace = __context.get('workspace');
let project = __context.get('project');
let path = __context.get('path');
const workspace = __context.get('workspace');
const project = __context.get('project');
const path = __context.get('path');

let modelPath = path.replace(".edm", ".model");
let content = transformer.transform(workspace, project, path);
const modelPath = path.replace(".edm", ".model");
const content = transformer.transform(workspace, project, path);

if (content !== null) {
let bytes = require("io/bytes");
input = bytes.textToByteArray(content);
const bytes = require("io/bytes");
const input = bytes.textToByteArray(content);

if (workspaceManager.getWorkspace(workspace)
.getProject(project).getFile(path).exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,18 @@ angular.module('page', ["ideUI", "ideView", "entityApi"])
filter.${property.name} = new Date(filter.${property.name});
}
#end
#end
#foreach ($property in $filter.properties)
#if($property.widgetType == "DROPDOWN")
${dollar}scope.${property.name}Value = filter.${property.name};
#end
#end
$scope.entity = filter;
#foreach ($property in $filter.properties)
#if($property.widgetType == "DROPDOWN")
${dollar}scope.entity.${property.name} = undefined;
#end
#end
}

$scope.isValid = function (isValid, property) {
Expand Down Expand Up @@ -80,6 +90,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"])
text: e.${property.widgetDropDownValue}
}
});
${dollar}scope.entity.${property.name} = ${dollar}scope.${property.name}Value;
});
#end
#end
Expand Down

0 comments on commit 3ad5146

Please sign in to comment.