mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2026-02-20 20:35:43 +08:00
Compare commits
6 Commits
d508cda19d
...
rocketmq-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c09ac287 | ||
|
|
e97072a3b1 | ||
|
|
6d360509c0 | ||
|
|
464f57adf8 | ||
|
|
5d08d3b122 | ||
|
|
d9fc76d3a3 |
6
pom.xml
6
pom.xml
@@ -28,14 +28,14 @@
|
||||
<groupId>org.apache.rocketmq</groupId>
|
||||
<artifactId>rocketmq-dashboard</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<version>2.0.0</version>
|
||||
<name>rocketmq-dashboard</name>
|
||||
|
||||
<scm>
|
||||
<url>git@github.com:apache/rocketmq-dashboard.git</url>
|
||||
<connection>scm:git:git@github.com:apache/rocketmq-dashboard.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:apache/rocketmq-dashboard.git</developerConnection>
|
||||
<tag>1.0.0</tag>
|
||||
<tag>rocketmq-dashboard-2.0.0</tag>
|
||||
</scm>
|
||||
|
||||
<mailingLists>
|
||||
@@ -459,7 +459,7 @@
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="${project.build.directory}/classes/public">
|
||||
<fileset dir="${project.basedir}/frontend/build"/>
|
||||
<fileset dir="${project.basedir}/frontend/build" />
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
|
||||
@@ -17,27 +17,29 @@
|
||||
package org.apache.rocketmq.dashboard.service.client;
|
||||
|
||||
import com.google.common.base.Throwables;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import org.apache.rocketmq.client.QueryResult;
|
||||
import org.apache.rocketmq.client.exception.MQBrokerException;
|
||||
import org.apache.rocketmq.client.exception.MQClientException;
|
||||
import org.apache.rocketmq.client.impl.MQAdminImpl;
|
||||
import org.apache.rocketmq.common.AclConfig;
|
||||
import org.apache.rocketmq.common.PlainAccessConfig;
|
||||
import org.apache.rocketmq.common.TopicConfig;
|
||||
import org.apache.rocketmq.remoting.protocol.admin.ConsumeStats;
|
||||
import org.apache.rocketmq.remoting.protocol.admin.RollbackStats;
|
||||
import org.apache.rocketmq.remoting.protocol.admin.TopicStatsTable;
|
||||
import org.apache.rocketmq.common.message.MessageClientIDSetter;
|
||||
import org.apache.rocketmq.common.message.MessageExt;
|
||||
import org.apache.rocketmq.common.message.MessageQueue;
|
||||
import org.apache.rocketmq.common.message.MessageRequestMode;
|
||||
import org.apache.rocketmq.dashboard.util.JsonUtil;
|
||||
import org.apache.rocketmq.remoting.RemotingClient;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingConnectException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingSendRequestException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingTimeoutException;
|
||||
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
|
||||
import org.apache.rocketmq.remoting.protocol.RequestCode;
|
||||
import org.apache.rocketmq.remoting.protocol.ResponseCode;
|
||||
import org.apache.rocketmq.remoting.protocol.admin.ConsumeStats;
|
||||
import org.apache.rocketmq.remoting.protocol.admin.RollbackStats;
|
||||
import org.apache.rocketmq.remoting.protocol.admin.TopicStatsTable;
|
||||
import org.apache.rocketmq.remoting.protocol.body.BrokerReplicasInfo;
|
||||
import org.apache.rocketmq.remoting.protocol.body.BrokerStatsData;
|
||||
import org.apache.rocketmq.remoting.protocol.body.ClusterAclVersionInfo;
|
||||
@@ -64,23 +66,20 @@ import org.apache.rocketmq.remoting.protocol.route.TopicRouteData;
|
||||
import org.apache.rocketmq.remoting.protocol.statictopic.TopicQueueMappingDetail;
|
||||
import org.apache.rocketmq.remoting.protocol.subscription.GroupForbidden;
|
||||
import org.apache.rocketmq.remoting.protocol.subscription.SubscriptionGroupConfig;
|
||||
import org.apache.rocketmq.dashboard.util.JsonUtil;
|
||||
import org.apache.rocketmq.remoting.RemotingClient;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingConnectException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingSendRequestException;
|
||||
import org.apache.rocketmq.remoting.exception.RemotingTimeoutException;
|
||||
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
|
||||
import org.apache.rocketmq.tools.admin.MQAdminExt;
|
||||
import org.apache.rocketmq.tools.admin.api.BrokerOperatorResult;
|
||||
import org.apache.rocketmq.tools.admin.api.MessageTrack;
|
||||
import org.apache.rocketmq.tools.admin.common.AdminToolResult;
|
||||
import org.joor.Reflect;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.apache.rocketmq.remoting.protocol.RemotingSerializable.decode;
|
||||
|
||||
@Service
|
||||
@@ -465,15 +464,18 @@ public class MQAdminExtImpl implements MQAdminExt {
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
MQAdminImpl mqAdminImpl = MQAdminInstance.threadLocalMqClientInstance().getMQAdminImpl();
|
||||
QueryResult qr = Reflect.on(mqAdminImpl).call("queryMessage", topic, msgId, 32,
|
||||
MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() - 1000 * 60 * 60 * 13L, Long.MAX_VALUE, true).get();
|
||||
if (qr != null && qr.getMessageList() != null && qr.getMessageList().size() > 0) {
|
||||
return qr.getMessageList().get(0);
|
||||
|
||||
Set<String> clusterList = MQAdminInstance.threadLocalMQAdminExt().getTopicClusterList(topic);
|
||||
if (clusterList == null || clusterList.isEmpty()) {
|
||||
return MQAdminInstance.threadLocalMQAdminExt().queryMessage("", topic, msgId);
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
for (String name : clusterList) {
|
||||
MessageExt messageExt = MQAdminInstance.threadLocalMQAdminExt().queryMessage(name, topic, msgId);
|
||||
if (messageExt != null) {
|
||||
return messageExt;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -60,6 +60,7 @@ var en = {
|
||||
"RETRY": "RETRY",
|
||||
"FIFO": "FIFO",
|
||||
"TRANSACTION": "TRANSACTION",
|
||||
"UNSPECIFIED": "UNSPECIFIED",
|
||||
"DLQ": "DLQ",
|
||||
"QUANTITY":"Quantity",
|
||||
"TYPE":"Type",
|
||||
|
||||
@@ -61,6 +61,7 @@ var zh = {
|
||||
"RETRY": "重试",
|
||||
"FIFO": "顺序",
|
||||
"TRANSACTION": "事务",
|
||||
"UNSPECIFIED": "未指定",
|
||||
"DLQ": "死信",
|
||||
"QUANTITY":"数量",
|
||||
"TYPE":"类型",
|
||||
|
||||
@@ -48,6 +48,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
||||
$scope.filterDelay = false
|
||||
$scope.filterFifo = false
|
||||
$scope.filterTransaction = false
|
||||
$scope.filterUnspecified = false
|
||||
$scope.filterRetry = false
|
||||
$scope.filterDLQ = false
|
||||
$scope.filterSystem = false
|
||||
@@ -91,6 +92,9 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
||||
$scope.$watch('filterTransaction', function () {
|
||||
$scope.filterList(1);
|
||||
});
|
||||
$scope.$watch('filterUnspecified', function () {
|
||||
$scope.filterList(1);
|
||||
});
|
||||
$scope.$watch('filterDelay', function () {
|
||||
$scope.filterList(1);
|
||||
});
|
||||
@@ -137,22 +141,30 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
|
||||
return true
|
||||
}
|
||||
}
|
||||
if (localStorage.getItem('isV5') && $scope.filterUnspecified) {
|
||||
if (type.includes("UNSPECIFIED")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if ($scope.filterNormal) {
|
||||
if (type.includes("NORMAL")) {
|
||||
return true
|
||||
}
|
||||
if (!localStorage.getItem('isV5') && type.includes("UNSPECIFIED")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if ($scope.filterDelay) {
|
||||
if (localStorage.getItem('isV5') && $scope.filterDelay) {
|
||||
if (type.includes("DELAY")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if ($scope.filterFifo) {
|
||||
if (localStorage.getItem('isV5') && $scope.filterFifo) {
|
||||
if (type.includes("FIFO")) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
if ($scope.filterTransaction) {
|
||||
if (localStorage.getItem('isV5') && $scope.filterTransaction) {
|
||||
if (type.includes("TRANSACTION")) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -276,15 +276,6 @@
|
||||
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="form-group">-->
|
||||
<!--<label class="control-label col-sm-4">retryMaxTimes:</label>-->
|
||||
<!--<div class="col-sm-8">-->
|
||||
<!--<input class="form-control" ng-model="item.subscriptionGroupConfig.retryMaxTimes"-->
|
||||
<!--type="text"-->
|
||||
<!--required/>-->
|
||||
<!--<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>-->
|
||||
<!--</div>-->
|
||||
<!--</div>-->
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">brokerId:</label>
|
||||
<div class="col-sm-9">
|
||||
@@ -293,6 +284,14 @@
|
||||
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">retryMaxTimes:</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" ng-model="item.subscriptionGroupConfig.retryMaxTimes" type="text"
|
||||
ng-disabled="{{!ngDialogData.writeOperationEnabled}}" required/>
|
||||
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">whichBrokerWhenConsumeSlowly:</label>
|
||||
<div class="col-sm-9">
|
||||
@@ -403,6 +402,14 @@
|
||||
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">retryMaxTimes:</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" ng-model="item.subscriptionGroupConfig.retryMaxTimes" type="text"
|
||||
ng-disabled="{{!ngDialogData.writeOperationEnabled}}" required/>
|
||||
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">whichBrokerWhenConsumeSlowly:</label>
|
||||
<div class="col-sm-9">
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
</md-checkbox>
|
||||
<md-checkbox aria-label="Checkbox" ng-model="filterTransaction" class="md-primary" ng-show="rmqVersion">{{'TRANSACTION' | translate}}
|
||||
</md-checkbox>
|
||||
<md-checkbox aria-label="Checkbox" ng-model="filterUnspecified" class="md-primary" ng-show="rmqVersion">{{'UNSPECIFIED' | translate}}
|
||||
</md-checkbox>
|
||||
<md-checkbox aria-label="Checkbox" ng-model="filterRetry" class="md-primary">{{'RETRY' | translate}}
|
||||
</md-checkbox>
|
||||
<md-checkbox aria-label="Checkbox" ng-model="filterDLQ" class="md-primary">{{'DLQ' | translate}}
|
||||
|
||||
Reference in New Issue
Block a user