Skip to content

Commit c4eca6c

Browse files
committed
feat: add iotdb support
1 parent 11ab39f commit c4eca6c

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

console/atest-ui/src/views/DataManager.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ const executeQuery = async () => {
116116
case 'atest-store-orm':
117117
ormDataHandler(data)
118118
break;
119+
case 'atest-store-iotdb':
120+
ormDataHandler(data)
121+
success = true
122+
break;
119123
case 'atest-store-etcd':
120124
keyValueDataHandler(data)
121125
break;

console/atest-ui/src/views/net.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,43 @@ var SBOM = (callback: (d: any) => void) => {
779779
.then(callback)
780780
}
781781

782+
<<<<<<< Updated upstream
783+
=======
784+
interface QueryObject {
785+
sql: string
786+
key: string
787+
}
788+
var DataQueryAsync = (store: string, kind: string, currentDatabase: string, query: string) => {
789+
const queryObj = {} as QueryObject;
790+
switch (kind) {
791+
case 'atest-store-orm':
792+
queryObj['sql'] = query;
793+
queryObj['key'] = currentDatabase;
794+
break;
795+
case 'atest-store-iotdb':
796+
queryObj['sql'] = query;
797+
queryObj['key'] = currentDatabase;
798+
break;
799+
case 'atest-store-etcd':
800+
queryObj['key'] = query;
801+
break;
802+
case 'atest-store-redis':
803+
queryObj['key'] = query;
804+
break;
805+
}
806+
const requestOptions = {
807+
method: 'POST',
808+
headers: {
809+
'X-Store-Name': store,
810+
'X-Database': currentDatabase
811+
},
812+
body: JSON.stringify(queryObj)
813+
}
814+
return fetch(`/api/v1/data/query`, requestOptions)
815+
.then(DefaultResponseProcess)
816+
}
817+
818+
>>>>>>> Stashed changes
782819
var DataQuery = (store: string, kind: string, currentDatabase: string, query: string, callback: (d: any) => void, errHandler: (d: any) => void) => {
783820
const queryObj = {}
784821
switch (kind) {

console/atest-ui/src/views/store.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ const storeExtensions = [
7878
}],
7979
link: 'https://github.com/LinuxSuRen/atest-ext-store-orm'
8080
},
81+
{
82+
name: 'atest-store-iotdb',
83+
params: [],
84+
link: 'https://github.com/LinuxSuRen/atest-ext-store-iotdb'
85+
},
8186
{
8287
name: 'atest-store-etcd',
8388
params: [],

pkg/server/remote_server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,9 @@ func (s *server) GetStores(ctx context.Context, in *Empty) (reply *Stores, err e
11571157
}
11581158
for _, item := range stores {
11591159
grpcStore := ToGRPCStore(item)
1160+
if item.Disabled {
1161+
continue
1162+
}
11601163

11611164
storeStatus, sErr := s.VerifyStore(ctx, &SimpleQuery{Name: item.Name})
11621165
grpcStore.Ready = sErr == nil && storeStatus.Ready

0 commit comments

Comments
 (0)