diff options
author | JvD_Ericsson <jeff.van.dam@est.tech> | 2023-10-06 09:12:37 +0100 |
---|---|---|
committer | MichaelMorris <michael.morris@est.tech> | 2023-10-06 16:54:29 +0100 |
commit | 4f058c098678ea01f8a01250dbf9bac4b77b6744 (patch) | |
tree | 84e667e3baf4d27f747bc2826ecafc3ff6beab47 /catalog-ui | |
parent | ee6e389e64b55615800a81ce43a41fa3e7ff93ce (diff) |
Milestone import support
Issue-ID: SDC-4646
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: I90da530a84c757a07c3ef903201f89869d223b8c
Diffstat (limited to 'catalog-ui')
2 files changed, 14 insertions, 4 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/activities-list/activities-list.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/activities-list/activities-list.component.ts index b265464f86..ac9daa4b33 100644 --- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/activities-list/activities-list.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/activities-list/activities-list.component.ts @@ -143,20 +143,30 @@ export class ActivitiesListComponent implements OnInit { } collectInputNames(index: number) { - return this.activities[index].inputs.listToscaDataDefinition.map((input) => input.name); + if (this.activities[index].inputs) { + return this.activities[index].inputs.listToscaDataDefinition.map((input) => input.name); + } + return []; } onAddInput(inputOperationParameter: InputOperationParameter, index: number) { + if (!this.activities[index].inputs) { + let input = new class implements IOperationParamsList { + listToscaDataDefinition: Array<InputOperationParameter> = []; + } + this.activities[index].inputs = input; + } this.activities[index].inputs.listToscaDataDefinition.push(inputOperationParameter); this.activities[index].inputs.listToscaDataDefinition = Array.from(this.activities[index].inputs.listToscaDataDefinition); + this.emitOnActivityChange(); } getInputs(index: number) { - if (this.activities[index].inputs.listToscaDataDefinition) { + if (this.activities[index].inputs && this.activities[index].inputs.listToscaDataDefinition) { let test: InputOperationParameter[] = this.activities[index].inputs.listToscaDataDefinition; return test; } - return {}; + return []; } onInputValueChange(changedInput: InputOperationParameter, index: number) { diff --git a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/add-input/add-input.component.ts b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/add-input/add-input.component.ts index 5620d193a8..d3b596ef69 100644 --- a/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/add-input/add-input.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/interface-operatons/operation-creator/add-input/add-input.component.ts @@ -145,7 +145,7 @@ export class AddInputComponent implements OnInit { showAddInput() { if (this.defaultType) { - this.inputToAdd.type = this.dataTypeMap.get(this.defaultType) ? this.defaultType : undefined; + this.onChangeInputType(this.defaultType); } this.showForm = true; this.showAddLink = false; |