From f18e857d3c1a31ff9808c183245049643f98b9f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=99=93=E4=B8=9C?= <763795151@qq.com> Date: Sat, 16 Oct 2021 14:22:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E8=B4=B9=E8=AF=A6=E6=83=85=EF=BC=8C?= =?UTF-8?q?=E6=9C=AA=E6=B6=88=E8=B4=B9=E7=9A=84=E6=B6=88=E8=B4=B9=E7=BB=84?= =?UTF-8?q?=E6=8A=A5=E9=94=99=EF=BC=8C=E8=8F=9C=E5=8D=95=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E6=8D=A2=E6=88=90hash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/scala/kafka/console/ConsumerConsole.scala | 13 +++++++++---- ui/src/router/index.js | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/scala/kafka/console/ConsumerConsole.scala b/src/main/scala/kafka/console/ConsumerConsole.scala index 022d59d..658974f 100644 --- a/src/main/scala/kafka/console/ConsumerConsole.scala +++ b/src/main/scala/kafka/console/ConsumerConsole.scala @@ -92,10 +92,15 @@ class ConsumerConsole(config: KafkaConfig) extends KafkaConsole(config: KafkaCon consumerGroup.members().asScala.filter(!_.assignment().topicPartitions().isEmpty).foreach(m => { m.assignment().topicPartitions().asScala.foreach(topicPartition => { - val t = topicPartitionConsumeInfoMap.get(topicPartition).get - t.clientId = m.clientId() - t.consumerId = m.consumerId() - t.host = m.host() + topicPartitionConsumeInfoMap.get(topicPartition) match { + case None => + case Some(t) => { + t.clientId = m.clientId() + t.consumerId = m.consumerId() + t.host = m.host() + } + } + }) }) diff --git a/ui/src/router/index.js b/ui/src/router/index.js index c47204c..e92c3f7 100644 --- a/ui/src/router/index.js +++ b/ui/src/router/index.js @@ -46,8 +46,8 @@ const routes = [ ]; const router = new VueRouter({ - mode: "history", - // mode: "hash", + // mode: "history", + mode: "hash", base: process.env.BASE_URL, routes, });