diff --git a/console/atest-ui/src/views/DataManager.vue b/console/atest-ui/src/views/DataManager.vue index 0de1f50..14f5c10 100644 --- a/console/atest-ui/src/views/DataManager.vue +++ b/console/atest-ui/src/views/DataManager.vue @@ -59,7 +59,13 @@ const queryDataFromTable = (data: QueryData) => { executeQuery() } const describeTable = (data: QueryData) => { - sqlQuery.value = `@describeTable_${data.label}` + switch (kind.value) { + case 'atest-store-cassandra': + sqlQuery.value = `@describeTable_${queryDataMeta.value.currentDatabase}:${data.label}` + break + default: + sqlQuery.value = `@describeTable_${data.label}` + } executeQuery() } const queryTables = () => { @@ -69,6 +75,7 @@ const queryTables = () => { watch(kind, (k) => { switch (k) { case 'atest-store-orm': + case 'atest-store-cassandra': case 'atest-store-iotdb': queryTip.value = 'Enter SQL query' executeQuery() @@ -157,6 +164,7 @@ const executeWithQuery = async (sql: string) => { const data = await API.DataQueryAsync(store.value, kind.value, queryDataMeta.value.currentDatabase, sql); switch (kind.value) { case 'atest-store-orm': + case 'atest-store-cassandra': case 'atest-store-iotdb': ormDataHandler(data) success = true @@ -188,7 +196,7 @@ const executeWithQuery = async (sql: string) => { diff --git a/console/atest-ui/src/views/net.ts b/console/atest-ui/src/views/net.ts index 49d2239..273b78e 100644 --- a/console/atest-ui/src/views/net.ts +++ b/console/atest-ui/src/views/net.ts @@ -788,9 +788,7 @@ var DataQueryAsync = (store: string, kind: string, currentDatabase: string, quer const queryObj = {} as QueryObject; switch (kind) { case 'atest-store-orm': - queryObj['sql'] = query; - queryObj['key'] = currentDatabase; - break; + case 'atest-store-cassandra': case 'atest-store-iotdb': queryObj['sql'] = query; queryObj['key'] = currentDatabase; diff --git a/console/atest-ui/src/views/store.ts b/console/atest-ui/src/views/store.ts index 00915a9..c42ffdb 100644 --- a/console/atest-ui/src/views/store.ts +++ b/console/atest-ui/src/views/store.ts @@ -88,6 +88,14 @@ const storeExtensions = [ params: [], link: 'https://github.com/LinuxSuRen/atest-ext-store-iotdb' }, + { + name: 'atest-store-cassandra', + params: [{ + key: 'keyspace', + defaultValue: '' + }], + link: 'https://github.com/LinuxSuRen/atest-ext-store-cassandra' + }, { name: 'atest-store-etcd', params: [], diff --git a/extensions/README.md b/extensions/README.md index e7a27ae..7bc914d 100644 --- a/extensions/README.md +++ b/extensions/README.md @@ -9,6 +9,7 @@ Ports in extensions: | Store | [mongodb](https://github.com/LinuxSuRen/atest-ext-store-mongodb) | 4075 | | Store | [redis](https://github.com/LinuxSuRen/atest-ext-store-redis) | | | Store | [iotdb](https://github.com/LinuxSuRen/atest-ext-store-iotdb) | | +| Store | [Cassandra](https://github.com/LinuxSuRen/atest-ext-store-cassandra) | | | Monitor | [docker-monitor](https://github.com/LinuxSuRen/atest-ext-monitor-docker) | | | Agent | [collector](https://github.com/LinuxSuRen/atest-ext-collector) | | | Secret | [Vault](https://github.com/LinuxSuRen/api-testing-vault-extension) | |