feat: support empty redis key separator for flat key display
This commit is contained in:
1 parent
89aa315a2d
commit
6f15fa303c
5 files changed
+9
-6
No files matched your search
@@ -549,7 +549,7 @@ watch(
|
||||
redis_sentinel_password: config.redis_sentinel_password || "",
|
||||
redis_sentinel_tls: config.redis_sentinel_tls || false,
|
||||
redis_cluster_nodes: config.redis_cluster_nodes || "",
|
||||
redis_key_separator: config.redis_key_separator || ":",
|
||||
redis_key_separator: config.redis_key_separator ?? ":",
|
||||
etcd_endpoints: config.etcd_endpoints || "",
|
||||
read_only: config.read_only || false,
|
||||
visible_databases: config.visible_databases,
|
||||
@@ -1095,7 +1095,7 @@ function connectionConfigForSubmit(id: string): ConnectionConfig {
|
||||
config.redis_cluster_nodes = undefined;
|
||||
}
|
||||
if (config.db_type === "redis") {
|
||||
config.redis_key_separator = config.redis_key_separator?.trim() || ":";
|
||||
config.redis_key_separator = config.redis_key_separator?.trim() ?? ":";
|
||||
}
|
||||
if (config.db_type === "etcd") {
|
||||
config.etcd_endpoints = normalizeEndpointLines(config.etcd_endpoints || "");
|
||||
|
||||
@@ -104,7 +104,10 @@ const effectivePattern = computed(() => (searchMode.value === "key" ? redisKeySe
|
||||
const isSearchMode = computed(() => (searchMode.value === "key" ? effectivePattern.value !== "*" : valueQuery.value !== ""));
|
||||
const searchPlaceholder = computed(() => (searchMode.value === "key" ? (fuzzyKeySearch.value ? t("redis.fuzzyPattern") : t("redis.pattern")) : t("redis.valueSearchPlaceholder")));
|
||||
const loadingEmptyText = computed(() => (searchMode.value === "value" && valueQuery.value ? t("redis.searchingValues") : t("redis.loadingKeys")));
|
||||
const redisKeySeparator = computed(() => connectionStore.getConfig(props.connectionId)?.redis_key_separator || ":");
|
||||
const redisKeySeparator = computed(() => connectionStore.getConfig(props.connectionId)?.redis_key_separator ?? ":");
|
||||
watch(redisKeySeparator, () => {
|
||||
if (flatKeys.value.length > 0) rebuildTree(false);
|
||||
});
|
||||
const lastTotalKeys = ref(0);
|
||||
const fetchAllProgressText = computed(() => {
|
||||
if (!isFetchingAll.value) return "";
|
||||
|
||||
Reference in new issue
Block a user