support to let user to choose store param from list
This commit is contained in:
parent
ad85fb89cb
commit
f33cd5c41f
|
@ -20,3 +20,4 @@ console/atest-desktop/atest
|
|||
console/atest-desktop/atest.exe
|
||||
console/atest-desktop/coverage
|
||||
atest-store-git
|
||||
.db
|
||||
|
|
|
@ -150,6 +150,8 @@ watch(() => storeForm.kind.name, (name) => {
|
|||
value: '',
|
||||
defaultValue: p.defaultValue,
|
||||
description: p.description,
|
||||
type: p.type,
|
||||
enum: p.enum
|
||||
} as Pair)
|
||||
} else {
|
||||
pro[index].description = p.description
|
||||
|
@ -318,15 +320,21 @@ const storeExtLink = ref('')
|
|||
<el-table-column label="Value">
|
||||
<template #default="scope">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-input v-model="scope.row.value" :placeholder="scope.row.defaultValue">
|
||||
<template #append v-if="scope.row.description">
|
||||
<el-tooltip :content="scope.row.description">
|
||||
<el-select v-model="scope.row.value" v-if="scope.row.enum">
|
||||
<el-option
|
||||
v-for="item in scope.row.enum"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input-number v-model="scope.row.value" v-else-if="scope.row.type === 'number'"/>
|
||||
<el-input v-model="scope.row.value" :placeholder="scope.row.defaultValue" v-else/>
|
||||
<el-tooltip :content="scope.row.description" v-if="scope.row.description">
|
||||
<el-icon>
|
||||
<QuestionFilled/>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -22,80 +22,82 @@ interface Store {
|
|||
}
|
||||
|
||||
const storeExtensions = [
|
||||
{
|
||||
name: 'atest-store-git',
|
||||
params: [{
|
||||
key: 'insecure'
|
||||
}, {
|
||||
key: 'timeout'
|
||||
}, {
|
||||
key: 'targetpath'
|
||||
}, {
|
||||
key: 'branch'
|
||||
}, {
|
||||
key: 'email',
|
||||
description: 'See also: git config --local user.email xxx@xxx.com'
|
||||
}, {
|
||||
key: 'name',
|
||||
description: 'See also: git config --local user.name xxx'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-git'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-s3',
|
||||
params: [{
|
||||
key: 'accesskeyid'
|
||||
}, {
|
||||
key: 'secretaccesskey'
|
||||
}, {
|
||||
key: 'sessiontoken'
|
||||
}, {
|
||||
key: 'region'
|
||||
}, {
|
||||
key: 'disablessl'
|
||||
}, {
|
||||
key: 'forcepathstyle'
|
||||
}, {
|
||||
key: 'bucket'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-s3'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-orm',
|
||||
params: [{
|
||||
key: 'driver',
|
||||
defaultValue: 'mysql',
|
||||
description: 'Supported: mysql, postgres, sqlite'
|
||||
}, {
|
||||
key: 'database',
|
||||
defaultValue: 'atest'
|
||||
}, {
|
||||
key: 'historyLimit',
|
||||
defaultValue: '',
|
||||
description: 'Set the limit of the history record count'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-orm'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-etcd',
|
||||
params: [],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-etcd'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-git',
|
||||
params: [{
|
||||
key: 'insecure'
|
||||
}, {
|
||||
key: 'timeout'
|
||||
}, {
|
||||
key: 'targetpath'
|
||||
}, {
|
||||
key: 'branch'
|
||||
}, {
|
||||
key: 'email',
|
||||
description: 'See also: git config --local user.email xxx@xxx.com'
|
||||
}, {
|
||||
key: 'name',
|
||||
description: 'See also: git config --local user.name xxx'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-git'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-s3',
|
||||
params: [{
|
||||
key: 'accesskeyid'
|
||||
}, {
|
||||
key: 'secretaccesskey'
|
||||
}, {
|
||||
key: 'sessiontoken'
|
||||
}, {
|
||||
key: 'region'
|
||||
}, {
|
||||
key: 'disablessl'
|
||||
}, {
|
||||
key: 'forcepathstyle'
|
||||
}, {
|
||||
key: 'bucket'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-s3'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-orm',
|
||||
params: [{
|
||||
key: 'driver',
|
||||
defaultValue: 'mysql',
|
||||
enum: ['mysql', 'postgres', 'sqlite', 'tdengine'],
|
||||
description: 'Supported: mysql, postgres, sqlite, tdengine'
|
||||
}, {
|
||||
key: 'database',
|
||||
defaultValue: 'atest'
|
||||
}, {
|
||||
key: 'historyLimit',
|
||||
defaultValue: '',
|
||||
// type: 'number',
|
||||
description: 'Set the limit of the history record count'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-orm'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-etcd',
|
||||
params: [],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-etcd'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-redis',
|
||||
params: [],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-redis'
|
||||
},
|
||||
{
|
||||
name: 'atest-store-mongodb',
|
||||
params: [{
|
||||
key: 'collection'
|
||||
}, {
|
||||
key: 'database',
|
||||
defaultValue: 'atest'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-mongodb'
|
||||
}
|
||||
{
|
||||
name: 'atest-store-mongodb',
|
||||
params: [{
|
||||
key: 'collection'
|
||||
}, {
|
||||
key: 'database',
|
||||
defaultValue: 'atest'
|
||||
}],
|
||||
link: 'https://github.com/LinuxSuRen/atest-ext-store-mongodb'
|
||||
}
|
||||
] as Store[]
|
||||
|
||||
export function SupportedExtensions() {
|
||||
|
|
Loading…
Reference in New Issue