aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/tabs/hierarchy/hierarchy-view.html
blob: 423cbcd1f04b336ae19286bd1c777158fd518131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!--
  ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->

<div class="sdc-general-tab hierarchy-tab" ng-class="">
    <loader data-display="isLoading" relative="true" size="medium"></loader>
    <div class="sdc-general-tab-title" data-tests-id="tab-header" translate="DEPLOYMENT_TAB_TITLE"></div>

    <div class="resizable-container">
        <div  data-ng-if="!component.isService()"class="resizable-section">

            <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true"
                               class="general-tab-scrollbar-container">
                <div class="sdc-general-tab-sub-title" data-tests-id="tab-sub-header">{{component.name}}</div>
                <expand-collapse expanded-selector=".hierarchy-module-member-list.{{$index}}"
                                 class="general-tab-expand-collapse" is-close-on-init="true"
                                 data-tests-id="hierarchy-module-{{$index}}"
                                 data-ng-repeat-start="module in component.modules">
                    <div class="expand-collapse-title first-level" data-tests-id="hierarchy-module-{{$index}}-title" ng-class="{'selected': selectedIndex === $index}" data-ng-click="onModuleSelected(module, $index)">
                        <div class="expand-collapse-title-icon"></div>
                        <span class="expand-collapse-title-text" data-ng-bind="module.name" tooltips
                              tooltip-content="{{module.name}}"></span>

                    </div>
                </expand-collapse>

                <div data-ng-repeat-end="" class="hierarchy-module-member-list {{$index}}">
                    <div ng-repeat="memberId in ::module.members track by $index">
                        <div class="expand-collapse-sub-title"  tooltips tooltip-content="{{componentInstancesMap[memberId].name}}">{{componentInstancesMap[memberId].name}}</div>
                    </div>
                </div>
            </perfect-scrollbar>
        </div>
        <div  data-ng-if="component.isService()"class="resizable-section">
            <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true"
                               class="general-tab-scrollbar-container">
                <expand-collapse expanded-selector=".hierarchy-modules-list.{{$index}}"
                                 class="general-tab-expand-collapse" is-close-on-init="true"
                                 data-tests-id="hierarchy-instance-{{$index}}"

                                 data-ng-repeat-start="instance in component.componentInstances">
                    <div class="expand-collapse-title first-level" data-tests-id="hierarchy-instance-{{$index}}-title">
                        <div class="expand-collapse-title-icon"></div>
                        <span class="expand-collapse-title-text" data-ng-bind="instance.name" tooltips
                              tooltip-content="{{instance.name}}"></span>

                    </div>
                </expand-collapse>
                <!--TODO: Rachel :  -->
                <div data-ng-repeat-end="" class="hierarchy-modules-list {{$index}}">
                    <expand-collapse expanded-selector=".outer-index-{{$parent.$index}}.hierarchy-module-member-list.{{$index}}"
                                     class="general-tab-expand-collapse" is-close-on-init="true"
                                     data-tests-id="hierarchy-module-{{$index}}"
                                     data-ng-repeat-start="module in instance.groupInstances">
                        <div class="expand-collapse-title second-level" data-tests-id="hierarchy-module-{{$index}}-title" ng-class="{'selected': selectedIndex === $index && selectedInstanceId === instance.uniqueId}" data-ng-click="onModuleSelected(module, $index, instance.uniqueId)">
                            <div class="expand-collapse-title-icon"></div>
                        <span class="expand-collapse-title-text" data-ng-bind="module.name" tooltips tooltip-content="{{module.name}}"></span>

                        </div>
                    </expand-collapse>

                    <div data-ng-repeat-end="" class="outer-index-{{$parent.$index}} hierarchy-module-member-list {{$index}}">
                        <div ng-repeat="memberId in ::module.members track by $index">
                            <div class="expand-collapse-sub-title"  tooltips tooltip-content="{{componentInstancesMap[memberId].name}}">{{componentInstancesMap[memberId].name}}</div>
                        </div>
                    </div>
                </div>
            </perfect-scrollbar>
        </div>

        <div  resizable r-directions="['top']" r-flex="true" ng-if="selectedModule" class="resizable-section module-data-container" data-tests-id="selected-module-data">
            <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true"
                               class="general-tab-scrollbar-container">
                <div class="module-data">
                    <div>
                        <div class="module-name module-text-overflow" data-tests-id="selected-module-name" tooltips tooltip-content="{{selectedModule.name}}">{{selectedModule.name}}</div>
                        <div class="edit-name-container" data-ng-if="!component.isService()">
                            <edit-name-popover header="Edit Module Name" direction="auto top" module="selectedModule" on-save="updateHeatName()" ng-class="{'disabled': isViewOnly}" class="sdc-edit-icon" data-tests-id="edit-name-popover-icon"></edit-name-popover>
                        </div>
                    </div>
                    <div class="" data-tests-id="selected-module-group-uuid" tooltips tooltip-content="{{selectedModule.groupUUID}}"><span class="bold">Module ID:</span><br><span class="small-font">{{selectedModule.groupUUID}}</span></div>
                    <div class="" data-tests-id="selected-module-group-customization-uuid" data-ng-if="component.isService() && isViewOnly" tooltips tooltip-content="{{selectedModule.customizationUUID}}"><span class="bold">Customization ID:</span ><br><span class="small-font">{{selectedModule.customizationUUID}}</span></div>
                    <div class=""  data-tests-id="selected-module-group-invariant-uuid" tooltips tooltip-content="{{selectedModule.invariantUUID}}"><span class="bold">Invariant UUID:</span><span class="small-font">{{selectedModule.invariantUUID}}</span></div>
                    <div data-tests-id="selected-module-version"><span class="bold">Version:</span> {{selectedModule.version}}</div>
                    <div data-tests-id="selected-module-is-base"><span class="bold">IsBase:</span> {{selectedModule.isBase}}</div>

                </div>
                <expand-collapse-list-header title="Properties" expand-collapse-list-data="expandCollapsePropertiesList"></expand-collapse-list-header>
                <div ng-repeat="property in filteredProperties=(selectedModule.properties | filter: expandCollapsePropertiesList.filter | orderBy:expandCollapsePropertiesList.orderByField) track by $index" data-ng-if="expandCollapsePropertiesList.expandCollapse">
                    <div class="list-item property-data" data-ng-class="{'last':$last}">
                        <div class="property-name  module-text-overflow" data-tests-id="selected-module-property-name">
                            <span tooltips tooltip-content="{{property.name}}"
                                  data-ng-class="{'hand': !isViewOnly}"
                                  data-ng-click="!isViewOnly && openEditPropertyModal(property, filteredProperties)">{{property.name}}</span>
                        </div>
                        <div class="module-text-overflow property-info" data-tests-id="selected-module-property-type"> Type: {{property.type}}</div>
                        <div class="module-text-overflow property-info" data-tests-id="selected-module-property-schema-type">Value: {{property.value}}</div>
                    </div>
                </div>
                <expand-collapse-list-header title="Artifacts" expand-collapse-list-data="expandCollapseArtifactsList"></expand-collapse-list-header>
                <div ng-repeat="artifact in selectedModule.artifacts| filter: expandCollapseArtifactsList.filter | orderBy:expandCollapseArtifactsList.orderByField  track by $index" data-ng-if="expandCollapseArtifactsList.expandCollapse">
                    <div class="list-item artifact-data" data-ng-class="{'last':$last}">
                        <div class="artifact-name  module-text-overflow" data-tests-id="selected-module-artifact-name" tooltips tooltip-content="{{artifact.artifactName}}">{{artifact.artifactName}}</div>
                        <div class="module-text-overflow" tooltips data-tests-id="selected-module-artifact-uuid" tooltip-content="{{artifact.artifactUUID}}">UUID: {{artifact.artifactUUID}}</div>
                        <div data-tests-id="selected-module-artifact-version">Version: {{artifact.artifactVersion}}</div>
                    </div>
                </div>
            </perfect-scrollbar>
        </div>
    </div>
</div>