forked from github/dataease
commit
55daff9813
@ -230,7 +230,41 @@ export default {
|
||||
data_update_settings: 'Data update settings',
|
||||
connection_method: 'Connection method',
|
||||
hostname: 'hostname',
|
||||
jdbc_connection: 'JDBC connection'
|
||||
jdbc_connection: 'JDBC connection',
|
||||
jdbc_connection_string: ' JDBC connection string',
|
||||
ssh_settings: 'SSH settings',
|
||||
enable_ssh: 'Enable SSH',
|
||||
host: 'Host',
|
||||
please_enter_hostname: 'Please enter hostname',
|
||||
port: 'port',
|
||||
password: 'password',
|
||||
enter_ssh_key: 'Please enter ssh key',
|
||||
ssh_key_password: 'ssh key password',
|
||||
update_now: 'Update now',
|
||||
update_once: 'Update once',
|
||||
edit_parameters: 'Edit parameters',
|
||||
text: 'text',
|
||||
numerical_value: 'numerical value',
|
||||
numeric_value_decimal: 'Numeric value (decimal)',
|
||||
interface_name: 'Interface name',
|
||||
to_replace_it:
|
||||
'Replacement may affect custom datasets, related datasets, dashboards, etc. Do you want to replace it?',
|
||||
document: 'document',
|
||||
reupload: 'Reupload',
|
||||
and_csv_formats: 'Only supports files in xlsx, xls, and csv formats',
|
||||
please_upload_files: 'Please upload files',
|
||||
cannot_be_empty_table: 'Data table cannot be empty',
|
||||
the_previous_step:
|
||||
'The filled in information will be cleared. Are you sure you want to return to the previous step?',
|
||||
add_data_table: 'Need to add data table',
|
||||
replace_data: 'Replace data',
|
||||
append_data: 'append data',
|
||||
copy_data_source: 'Copy data source',
|
||||
create_data_source: 'Create data source',
|
||||
want_to_exit: 'The current changes have not been saved. Are you sure you want to exit?',
|
||||
configuration_information: 'Configuration information',
|
||||
all: 'all',
|
||||
api_data: 'API data'
|
||||
},
|
||||
login: {
|
||||
welcome: 'Welcome',
|
||||
|
@ -210,7 +210,6 @@ export default {
|
||||
the_request_address: '请输入请求地址',
|
||||
name_already_exists: '已经存在同名参数:',
|
||||
name_already_exists_de: '已经存在同名的参数表',
|
||||
verification_failed: '校验失败',
|
||||
interface_parameters: '接口参数',
|
||||
extract_parameters: '提取参数',
|
||||
view_data_structure: '查看数据结构',
|
||||
@ -228,26 +227,59 @@ export default {
|
||||
a_folder_name: '请输入文件夹名称',
|
||||
data_source: '数据源',
|
||||
the_destination_folder: '请选择目标文件夹',
|
||||
source_saved_successfully: '保存数据源成功',
|
||||
relevant_content_found: '没有找到相关内容',
|
||||
recently_created: '最近创建',
|
||||
cannot_be_empty: 'SSH主机不能为空',
|
||||
cannot_be_empty_de: 'SSH端口不能为空',
|
||||
cannot_be_empty_de_name: 'SSH用户名不能为空',
|
||||
cannot_be_empty_de_pwd: 'SSH密码不能为空',
|
||||
cannot_be_empty_de_key: 'SSH key不能为空',
|
||||
enter_parameter_name: '请输入参数名称',
|
||||
to_64_characters: '参数名称限制2~64字符',
|
||||
the_interface_name: '请输入接口名称',
|
||||
to_64_characters_de: '接口名称限制2~64字符',
|
||||
sure_to_delete: '确定删除吗?',
|
||||
rename: '重命名',
|
||||
delete: '删除',
|
||||
source_configuration_information: '数据源配置信息',
|
||||
data_update_settings: '数据更新设置',
|
||||
connection_method: '连接方式',
|
||||
hostname: '主机名',
|
||||
jdbc_connection: 'JDBC 连接'
|
||||
jdbc_connection: 'JDBC 连接',
|
||||
jdbc_connection_string: ' JDBC 连接字符串',
|
||||
ssh_settings: 'SSH 设置',
|
||||
enable_ssh: '启用SSH',
|
||||
host: '主机',
|
||||
please_enter_hostname: '请输入主机名',
|
||||
port: '端口',
|
||||
password: '密码',
|
||||
enter_ssh_key: '请输入ssh key',
|
||||
ssh_key_password: 'ssh key 密码',
|
||||
update_now: '立即更新',
|
||||
update_once: '更新一次',
|
||||
edit_parameters: '编辑参数',
|
||||
enter_parameter_name: '请输入参数名称',
|
||||
text: '文本',
|
||||
numerical_value: '数值',
|
||||
numeric_value_decimal: '数值(小数)',
|
||||
rename: '重命名',
|
||||
interface_name: '接口名称',
|
||||
the_interface_name: '请输入接口名称',
|
||||
to_replace_it: '替换可能会影响自定义数据集、关联数据集、仪表板等,是否替换?',
|
||||
document: '文件',
|
||||
reupload: '重新上传',
|
||||
and_csv_formats: '仅支持xlsx、xls、csv格式的文件',
|
||||
please_upload_files: '请上传文件',
|
||||
cannot_be_empty_table: '数据表不能为空',
|
||||
the_previous_step: '填写的信息将会清空,确定返回上一步吗?',
|
||||
add_data_table: '需要添加数据表',
|
||||
verification_failed: '校验失败',
|
||||
source_saved_successfully: '保存数据源成功',
|
||||
replace_data: '替换数据',
|
||||
append_data: '追加数据',
|
||||
copy_data_source: '复制数据源',
|
||||
create_data_source: '创建数据源',
|
||||
want_to_exit: '当前的更改尚未保存,确定退出吗?',
|
||||
configuration_information: '配置信息',
|
||||
recently_created: '最近创建',
|
||||
all: '全部',
|
||||
api_data: 'API数据'
|
||||
},
|
||||
dynamic_time: {
|
||||
set_default: '设置默认值',
|
||||
|
@ -944,13 +944,13 @@ defineExpose({
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label=" JDBC 连接字符串"
|
||||
:label="t('data_source.jdbc_connection_string')"
|
||||
prop="configuration.jdbcUrl"
|
||||
v-if="form.configuration.urlType === 'jdbcUrl'"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.configuration.jdbcUrl"
|
||||
placeholder=" JDBC 连接字符串"
|
||||
:placeholder="t('data_source.jdbc_connection_string')"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -1115,7 +1115,7 @@ defineExpose({
|
||||
v-if="!['es', 'api'].includes(form.type) && form.configuration.urlType !== 'jdbcUrl'"
|
||||
class="de-expand"
|
||||
@click="showSSH = !showSSH"
|
||||
>SSH 设置
|
||||
>{{ t('data_source.ssh_settings') }}
|
||||
<el-icon>
|
||||
<Icon
|
||||
><component
|
||||
@ -1128,16 +1128,18 @@ defineExpose({
|
||||
</el-form-item>
|
||||
<template v-if="showSSH">
|
||||
<el-form-item>
|
||||
<el-checkbox v-model="form.configuration.useSSH">启用SSH</el-checkbox>
|
||||
<el-checkbox v-model="form.configuration.useSSH">{{
|
||||
t('data_source.enable_ssh')
|
||||
}}</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item label="主机" prop="configuration.sshHost">
|
||||
<el-form-item :label="t('data_source.host')" prop="configuration.sshHost">
|
||||
<el-input
|
||||
v-model="form.configuration.sshHost"
|
||||
placeholder="请输入主机名"
|
||||
:placeholder="t('data_source.please_enter_hostname')"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="端口" prop="configuration.sshPort">
|
||||
<el-form-item :label="t('data_source.port')" prop="configuration.sshPort">
|
||||
<el-input-number
|
||||
v-model="form.configuration.sshPort"
|
||||
autocomplete="off"
|
||||
@ -1157,9 +1159,9 @@ defineExpose({
|
||||
:maxlength="255"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="连接方式">
|
||||
<el-form-item :label="t('data_source.connection_method')">
|
||||
<el-radio-group v-model="form.configuration.sshType">
|
||||
<el-radio label="password">密码</el-radio>
|
||||
<el-radio label="password">{{ t('data_source.password') }}</el-radio>
|
||||
<el-radio label="sshkey">ssh key</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@ -1185,12 +1187,15 @@ defineExpose({
|
||||
type="textarea"
|
||||
:rows="6"
|
||||
v-model="form.configuration.sshKey"
|
||||
placeholder="请输入ssh key"
|
||||
:placeholder="t('data_source.enter_ssh_key')"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="ssh key 密码" v-if="form.configuration.sshType === 'sshkey'">
|
||||
<el-form-item
|
||||
:label="t('data_source.ssh_key_password')"
|
||||
v-if="form.configuration.sshType === 'sshkey'"
|
||||
>
|
||||
<CustomPassword
|
||||
:placeholder="t('common.inputText') + t('datasource.password')"
|
||||
show-password
|
||||
@ -1314,7 +1319,7 @@ defineExpose({
|
||||
v-if="activeStep === 2 && form.type === 'API'"
|
||||
>
|
||||
<el-radio-group v-model="form.syncSetting.syncRate" @change="onRateChange">
|
||||
<el-radio label="RIGHTNOW">立即更新</el-radio>
|
||||
<el-radio label="RIGHTNOW">{{ t('data_source.update_now') }}</el-radio>
|
||||
<el-radio label="CRON">{{ t('datasource.cron_config') }}</el-radio>
|
||||
<el-radio label="SIMPLE_CRON">{{ t('datasource.simple_cron') }}</el-radio>
|
||||
</el-radio-group>
|
||||
@ -1345,7 +1350,7 @@ defineExpose({
|
||||
<el-option :label="t('common.hour')" value="hour" />
|
||||
<el-option :label="t('common.day')" value="day" />
|
||||
</el-select>
|
||||
更新一次
|
||||
{{ t('data_source.update_once') }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.syncSetting.syncRate === 'CRON'" prop="syncSetting.cron">
|
||||
@ -1396,7 +1401,7 @@ defineExpose({
|
||||
</div>
|
||||
</el-form>
|
||||
<el-dialog
|
||||
title="编辑参数"
|
||||
:title="t('data_source.edit_parameters')"
|
||||
v-model="dialogEditParams"
|
||||
width="420px"
|
||||
class="create-dialog"
|
||||
@ -1411,13 +1416,16 @@ defineExpose({
|
||||
:rules="paramsObjRules"
|
||||
>
|
||||
<el-form-item :label="t('visualization.param_name')" prop="name">
|
||||
<el-input placeholder="请输入参数名称" v-model="paramsObj.name" />
|
||||
<el-input
|
||||
:placeholder="t('data_source.enter_parameter_name')"
|
||||
v-model="paramsObj.name"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="t('deDataset.parameter_type')" prop="deType">
|
||||
<el-radio-group v-model="paramsObj.deType">
|
||||
<el-radio :value="0" label="文本"></el-radio>
|
||||
<el-radio :value="2" label="数值"></el-radio>
|
||||
<el-radio :value="3" label="数值(小数)"></el-radio>
|
||||
<el-radio :value="0" :label="t('data_source.text')"></el-radio>
|
||||
<el-radio :value="2" :label="t('data_source.numerical_value')"></el-radio>
|
||||
<el-radio :value="3" :label="t('data_source.numeric_value_decimal')"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -1427,7 +1435,7 @@ defineExpose({
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="重命名"
|
||||
:title="t('data_source.rename')"
|
||||
v-model="dialogRenameApi"
|
||||
width="420px"
|
||||
class="create-dialog"
|
||||
@ -1441,8 +1449,8 @@ defineExpose({
|
||||
:model="apiObj"
|
||||
:rules="apiObjRules"
|
||||
>
|
||||
<el-form-item label="接口名称" prop="name">
|
||||
<el-input placeholder="请输入接口名称" v-model="apiObj.name" />
|
||||
<el-form-item :label="t('data_source.interface_name')" prop="name">
|
||||
<el-input :placeholder="t('data_source.the_interface_name')" v-model="apiObj.name" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
@ -246,7 +246,7 @@ const saveExcelDs = (params, successCb, finallyCb) => {
|
||||
if (props.param.editType === 0 && props.param.id && (effectExtField || changeFiled)) {
|
||||
ElMessageBox.confirm(t('deDataset.replace_the_data'), {
|
||||
confirmButtonText: t('dataset.confirm'),
|
||||
tip: '替换可能会影响自定义数据集、关联数据集、仪表板等,是否替换?',
|
||||
tip: t('data_source.to_replace_it'),
|
||||
cancelButtonText: 'Cancel',
|
||||
confirmButtonType: 'primary',
|
||||
type: 'warning',
|
||||
@ -430,7 +430,7 @@ defineExpose({
|
||||
<el-form-item
|
||||
v-if="sheetFile.name"
|
||||
prop="id"
|
||||
label="文件"
|
||||
:label="t('data_source.document')"
|
||||
key="sheetFile"
|
||||
:rules="[
|
||||
{
|
||||
@ -457,7 +457,7 @@ defineExpose({
|
||||
name="file"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button text>重新上传</el-button>
|
||||
<el-button text>{{ t('data_source.reupload') }}</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
@ -465,7 +465,7 @@ defineExpose({
|
||||
v-else
|
||||
prop="id"
|
||||
key="sheetId"
|
||||
label="文件"
|
||||
:label="t('data_source.document')"
|
||||
:rules="[
|
||||
{
|
||||
required: true
|
||||
@ -493,8 +493,10 @@ defineExpose({
|
||||
</el-button>
|
||||
</template>
|
||||
</el-upload>
|
||||
<p class="upload-tip" style="width: 100%">仅支持xlsx、xls、csv格式的文件</p>
|
||||
<div class="ed-form-item__error" v-if="status">请上传文件</div>
|
||||
<p class="upload-tip" style="width: 100%">{{ t('data_source.and_csv_formats') }}</p>
|
||||
<div class="ed-form-item__error" v-if="status">
|
||||
{{ t('data_source.please_upload_files') }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:class="status && !sheetFile.name && 'error-status'"
|
||||
|
@ -209,7 +209,7 @@ const next = () => {
|
||||
currentDsType.value === 'API' &&
|
||||
activeStep.value !== 2
|
||||
) {
|
||||
ElMessage.error('数据表不能为空')
|
||||
ElMessage.error(t('data_source.cannot_be_empty_table'))
|
||||
return
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ emitter.on('showFinishPage', handleShowFinishPage)
|
||||
|
||||
const prev = () => {
|
||||
if ((currentDsType.value === 'API' && activeApiStep.value === 1) || activeStep.value === 1) {
|
||||
ElMessageBox.confirm('填写的信息将会清空,确定返回上一步吗?', {
|
||||
ElMessageBox.confirm(t('data_source.the_previous_step'), {
|
||||
confirmButtonType: 'primary',
|
||||
type: 'warning',
|
||||
autofocus: false,
|
||||
@ -336,7 +336,7 @@ const validateDS = () => {
|
||||
}
|
||||
if (currentDsType.value === 'API') {
|
||||
if (form.apiConfiguration.length === 0) {
|
||||
ElMessage.error('需要添加数据表')
|
||||
ElMessage.error(t('data_source.add_data_table'))
|
||||
return
|
||||
}
|
||||
let apiItems = []
|
||||
@ -383,7 +383,7 @@ const doValidateDs = request => {
|
||||
if (error === 0) {
|
||||
ElMessage.success(t('datasource.validate_success'))
|
||||
} else {
|
||||
ElMessage.error('校验失败')
|
||||
ElMessage.error(t('data_source.verification_failed'))
|
||||
}
|
||||
} else {
|
||||
ElMessage.success(t('datasource.validate_success'))
|
||||
@ -505,7 +505,7 @@ const doSaveDs = request => {
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
handleShowFinishPage({ id: res.id, name: res.name })
|
||||
ElMessage.success('保存数据源成功')
|
||||
ElMessage.success(t('data_source.source_saved_successfully'))
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@ -522,7 +522,7 @@ const doSaveDs = request => {
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
handleShowFinishPage({ id: res.id, name: res.name })
|
||||
ElMessage.success('保存数据源成功')
|
||||
ElMessage.success(t('data_source.source_saved_successfully'))
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
@ -634,9 +634,13 @@ const init = (nodeInfo: Form | Param, id?: string, res?: object) => {
|
||||
const drawTitle = computed(() => {
|
||||
const { id, editType, creator } = form2
|
||||
if (creator && id && currentDsType.value == 'Excel') {
|
||||
return editType === 1 ? '追加数据' : '替换数据'
|
||||
return editType === 1 ? t('data_source.append_data') : t('data_source.replace_data')
|
||||
}
|
||||
return editDs.value ? (!form.id ? '复制数据源' : t('datasource.modify')) : '创建数据源'
|
||||
return editDs.value
|
||||
? !form.id
|
||||
? t('data_source.copy_data_source')
|
||||
: t('datasource.modify')
|
||||
: t('data_source.create_data_source')
|
||||
})
|
||||
|
||||
const beforeClose = () => {
|
||||
@ -645,7 +649,7 @@ const beforeClose = () => {
|
||||
wsCache.set('ds-new-success', false)
|
||||
}
|
||||
if (!showFinishPage.value && ((!editDs.value && activeStep.value !== 0) || isUpdate)) {
|
||||
ElMessageBox.confirm('当前的更改尚未保存,确定退出吗?', {
|
||||
ElMessageBox.confirm(t('data_source.want_to_exit'), {
|
||||
confirmButtonText: t('dataset.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
showCancelButton: true,
|
||||
@ -696,7 +700,7 @@ defineExpose({
|
||||
<span class="icon">
|
||||
{{ activeStep <= 1 ? '2' : '' }}
|
||||
</span>
|
||||
<span class="title">配置信息</span>
|
||||
<span class="title">{{ t('data_source.configuration_information') }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-step>
|
||||
@ -730,7 +734,7 @@ defineExpose({
|
||||
@click="handleNodeClick({ type: 'latestUse', name: 'latestUse', id: 'latestUse' })"
|
||||
class="list-item_primary"
|
||||
>
|
||||
最近创建
|
||||
{{ t('data_source.recently_created') }}
|
||||
</p>
|
||||
<el-divider />
|
||||
<p
|
||||
@ -738,7 +742,7 @@ defineExpose({
|
||||
@click="handleNodeClick({ type: 'all', name: 'all', id: 'all' })"
|
||||
class="list-item_primary"
|
||||
>
|
||||
全部
|
||||
{{ t('data_source.all') }}
|
||||
</p>
|
||||
<div
|
||||
:key="ele.name"
|
||||
|
@ -122,7 +122,7 @@ export const nameMap = {
|
||||
OLTP: 'OLTP',
|
||||
OLAP: 'OLAP',
|
||||
DL: t('datasource.dl'),
|
||||
OTHER: 'API数据',
|
||||
OTHER: t('data_source.api_data'),
|
||||
LOCAL: t('datasource.local_file')
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user