mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2025-09-10 11:40:01 +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",
|
url: "consumer/groupList.query",
|
||||||
params: {
|
params: {
|
||||||
skipSysGroup: false,
|
skipSysGroup: false,
|
||||||
address: localStorage.getItem('isV5') ? localStorage.getItem('proxyAddr') : null
|
address: $scope.isRmqVersionV5() ? localStorage.getItem('proxyAddr') : null
|
||||||
}
|
}
|
||||||
}).success(function (resp) {
|
}).success(function (resp) {
|
||||||
if (resp.status == 0) {
|
if (resp.status == 0) {
|
||||||
|
@@ -27,6 +27,15 @@ app.controller('AppCtrl', ['$scope','$window','$translate','$http','Notification
|
|||||||
localStorage.setItem("isV5", v);
|
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(){
|
$scope.logout = function(){
|
||||||
$http({
|
$http({
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
@@ -141,7 +141,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (localStorage.getItem('isV5') && $scope.filterUnspecified) {
|
if ($scope.isRmqVersionV5() && $scope.filterUnspecified) {
|
||||||
if (type.includes("UNSPECIFIED")) {
|
if (type.includes("UNSPECIFIED")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -150,21 +150,21 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
|||||||
if (type.includes("NORMAL")) {
|
if (type.includes("NORMAL")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (!localStorage.getItem('isV5') && type.includes("UNSPECIFIED")) {
|
if (!$scope.isRmqVersionV5() && type.includes("UNSPECIFIED")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (localStorage.getItem('isV5') && $scope.filterDelay) {
|
if ($scope.isRmqVersionV5() && $scope.filterDelay) {
|
||||||
if (type.includes("DELAY")) {
|
if (type.includes("DELAY")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (localStorage.getItem('isV5') && $scope.filterFifo) {
|
if ($scope.isRmqVersionV5() && $scope.filterFifo) {
|
||||||
if (type.includes("FIFO")) {
|
if (type.includes("FIFO")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (localStorage.getItem('isV5') && $scope.filterTransaction) {
|
if ($scope.isRmqVersionV5() && $scope.filterTransaction) {
|
||||||
if (type.includes("TRANSACTION")) {
|
if (type.includes("TRANSACTION")) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user