You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ri...@apache.org on 2020/04/12 16:24:55 UTC
[incubator-streampipes] branch dev updated: Add restrictedEditMode
for more flexible modification of pipeline element options
This is an automated email from the ASF dual-hosted git repository.
riemer pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new f2bcd7f Add restrictedEditMode for more flexible modification of pipeline element options
f2bcd7f is described below
commit f2bcd7f6428c1510579dd98f021789829f40496a
Author: Dominik Riemer <ri...@fzi.de>
AuthorDate: Sun Apr 12 18:25:44 2020 +0200
Add restrictedEditMode for more flexible modification of pipeline element options
---
.../customize/customize-dialog.component.ts | 3 ++-
.../customize/customize-dialog.tmpl.html | 12 +++++++++---
.../customoutput/customoutput.component.ts | 3 ++-
.../components/customoutput/customoutput.tmpl.html | 21 +++++++++++++++------
.../property-selection.component.ts | 3 ++-
.../propertyselection/property-selection.tmpl.html | 3 ++-
.../components/fileupload/fileupload.component.ts | 3 ++-
.../components/fileupload/fileupload.tmpl.html | 8 +++++---
.../mappingnary/mappingnary.component.ts | 3 ++-
.../components/mappingnary/mappingnary.tmpl.html | 6 +++---
.../mappingunary/mappingunary.component.ts | 1 +
.../components/mappingunary/mappingunary.tmpl.html | 5 +++--
.../editor/components/oneof/oneof.controller.ts | 5 +++++
.../pipeline-element-options.controller.ts | 3 ++-
.../pipeline-element-options.tmpl.html | 2 +-
.../components/pipeline/pipeline.controller.ts | 2 +-
.../replaceoutput/replaceoutput.component.ts | 3 ++-
.../replaceoutput/replaceoutput.tmpl.html | 2 +-
.../customize.controller.ts | 9 ++++++---
.../customizeElementDialog.tmpl.html | 22 +++++++++++++++++++---
.../services/editor-dialog-manager.service.ts | 5 +++--
21 files changed, 88 insertions(+), 36 deletions(-)
diff --git a/ui/src/app/editor/components/customize/customize-dialog.component.ts b/ui/src/app/editor/components/customize/customize-dialog.component.ts
index dfbb345..f7b4a3f 100644
--- a/ui/src/app/editor/components/customize/customize-dialog.component.ts
+++ b/ui/src/app/editor/components/customize/customize-dialog.component.ts
@@ -26,7 +26,8 @@ export let CustomizeDialogComponent = {
staticProperty: "=",
selectedElement: "=",
displayRecommended: "=",
- customizeForm: "="
+ customizeForm: "=",
+ restrictedEditMode: "<"
},
controller: CustomizeDialogController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/customize/customize-dialog.tmpl.html b/ui/src/app/editor/components/customize/customize-dialog.tmpl.html
index 471b3fb..1a2737b 100644
--- a/ui/src/app/editor/components/customize/customize-dialog.tmpl.html
+++ b/ui/src/app/editor/components/customize/customize-dialog.tmpl.html
@@ -51,11 +51,15 @@
</div>
<div ng-if="ctrl.staticProperty.properties.staticPropertyType == 'MappingPropertyUnary'">
<mapping-property-unary selected-element="ctrl.selectedElement" static-property="ctrl.staticProperty"
- display-recommended="ctrl.displayRecommended"></mapping-property-unary>
+ display-recommended="ctrl.displayRecommended"
+ restricted-edit-mode="ctrl.restrictedEditMode">
+ </mapping-property-unary>
</div>
<div ng-if="ctrl.staticProperty.properties.staticPropertyType == 'MappingPropertyNary'">
<mapping-property-nary selected-element="ctrl.selectedElement" static-property="ctrl.staticProperty"
- display-recommended="ctrl.displayRecommended"></mapping-property-nary>
+ display-recommended="ctrl.displayRecommended"
+ restricted-edit-mode="ctrl.restrictedEditMode">
+ </mapping-property-nary>
</div>
<div ng-if="ctrl.staticProperty.properties.staticPropertyType == 'MatchingProperty'">
<matching-property static-property="ctrl.staticProperty"></matching-property>
@@ -79,7 +83,9 @@
</div>
<div ng-if="ctrl.staticProperty.properties.staticPropertyType == 'FileStaticProperty'">
<file-static-property customize-form="ctrl.customizeForm" display-recommended="ctrl.displayRecommended"
- static-property="ctrl.staticProperty" selected-element="ctrl.selectedElement"></file-static-property>
+ static-property="ctrl.staticProperty" selected-element="ctrl.selectedElement"
+ restricted-edit-mode="ctrl.restrictedEditMode">
+ </file-static-property>
</div>
</div>
</div>
\ No newline at end of file
diff --git a/ui/src/app/editor/components/customoutput/customoutput.component.ts b/ui/src/app/editor/components/customoutput/customoutput.component.ts
index c8f3e13..720c583 100644
--- a/ui/src/app/editor/components/customoutput/customoutput.component.ts
+++ b/ui/src/app/editor/components/customoutput/customoutput.component.ts
@@ -25,7 +25,8 @@ export let CustomOutputComponent = {
bindings: {
outputStrategy: "=",
selectedElement: "=",
- customizeForm: "="
+ customizeForm: "=",
+ restrictedEditMode: "<"
},
controller: CustomOutputController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/customoutput/customoutput.tmpl.html b/ui/src/app/editor/components/customoutput/customoutput.tmpl.html
index 286526f..c2af3cf 100644
--- a/ui/src/app/editor/components/customoutput/customoutput.tmpl.html
+++ b/ui/src/app/editor/components/customoutput/customoutput.tmpl.html
@@ -18,22 +18,31 @@
<div flex="100" layout="row" layout-align="start center">
<h5 style="margin-right:10px;">{{ctrl.selectedElement.inputStreams[0].name}}</h5>
- <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.selectAll(ctrl.collectedPropertiesFirstStream)">Select all</sp-button>
- <sp-button sp-button-gray sp-button-small-padding ng-click="ctrl.deselectAll(ctrl.collectedPropertiesFirstStream)">Select none</sp-button>
+ <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.selectAll(ctrl.collectedPropertiesFirstStream)"
+ ng-disabled="ctrl.restrictedEditMode">Select all
+ </sp-button>
+ <sp-button sp-button-gray sp-button-small-padding
+ ng-click="ctrl.deselectAll(ctrl.collectedPropertiesFirstStream)" ng-disabled="ctrl.restrictedEditMode">Select
+ none
+ </sp-button>
</div>
<div ng-repeat="(index, property) in ctrl.collectedPropertiesFirstStream track by $index">
<property-selection output-strategy="ctrl.outputStrategy" event-property="property"
- layer="0"></property-selection>
+ layer="0" restricted-edit-mode="ctrl.restrictedEditMode"></property-selection>
</div>
<div ng-if="ctrl.collectedPropertiesSecondStream.length > 0">
<div flex="100" layout="row" layout-align="start center">
<h5 style="margin-right:10px;">{{ctrl.selectedElement.inputStreams[1].name}}</h5>
- <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.selectAll(ctrl.collectedPropertiesSecondStream)">Select all</sp-button>
- <sp-button sp-button-gray sp-button-small-padding ng-click="ctrl.deselectAll(ctrl.collectedPropertiesSecondStream)">Select none</sp-button>
+ <sp-button sp-button-blue sp-button-small-padding
+ ng-click="ctrl.selectAll(ctrl.collectedPropertiesSecondStream)" ng-disabled="ctrl.restrictedEditMode">Select
+ all</sp-button>
+ <sp-button sp-button-gray sp-button-small-padding
+ ng-click="ctrl.deselectAll(ctrl.collectedPropertiesSecondStream)" ng-disabled="ctrl.restrictedEditMode">Select
+ none</sp-button>
</div>
<div ng-repeat="(index, property) in ctrl.collectedPropertiesSecondStream track by $index">
<property-selection output-strategy="ctrl.outputStrategy" event-property="property"
- layer="0"></property-selection>
+ layer="0" restricted-edit-mode="ctrl.restrictedEditMode"></property-selection>
</div>
</div>
<input type="hidden" name="{{ctrl.outputStrategy.properties.elementId}}" ng-model="ctrl.outputStrategy.properties.selectedPropertyKeys" custom-output-validator>
diff --git a/ui/src/app/editor/components/customoutput/propertyselection/property-selection.component.ts b/ui/src/app/editor/components/customoutput/propertyselection/property-selection.component.ts
index b1d22c5..4cf6dd5 100644
--- a/ui/src/app/editor/components/customoutput/propertyselection/property-selection.component.ts
+++ b/ui/src/app/editor/components/customoutput/propertyselection/property-selection.component.ts
@@ -26,7 +26,8 @@ export let PropertySelectionComponent = {
outputStrategy: "=",
eventProperty: "=",
layer: "@",
- togglePropertyKey: "&"
+ togglePropertyKey: "&",
+ restrictedEditMode: "<"
},
controller: PropertySelectionController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/customoutput/propertyselection/property-selection.tmpl.html b/ui/src/app/editor/components/customoutput/propertyselection/property-selection.tmpl.html
index 3f05204..2cbf1b5 100644
--- a/ui/src/app/editor/components/customoutput/propertyselection/property-selection.tmpl.html
+++ b/ui/src/app/editor/components/customoutput/propertyselection/property-selection.tmpl.html
@@ -17,7 +17,8 @@
-->
<div class="property-selection" style="margin-left:{{ctrl.layer*5}}%">
- <md-checkbox style="margin-bottom:0px;" ng-checked="ctrl.exists(ctrl.eventProperty.properties.runtimeId)" ng-click="ctrl.toggle(ctrl.eventProperty.properties.runtimeId)">
+ <md-checkbox style="margin-bottom:0px;" ng-checked="ctrl.exists(ctrl.eventProperty.properties.runtimeId)"
+ ng-click="ctrl.toggle(ctrl.eventProperty.properties.runtimeId)" ng-disabled="ctrl.restrictedEditMode">
<div ng-if="ctrl.eventProperty.properties.label"><b>{{ctrl.eventProperty.properties.label}}</b> <i>({{ctrl.eventProperty.properties.description}},
field name: {{ctrl.eventProperty.properties.runtimeName}})</i><br/></div>
<div ng-if="!ctrl.eventProperty.properties.label"><b>{{ctrl.eventProperty.properties.runtimeName}}</b><br/>
diff --git a/ui/src/app/editor/components/fileupload/fileupload.component.ts b/ui/src/app/editor/components/fileupload/fileupload.component.ts
index 9a9070a..006c1d2 100644
--- a/ui/src/app/editor/components/fileupload/fileupload.component.ts
+++ b/ui/src/app/editor/components/fileupload/fileupload.component.ts
@@ -26,7 +26,8 @@ export let FileUploadComponent = {
staticProperty: "=",
inputStreams : "=",
selectedElement: "=",
- customizeForm: "="
+ customizeForm: "=",
+ restrictedEditMode: "="
},
controller: FileUploadController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/fileupload/fileupload.tmpl.html b/ui/src/app/editor/components/fileupload/fileupload.tmpl.html
index 1afe057..1967f47 100644
--- a/ui/src/app/editor/components/fileupload/fileupload.tmpl.html
+++ b/ui/src/app/editor/components/fileupload/fileupload.tmpl.html
@@ -19,7 +19,8 @@
<div>
<h5>Select File</h5>
<md-input-container flex="100" layout="column">
- <md-select required class="md-accent" name="{{ctrl.staticProperty.properties.elementId}}" ng-model="ctrl.staticProperty.properties.locationPath">
+ <md-select required class="md-accent" name="{{ctrl.staticProperty.properties.elementId}}"
+ ng-model="ctrl.staticProperty.properties.locationPath" ng-disabled="ctrl.restrictedEditMode">
<md-option ng-repeat="fileMetadata in ctrl.fileMetadataDescriptions track by $index" ng-value="fileMetadata.internalFilename" ng-selected="fileMetadata.internalFilename == ctrl.staticProperty.properties.locationPath">
<b>{{fileMetadata.originalFilename}}</b><br/>
</md-option>
@@ -27,8 +28,9 @@
</md-input-container>
<hr/>
<h5>Upload new file</h5>
- <input ng-model="ctrl.file" type="file" name="file" id="file">
- <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.uploadFile()" style="margin-top:10px;">
+ <input ng-model="ctrl.file" type="file" name="file" id="file" ng-disabled="ctrl.restrictedEditMode">
+ <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.uploadFile()" style="margin-top:10px;"
+ ng-disabled="ctrl.restrictedEditMode">
<i class="material-icons" style="font-size:18px;">file_upload</i>
<md-tooltip md-direction="top">
Upload
diff --git a/ui/src/app/editor/components/mappingnary/mappingnary.component.ts b/ui/src/app/editor/components/mappingnary/mappingnary.component.ts
index 5fa427a..df10b8c 100644
--- a/ui/src/app/editor/components/mappingnary/mappingnary.component.ts
+++ b/ui/src/app/editor/components/mappingnary/mappingnary.component.ts
@@ -25,7 +25,8 @@ export let MappingNaryComponent = {
bindings: {
staticProperty : "=",
displayRecommended: "=",
- selectedElement: "<"
+ selectedElement: "<",
+ restrictedEditMode: "<"
},
controller: MappingNaryController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/mappingnary/mappingnary.tmpl.html b/ui/src/app/editor/components/mappingnary/mappingnary.tmpl.html
index ab09545..3cb491e 100644
--- a/ui/src/app/editor/components/mappingnary/mappingnary.tmpl.html
+++ b/ui/src/app/editor/components/mappingnary/mappingnary.tmpl.html
@@ -17,17 +17,17 @@
-->
<div flex="100" layout="row" layout-align="start center" style="margin-bottom:15px;">
- <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.selectAll()">
+ <sp-button sp-button-blue sp-button-small-padding ng-click="ctrl.selectAll()" ng-disabled="ctrl.restrictedEditMode">
Select all
</sp-button>
- <sp-button sp-button-gray sp-button-small-padding ng-click="ctrl.deselectAll()">
+ <sp-button sp-button-gray sp-button-small-padding ng-click="ctrl.deselectAll()" ng-disabled="ctrl.restrictedEditMode">
Select none
</sp-button>
</div>
<div
ng-repeat="property in ctrl.availableProperties | displayRecommendedFilter: ctrl.staticProperty.properties.propertyScope:ctrl.displayRecommended">
<md-checkbox ng-checked="ctrl.exists(property, ctrl.staticProperty)"
- ng-click="ctrl.toggle(property, ctrl.staticProperty)" name="{{property.properties.elementId}}">
+ ng-click="ctrl.toggle(property, ctrl.staticProperty)" name="{{property.properties.elementId}}" ng-disabled="ctrl.restrictedEditMode">
<div ng-if="property.properties.label"><b>{{property.properties.label}}</b> <i>({{property.properties.description}},
field name: {{property.properties.runtimeName}})</i><br/></div>
<div ng-if="!property.properties.label"><b>{{property.properties.runtimeName}}</b><br/></div>
diff --git a/ui/src/app/editor/components/mappingunary/mappingunary.component.ts b/ui/src/app/editor/components/mappingunary/mappingunary.component.ts
index 62a9391..0b5c9ad 100644
--- a/ui/src/app/editor/components/mappingunary/mappingunary.component.ts
+++ b/ui/src/app/editor/components/mappingunary/mappingunary.component.ts
@@ -26,6 +26,7 @@ export let MappingUnaryComponent = {
staticProperty : "=",
displayRecommended: "=",
selectedElement: "=",
+ restrictedEditMode: "<"
},
controller: MappingUnaryController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/mappingunary/mappingunary.tmpl.html b/ui/src/app/editor/components/mappingunary/mappingunary.tmpl.html
index 5436de1..4fc870f 100644
--- a/ui/src/app/editor/components/mappingunary/mappingunary.tmpl.html
+++ b/ui/src/app/editor/components/mappingunary/mappingunary.tmpl.html
@@ -16,9 +16,10 @@
~
-->
-<md-select ng-model="ctrl.staticProperty.properties.selectedProperty" placeholder="{{ctrl.staticProperty.properties.description}}">
+<md-select ng-model="ctrl.staticProperty.properties.selectedProperty"
+ placeholder="{{ctrl.staticProperty.properties.description}}" ng-disabled="ctrl.restrictedEditMode">
<md-option
- ng-repeat="property in ctrl.availableProperties | displayRecommendedFilter: ctrl.staticProperty.properties.propertyScope:ctrl.displayRecommended" ng-value="property.properties.runtimeId" ng-selected="property.properties.runtimeId === ctrl.staticProperty.properties.selectedProperty">
+ ng-repeat="property in ctrl.availableProperties | displayRecommendedFilter: ctrl.staticProperty.properties.propertyScope:ctrl.displayRecommended" ng-value="property.properties.runtimeId" ng-selected="property.properties.runtimeId === ctrl.staticProperty.properties.selectedProperty" >
<div ng-if="property.properties.label"><b>{{property.properties.label}}</b> <i>({{property.properties.description}}, field name: {{property.properties.niceLabel}})</i><br/></div>
<div ng-if="!property.properties.label"> <b>{{property.properties.niceLabel}}</b><br/></div>
</md-option>
diff --git a/ui/src/app/editor/components/oneof/oneof.controller.ts b/ui/src/app/editor/components/oneof/oneof.controller.ts
index 21bb307..1783a93 100644
--- a/ui/src/app/editor/components/oneof/oneof.controller.ts
+++ b/ui/src/app/editor/components/oneof/oneof.controller.ts
@@ -25,6 +25,11 @@ export class OneOfController {
constructor() { }
$onInit() {
+ this.staticProperty.properties.options.forEach(o => {
+ if (o.selected) {
+ this.staticProperty.properties.currentSelection = o;
+ }
+ });
}
change(option) {
diff --git a/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.controller.ts b/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.controller.ts
index 33d8733..d2bad22 100644
--- a/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.controller.ts
+++ b/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.controller.ts
@@ -89,7 +89,8 @@ export class PipelineElementOptionsController {
}
openCustomizeDialog() {
- this.EditorDialogManager.showCustomizeDialog($("#" + this.pipelineElement.payload.DOM), "", this.pipelineElement.payload)
+ let restrictedEditMode = ! (this.isRootElement());
+ this.EditorDialogManager.showCustomizeDialog($("#" + this.pipelineElement.payload.DOM), "", this.pipelineElement.payload, restrictedEditMode)
.then(() => {
this.JsplumbService.activateEndpoint(this.pipelineElement.payload.DOM, !this.pipelineElement.payload.uncompleted);
}, () => {
diff --git a/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.tmpl.html b/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.tmpl.html
index 9eb0acd..49d19bb 100644
--- a/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.tmpl.html
+++ b/ui/src/app/editor/components/pipeline-element-options/pipeline-element-options.tmpl.html
@@ -18,7 +18,7 @@
<div ng-show="ctrl.currentMouseOverElement==ctrl.pipelineElement.payload.DOM" class="sp-fade-options">
<span class="options-button customize-button" ng-show="ctrl.pipelineElement.type!='stream'" style="z-index:10">
- <md-button ng-click="ctrl.openCustomizeDialog()" ng-disabled="!ctrl.isRootElement()" class="md-icon-button"
+ <md-button ng-click="ctrl.openCustomizeDialog()" class="md-icon-button"
style="margin:0px;font-size:20px;">
<i class="material-icons">settings</i>
<md-tooltip md-direction="top">
diff --git a/ui/src/app/editor/components/pipeline/pipeline.controller.ts b/ui/src/app/editor/components/pipeline/pipeline.controller.ts
index 196bb1f..12608b0 100644
--- a/ui/src/app/editor/components/pipeline/pipeline.controller.ts
+++ b/ui/src/app/editor/components/pipeline/pipeline.controller.ts
@@ -275,7 +275,7 @@ export class PipelineController {
var sourceEndpoint = this.JsplumbBridge.selectEndpoints({element: info.targetEndpoint.elementId});
if (this.PipelineEditorService.isFullyConnected(pe)) {
if ((pe.payload.staticProperties && pe.payload.staticProperties.length > 0) || this.isCustomOutput(pe)) {
- this.EditorDialogManager.showCustomizeDialog($("#" +pe.payload.DOM), sourceEndpoint, pe.payload)
+ this.EditorDialogManager.showCustomizeDialog($("#" +pe.payload.DOM), sourceEndpoint, pe.payload, false)
.then(() => {
this.JsplumbService.activateEndpoint(pe.payload.DOM, !pe.payload.uncompleted);
}, () => {
diff --git a/ui/src/app/editor/components/replaceoutput/replaceoutput.component.ts b/ui/src/app/editor/components/replaceoutput/replaceoutput.component.ts
index 209dc90..913e18a 100644
--- a/ui/src/app/editor/components/replaceoutput/replaceoutput.component.ts
+++ b/ui/src/app/editor/components/replaceoutput/replaceoutput.component.ts
@@ -23,7 +23,8 @@ declare const require: any;
export let ReplaceOutputComponent = {
template: require('./replaceoutput.tmpl.html'),
bindings: {
- outputStrategy : "="
+ outputStrategy : "=",
+ restrictedEditMode: "<"
},
controller: ReplaceOutputController,
controllerAs: 'ctrl'
diff --git a/ui/src/app/editor/components/replaceoutput/replaceoutput.tmpl.html b/ui/src/app/editor/components/replaceoutput/replaceoutput.tmpl.html
index 6e3b3d2..1df82a3 100644
--- a/ui/src/app/editor/components/replaceoutput/replaceoutput.tmpl.html
+++ b/ui/src/app/editor/components/replaceoutput/replaceoutput.tmpl.html
@@ -24,7 +24,7 @@
</md-select>
<div ng-show="replaceOutput.renamingAllowed">
<md-input-container flex> <label>New property name</label>
- <input ng-model="replaceOutput.runtimeName"/>
+ <input ng-model="replaceOutput.runtimeName" ng-disabled="ctrl.restrictedEditMode"/>
</md-input-container>
</div>
</div>
\ No newline at end of file
diff --git a/ui/src/app/editor/dialog/customize-pipeline-element/customize.controller.ts b/ui/src/app/editor/dialog/customize-pipeline-element/customize.controller.ts
index b0b340c..0c3558c 100644
--- a/ui/src/app/editor/dialog/customize-pipeline-element/customize.controller.ts
+++ b/ui/src/app/editor/dialog/customize-pipeline-element/customize.controller.ts
@@ -38,8 +38,9 @@ export class CustomizeController {
customizeForm: any;
ShepherdService: ShepherdService;
showDocumentation: boolean = false;
+ restrictedEditMode: boolean;
- constructor($rootScope, $mdDialog, elementData, sourceEndpoint, sepa, ShepherdService) {
+ constructor($rootScope, $mdDialog, elementData, sourceEndpoint, sepa, restrictedEditMode, ShepherdService) {
this.selectedElement = sepa;
this.selection = [];
this.matchingSelectionLeft = [];
@@ -53,6 +54,7 @@ export class CustomizeController {
this.$mdDialog = $mdDialog;
this.$rootScope = $rootScope;
this.ShepherdService = ShepherdService;
+ this.restrictedEditMode = restrictedEditMode;
}
$onInit() {
@@ -99,8 +101,9 @@ export class CustomizeController {
if (this.ShepherdService.isTourActive()) {
this.ShepherdService.trigger("save-" +this.selectedElement.type);
}
+ } else {
+ this.invalid = true;
}
- else this.invalid = true;
}
@@ -145,4 +148,4 @@ export class CustomizeController {
}
}
-CustomizeController.$inject = ['$rootScope', '$mdDialog', 'elementData', 'sourceEndpoint', 'sepa', 'ShepherdService'];
\ No newline at end of file
+CustomizeController.$inject = ['$rootScope', '$mdDialog', 'elementData', 'sourceEndpoint', 'sepa', 'restrictedEditMode', 'ShepherdService'];
\ No newline at end of file
diff --git a/ui/src/app/editor/dialog/customize-pipeline-element/customizeElementDialog.tmpl.html b/ui/src/app/editor/dialog/customize-pipeline-element/customizeElementDialog.tmpl.html
index 8017b44..24b38e7 100644
--- a/ui/src/app/editor/dialog/customize-pipeline-element/customizeElementDialog.tmpl.html
+++ b/ui/src/app/editor/dialog/customize-pipeline-element/customizeElementDialog.tmpl.html
@@ -70,11 +70,23 @@
</div>
</div>
</div>
+ <div flex="100" layout="column" ng-if="ctrl.restrictedEditMode">
+ <div layout="column" class="customize-item-main-help" style="border: 2px solid #ffc400">
+ <div class="customize-item-title-help" style="background: #ffc400;" flex="100"
+ layout="row">
+ You can only modify things that don't affect your pipeline structure. To fully
+ modify this element, make sure that it doesn't connect to any successors (remove
+ outgoing connectors).
+ </div>
+ </div>
+ </div>
<div ng-repeat="staticProperty in ctrl.selectedElement.staticProperties">
<customize-dialog customize-form="ctrl.customizeForm"
selected-element="ctrl.selectedElement"
static-property="staticProperty"
- display-recommended="ctrl.displayRecommended"></customize-dialog>
+ display-recommended="ctrl.displayRecommended"
+ restricted-edit-mode="ctrl.restrictedEditMode">
+ </customize-dialog>
</div>
<div ng-repeat="outputStrategy in ctrl.selectedElement.outputStrategies">
@@ -86,7 +98,8 @@
</div>
</div>
<div class="customize-item-content">
- <replace-output output-strategy="outputStrategy"></replace-output>
+ <replace-output output-strategy="outputStrategy"
+ restricted-edit-mode="ctrl.restrictedEditMode"></replace-output>
</div>
</div>
</div>
@@ -103,7 +116,10 @@
</div>
<div class="customize-item-content">
<custom-output output-strategy="outputStrategy"
- selected-element="ctrl.selectedElement" customize-form="ctrl.customizeForm" ></custom-output>
+ selected-element="ctrl.selectedElement"
+ customize-form="ctrl.customizeForm"
+ restricted-edit-mode="ctrl.restrictedEditMode">
+ </custom-output>
</div>
</div>
</div>
diff --git a/ui/src/app/editor/services/editor-dialog-manager.service.ts b/ui/src/app/editor/services/editor-dialog-manager.service.ts
index 9fca51f..90e76ac 100644
--- a/ui/src/app/editor/services/editor-dialog-manager.service.ts
+++ b/ui/src/app/editor/services/editor-dialog-manager.service.ts
@@ -47,12 +47,13 @@ export class EditorDialogManager {
this.$mdDialog.show(dialogContent);
}
- showCustomizeDialog(elementData, sourceEndpoint, sepa) {
+ showCustomizeDialog(elementData, sourceEndpoint, sepa, restrictedEditMode) {
var dialogContent = this.DialogBuilder.getDialogTemplate(CustomizeController, require('../dialog/customize-pipeline-element/customizeElementDialog.tmpl.html'));
dialogContent.locals = {
elementData: elementData,
sourceEndpoint: sourceEndpoint,
- sepa: sepa
+ sepa: sepa,
+ restrictedEditMode: restrictedEditMode
}
return this.$mdDialog.show(dialogContent);
};