aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/app/scripts/view-models/catalog/catalog-view.html
blob: 0d46dc2a24698de3e4367f0b5bfffcb86743920b (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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<div class="sdc-catalog-container">

    <loader data-display="gui.isLoading"></loader>
<!--
    <ecomp-header menu-data="menuItems" version="{{version}}"></ecomp-header>
-->

    <div class="w-sdc-main-container">

        <!-- LEFT SIDE -->
        <perfect-scrollbar scroll-y-margin-offset="0" class="sdc-catalog-body-container w-sdc-left-sidebar" include-padding="true">
            <div class="sdc-catalog-leftbar-container">

                <div class="sdc-catalog-type-filter-container">
                    <div
                        class="i-sdc-designer-leftbar-section-title pointer"
                        data-ng-click="sectionClick('type')"
                        data-ng-class="{'expanded': expandedSection.indexOf('type') !== -1}">
                        <span class="i-sdc-designer-leftbar-section-title-icon"></span>
                        <span class="i-sdc-designer-leftbar-section-title-text" data-tests-id="typeFilterTitle">Type</span>
                    </div>
                    <div class="i-sdc-designer-leftbar-section-content">
                        <ul class="list-unstyled i-sdc-designer-leftbar-section-content-ul">
                            <li class="i-sdc-designer-leftbar-section-content-ul-li" data-ng-repeat="type in checkboxes.componentTypes">

                                <sdc-checkbox elem-id="checkbox-{{type | lowercase | clearWhiteSpaces}}"
                                              sdc-checklist-model="checkboxesFilter.selectedComponentTypes"
                                              sdc-checklist-value="type"
                                              data-ng-click="gui.onComponentTypeClick(type)"
                                              text="{{type}}"></sdc-checkbox>

                                <ul class="list-unstyled i-sdc-catalog-subcategories-checkbox" data-ng-if="type==='Resource'">
                                    <li data-ng-repeat="subType in checkboxes.resourceSubTypes">

                                        <sdc-checkbox elem-id="checkbox-{{subType | lowercase | clearWhiteSpaces}}"
                                                      sdc-checklist-model="checkboxesFilter.selectedResourceSubTypes"
                                                      sdc-checklist-value="subType"
                                                      data-ng-click="gui.onResourceSubTypesClick()"
                                                      text="{{subType}}"></sdc-checkbox>

                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                </div>

                <div class="sdc-catalog-categories-filter-container">
                    <div
                        class="i-sdc-designer-leftbar-section-title pointer"
                        data-ng-click="sectionClick('category')"
                        data-ng-class="{'expanded': expandedSection.indexOf('category') !== -1}">
                        <span class="i-sdc-designer-leftbar-section-title-icon"></span>
                        <span class="i-sdc-designer-leftbar-section-title-text" data-tests-id="categoriesFilterTitle">Categories</span>
                    </div>
                    <div class="i-sdc-designer-leftbar-section-content">

                        <!-- CATEGORY CHECKBOX -->
                        <ul class="list-unstyled i-sdc-designer-leftbar-section-content-ul">
                            <li class="i-sdc-designer-leftbar-section-content-ul-li"
                                data-ng-repeat="category in categories track by category.uniqueId | categoryTypeFilter:checkboxesFilter.selectedComponentTypes | orderBy: category">

                                <sdc-checkbox elem-id="checkbox-{{category.uniqueId | lowercase | clearWhiteSpaces}}"
                                              sdc-checklist-model="checkboxesFilter.selectedCategoriesModel"
                                              sdc-checklist-value="category.uniqueId"
                                              data-tests-id="{{category.uniqueId}}"
                                              data-ng-click="gui.onCategoryClick(category)"
                                              text="{{category.name}}"></sdc-checkbox>

                                <!-- SUB CATEGORY CHECKBOX -->
                                <ul class="list-unstyled i-sdc-catalog-subcategories-checkbox" data-ng-if="category.subcategories && category.subcategories.length>0">
                                    <li ng-repeat="subcategory in category.subcategories track by subcategory.uniqueId | orderBy:'name'">

                                        <sdc-checkbox elem-id="checkbox-{{subcategory.uniqueId | lowercase | clearWhiteSpaces}}"
                                                      sdc-checklist-model="checkboxesFilter.selectedCategoriesModel"
                                                      sdc-checklist-value="subcategory.uniqueId"
                                                      data-tests-id="{{subcategory.uniqueId}}"
                                                      data-ng-click="gui.onSubcategoryClick($parent.category, subcategory)"
                                                      text="{{subcategory.name}}"></sdc-checkbox>

                                        <!-- GROUPING CHECKBOX -->
                                        <ul class=" list-unstyled i-sdc-catalog-grouping-checkbox" data-ng-if="subcategory.groupings && subcategory.groupings.length>0">
                                            <li ng-repeat="grouping in subcategory.groupings track by grouping.uniqueId | orderBy:'name'">

                                                <sdc-checkbox elem-id="checkbox-{{grouping.uniqueId | lowercase | clearWhiteSpaces}}"
                                                              sdc-checklist-model="checkboxesFilter.selectedCategoriesModel"
                                                              sdc-checklist-value="grouping.uniqueId"
                                                              data-ng-click="gui.onGroupClick($parent.subcategory)"
                                                              text="{{grouping.name}}"></sdc-checkbox>

                                            </li>
                                        </ul>
                                    </li><!-- Close subcategory -->
                                </ul><!-- Close subcategories -->
                            </li><!-- Close main category -->
                        </ul><!-- Close main categories -->

                    </div>
                </div>

                <!-- STATUS -->
                <div class="sdc-catalog-status-filter-container">
                    <div
                        class="i-sdc-designer-leftbar-section-title pointer"
                        data-ng-click="sectionClick('status')"
                        data-ng-class="{'expanded': expandedSection.indexOf('status') !== -1}">
                        <span class="i-sdc-designer-leftbar-section-title-icon"></span>
                        <span class="i-sdc-designer-leftbar-section-title-text" data-tests-id="statusFilterTitle">Status</span>
                    </div>

                    <div class="i-sdc-designer-leftbar-section-content">
                        <ul class="list-unstyled i-sdc-designer-leftbar-section-content-ul">
                            <!--li data-ng-repeat="(key, value) in confStatus" -->

                            <li class="i-sdc-designer-leftbar-section-content-ul-li"
                                data-ng-repeat="(key, state) in confStatus | catalogStatusFilter">

                                <sdc-checkbox elem-id="checkbox-{{key | lowercase | clearWhiteSpaces}}"
                                              sdc-checklist-model="checkboxesFilter.selectedStatuses"
                                              sdc-checklist-value="state.values"
                                              text="{{state.name}}"></sdc-checkbox>

                                <div class="i-sdc-categories-list-item-icon"></div>
                                </label>
                            </li>
                        </ul>
                    </div>
                </div>

            </div>
        </perfect-scrollbar>

        <!-- RIGHT SIDE -->
        <perfect-scrollbar id="catalog-main-scroll" include-padding="true" class="w-sdc-main-right-container w-sdc-catalog-main">

            <!-- HEADER -->
            <div>
                <div class="w-sdc-dashboard-catalog-header">
                    {{getNumOfElements((catalogFilterdItems | entityFilter:checkboxesFilter | filter:search).length)}}
                </div>
                <div class="w-sdc-dashboard-catalog-header-right">
                    <span class="w-sdc-dashboard-catalog-header-order" translate="SORT_CAPTION"></span>&nbsp;&nbsp;
                    <a class="w-sdc-dashboard-catalog-sort" data-tests-id="sort-by-last-update" data-ng-class="{'blue' : sortBy==='lastUpdateDate'}"
                       ng-click="order('lastUpdateDate')" translate="SORT_BY_UPDATE_DATE"></a>&nbsp;
                    <span data-ng-show="sortBy === 'lastUpdateDate'" class="w-sdc-catalog-sort-arrow" data-ng-class="{'down': reverse, 'up':!reverse}"></span>
                    &nbsp;|&nbsp;
                    <a class="w-sdc-dashboard-catalog-sort" data-tests-id="sort-by-alphabetical" data-ng-class="{'blue' : sortBy!=='lastUpdateDate'}"
                       ng-click="order('name | resourceName')" translate="SORT_ALPHABETICAL"></a>&nbsp;
                    <span data-ng-show="sortBy !== 'lastUpdateDate'" class="w-sdc-catalog-sort-arrow" data-ng-class="{'down': reverse, 'up':!reverse}"></span>
                </div>
            </div>

            <div infinite-scroll-disabled='isAllItemDisplay'  infinite-scroll="raiseNumberOfElementToDisplay()" infinite-scroll-container="'#catalog-main-scroll'" infinite-scroll-parent>
            <!-- CARDS -->
                <div data-ng-class="{'sdc-hide-popover': hidePopover}"
                     data-ng-init="component.filterTerm = component.name +  ' '  + component.description + ' ' + component.tags.toString() + ' ' + component.version"
                     class="w-sdc-dashboard-card"
                     data-ng-repeat="component in catalogFilterdItems | entityFilter:checkboxesFilter | filter:search | orderBy:sortBy:reverse | limitTo:numberOfItemToDisplay"
                     data-ng-class="{'resource' : component.isResource(), 'service' : component.isService(), 'product' : component.isProduct()}">

                    <div class="w-sdc-dashboard-card-body" data-ng-click="gui.isLoading || goToComponent(component)">
                        <div class="w-sdc-dashboard-card-avatar"><span data-tests-id="asset-type" class="{{component.getComponentSubType()}}"></span></div>
                        <!--<div class="w-sdc-dashboard-card-edit " data-ng-class="component.lifecycleState" data-tests-id="assetlifecycleState {{getStatus()}}"></div>-->
                        <div class="w-sdc-dashboard-card-schema-image {{component.icon}}" data-tests-id="{{component.categories[0].subcategories[0].uniqueId}}" data-ng-class="{'sprite-resource-icons':component.isResource(), 'sprite-services-icons':component.isService(), 'sprite-product-icons':component.isProduct()}"></div>
                        <!--<div class="w-sdc-dashboard-card-description">{{component.description}}</div>-->
                        <div class="w-sdc-dashboard-card-info-name-container">
                            <span class="w-sdc-dashboard-card-info-name" tooltips
                                  tooltip-content="{{component.name | resourceName}}"> {{component.name | resourceName}}</span>
                        </div>
                    </div>

                    <div class="w-sdc-dashboard-card-footer">
                        <div class="w-sdc-dashboard-card-info">
                            <div class="w-sdc-dashboard-card-info-lifecycleState">
                            <span class="w-sdc-dashboard-card-info-lifecycleState" tooltips
                                  tooltip-content="{{component.getStatus(sdcMenu)}}"> {{component.getStatus(sdcMenu)}}</span>
                            </div>
                            <div class="w-sdc-dashboard-card-info-user">V {{component.version}}</div>
                        </div>
                        <!--<div class="w-sdc-dashboard-card-info-lifecycleState-icon sprite-new {{sdcMenu.LifeCycleStatuses[component.lifecycleState].icon}}"></div>-->
                    </div>
                </div>
            </div>
        </perfect-scrollbar>

    </div>

    <top-nav top-lvl-selected-index="1" search-bind="search.filterTerm" version="{{version}}"></top-nav>

</div>