ISSUE #260, #261: AutoRefresh + i18n processing

This commit is contained in:
walking98
2019-05-09 14:14:18 +08:00
parent 4db1a916d8
commit 3b05c7ee57
6 changed files with 38 additions and 16 deletions

View File

@@ -14,7 +14,7 @@ spring.http.encoding.enabled=true
spring.http.encoding.force=true
logging.config=classpath:logback.xml
#if this value is empty,use env value rocketmq.config.namesrvAddr NAMESRV_ADDR | now, you can set it in ops page.default localhost:9876
rocketmq.config.namesrvAddr=
rocketmq.config.namesrvAddr=11.239.187.178:9876
#if you use rocketmq version < 3.5.8, rocketmq.config.isVIPChannel should be false.default true
rocketmq.config.isVIPChannel=
#rocketmq-console's data path:dashboard/monitor

View File

@@ -165,6 +165,10 @@ module.controller('consumerController', ['$scope', 'ngDialog', '$http','Notifica
if(resp.status ==0){
console.log(resp);
ngDialog.open({
preCloseCallback: function(value) {
// Refresh topic list
$scope.refreshConsumerData();
},
template: 'consumerModifyDialog',
controller: 'consumerModifyDialogController',
data:{
@@ -244,6 +248,10 @@ module.controller('consumerController', ['$scope', 'ngDialog', '$http','Notifica
console.log(resp);
ngDialog.open({
preCloseCallback: function(value) {
// Refresh topic list
$scope.refreshConsumerData();
},
template: 'deleteConsumerDialog',
controller: 'deleteConsumerDialogController',
data:{

View File

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

View File

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

View File

@@ -35,21 +35,26 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
$scope.filterDLQ = false
$scope.allTopicList = [];
$scope.topicShowList = [];
$http({
method: "GET",
url: "topic/list.query"
}).success(function (resp) {
if(resp.status ==0){
$scope.allTopicList = resp.data.topicList.sort();
console.log($scope.allTopicList);
console.log(JSON.stringify(resp));
$scope.showTopicList(1,$scope.allTopicList.length);
}else {
Notification.error({message: resp.errMsg, delay: 5000});
}
$scope.refreshTopicList = function () {
$http({
method: "GET",
url: "topic/list.query"
}).success(function (resp) {
if(resp.status ==0){
$scope.allTopicList = resp.data.topicList.sort();
console.log($scope.allTopicList);
console.log(JSON.stringify(resp));
$scope.showTopicList(1,$scope.allTopicList.length);
}else {
Notification.error({message: resp.errMsg, delay: 5000});
}
});
};
$scope.refreshTopicList();
});
$scope.filterStr="";
$scope.$watch('filterStr', function() {
$scope.filterList(1);
@@ -127,6 +132,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
}).success(function (resp) {
if(resp.status ==0){
Notification.info({message: "delete success!", delay: 2000});
$scope.refreshTopicList();
}else {
Notification.error({message: resp.errMsg, delay: 2000});
}
@@ -287,6 +293,10 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
if(resp.status ==0){
console.log(resp);
ngDialog.open({
preCloseCallback: function(value) {
// Refresh topic list
$scope.refreshTopicList();
},
template: 'topicModifyDialog',
controller: 'topicModifyDialogController',
data:{

View File

@@ -31,7 +31,9 @@
<button class="btn btn-raised btn-sm btn-primary" type="button" ng-click="openAddDialog()">{{'ADD' |
translate}}/ {{'UPDATE' | translate}}
</button>
<button class="btn btn-raised btn-sm btn-primary" type="button" ng-click="refreshTopicList()">
{{'REFRESH' | translate}}
</button>
</form>
</div>
<br>
@@ -221,7 +223,7 @@
<div class="modal-body ">
<form name="addAppForm" class="form-horizontal" novalidate>
<div ng-show="ngDialogData.consumerGroupCount == 0">
Don't have {{ 'SUBSCRIPTION_GROUP' | translate }}
{{ 'NO_DATA' | translate }} {{ 'SUBSCRIPTION_GROUP' | translate }}
</div>