summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/interface-operation
diff options
context:
space:
mode:
authoraribeiro <anderson.ribeiro@est.tech>2021-07-15 09:18:37 +0100
committeraribeiro <anderson.ribeiro@est.tech>2021-08-06 17:22:20 +0100
commit47bcc63a9daff1f310125fed006f27c93656fa83 (patch)
tree3c61670b039c0e63d14880f909e6047d54776492 /catalog-ui/src/app/ng2/pages/interface-operation
parent0ed125f98ae8ea9e80c855a640c328654660d081 (diff)
Retrieve data types based on component model
Issue-ID: SDC-3660 Signed-off-by: aribeiro <anderson.ribeiro@est.tech> Change-Id: I09c533eb39277532b29e581e4dd57e9df952e8e6
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/interface-operation')
-rw-r--r--catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.ts b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.ts
index 76cf73ff17..8227229c26 100644
--- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.ts
+++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.ts
@@ -3,6 +3,7 @@ import {PROPERTY_DATA} from "app/utils";
import {DataTypeService} from "app/ng2/services/data-type.service";
import {OperationModel, OperationParameter, InputBEModel, DataTypeModel, Capability} from 'app/models';
import {DropdownValue} from "app/ng2/components/ui/form-components/dropdown/ui-element-dropdown.component";
+import {WorkspaceService} from "../../../workspace/workspace.service";
class DropdownValueType extends DropdownValue {
type: String;
@@ -37,7 +38,7 @@ export class ParamRowComponent {
filteredInputProps: Array<DropdownValue> = [];
filteredCapabilitiesProps: Array<{capabilityName: string, properties: Array<DropdownValueType>}> = [];
- constructor(private dataTypeService:DataTypeService) {}
+ constructor(private dataTypeService:DataTypeService, protected workspaceService: WorkspaceService) {}
ngOnInit() {
if (this.isInputParam) {
@@ -58,7 +59,7 @@ export class ParamRowComponent {
)
);
} else {
- const dataTypes: Array<DataTypeModel> = _.toArray(this.dataTypeService.getAllDataTypes());
+ const dataTypes: Array<DataTypeModel> = _.toArray(this.dataTypeService.getDataTypeByModel(this.workspaceService.metadata.model));
this.propTypeEnum = _.concat(
_.map(
_.filter(
@@ -170,7 +171,7 @@ export class ParamRowComponent {
getPrimitiveSubtypes(): Array<InputBEModel> {
const flattenedProps: Array<any> = [];
- const dataTypes = this.dataTypeService.getAllDataTypes();
+ const dataTypes = this.dataTypeService.getDataTypeByModel(this.workspaceService.metadata.model);
_.forEach(this.inputProps, prop => {
const type:DataTypeModel = _.find(