Commit ca60ca853c95cf6e938e34b4ec18f9fca9e579e1
Committed by
GitHub
Merge pull request #514 from jktu2870/improvement/timeseriesTable/search
Additional improvements for widget "Timeseries - table"
Showing
2 changed files
with
14 additions
and
9 deletions
@@ -1214,6 +1214,7 @@ export default angular.module('thingsboard.locale', []) | @@ -1214,6 +1214,7 @@ export default angular.module('thingsboard.locale', []) | ||
1214 | "remove-widget-text": "After the confirmation the widget and all related data will become unrecoverable.", | 1214 | "remove-widget-text": "After the confirmation the widget and all related data will become unrecoverable.", |
1215 | "timeseries": "Time series", | 1215 | "timeseries": "Time series", |
1216 | "search-data": "Search data", | 1216 | "search-data": "Search data", |
1217 | + "no-data-found": "No data found", | ||
1217 | "latest-values": "Latest values", | 1218 | "latest-values": "Latest values", |
1218 | "rpc": "Control widget", | 1219 | "rpc": "Control widget", |
1219 | "alarm": "Alarm widget", | 1220 | "alarm": "Alarm widget", |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <md-tabs flex md-selected="vm.sourceIndex" ng-class="{'tb-headless': vm.sources.length === 1}" | 41 | <md-tabs flex md-selected="vm.sourceIndex" ng-class="{'tb-headless': vm.sources.length === 1}" |
42 | id="tabs" md-border-bottom flex> | 42 | id="tabs" md-border-bottom flex> |
43 | <md-tab ng-repeat="source in vm.sources" label="{{ source.datasource.name }}"> | 43 | <md-tab ng-repeat="source in vm.sources" label="{{ source.datasource.name }}"> |
44 | - <md-table-container> | 44 | + <md-table-container class="tb-absolute-fill layout-column"> |
45 | <table md-table> | 45 | <table md-table> |
46 | <thead md-head md-order="source.query.order" md-on-reorder="vm.onReorder(source)"> | 46 | <thead md-head md-order="source.query.order" md-on-reorder="vm.onReorder(source)"> |
47 | <tr md-row> | 47 | <tr md-row> |
@@ -70,16 +70,20 @@ | @@ -70,16 +70,20 @@ | ||
70 | </tr> | 70 | </tr> |
71 | </tbody> | 71 | </tbody> |
72 | </table> | 72 | </table> |
73 | + <md-divider></md-divider> | ||
74 | + <span ng-show="!vm.sources[vm.sourceIndex].data.length" | ||
75 | + layout-align="center center" | ||
76 | + class="no-data-found" translate>widget.no-data-found</span> | ||
73 | </md-table-container> | 77 | </md-table-container> |
74 | - <md-table-pagination ng-if="vm.displayPagination" | ||
75 | - md-limit="source.query.limit" | ||
76 | - md-limit-options="vm.limitOptions" | ||
77 | - md-page="source.query.page" | ||
78 | - md-total="{{source.data.length}}" | ||
79 | - md-on-paginate="vm.onPaginate(source)" | ||
80 | - md-page-select> | ||
81 | - </md-table-pagination> | ||
82 | </md-tab> | 78 | </md-tab> |
83 | </md-tabs> | 79 | </md-tabs> |
80 | + <md-table-pagination ng-if="vm.displayPagination" | ||
81 | + md-limit="vm.sources[vm.sourceIndex].query.limit" | ||
82 | + md-limit-options="vm.limitOptions" | ||
83 | + md-page="vm.sources[vm.sourceIndex].query.page" | ||
84 | + md-total="{{vm.sources[vm.sourceIndex].data.length}}" | ||
85 | + md-on-paginate="vm.onPaginate(vm.sources[vm.sourceIndex])" | ||
86 | + md-page-select> | ||
87 | + </md-table-pagination> | ||
84 | </div> | 88 | </div> |
85 | </div> | 89 | </div> |