ISSUE #271 Separate System Topics from Normal topic list

This commit is contained in:
walking98
2019-05-09 18:58:45 +08:00
parent 20c969b11d
commit c7c0d95a47
5 changed files with 53 additions and 6 deletions

View File

@@ -83,5 +83,6 @@ var en = {
"USER_NAME":"Username",
"PASSWORD":"Password",
"NO_DATA":"Don't have ",
"SYSTEM":"SYSTEM",
"WELCOME":"Hi, welcome using RocketMQ Console"
}

View File

@@ -83,5 +83,6 @@ var zh = {
"USER_NAME":"用户名",
"PASSWORD":"密码",
"NO_DATA":"不存在 ",
"SYSTEM":"系统",
"WELCOME":"您好欢迎使用RocketMQ控制台"
}

View File

@@ -33,6 +33,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
$scope.filterNormal = true
$scope.filterRetry = false
$scope.filterDLQ = false
$scope.filterSystem = false
$scope.allTopicList = [];
$scope.topicShowList = [];
@@ -68,6 +69,9 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
$scope.$watch('filterDLQ', function() {
$scope.filterList(1);
});
$scope.$watch('filterSystem', function() {
$scope.filterList(1);
});
$scope.filterList = function (currentPage) {
var lowExceptStr = $scope.filterStr.toLowerCase();
var canShowList = [];
@@ -97,6 +101,11 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
return true
}
}
if($scope.filterSystem){
if(str.startsWith("%S")){
return true
}
}
if($scope.filterNormal){
if(str.startsWith("%") == false){
return true

View File

@@ -28,6 +28,8 @@
</md-checkbox>
<md-checkbox aria-label="Checkbox" ng-model="filterDLQ" class="md-primary">{{'DLQ' | translate}}
</md-checkbox>
<md-checkbox aria-label="Checkbox" ng-model="filterSystem" class="md-primary">{{'SYSTEM' | translate}}
</md-checkbox>
<button class="btn btn-raised btn-sm btn-primary" type="button" ng-click="openAddDialog()">{{'ADD' |
translate}}/ {{'UPDATE' | translate}}
</button>
@@ -46,7 +48,7 @@
</tr>
<tr ng-repeat="topic in topicShowList">
<td class="text-center">{{topic}}</td>
<td class="text-center">
<td class="text-left">
<button class="btn btn-raised btn-sm btn-primary" type="button"
ng-click="statsView(topic)">{{'STATUS' | translate}}
</button>
@@ -58,15 +60,19 @@
ng-click="consumerView(topic)">consumer {{'MANAGE' | translate}}
</button>
<button class="btn btn-raised btn-sm btn-primary" type="button"
ng-show="{{!topic.startsWith('%S')}}"
ng-click="openUpdateDialog(topic)">topic {{'CONFIG' |translate}}
</button>
<button class="btn btn-raised btn-sm btn-primary" type="button"
ng-show="{{!topic.startsWith('%S')}}"
ng-click="openSendTopicMessageDialog(topic)">{{'SEND_MSG' | translate}}
</button>
<button class="btn btn-raised btn-sm btn-danger" type="button"
ng-show="{{!topic.startsWith('%S')}}"
ng-click="openConsumerResetOffsetDialog(topic)">{{'RESET_CUS_OFFSET' | translate}}
</button>
<button class="btn btn-raised btn-sm btn-danger" type="button"
ng-show="{{!topic.startsWith('%S')}}"
ng-confirm-click="Are you sure to delete?"
confirmed-click="deleteTopic(topic)">{{'DELETE' | translate}}
</button>