From 243c89b459fbf5c48c211be18fc9d46af46adaa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=99=93=E4=B8=9C?= <763795151@qq.com> Date: Tue, 28 Dec 2021 20:39:07 +0800 Subject: [PATCH] =?UTF-8?q?topic=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=8C=E6=B6=88=E6=81=AF=E8=BF=87=E6=BB=A4=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/message/SearchByTime.vue | 133 ++++++++++++++++++++++++++ ui/src/views/topic/Topic.vue | 39 ++++++-- 2 files changed, 162 insertions(+), 10 deletions(-) diff --git a/ui/src/views/message/SearchByTime.vue b/ui/src/views/message/SearchByTime.vue index 401ec6a..92fa3fb 100644 --- a/ui/src/views/message/SearchByTime.vue +++ b/ui/src/views/message/SearchByTime.vue @@ -59,6 +59,78 @@ +
@@ -97,6 +169,9 @@ export default {
rules: [{ type: "array", required: true, message: "请选择时间!" }],
},
data: defaultData,
+ deserializerList: [],
+ showBodyFilter: false,
+ showHeaderFilter: false,
};
},
methods: {
@@ -151,6 +226,40 @@ export default {
this.selectPartition = -1;
this.getPartitionInfo(topic);
},
+ onFilterChange(e) {
+ switch (e) {
+ case "body":
+ this.showBodyFilter = true;
+ this.showHeaderFilter = false;
+ break;
+ case "header":
+ this.showHeaderFilter = true;
+ this.showBodyFilter = false;
+ break;
+ default:
+ this.showBodyFilter = false;
+ this.showHeaderFilter = false;
+ break;
+ }
+ },
+ getDeserializerList() {
+ request({
+ url: KafkaMessageApi.deserializerList.url,
+ method: KafkaMessageApi.deserializerList.method,
+ }).then((res) => {
+ if (res.code != 0) {
+ notification.error({
+ message: "error",
+ description: res.msg,
+ });
+ } else {
+ this.deserializerList = res.data;
+ }
+ });
+ },
+ },
+ created() {
+ this.getDeserializerList();
},
};
const defaultData = { realNum: 0, maxNum: 0 };
@@ -195,7 +304,31 @@ const defaultData = { realNum: 0, maxNum: 0 };
width: 400px !important;
}
+.filter-select {
+ width: 160px !important;
+}
+
+.body-type {
+ width: 120px;
+}
+
+.msg-body {
+ width: 400px;
+}
+
.type-select {
width: 150px !important;
}
+.hint {
+ font-size: smaller;
+ color: green;
+}
+.ant-advanced-search-form {
+ padding-bottom: 0px;
+}
+.hr {
+ height: 1px;
+ border: none;
+ border-top: 1px dashed #0066cc;
+}
diff --git a/ui/src/views/topic/Topic.vue b/ui/src/views/topic/Topic.vue
index 66b9eb4..9703acd 100644
--- a/ui/src/views/topic/Topic.vue
+++ b/ui/src/views/topic/Topic.vue
@@ -15,6 +15,7 @@
placeholder="topic"
class="input-w"
v-decorator="['topic']"
+ @change="onTopicUpdate"
/>
@@ -22,8 +23,9 @@