summaryrefslogtreecommitdiffstats
path: root/catalog-ui
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-06-20 18:23:58 +0100
committerAndré Schmid <andre.schmid@est.tech>2022-06-20 17:24:25 +0000
commit14ba27afc1422243aa459e3579bee53e2284fba6 (patch)
treeabff56732721b0eae5a8526e6a73e1939e1035e4 /catalog-ui
parentb8f6a493700972a5b6425081fe213b80a6dc295e (diff)
Fix get_input not working for complex properties
In the TOSCA function component, complex types inputs were not being found for a selected complex type property. Change-Id: I4c5c6876d8b64f6fdedf137e0523e4a105a5f921 Issue-ID: SDC-4057 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'catalog-ui')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
index 8c983b61b8..4eefbcb467 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/tosca-function/tosca-function.component.ts
@@ -22,7 +22,7 @@ import {ComponentMetadata, DataTypeModel, PropertyBEModel, PropertyModel} from '
import {TopologyTemplateService} from "../../../services/component-services/topology-template.service";
import {WorkspaceService} from "../../workspace/workspace.service";
import {PropertiesService} from "../../../services/properties.service";
-import {PROPERTY_DATA} from "../../../../utils/constants";
+import {PROPERTY_DATA, PROPERTY_TYPES} from "../../../../utils/constants";
import {DataTypeService} from "../../../services/data-type.service";
import {ToscaGetFunctionType} from "../../../../models/tosca-get-function-type";
import {TranslateService} from "../../../shared/translator/translate.service";
@@ -335,12 +335,13 @@ export class ToscaFunctionComponent implements OnInit {
}
private hasSameType(property: PropertyBEModel) {
- if (this.property.schema && this.property.schema.property) {
+ if (this.typeHasSchema(this.property.type)) {
if (!property.schema || !property.schema.property) {
return false;
}
return property.type === this.property.type && this.property.schema.property.type === property.schema.property.type;
}
+
return property.type === this.property.type;
}
@@ -356,6 +357,10 @@ export class ToscaFunctionComponent implements OnInit {
return PROPERTY_DATA.SIMPLE_TYPES.indexOf(propertyType) === -1;
}
+ private typeHasSchema(propertyType: string): boolean {
+ return PROPERTY_TYPES.MAP === propertyType || PROPERTY_TYPES.LIST === propertyType;
+ }
+
private stopLoading(): void {
this.isLoading = false;
}
'>189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304