2 ~ Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
8 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
17 <div class="workspace-attributes">
18 <div class="add-btn" data-tests-id="add-attribute-button" ng-if="!isViewMode()"
19 data-ng-class="{'disabled': isDisableMode()}" data-ng-click="addOrUpdateAttribute()" data-tests-id="add-attribute-button">Add</div>
20 <div class="table-container-flex">
21 <div class="table" data-ng-class="{'view-mode': isViewMode()}">
22 <div class="head flex-container">
23 <div class="table-header head-row hand flex-item" data-ng-repeat="header in tableHeadersList track by $index" data-ng-click="sort(header.property)">{{header.title}}
24 <span data-ng-if="sortBy === header.property" class="table-header-sort-arrow" data-ng-class="{'down': reverse, 'up':!reverse}"> </span>
26 <div class="table-no-text-header head-row flex-item" ng-if="!isViewMode()"></div>
27 <!--div class="table-no-text-header head-row flex-item"></div-->
31 <perfect-scrollbar scroll-y-margin-offset="0" include-padding="true" class="scrollbar-container">
32 <div data-ng-if="component.attributes.length === 0" class="no-row-text" data-ng-class="{'disabled': isDisableMode()}">
33 There are no attributes to display <br>
34 <span ng-if="!isViewMode()"> click <a data-ng-click="addOrUpdateAttribute()">here</a> to add one </span>
37 <div data-ng-repeat-start="attribute in component.attributes | orderBy:sortBy:reverse track by $index"
38 class="flex-container data-row" data-ng-class="{'selected': attribute.selected}"
39 data-ng-click="attribute.selected = !attribute.selected" data-tests-id="attributes-table-row">
41 <div class="table-col-general flex-item text">
42 <span class="sprite table-arrow" data-ng-class="{'opened': attribute.selected}"></span>
43 <span data-tests-id="{{attribute.name}}" tooltips tooltip-content="{{attribute.name}}">{{attribute.name}}</span>
47 <div class="table-col-general flex-item text" data-tests-id="{{attribute.type}}" data-ng-bind="attribute.type"></div>
49 <div class="table-col-general flex-item text">
50 <span tooltips tooltip-content="{{attribute.defaultValue}}" data-tests-id="{{attribute.defaultValue}}" data-ng-bind="attribute.defaultValue"></span>
53 <div class="table-btn-col flex-item" ng-if="!isViewMode()">
54 <button class="table-edit-btn" data-tests-id="edit_{{attribute.name}}" data-ng-show="attribute.parentUniqueId==component.uniqueId"
55 data-ng-click="addOrUpdateAttribute(attribute); $event.stopPropagation();" data-ng-class="{'disabled': isViewMode()}"> </button>
56 <button class="table-delete-btn" data-tests-id="delete_{{attribute.name}}" data-ng-show="attribute.parentUniqueId==component.uniqueId"
57 data-ng-click="delete(attribute); $event.stopPropagation();" data-ng-class="{'disabled': isViewMode()}"> </button>
60 <div data-ng-repeat-end="" data-ng-if="attribute.selected && attribute.description" class="item-opened" data-ng-bind="attribute.description">