summaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2022-07-14 21:06:58 +0100
committerMichael Morris <michael.morris@est.tech>2022-07-15 13:16:16 +0000
commitee8876059c520d97bf068734b25a02365d7fe1ea (patch)
tree46176fc6a016818c6d17dd0ac20054ec884e7802 /catalog-ui
parente4055451d3fbfe1fba35dcf546907ad432f6b4fc (diff)
Support Outputs during Import Service
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I4d58576b70ef738d6fa7545cd268ec030b43f95c Issue-ID: SDC-4051
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/models/attributes-outputs/output-be-model.ts8
-rw-r--r--catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts14
2 files changed, 10 insertions, 12 deletions
diff --git a/catalog-ui/src/app/models/attributes-outputs/output-be-model.ts b/catalog-ui/src/app/models/attributes-outputs/output-be-model.ts
index c5f0bfabd3..e90a8a9f4e 100644
--- a/catalog-ui/src/app/models/attributes-outputs/output-be-model.ts
+++ b/catalog-ui/src/app/models/attributes-outputs/output-be-model.ts
@@ -18,23 +18,21 @@
* ============LICENSE_END=========================================================
*/
-import {AttributeBEModel} from "./attribute-be-model";
+import { AttributeBEModel } from './attribute-be-model';
export class OutputBEModel extends AttributeBEModel {
outputPath: string;
- outputs: Array<OutputComponentInstanceModel>;
instanceUniqueId: string;
ownerId: string;
attributeId: string;
- attributes: Array<OutputComponentInstanceModel>;
+ attribute: OutputComponentInstanceModel;
constructor(output?: OutputBEModel) {
super(output);
this.instanceUniqueId = output.instanceUniqueId;
this.attributeId = output.attributeId;
- this.attributes = output.attributes;
- this.outputs = output.outputs;
+ this.attribute = output.attribute;
this.ownerId = output.ownerId;
this.outputPath = output.outputPath;
}
diff --git a/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts b/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
index 8806562d06..d66846bf4a 100644
--- a/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
+++ b/catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts
@@ -18,11 +18,11 @@
* ============LICENSE_END=========================================================
*/
-import * as _ from "lodash";
-import {PROPERTY_DATA} from "../../utils/constants";
-import {OutputBEModel} from "./output-be-model";
-import {AttributeFEModel} from "./attribute-fe-model";
-import {DerivedAttributeType} from "./attribute-be-model";
+import * as _ from 'lodash';
+import { PROPERTY_DATA } from '../../utils/constants';
+import { DerivedAttributeType } from './attribute-be-model';
+import { AttributeFEModel } from './attribute-fe-model';
+import { OutputBEModel } from './output-be-model';
export class OutputFEModel extends OutputBEModel {
isSimpleType: boolean;
@@ -38,7 +38,7 @@ export class OutputFEModel extends OutputBEModel {
super(output);
if (output) {
this.isSimpleType = PROPERTY_DATA.SIMPLE_TYPES.indexOf(this.type) > -1;
- let relatedAttribute = output.attributes && output.attributes[0] || output.outputs && output.outputs[0];
+ const relatedAttribute = output.attribute;
if (relatedAttribute) {
this.relatedAttributeValue = relatedAttribute.value;
this.relatedAttributeName = relatedAttribute.name;
@@ -71,6 +71,6 @@ export class OutputFEModel extends OutputBEModel {
}
hasChanged(): boolean {
- return this.hasDefaultValueChanged() ;
+ return this.hasDefaultValueChanged();
}
}