From 6e12c8ad59f11426e49f81c4a7032480b126bfbc Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 23 Jan 2023 20:10:43 +0000 Subject: Implement hiding mechanism Signed-off-by: Vasyl Razinkov Change-Id: I799af15e31b724ca394eebe435223c03186fb6d3 Issue-ID: SDC-4344 --- .../workspace/tabs/general/general-view-model.ts | 9 +- .../workspace/tabs/general/general-view.html | 1242 ++++++++++---------- 2 files changed, 622 insertions(+), 629 deletions(-) (limited to 'catalog-ui/src/app/view-models/workspace') diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts index a1acfc73fa..8023ceecec 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts @@ -176,9 +176,6 @@ export class GeneralViewModel { this.initScope(); } - - - private initScopeValidation = ():void => { this.$scope.validation = new Validation(); this.$scope.validation.componentNameValidationPattern = this.ComponentNameValidationPattern; @@ -689,7 +686,6 @@ export class GeneralViewModel { } }; - this.EventListenerService.registerObserverCallback(EVENTS.ON_LIFECYCLE_CHANGE_WITH_SAVE, (nextState) => { if (this.$state.current.data.unsavedChanges && this.$scope.isValidForm) { this.$scope.save().then(() => { @@ -888,6 +884,10 @@ export class GeneralViewModel { } return metadatakey != null; } + + this.$scope.isNotApplicableMetadataKeys = (key: string): boolean => { + return this.$scope.component.categories && this.$scope.component.categories[0].notApplicableMetadataKeys && this.$scope.component.categories[0].notApplicableMetadataKeys.some(item => item === key); + } } private filterCategoriesByModel(modelName:string) { @@ -897,7 +897,6 @@ export class GeneralViewModel { !modelName ? !category.models || category.models.indexOf(DEFAULT_MODEL_NAME) !== -1 : category.models !== null && category.models.indexOf(modelName) !== -1); } - private filterBaseTypesByModelAndCategory(modelName:string) { let categories = this.$scope.component.categories; if (categories) { diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html index 1fb8d5f10f..4704feb71e 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html +++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view.html @@ -14,644 +14,638 @@ ~ limitations under the License. -->
-
-
- Click save to update to the new VSP -
- - + -
-
+
+ -
+
-
+
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
- -
- - - -
- - - - - -
-
- - - -
- - -
- - - -
- - - - -
- - -
-
- -
-
- - - -
- -
- - -
- -
-
-
- - -
-
- - -
- -
-
-
- - -
-
-
- -
- - - - -
- - -
+ ng-model="component.icon" + tooltips tooltip-content='{{component.icon | translate}}' + >
- - - -
- - - - -
- - - -
+
+
+
+ +
+ + + +
+ + + + +
- - -
- -
- -
- - - - - -
- - -
- -
- {{(fileModel && fileModel.filename) || importedToscaBrowseFileText }} -
- -
Browse
-
-
- -
- - - - - -
- - - -
- - - -
- - - -
-
- - - -
- - - -
- - - -
- +
+ + + +
+ + +
+ + + +
+ + + + +
+ +
- - - - -
- - - -
- - - -
+
+ +
+
+ + +
+ +
+ + +
+
- - - -
- - - -
- - -
+
+
+ + +
+
+ + +
+
- - - - -
- - -
- -
-
- - - -
-
-
- -
-
- -
- -
-
- - -
-
- - -
-
- - - -
-
-
- -
-
- -
- -
-
- - -
-
- - -
-
- - - -
-
-
- -
-
- -
- -
-
- - -
-
- - -
-
- - -
-
-
- -
-
- -
- -
-
- - -
-
- - -
-
- - - - -
- - - - -
- - - -
- - -
- - - - -
-
-
- - -
-
-
-
- - -
-
-
- - - - -
+
+
+ + +
+
+
+ + + +
+ + + + +
+ + +
+
+ + + +
+ + + +
+ + + +
+
+ + +
+ +
+ +
+ + + +
+ + +
+ +
+ {{(fileModel && fileModel.filename) || importedToscaBrowseFileText }} +
+ +
Browse
+
+
+ +
+ + + + + +
+ + + +
+ + + +
+ + + +
+
+ + + +
+ + + +
+ + + +
+ +
+ + + +
+ + + +
+ + + +
+
+ + + +
+ + + +
+ + +
+
+ + + +
+ + +
+ +
+
+ + + +
+
+
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + + +
+
+
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + + +
+
+
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + + +
+
+
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + + +
+ + + + +
+ + + +
+ + +
+ + + +
+
+
+ + +
+
+
+
+ + +
+
+
+ + + +
+
-
+
- +
-- cgit 1.2.3-korg