集群名称支持中文,消息查询可选择时间展示顺序

This commit is contained in:
许晓东
2022-01-13 14:19:17 +08:00
parent 10302dd39c
commit e8fe2ea1c7
4 changed files with 68 additions and 36 deletions

View File

@@ -69,6 +69,9 @@ sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule require
import request from "@/utils/request";
import { KafkaClusterApi } from "@/utils/api";
import notification from "ant-design-vue/es/notification";
import { getClusterInfo } from "@/utils/local-cache";
import { mapMutations } from "vuex";
import { CLUSTER } from "@/store/mutation-types";
export default {
name: "AddClusterInfo",
@@ -124,6 +127,17 @@ export default {
if (res.code == 0) {
this.$message.success(res.msg);
this.$emit(this.closeDialogEvent, { refresh: true });
if (this.isModify) {
let clusterInfo = getClusterInfo();
if (
clusterInfo &&
clusterInfo.id &&
clusterInfo.id == this.clusterInfo.id &&
clusterInfo.clusterName != data.clusterName
) {
this.switchCluster(data);
}
}
} else {
notification.error({
message: "error",
@@ -138,6 +152,9 @@ export default {
this.data = [];
this.$emit(this.closeDialogEvent, { refresh: false });
},
...mapMutations({
switchCluster: CLUSTER.SWITCH,
}),
},
};
const defaultInfo = { clusterName: "", address: "", properties: "" };