Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions console/atest-ui/src/views/DataManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -188,7 +196,7 @@ const executeWithQuery = async (sql: string) => {
<template>
<div>
<el-container style="height: calc(100vh - 50px);">
<el-aside v-if="kind === 'atest-store-orm' || kind === 'atest-store-iotdb'">
<el-aside v-if="kind === 'atest-store-orm' || kind === 'atest-store-iotdb' || kind === 'atest-store-cassandra'">
<el-scrollbar>
<el-select v-model="queryDataMeta.currentDatabase" placeholder="Select database"
@change="queryTables" filterable>
Expand All @@ -204,7 +212,7 @@ const executeWithQuery = async (sql: string) => {
<span @click="queryDataFromTable(data)">
{{ node.label }}
</span>
<el-icon style="margin-left: 6px;" @click="describeTable(data)" v-if="kind === 'atest-store-orm'"><Document /></el-icon>
<el-icon style="margin-left: 6px;" @click="describeTable(data)" v-if="kind === 'atest-store-orm' || kind === 'atest-store-cassandra'"><Document /></el-icon>
</template>
</el-tree>
</el-scrollbar>
Expand Down
2 changes: 1 addition & 1 deletion console/atest-ui/src/views/__test__/store.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { SupportedExtension, SupportedExtensions } from "../store";
describe("SupportedExtensions", () => {
test('length check', () => {
const extensions = SupportedExtensions()
expect(extensions.length).toBe(7)
expect(extensions.length).toBe(8)
})

for (const extension of SupportedExtensions()) {
Expand Down
4 changes: 1 addition & 3 deletions console/atest-ui/src/views/net.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions console/atest-ui/src/views/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down
1 change: 1 addition & 0 deletions extensions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | |
Expand Down
Loading