diff --git a/ui/src/views/group/Group.vue b/ui/src/views/group/Group.vue index b24b080..4444996 100644 --- a/ui/src/views/group/Group.vue +++ b/ui/src/views/group/Group.vue @@ -1,93 +1,98 @@ @@ -115,6 +120,7 @@ export default { resourceType: "", username: "", }, + loading: false, }; }, methods: { @@ -129,19 +135,23 @@ export default { getConsumerGroupList() { Object.assign(this.queryParam, this.form.getFieldsValue()); + this.loading = true; request({ url: KafkaConsumerApi.getConsumerGroupList.url, method: KafkaConsumerApi.getConsumerGroupList.method, data: this.queryParam, }).then((res) => { + this.loading = false; this.data = res.data.list; }); }, deleteGroup(group) { + this.loading = true; request({ url: KafkaConsumerApi.deleteConsumerGroup.url + "?groupId=" + group, method: KafkaConsumerApi.deleteConsumerGroup.method, }).then((res) => { + this.loading = false; if (res.code == 0) { this.$message.success(res.msg); this.getConsumerGroupList(); diff --git a/ui/src/views/topic/PartitionInfo.vue b/ui/src/views/topic/PartitionInfo.vue index 7c3c0fa..22bbcb1 100644 --- a/ui/src/views/topic/PartitionInfo.vue +++ b/ui/src/views/topic/PartitionInfo.vue @@ -10,30 +10,32 @@ @cancel="handleCancel" >
- - - - + + +
    +
      + {{ + i + }} +
    +
+
    +
      + {{ + i + }} +
    +
+
+
@@ -59,6 +61,7 @@ export default { columns: columns, show: this.visible, data: [], + loading: false, }; }, watch: { @@ -71,10 +74,12 @@ export default { }, methods: { getPartitionInfo() { + this.loading = true; request({ url: KafkaTopicApi.getPartitionInfo.url + "?topic=" + this.topic, method: KafkaTopicApi.getPartitionInfo.method, }).then((res) => { + this.loading = false; if (res.code != 0) { notification.error({ message: "error", @@ -86,6 +91,7 @@ export default { }); }, handleCancel() { + this.data = []; this.$emit("closePartitionInfoDialog", {}); }, }, diff --git a/ui/src/views/topic/Topic.vue b/ui/src/views/topic/Topic.vue index c871c98..9901ec8 100644 --- a/ui/src/views/topic/Topic.vue +++ b/ui/src/views/topic/Topic.vue @@ -1,80 +1,82 @@ @@ -83,6 +85,7 @@ import request from "@/utils/request"; import { KafkaTopicApi } from "@/utils/api"; import notification from "ant-design-vue/es/notification"; import PartitionInfo from "@/views/topic/PartitionInfo"; + export default { name: "Topic", components: { PartitionInfo }, @@ -101,6 +104,7 @@ export default { username: "", }, showPartitionInfo: false, + loading: false, }; }, methods: { @@ -115,11 +119,13 @@ export default { getTopicList() { Object.assign(this.queryParam, this.form.getFieldsValue()); + this.loading = true; request({ url: KafkaTopicApi.getTopicList.url, method: KafkaTopicApi.getTopicList.method, params: this.queryParam, }).then((res) => { + this.loading = false; this.data = res.data; }); },