|
|
|
@ -15,33 +15,71 @@ |
|
|
|
limitations under the License. |
|
|
|
|
|
|
|
--> |
|
|
|
<div class="tb-absolute-fill tb-entities-table tb-data-table timeseriesWidget" layout="column"> |
|
|
|
<div 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> |
|
|
|
<md-tooltip md-direction="{{vm.ctx.dashboard.isWidgetExpanded ? 'bottom' : 'top'}}"> |
|
|
|
{{'entity.search' | translate}} |
|
|
|
</md-tooltip> |
|
|
|
</md-button> |
|
|
|
<md-input-container flex> |
|
|
|
<label> </label> |
|
|
|
<input ng-model="vm.query.search" placeholder="{{'widget.search-data' | translate}}" md-autofocus/> |
|
|
|
</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> |
|
|
|
<md-tooltip md-direction="{{vm.ctx.dashboard.isWidgetExpanded ? 'bottom' : 'top'}}"> |
|
|
|
{{ 'action.close' | translate }} |
|
|
|
</md-tooltip> |
|
|
|
</md-button> |
|
|
|
</div> |
|
|
|
</md-toolbar> |
|
|
|
|
|
|
|
<md-tabs md-selected="vm.sourceIndex" ng-class="{'tb-headless': vm.sources.length === 1}" |
|
|
|
id="tabs" md-border-bottom flex class="tb-absolute-fill"> |
|
|
|
<md-tab ng-repeat="source in vm.sources" label="{{ source.datasource.name }}"> |
|
|
|
<md-table-container> |
|
|
|
<table md-table> |
|
|
|
<thead md-head md-order="source.query.order" md-on-reorder="vm.onReorder(source)"> |
|
|
|
<tr md-row> |
|
|
|
<th ng-show="vm.showTimestamp" md-column md-order-by="0"><span>Timestamp</span></th> |
|
|
|
<th md-column md-order-by="{{ h.index }}" ng-repeat="h in source.ts.header"><span>{{ h.dataKey.label }}</span></th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody md-body> |
|
|
|
<tr md-row ng-repeat="row in source.ts.data track by $index"> |
|
|
|
<td ng-show="$index > 0 || ($index === 0 && vm.showTimestamp)" md-cell ng-repeat="d in row track by $index" ng-style="vm.cellStyle(source, $index, d)" ng-bind-html="vm.cellContent(source, $index, row, d)"> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</md-table-container> |
|
|
|
<md-table-pagination ng-if="vm.displayPagination" |
|
|
|
md-limit="source.query.limit" |
|
|
|
md-limit-options="vm.limitOptions" |
|
|
|
md-page="source.query.page" |
|
|
|
md-total="{{source.ts.count}}" |
|
|
|
md-on-paginate="vm.onPaginate(source)" |
|
|
|
md-page-select> |
|
|
|
</md-table-pagination> |
|
|
|
</md-tab> |
|
|
|
</md-tabs> |
|
|
|
<md-tabs flex md-selected="vm.sourceIndex" ng-class="{'tb-headless': vm.sources.length === 1}" |
|
|
|
id="tabs" md-border-bottom flex> |
|
|
|
<md-tab ng-repeat="source in vm.sources" label="{{ source.datasource.name }}"> |
|
|
|
<md-table-container> |
|
|
|
<table md-table> |
|
|
|
<thead md-head md-order="source.query.order" md-on-reorder="vm.onReorder(source)"> |
|
|
|
<tr md-row> |
|
|
|
<th ng-show="vm.showTimestamp" |
|
|
|
md-column md-order-by="0" |
|
|
|
> |
|
|
|
<span>Timestamp</span> |
|
|
|
</th> |
|
|
|
<th md-column |
|
|
|
md-order-by="{{ h.index }}" |
|
|
|
ng-repeat="h in source.ts.header" |
|
|
|
> |
|
|
|
<span>{{ h.dataKey.label }}</span> |
|
|
|
</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
|
|
|
|
<tbody md-body> |
|
|
|
<tr md-row ng-repeat="row in source.ts.data track by $index"> |
|
|
|
<td ng-show="$index > 0 || ($index === 0 && vm.showTimestamp)" |
|
|
|
md-cell |
|
|
|
ng-repeat="d in row track by $index" |
|
|
|
ng-style="vm.cellStyle(source, $index, d)" |
|
|
|
ng-bind-html="vm.cellContent(source, $index, row, d)" |
|
|
|
></td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
</md-table-container> |
|
|
|
<md-table-pagination ng-if="vm.displayPagination" |
|
|
|
md-limit="source.query.limit" |
|
|
|
md-limit-options="vm.limitOptions" |
|
|
|
md-page="source.query.page" |
|
|
|
md-total="{{source.data.length}}" |
|
|
|
md-on-paginate="vm.onPaginate(source)" |
|
|
|
md-page-select> |
|
|
|
</md-table-pagination> |
|
|
|
</md-tab> |
|
|
|
</md-tabs> |
|
|
|
</div> |
|
|
|
</div> |