fix(tabs): hide database label for connection-only targets

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-23 14:43:43 +08:00
1 parent 13d2db6191
commit ebb2c1006e
4 files changed
+43 -3

No files matched your search

@@ -7,6 +7,14 @@ export interface DatabaseInfoRow {
value: string;
}
// These connections have no real database metadata. VictoriaMetrics exposes a
// configured label as a synthetic database node, not a server database.
const DATABASE_INFO_UNSUPPORTED_TYPES = new Set<ConnectionConfig["db_type"]>(["dynamodb", "elasticsearch", "easysearch", "meilisearch", "solr", "qdrant", "weaviate", "chromadb", "etcd", "zookeeper", "nacos", "consul", "mq", "mqtt", "victoriametrics"]);
export function supportsConnectionDatabaseInfo(dbType: ConnectionConfig["db_type"]): boolean {
return !DATABASE_INFO_UNSUPPORTED_TYPES.has(dbType);
}
const DATABASE_INFO_FIELDS: readonly DatabaseInfoField[] = ["productName", "productVersion", "currentDatabase", "serverComment", "serverCharset", "serverCollation", "unquotedIdentifierCase", "quotedIdentifierCase", "driverName", "driverVersion", "jdbcVersion"];
const IDENTIFIER_CASES = new Set<IdentifierCase>(["lower", "upper", "mixed"]);