feat: add iotdb support
This commit is contained in:
parent
11ab39f11f
commit
c4eca6cbc1
|
@ -116,6 +116,10 @@ const executeQuery = async () => {
|
|||
case 'atest-store-orm':
|
||||
ormDataHandler(data)
|
||||
break;
|
||||
case 'atest-store-iotdb':
|
||||
ormDataHandler(data)
|
||||
success = true
|
||||
break;
|
||||
case 'atest-store-etcd':
|
||||
keyValueDataHandler(data)
|
||||
break;
|
||||
|
|
|
@ -779,6 +779,43 @@ var SBOM = (callback: (d: any) => void) => {
|
|||
.then(callback)
|
||||
}
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
=======
|
||||
interface QueryObject {
|
||||
sql: string
|
||||
key: string
|
||||
}
|
||||
var DataQueryAsync = (store: string, kind: string, currentDatabase: string, query: string) => {
|
||||
const queryObj = {} as QueryObject;
|
||||
switch (kind) {
|
||||
case 'atest-store-orm':
|
||||
queryObj['sql'] = query;
|
||||
queryObj['key'] = currentDatabase;
|
||||
break;
|
||||
case 'atest-store-iotdb':
|
||||
queryObj['sql'] = query;
|
||||
queryObj['key'] = currentDatabase;
|
||||
break;
|
||||
case 'atest-store-etcd':
|
||||
queryObj['key'] = query;
|
||||
break;
|
||||
case 'atest-store-redis':
|
||||
queryObj['key'] = query;
|
||||
break;
|
||||
}
|
||||
const requestOptions = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-Store-Name': store,
|
||||
'X-Database': currentDatabase
|
||||
},
|
||||
body: JSON.stringify(queryObj)
|
||||
}
|
||||
return fetch(`/api/v1/data/query`, requestOptions)
|
||||
.then(DefaultResponseProcess)
|
||||
}
|
||||
|
||||
>>>>>>> Stashed changes
|
||||
var DataQuery = (store: string, kind: string, currentDatabase: string, query: string, callback: (d: any) => void, errHandler: (d: any) => void) => {
|
||||
const queryObj = {}
|
||||
switch (kind) {
|
||||
|
|
|
@ -78,6 +78,11 @@ const storeExtensions = [
|
|||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-orm'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-iotdb',
|
||||
params: [],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-iotdb'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-etcd',
|
||||
params: [],
|
||||
|
|
|
@ -1157,6 +1157,9 @@ func (s *server) GetStores(ctx context.Context, in *Empty) (reply *Stores, err e
|
|||
}
|
||||
for _, item := range stores {
|
||||
grpcStore := ToGRPCStore(item)
|
||||
if item.Disabled {
|
||||
continue
|
||||
}
|
||||
|
||||
storeStatus, sErr := s.VerifyStore(ctx, &SimpleQuery{Name: item.Name})
|
||||
grpcStore.Ready = sErr == nil && storeStatus.Ready
|
||||
|
|
Loading…
Reference in New Issue