diff options
author | 2020-06-23 09:15:48 +0100 | |
---|---|---|
committer | 2020-09-04 14:42:04 +0000 | |
commit | 032525a375681fb18cc498d8daed9d73faa21ec3 (patch) | |
tree | 20cf4c17f406b8d30c29ce904fe1f19ea4a2c989 /catalog-ui/src/app/ng2/pages/composition/panel | |
parent | c16117e08b97da93da61be841c22f5759cdadd37 (diff) |
Support for Nested/Hierarchical Services
Change-Id: I478cf2e1f9cf96443a3e35bf22ac2c9d72bca8f1
Issue-ID: SDC-3145
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/composition/panel')
3 files changed, 12 insertions, 7 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap b/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap index fdede9d09e..beaa72f4fb 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap +++ b/catalog-ui/src/app/ng2/pages/composition/panel/__snapshots__/composition-panel.component.spec.ts.snap @@ -9,6 +9,7 @@ exports[`composition-panel component should match current snapshot of compositio isConfiguration={[Function Function]} isPNF={[Function Function]} selectedComponentIsServiceProxyInstance={[Function Function]} + selectedComponentIsServiceSubstitutionInstance={[Function Function]} selectedComponentIsVfcInstance={[Function Function]} setActive={[Function Function]} store={[Function Store]} diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts index bf8cc27bfb..89634ef000 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/composition-panel.component.ts @@ -121,29 +121,29 @@ export class CompositionPanelComponent { } // Deployment artifacts - if (!this.isPNF() && !this.isConfiguration() && !this.selectedComponentIsServiceProxyInstance()) { + if (!this.isPNF() && !this.isConfiguration() && !this.selectedComponentIsServiceProxyInstance() && !this.selectedComponentIsServiceSubstitutionInstance()) { this.tabs.push(tabs.deploymentArtifacts); } // Properties or Inputs - if (component.isResource() || this.selectedComponentIsServiceProxyInstance()) { + if (component.isResource() || this.selectedComponentIsServiceProxyInstance() || this.selectedComponentIsServiceSubstitutionInstance()) { this.tabs.push(tabs.properties); } else { this.tabs.push(tabs.inputs); } - if (!this.isConfiguration() && !this.selectedComponentIsServiceProxyInstance()) { + if (!this.isConfiguration() && !this.selectedComponentIsServiceProxyInstance() && !this.selectedComponentIsServiceSubstitutionInstance()) { this.tabs.push(tabs.infoArtifacts); } - if (!(component.isService()) || this.selectedComponentIsServiceProxyInstance()) { + if (!(component.isService()) || this.selectedComponentIsServiceProxyInstance() || this.selectedComponentIsServiceSubstitutionInstance()) { this.tabs.push(tabs.reqAndCapabilities); } - if (component.isService() && !this.selectedComponentIsServiceProxyInstance()) { + if (component.isService() && !this.selectedComponentIsServiceProxyInstance() && !this.selectedComponentIsServiceSubstitutionInstance()) { this.tabs.push(tabs.apiArtifacts); } - if (component.isService() && this.selectedComponentIsServiceProxyInstance()) { + if (component.isService() && (this.selectedComponentIsServiceProxyInstance() || this.selectedComponentIsServiceSubstitutionInstance())) { this.tabs.push(tabs.consumption); this.tabs.push(tabs.dependencies); this.tabs.push(tabs.substitutionFilter) @@ -173,6 +173,10 @@ export class CompositionPanelComponent { private selectedComponentIsServiceProxyInstance = (): boolean => { return this.isComponentInstanceSelected() && this.selectedComponent.isServiceProxy(); } + + private selectedComponentIsServiceSubstitutionInstance = (): boolean => { + return this.isComponentInstanceSelected() && this.selectedComponent.isServiceSubstitution(); + } private selectedComponentIsVfcInstance = (): boolean => { return this.isComponentInstanceSelected() && this.selectedComponent.isVFC(); diff --git a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/info-tab/info-tab.component.ts b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/info-tab/info-tab.component.ts index 45f31e7b35..cb889a2583 100644 --- a/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/info-tab/info-tab.component.ts +++ b/catalog-ui/src/app/ng2/pages/composition/panel/panel-tabs/info-tab/info-tab.component.ts @@ -110,7 +110,7 @@ export class InfoTabComponent implements OnInit, OnDestroy { }, onCancel); }; - if (this.component.isService() || this.component.isServiceProxy()) { + if (this.component.isService() || this.component.isServiceProxy() || this.component.isServiceSubstitution()) { this.serviceService.checkComponentInstanceVersionChange(this.workspaceService.metadata.componentType, this.workspaceService.metadata.uniqueId, this.component.uniqueId, newVersionValue).subscribe((pathsToDelete:string[]) => { if (pathsToDelete && pathsToDelete.length) { |