This is an automated email from the ASF dual-hosted git repository. jinrongtong pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git
The following commit(s) were added to refs/heads/master by this push: new 5d08d3b Support Unspecified Topic Add & Update & Query (#223) 5d08d3b is described below commit 5d08d3b122462b9303da6b2af52a2f2627a2286e Author: Akai <91858554+1294566...@users.noreply.github.com> AuthorDate: Wed Jul 24 10:57:04 2024 +0800 Support Unspecified Topic Add & Update & Query (#223) * fix:Fixed the issue that normal messages in version v4 are not showed * feat:support unspecified topic --------- Co-authored-by: yuanziwei <yuanzi...@xiaomi.com> --- src/main/resources/static/src/i18n/en.js | 1 + src/main/resources/static/src/i18n/zh.js | 1 + src/main/resources/static/src/topic.js | 15 ++++++++++++--- src/main/resources/static/view/pages/topic.html | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/src/i18n/en.js b/src/main/resources/static/src/i18n/en.js index 83083d7..2c1450d 100644 --- a/src/main/resources/static/src/i18n/en.js +++ b/src/main/resources/static/src/i18n/en.js @@ -60,6 +60,7 @@ var en = { "RETRY": "RETRY", "FIFO": "FIFO", "TRANSACTION": "TRANSACTION", + "UNSPECIFIED": "UNSPECIFIED", "DLQ": "DLQ", "QUANTITY":"Quantity", "TYPE":"Type", diff --git a/src/main/resources/static/src/i18n/zh.js b/src/main/resources/static/src/i18n/zh.js index f8c3c1d..2f0e6f3 100644 --- a/src/main/resources/static/src/i18n/zh.js +++ b/src/main/resources/static/src/i18n/zh.js @@ -61,6 +61,7 @@ var zh = { "RETRY": "重试", "FIFO": "顺序", "TRANSACTION": "事务", + "UNSPECIFIED": "未指定", "DLQ": "死信", "QUANTITY":"数量", "TYPE":"类型", diff --git a/src/main/resources/static/src/topic.js b/src/main/resources/static/src/topic.js index 4ef6720..81383b3 100644 --- a/src/main/resources/static/src/topic.js +++ b/src/main/resources/static/src/topic.js @@ -48,6 +48,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati $scope.filterDelay = false $scope.filterFifo = false $scope.filterTransaction = false + $scope.filterUnspecified = false $scope.filterRetry = false $scope.filterDLQ = false $scope.filterSystem = false @@ -91,6 +92,9 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati $scope.$watch('filterTransaction', function () { $scope.filterList(1); }); + $scope.$watch('filterUnspecified', function () { + $scope.filterList(1); + }); $scope.$watch('filterDelay', function () { $scope.filterList(1); }); @@ -137,6 +141,11 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati return true } } + if (localStorage.getItem('isV5') && $scope.filterUnspecified) { + if (type.includes("UNSPECIFIED")) { + return true + } + } if ($scope.filterNormal) { if (type.includes("NORMAL")) { return true @@ -145,17 +154,17 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati return true } } - if ($scope.filterDelay) { + if (localStorage.getItem('isV5') && $scope.filterDelay) { if (type.includes("DELAY")) { return true } } - if ($scope.filterFifo) { + if (localStorage.getItem('isV5') && $scope.filterFifo) { if (type.includes("FIFO")) { return true } } - if ($scope.filterTransaction) { + if (localStorage.getItem('isV5') && $scope.filterTransaction) { if (type.includes("TRANSACTION")) { return true } diff --git a/src/main/resources/static/view/pages/topic.html b/src/main/resources/static/view/pages/topic.html index fb0ccf6..f12d352 100644 --- a/src/main/resources/static/view/pages/topic.html +++ b/src/main/resources/static/view/pages/topic.html @@ -30,6 +30,8 @@ </md-checkbox> <md-checkbox aria-label="Checkbox" ng-model="filterTransaction" class="md-primary" ng-show="rmqVersion">{{'TRANSACTION' | translate}} </md-checkbox> + <md-checkbox aria-label="Checkbox" ng-model="filterUnspecified" class="md-primary" ng-show="rmqVersion">{{'UNSPECIFIED' | translate}} + </md-checkbox> <md-checkbox aria-label="Checkbox" ng-model="filterRetry" class="md-primary">{{'RETRY' | translate}} </md-checkbox> <md-checkbox aria-label="Checkbox" ng-model="filterDLQ" class="md-primary">{{'DLQ' | translate}}