diff options
Diffstat (limited to 'catalog-ui/src/app')
-rw-r--r-- | catalog-ui/src/app/models/attributes-outputs/output-be-model.ts | 8 | ||||
-rw-r--r-- | catalog-ui/src/app/models/attributes-outputs/output-fe-model.ts | 14 |
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(); } } |