diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row')
3 files changed, 12 insertions, 13 deletions
diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html index 8382f1e842..29e8a3508b 100644 --- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html +++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.html @@ -38,11 +38,17 @@ <div class="cell field-property" *ngIf="isInputParam"> <ui-element-dropdown + *ngIf="filteredInputProps.length > 0" data-tests-id="paramProperty" [values]="filteredInputProps" [(value)]="param.property" [readonly]="readonly"> </ui-element-dropdown> + <span + *ngIf="filteredInputProps.length == 0" + class="no-properties-error"> + No available properties of this type. + </span> </div> <div class="cell field-mandatory" *ngIf="!isAssociateWorkflow"> diff --git a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.less b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.less index 81a1832c21..28932eb90f 100644 --- a/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.less +++ b/catalog-ui/src/app/ng2/pages/interface-operation/operation-creator/param-row/param-row.component.less @@ -36,5 +36,10 @@ &:last-child { flex: 1; } + + .no-properties-error { + color: red; + font-style: italic; + } } } 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 9f7f4230ee..8844cf65bb 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 @@ -1,5 +1,4 @@ import {Component, Input} from '@angular/core'; -import {PROPERTY_DATA} from "app/utils"; import {DataTypeService} from "app/ng2/services/data-type.service"; import {OperationParameter} from 'app/models'; import {DropdownValue} from "app/ng2/components/ui/form-components/dropdown/ui-element-dropdown.component"; @@ -22,19 +21,8 @@ export class ParamRowComponent { propTypeEnum: Array<String> = []; filteredInputProps: Array<DropdownValue> = []; - constructor(private dataTypeService:DataTypeService) {} - ngOnInit() { - const types = PROPERTY_DATA.TYPES.concat( - _.filter( - Object.keys(this.dataTypeService.getAllDataTypes()), - type => PROPERTY_DATA.TYPES.indexOf(type) === -1 - ) - ); - this.propTypeEnum = _.filter( - types, - type => _.toArray(this.propTypes).indexOf(type) > -1 - ); + this.propTypeEnum = _.uniq(_.toArray(this.propTypes)); this.onChangeType(); } |