fix(mq): hide new-query entry for message queue connections
This commit is contained in:
1 parent
d0b9e49b7e
commit
4b64656069
4 files changed
+21
-1
No files matched your search
@@ -98,6 +98,21 @@ describe("connection query actions", () => {
|
|||||||
expect(supportsConnectionQueryActions("hbase")).toBe(false);
|
expect(supportsConnectionQueryActions("hbase")).toBe(false);
|
||||||
expect(supportsConnectionQueryActions("zookeeper")).toBe(false);
|
expect(supportsConnectionQueryActions("zookeeper")).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("hides the sidebar new-query entry for message brokers", () => {
|
||||||
|
// Kafka/Pulsar/RocketMQ/RabbitMQ all share db_type "mq" and have no SQL
|
||||||
|
// engine: the sidebar entry opened a plain SQL editor against a broker
|
||||||
|
// (issue #8415). MQTT has the same console-only surface.
|
||||||
|
expect(supportsConnectionQueryActions("mq")).toBe(false);
|
||||||
|
expect(supportsConnectionQueryActions("mqtt")).toBe(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("message queue query capabilities", () => {
|
||||||
|
it("does not advertise query execution for broker surfaces", () => {
|
||||||
|
expect(supportsQueryExecution("mq")).toBe(false);
|
||||||
|
expect(supportsQueryExecution("mqtt")).toBe(false);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("zookeeper query capabilities", () => {
|
describe("zookeeper query capabilities", () => {
|
||||||
|
|||||||
@@ -117,9 +117,14 @@ export function supportsClearableQuerySchema(dbType?: DatabaseType): boolean {
|
|||||||
* so the sidebar "new query" flow would call list-databases and fail
|
* so the sidebar "new query" flow would call list-databases and fail
|
||||||
* (issue #8215). It is excluded alongside the other specialized surfaces
|
* (issue #8215). It is excluded alongside the other specialized surfaces
|
||||||
* (nacos, consul, hbase) whose connection workbench replaces query tabs.
|
* (nacos, consul, hbase) whose connection workbench replaces query tabs.
|
||||||
|
*
|
||||||
|
* The message-queue surfaces (`mq` — Pulsar/Kafka/RocketMQ/RabbitMQ — and
|
||||||
|
* `mqtt`) belong to the same group: brokers have no SQL engine, and their
|
||||||
|
* workbench is the MQ/MQTT admin tab. The sidebar entry used to open a plain
|
||||||
|
* SQL editor against a broker (issue #8415).
|
||||||
*/
|
*/
|
||||||
export function supportsConnectionQueryActions(dbType?: DatabaseType): boolean {
|
export function supportsConnectionQueryActions(dbType?: DatabaseType): boolean {
|
||||||
return dbType !== "nacos" && dbType !== "consul" && dbType !== "hbase" && dbType !== "zookeeper";
|
return dbType !== "nacos" && dbType !== "consul" && dbType !== "hbase" && dbType !== "zookeeper" && dbType !== "mq" && dbType !== "mqtt";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 212 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 250 KiB |
Reference in new issue
Block a user