summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/view-models/workspace/tabs/composition/tabs/properties-and-attributes/properties-view.html
blob: cdd69682dcd44890f531aa1b19fd9aa253a6dc5f (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
124
125
126
127
128
129
130
131
132
133
<!--
  ~ 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.
-->

<perfect-scrollbar class="w-sdc-designer-sidebar-tab-content properties" id="main-scroll">

    <div class="w-sdc-designer-sidebar-section">

        <!--expand-collapse data-ng-if="isPropertyOwner() && !currentComponent.properties.length" expanded-selector=".w-sdc-composition-sidebar-section-content.{{currentComponent.name}}"
                         class="w-sdc-composition-sidebar-section-title">
            <span class="w-sdc-composition-sidebar-section-title-text" tooltips tooltip-content="{{currentComponent.name | resourceName}}&nbsp;Properties"
                data-ng-bind="(currentComponent.name | resourceName)+ ' Properties'"></span>
            <div class="w-sdc-composition-sidebar-section-title-icon"></div>
        </expand-collapse-->
        <!--properties-->
        <expand-collapse data-ng-repeat-start="(key, group) in properties"
                         expanded-selector=".w-sdc-designer-sidebar-section-content.properties.{{$index}}">
            <div class="first-level">
                <div class="expand-collapse-title-icon"></div>
                <span class="w-sdc-designer-sidebar-section-title-text" data-ng-bind="groupNameByKey(key) + ' Properties'"
                      tooltips tooltip-content="{{groupNameByKey(key)}}&nbsp;Properties"
                      data-tests-id="vfi-properties"></span>
            </div>
        </expand-collapse>

        <div data-ng-repeat-end="" class="w-sdc-designer-sidebar-section-content properties {{$index}}"> <!--data-ng-show="isShowDetailsSection" -->
            <div class="i-sdc-designer-sidebar-section-content-item" data-ng-if="!groupPropertiesByInstance">
                <div class="i-sdc-designer-sidebar-section-content-item-property-and-attribute" data-tests-id="propertyRow"
                     data-ng-repeat="property in group | orderBy: 'name' track by $index">
                    <div>
                        <span class="i-sdc-designer-sidebar-section-content-item-property-and-attribute-label"
                              data-ng-class="{'hand enabled': !$parent.isViewOnly}"
                              tooltips tooltip-content="{{property.name}}"
                              data-ng-click="!$parent.isViewOnly && updateProperty(property)"
                              data-tests-id="{{property.name}}">{{property.name}}</span>
                    </div>
                    <div>
                        <span class="i-sdc-designer-sidebar-section-content-item-property-value" data-ng-if="isPropertyOwner()"
                              tooltips tooltip-content="{{property.defaultValue}}">{{property.defaultValue}}</span>
                        <span class="i-sdc-designer-sidebar-section-content-item-property-value" data-ng-if="!isPropertyOwner()"
                              tooltips tooltip-content="{{property.value}}"
                              data-tests-id="value_{{property.name}}">{{property.value}}</span>
                    </div>
                    <button class="i-sdc-designer-sidebar-section-content-item-button delete sprite e-sdc-small-icon-delete"
                            data-ng-if="!$parent.isViewOnly&&(isPropertyOwner() && !property.readonly)"
                            data-ng-click="deleteProperty(property)" type="button"></button>
                </div>
            </div>
            <div class="i-sdc-designer-sidebar-section-content-item" data-ng-if="groupPropertiesByInstance">
                <div data-ng-repeat-start="(instancesIds , InstanceProperties) in (group | groupBy:'path')"
                     class="vfci-properties-group"
                     data-ng-click="showGroupsOfInstanceProperties[$index]=!showGroupsOfInstanceProperties[$index]"
                data-ng-class="{'expanded':showGroupsOfInstanceProperties[$index]}">
                    <div class="second-level">
                        <div class="expand-collapse-title-icon"></div>
                        <span class="w-sdc-designer-sidebar-section-title-text" data-ng-bind="getComponentInstanceNameFromInstanceByKey(InstanceProperties[0].path[1]) + ' Properties'"
                              tooltips tooltip-content="{{getComponentInstanceNameFromInstanceByKey(InstanceProperties[0].path[1])}}&nbsp;Properties"
                              data-tests-id="vfci-properties"></span>
                    </div>
                </div>
                <div data-ng-repeat-end="" class="w-sdc-designer-sidebar-section-content instance-properties {{$index}}" data-ng-if="showGroupsOfInstanceProperties[$index]">
                    <div class="i-sdc-designer-sidebar-section-content-item">
                        <div class="i-sdc-designer-sidebar-section-content-item-property-and-attribute" data-tests-id="propertyRow"
                             data-ng-repeat="instanceProperty in InstanceProperties | orderBy: 'name'">
                            <div>
                                <span class="i-sdc-designer-sidebar-section-content-item-property-and-attribute-label"
                                      data-ng-class="{'hand enabled': !$parent.isViewOnly}"
                                      tooltips tooltip-content="{{instanceProperty.name}}"
                                      data-tests-id="vfci-property">{{instanceProperty.name}}</span>
                            </div>
                            <div>
                                <span class="i-sdc-designer-sidebar-section-content-item-property-value"
                                      tooltips tooltip-content="{{instanceProperty.value === undefined ? instanceProperty.defaultValue : instanceProperty.value}}">
                                    {{instanceProperty.value === undefined ? instanceProperty.defaultValue : instanceProperty.value}}</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--<div  class="w-sdc-designer-sidebar-section-footer" data-ng-if="(!$parent.isViewOnly && isPropertyOwner()) || showAddPropertyButton">-->
                <!--<button class="w-sdc-designer-sidebar-section-footer-action tlv-btn blue" data-tests-id="addGrey" data-ng-click="addProperty()" type="button">-->
                    <!--Add Property-->
                <!--</button>-->
            <!--</div>-->
        </div>


        <!--attributes-->
        <expand-collapse data-ng-repeat-start="(key, group) in attributes"
                         expanded-selector=".w-sdc-designer-sidebar-section-content.attributes.{{$index}}">
            <div class="first-level">
                <div class="expand-collapse-title-icon"></div>
                <span class="w-sdc-designer-sidebar-section-title-text" data-ng-bind="groupNameByKey(key) + ' Attributes'"
                      tooltips tooltip-content="{{groupNameByKey(key)}}&nbsp;Attributes"></span>
            </div>
        </expand-collapse>

        <div data-ng-repeat-end="" class="w-sdc-designer-sidebar-section-content attributes {{$index}}"> <!--data-ng-show="isShowDetailsSection" -->
            <div class="i-sdc-designer-sidebar-section-content-item">
                <div class="i-sdc-designer-sidebar-section-content-item-property-and-attribute"
                     data-ng-repeat="attribute in group | orderBy: 'name' track by $index">
                    <div>
                        <span class="i-sdc-designer-sidebar-section-content-item-property-and-attribute-label"
                              data-ng-class="{'hand enabled': !$parent.isViewOnly}"
                              tooltips tooltip-content="{{attribute.name}}"
                              data-ng-click="!$parent.isViewOnly && viewAttribute(attribute)"
                              data-tests-id="{{attribute.name}}-attr">{{attribute.name}}</span>
                    </div>
                    <div>
                        <span class="i-sdc-designer-sidebar-section-content-item-property-value" data-ng-if="isPropertyOwner()"
                              tooltips tooltip-content="{{attribute.defaultValue}}">{{attribute.defaultValue}}</span>
                        <span class="i-sdc-designer-sidebar-section-content-item-property-value" data-ng-if="!isPropertyOwner()"
                              tooltips tooltip-content="{{attribute.value}}" data-tests-id="value-of-{{attribute.name}}">{{attribute.value}}</span>
                    </div>
                </div>
            </div>

        </div>

    </div>
</perfect-scrollbar>