mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2025-09-10 19:48:29 +08:00
front js check is v5 'false' will be true fix (#269)
This commit is contained in:
@@ -79,7 +79,7 @@ module.controller('consumerController', ['$scope', 'ngDialog', '$http', 'Notific
|
||||
url: "consumer/groupList.query",
|
||||
params: {
|
||||
skipSysGroup: false,
|
||||
address: localStorage.getItem('isV5') ? localStorage.getItem('proxyAddr') : null
|
||||
address: $scope.isRmqVersionV5() ? localStorage.getItem('proxyAddr') : null
|
||||
}
|
||||
}).success(function (resp) {
|
||||
if (resp.status == 0) {
|
||||
|
@@ -27,6 +27,15 @@ app.controller('AppCtrl', ['$scope','$window','$translate','$http','Notification
|
||||
localStorage.setItem("isV5", v);
|
||||
}
|
||||
|
||||
$scope.isRmqVersionV5 = function(){
|
||||
var v=localStorage.getItem('isV5');
|
||||
//for js !! 'false' is true!
|
||||
if( /false/i.test(v) ){
|
||||
return false;
|
||||
}
|
||||
return !! v;
|
||||
}
|
||||
|
||||
$scope.logout = function(){
|
||||
$http({
|
||||
method: "POST",
|
||||
|
@@ -141,7 +141,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('isV5') && $scope.filterUnspecified) {
|
||||
if ($scope.isRmqVersionV5() && $scope.filterUnspecified) {
|
||||
if (type.includes("UNSPECIFIED")) {
|
||||
return true
|
||||
}
|
||||
@@ -150,21 +150,21 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
||||
if (type.includes("NORMAL")) {
|
||||
return true
|
||||
}
|
||||
if (!localStorage.getItem('isV5') && type.includes("UNSPECIFIED")) {
|
||||
if (!$scope.isRmqVersionV5() && type.includes("UNSPECIFIED")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('isV5') && $scope.filterDelay) {
|
||||
if ($scope.isRmqVersionV5() && $scope.filterDelay) {
|
||||
if (type.includes("DELAY")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('isV5') && $scope.filterFifo) {
|
||||
if ($scope.isRmqVersionV5() && $scope.filterFifo) {
|
||||
if (type.includes("FIFO")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('isV5') && $scope.filterTransaction) {
|
||||
if ($scope.isRmqVersionV5() && $scope.filterTransaction) {
|
||||
if (type.includes("TRANSACTION")) {
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user