|
|
|
@ -15,7 +15,7 @@
|
|
|
|
|
* limitations under the License. |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
import { defineComponent, PropType, toRefs, watch } from 'vue' |
|
|
|
|
import { defineComponent, getCurrentInstance, PropType, toRefs, watch } from 'vue' |
|
|
|
|
import { |
|
|
|
|
NButton, |
|
|
|
|
NSpin, |
|
|
|
@ -84,6 +84,8 @@ const DetailModal = defineComponent({
|
|
|
|
|
const onChangeType = changeType |
|
|
|
|
const onChangePort = changePort |
|
|
|
|
|
|
|
|
|
const trim = getCurrentInstance()?.appContext.config.globalProperties.trim |
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
() => props.show, |
|
|
|
|
async () => { |
|
|
|
@ -105,7 +107,8 @@ const DetailModal = defineComponent({
|
|
|
|
|
onChangePort, |
|
|
|
|
onSubmit, |
|
|
|
|
onTest, |
|
|
|
|
onCancel |
|
|
|
|
onCancel, |
|
|
|
|
trim |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
render() { |
|
|
|
@ -168,6 +171,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
show-require-mark |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-data-source-name' |
|
|
|
|
v-model={[detailForm.name, 'value']} |
|
|
|
|
maxlength={60} |
|
|
|
@ -176,6 +180,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
</NFormItem> |
|
|
|
|
<NFormItem label={t('datasource.description')} path='note'> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-data-source-description' |
|
|
|
|
v-model={[detailForm.note, 'value']} |
|
|
|
|
type='textarea' |
|
|
|
@ -188,6 +193,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
show-require-mark |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-ip' |
|
|
|
|
v-model={[detailForm.host, 'value']} |
|
|
|
|
type='text' |
|
|
|
@ -216,6 +222,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
show-require-mark |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
v-model={[detailForm.principal, 'value']} |
|
|
|
|
type='text' |
|
|
|
|
placeholder={t('datasource.principal_tips')} |
|
|
|
@ -227,6 +234,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
path='javaSecurityKrb5Conf' |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
v-model={[detailForm.javaSecurityKrb5Conf, 'value']} |
|
|
|
|
type='text' |
|
|
|
|
placeholder={t('datasource.krb5_conf_tips')} |
|
|
|
@ -238,6 +246,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
path='loginUserKeytabUsername' |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
v-model={[detailForm.loginUserKeytabUsername, 'value']} |
|
|
|
|
type='text' |
|
|
|
|
placeholder={t('datasource.keytab_username_tips')} |
|
|
|
@ -249,6 +258,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
path='loginUserKeytabPath' |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
v-model={[detailForm.loginUserKeytabPath, 'value']} |
|
|
|
|
type='text' |
|
|
|
|
placeholder={t('datasource.keytab_path_tips')} |
|
|
|
@ -260,6 +270,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
show-require-mark |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-username' |
|
|
|
|
v-model={[detailForm.userName, 'value']} |
|
|
|
|
type='text' |
|
|
|
@ -272,6 +283,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
path='password' |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-password' |
|
|
|
|
v-model={[detailForm.password, 'value']} |
|
|
|
|
type='password' |
|
|
|
@ -284,6 +296,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
show-require-mark={requiredDataBase} |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-data-base' |
|
|
|
|
v-model={[detailForm.database, 'value']} |
|
|
|
|
type='text' |
|
|
|
@ -313,6 +326,7 @@ const DetailModal = defineComponent({
|
|
|
|
|
path='other' |
|
|
|
|
> |
|
|
|
|
<NInput |
|
|
|
|
allowInput={this.trim} |
|
|
|
|
class='input-jdbc-params' |
|
|
|
|
v-model={[detailForm.other, 'value']} |
|
|
|
|
type='textarea' |
|
|
|
|