Commit 8572de24d76c9d20f62d7da896c4b5ab1a77f225
1 parent
2dba7f52
UI: Improvement Widget "Timeseries - Table" pagination + no-data search message
Showing
2 changed files
with
14 additions
and
9 deletions
... | ... | @@ -1214,6 +1214,7 @@ export default angular.module('thingsboard.locale', []) |
1214 | 1214 | "remove-widget-text": "After the confirmation the widget and all related data will become unrecoverable.", |
1215 | 1215 | "timeseries": "Time series", |
1216 | 1216 | "search-data": "Search data", |
1217 | + "no-data-found": "No data found", | |
1217 | 1218 | "latest-values": "Latest values", |
1218 | 1219 | "rpc": "Control widget", |
1219 | 1220 | "alarm": "Alarm widget", | ... | ... |
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | <md-tabs flex md-selected="vm.sourceIndex" ng-class="{'tb-headless': vm.sources.length === 1}" |
42 | 42 | id="tabs" md-border-bottom flex> |
43 | 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 | 45 | <table md-table> |
46 | 46 | <thead md-head md-order="source.query.order" md-on-reorder="vm.onReorder(source)"> |
47 | 47 | <tr md-row> |
... | ... | @@ -70,16 +70,20 @@ |
70 | 70 | </tr> |
71 | 71 | </tbody> |
72 | 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 | 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 | 78 | </md-tab> |
83 | 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 | 88 | </div> |
85 | 89 | </div> |
\ No newline at end of file | ... | ... |