2017-06-19 19:22:48 +03:00
|
|
|
<!--
|
|
|
|
|
|
2018-03-05 17:34:13 +02:00
|
|
|
Copyright © 2016-2018 The Thingsboard Authors
|
2017-06-19 19:22:48 +03:00
|
|
|
|
|
|
|
|
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="tb-absolute-fill tb-entities-table tb-data-table" layout="column">
|
|
|
|
|
<div ng-show="vm.showData" flex class="tb-absolute-fill" layout="column">
|
|
|
|
|
<md-toolbar class="md-table-toolbar md-default" ng-show="vm.query.search != null">
|
|
|
|
|
<div class="md-toolbar-tools">
|
|
|
|
|
<md-button class="md-icon-button" aria-label="{{ 'action.search' | translate }}">
|
|
|
|
|
<md-icon aria-label="{{ 'action.search' | translate }}" class="material-icons">search</md-icon>
|
2017-10-23 20:25:03 +03:00
|
|
|
<md-tooltip md-direction="{{vm.ctx.dashboard.isWidgetExpanded ? 'bottom' : 'top'}}">
|
2017-06-19 19:22:48 +03:00
|
|
|
{{'entity.search' | translate}}
|
|
|
|
|
</md-tooltip>
|
|
|
|
|
</md-button>
|
|
|
|
|
<md-input-container flex>
|
|
|
|
|
<label> </label>
|
2018-03-22 14:09:02 +02:00
|
|
|
<input ng-model="vm.query.search" class="searchInput" placeholder="{{'entity.search' | translate}}"/>
|
2017-06-19 19:22:48 +03:00
|
|
|
</md-input-container>
|
|
|
|
|
<md-button class="md-icon-button" aria-label="Close" ng-click="vm.exitFilterMode()">
|
|
|
|
|
<md-icon aria-label="Close" class="material-icons">close</md-icon>
|
2017-10-23 20:25:03 +03:00
|
|
|
<md-tooltip md-direction="{{vm.ctx.dashboard.isWidgetExpanded ? 'bottom' : 'top'}}">
|
2017-06-19 19:22:48 +03:00
|
|
|
{{ 'action.close' | translate }}
|
|
|
|
|
</md-tooltip>
|
|
|
|
|
</md-button>
|
|
|
|
|
</div>
|
|
|
|
|
</md-toolbar>
|
|
|
|
|
<md-table-container flex>
|
|
|
|
|
<table md-table>
|
|
|
|
|
<thead md-head md-order="vm.query.order" md-on-reorder="vm.onReorder">
|
|
|
|
|
<tr md-row>
|
2017-06-22 17:40:26 +03:00
|
|
|
<th md-column ng-if="vm.displayEntityName" md-order-by="entityName"><span>{{vm.entityNameColumnTitle}}</span></th>
|
2017-06-19 19:22:48 +03:00
|
|
|
<th md-column ng-if="vm.displayEntityType" md-order-by="entityType"><span translate>entity.entity-type</span></th>
|
|
|
|
|
<th md-column md-order-by="{{ key.name }}" ng-repeat="key in vm.dataKeys"><span>{{ key.title }}</span></th>
|
2017-06-22 17:40:26 +03:00
|
|
|
<th md-column ng-if="vm.actionCellDescriptors.length"><span> </span></th>
|
2017-06-19 19:22:48 +03:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody md-body>
|
|
|
|
|
<tr ng-show="vm.entities.length" md-row md-select="entity"
|
|
|
|
|
md-select-id="id.id" md-auto-select="false" ng-repeat="entity in vm.entities"
|
|
|
|
|
ng-click="vm.onRowClick($event, entity)" ng-class="{'tb-current': vm.isCurrent(entity)}">
|
|
|
|
|
<td md-cell flex ng-if="vm.displayEntityName">{{entity.entityName}}</td>
|
|
|
|
|
<td md-cell flex ng-if="vm.displayEntityType">{{entity.entityType}}</td>
|
|
|
|
|
<td md-cell flex ng-repeat="key in vm.dataKeys"
|
|
|
|
|
ng-style="vm.cellStyle(entity, key)"
|
|
|
|
|
ng-bind-html="vm.cellContent(entity, key)">
|
|
|
|
|
</td>
|
2017-06-22 17:40:26 +03:00
|
|
|
<td md-cell ng-if="vm.actionCellDescriptors.length" class="tb-action-cell"
|
|
|
|
|
ng-style="{minWidth: vm.actionCellDescriptors.length*36+'px',
|
|
|
|
|
maxWidth: vm.actionCellDescriptors.length*36+'px',
|
|
|
|
|
width: vm.actionCellDescriptors.length*36+'px'}">
|
|
|
|
|
<md-button class="md-icon-button" ng-repeat="actionDescriptor in vm.actionCellDescriptors"
|
|
|
|
|
aria-label="{{ actionDescriptor.displayName }}"
|
2018-01-03 12:24:20 +02:00
|
|
|
ng-click="vm.onActionButtonClick($event, entity, actionDescriptor)" ng-disabled="$root.loading">
|
2017-06-22 17:40:26 +03:00
|
|
|
<md-icon aria-label="{{ actionDescriptor.displayName }}" class="material-icons">{{actionDescriptor.icon}}</md-icon>
|
2017-06-19 19:22:48 +03:00
|
|
|
<md-tooltip md-direction="top">
|
2017-06-22 17:40:26 +03:00
|
|
|
{{ actionDescriptor.displayName }}
|
2017-06-19 19:22:48 +03:00
|
|
|
</md-tooltip>
|
2017-06-22 17:40:26 +03:00
|
|
|
</md-button>
|
2017-06-19 19:22:48 +03:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<md-divider></md-divider>
|
|
|
|
|
<span ng-show="!vm.entities.length"
|
|
|
|
|
layout-align="center center"
|
|
|
|
|
class="no-data-found" translate>entity.no-entities-prompt</span>
|
|
|
|
|
</md-table-container>
|
|
|
|
|
<md-table-pagination ng-if="vm.displayPagination" md-boundary-links md-limit="vm.query.limit" md-limit-options="vm.limitOptions"
|
|
|
|
|
md-page="vm.query.page" md-total="{{vm.entitiesCount}}"
|
|
|
|
|
md-on-paginate="vm.onPaginate" md-page-select="vm.isGtMd">
|
|
|
|
|
</md-table-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
<span ng-show="!vm.showData"
|
|
|
|
|
layout-align="center center"
|
|
|
|
|
style="text-transform: uppercase; display: flex;"
|
|
|
|
|
class="tb-absolute-fill" translate>entity.no-data</span>
|
|
|
|
|
</div>
|