mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2025-09-11 20:15:44 +08:00
Co-authored-by: zhangjidi2016 <zhangjidi@cmss.chinamobile.com>
This commit is contained in:
@@ -62,6 +62,13 @@ public class ConsumerController {
|
|||||||
return consumerService.resetOffset(resetOffsetRequest);
|
return consumerService.resetOffset(resetOffsetRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/skipAccumulate.do", method = {RequestMethod.POST})
|
||||||
|
@ResponseBody
|
||||||
|
public Object skipAccumulate(@RequestBody ResetOffsetRequest resetOffsetRequest) {
|
||||||
|
logger.info("op=look resetOffsetRequest={}", JsonUtil.obj2String(resetOffsetRequest));
|
||||||
|
return consumerService.resetOffset(resetOffsetRequest);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/examineSubscriptionGroupConfig.query")
|
@RequestMapping(value = "/examineSubscriptionGroupConfig.query")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object examineSubscriptionGroupConfig(@RequestParam String consumerGroup) {
|
public Object examineSubscriptionGroupConfig(@RequestParam String consumerGroup) {
|
||||||
|
@@ -31,6 +31,7 @@ var zh = {
|
|||||||
"CONFIG": "配置",
|
"CONFIG": "配置",
|
||||||
"SEND_MSG": "发送消息",
|
"SEND_MSG": "发送消息",
|
||||||
"RESET_CUS_OFFSET": "重置消费位点",
|
"RESET_CUS_OFFSET": "重置消费位点",
|
||||||
|
"SKIP_MESSAGE_ACCUMULATE":"跳过堆积",
|
||||||
"DELETE": "删除",
|
"DELETE": "删除",
|
||||||
"CHANGE_LANG": "更换语言",
|
"CHANGE_LANG": "更换语言",
|
||||||
"BROKER": "Broker",
|
"BROKER": "Broker",
|
||||||
|
@@ -254,6 +254,33 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http','Notificatio
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.openSkipMessageAccumulateDialog = function (topic) {
|
||||||
|
$http({
|
||||||
|
method: "GET",
|
||||||
|
url: "topic/queryTopicConsumerInfo.query",
|
||||||
|
params:{
|
||||||
|
topic:topic
|
||||||
|
}
|
||||||
|
}).success(function (resp) {
|
||||||
|
if(resp.status ==0){
|
||||||
|
if(resp.data.groupList == null){
|
||||||
|
Notification.error({message: "don't have consume group!", delay: 2000});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ngDialog.open({
|
||||||
|
template: 'skipMessageAccumulateDialog',
|
||||||
|
controller: 'skipMessageAccumulateDialogController',
|
||||||
|
data:{
|
||||||
|
topic: topic,
|
||||||
|
selectedConsumerGroup:[],
|
||||||
|
allConsumerGroupList:resp.data.groupList
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
Notification.error({message: resp.errMsg, delay: 2000});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$scope.openSendTopicMessageDialog = function (topic) {
|
$scope.openSendTopicMessageDialog = function (topic) {
|
||||||
ngDialog.open({
|
ngDialog.open({
|
||||||
@@ -377,6 +404,34 @@ module.controller('consumerResetOffsetDialogController',['$scope', 'ngDialog', '
|
|||||||
}]
|
}]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
module.controller('skipMessageAccumulateDialogController',['$scope', 'ngDialog', '$http','Notification', function ($scope, ngDialog, $http,Notification) {
|
||||||
|
$scope.skipAccumulate = function () {
|
||||||
|
console.log($scope.ngDialogData.selectedConsumerGroup);
|
||||||
|
$http({
|
||||||
|
method: "POST",
|
||||||
|
url: "consumer/skipAccumulate.do",
|
||||||
|
data: {
|
||||||
|
resetTime: -1,
|
||||||
|
consumerGroupList: $scope.ngDialogData.selectedConsumerGroup,
|
||||||
|
topic:$scope.ngDialogData.topic,
|
||||||
|
force:true
|
||||||
|
}
|
||||||
|
}).success(function (resp) {
|
||||||
|
if(resp.status ==0){
|
||||||
|
ngDialog.open({
|
||||||
|
template: 'resetOffsetResultDialog',
|
||||||
|
data:{
|
||||||
|
result:resp.data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
Notification.error({message: resp.errMsg, delay: 2000});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
);
|
||||||
|
|
||||||
module.controller('sendTopicMessageDialogController', ['$scope', 'ngDialog', '$http','Notification',function ($scope, ngDialog, $http,Notification) {
|
module.controller('sendTopicMessageDialogController', ['$scope', 'ngDialog', '$http','Notification',function ($scope, ngDialog, $http,Notification) {
|
||||||
$scope.sendTopicMessage = {
|
$scope.sendTopicMessage = {
|
||||||
topic: $scope.ngDialogData.topic,
|
topic: $scope.ngDialogData.topic,
|
||||||
|
@@ -71,6 +71,10 @@
|
|||||||
ng-show="{{!sysFlag}}"
|
ng-show="{{!sysFlag}}"
|
||||||
ng-click="openConsumerResetOffsetDialog(topic)">{{'RESET_CUS_OFFSET' | translate}}
|
ng-click="openConsumerResetOffsetDialog(topic)">{{'RESET_CUS_OFFSET' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
<button class="btn btn-raised btn-sm btn-danger" type="button"
|
||||||
|
ng-show="{{!sysFlag}}"
|
||||||
|
ng-click="openSkipMessageAccumulateDialog(topic)">{{'SKIP_MESSAGE_ACCUMULATE' | translate}}
|
||||||
|
</button>
|
||||||
<button class="btn btn-raised btn-sm btn-danger" type="button"
|
<button class="btn btn-raised btn-sm btn-danger" type="button"
|
||||||
ng-show="{{!sysFlag}}"
|
ng-show="{{!sysFlag}}"
|
||||||
ng-confirm-click="Are you sure to delete?"
|
ng-confirm-click="Are you sure to delete?"
|
||||||
@@ -329,6 +333,37 @@
|
|||||||
</div>
|
</div>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/ng-template" id="skipMessageAccumulateDialog">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">{{topic}} {{'SKIP_MESSAGE_ACCUMULATE'|translate}}</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="form-horizontal" novalidate>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-2"> {{ 'SUBSCRIPTION_GROUP' | translate }}:</label>
|
||||||
|
<div class="col-sm-10">
|
||||||
|
<select name="mySelect" multiple chosen
|
||||||
|
ng-model="ngDialogData.selectedConsumerGroup"
|
||||||
|
ng-options="item for item in ngDialogData.allConsumerGroupList"
|
||||||
|
required>
|
||||||
|
<option value=""></option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="ngdialog-buttons">
|
||||||
|
<button type="button" class="ngdialog-button ngdialog-button-primary"
|
||||||
|
ng-click="skipAccumulate()">{{ 'COMMIT' | translate }}
|
||||||
|
</button>
|
||||||
|
<button type="button" class="ngdialog-button ngdialog-button-secondary"
|
||||||
|
ng-click="closeThisDialog('Cancel')">{{ 'CLOSE' | translate }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script type="text/ng-template" id="statsViewDialog">
|
<script type="text/ng-template" id="statsViewDialog">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title"> [{{ngDialogData.topic}}]{{'STATUS' | translate}}</h4>
|
<h4 class="modal-title"> [{{ngDialogData.topic}}]{{'STATUS' | translate}}</h4>
|
||||||
|
Reference in New Issue
Block a user