Skip to content

Commit

Permalink
feat: 接入点调整
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 15935
  • Loading branch information
hyunfa committed Aug 22, 2024
1 parent 8b1fd75 commit 1a07a44
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 13 deletions.
8 changes: 5 additions & 3 deletions frontend/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ export default {
数据文件路径: 'Data file path',
临时文件路径: 'Temporary file path',
接入点名称: 'Access point',
接入点版本: 'Access point version',
接入点描述: 'Select the associated GSE channel, V1 is associated with GSE1.0, V2 is associated with GSE2.0',
用户创建的接入点: 'User-created access point',
请输入Server的内网IP: 'Please enter the intranet IP of {type} Server',
请输入Server的外网IP: 'Please enter the extranet IP of {type} Server',
Expand Down Expand Up @@ -529,9 +531,9 @@ export default {
加载插件基础信息成功: 'Load plugin basic information successfully',
该接入点被使用中无法删除: 'This access point is in use and cannot be deleted',
序号: 'No.',
GSEFile服务地址: 'GSE File Serve',
GSEData服务地址: 'GSE Data Serve',
GSECluster服务地址: 'GSE Cluster Serve',
GSEFile服务地址: 'GSE File Endpoints',
GSEData服务地址: 'GSE Data Endpoints',
GSECluster服务地址: 'GSE Cluster Endpoints',
跳过检测: 'Skip Detection',
回调地址: 'Callback Address',
IPv4和IPv6不能混合使用: 'IPv4 and IPv6 cannot be mixed',
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ export default {
数据文件路径: '数据文件路径',
临时文件路径: '临时文件路径',
接入点名称: '接入点名称',
接入点版本: '接入点版本',
接入点描述: '选择关联的GSE通道,V1关联GSE1.0,V2关联GSE2.0',
用户创建的接入点: '用户创建的接入点',
请输入Server的内网IP: '请输入{type} Server的内网IP',
请输入Server的外网IP: '请输入{type} Server的外网IP',
Expand Down Expand Up @@ -529,9 +531,9 @@ export default {
加载插件基础信息成功: '加载插件基础信息成功',
该接入点被使用中无法删除: '该接入点被使用中,无法删除',
序号: '序号',
GSEFile服务地址: 'GSE File服务地址',
GSEData服务地址: 'GSE Data服务地址',
GSECluster服务地址: 'GSE Cluster服务地址',
GSEFile服务地址: 'GSE File地址',
GSEData服务地址: 'GSE Data地址',
GSECluster服务地址: 'GSE Cluster地址',
跳过检测: '跳过检测',
回调地址: '回调地址',
IPv4和IPv6不能混合使用: 'IPv4和IPv6不能混合使用',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface IConfigAgent {

export interface IApBase {
name: string
version: string
zk_account: string
zk_password?: string // 编辑可不填
zk_hosts: IZk[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ const { accessPoint } = withDefaults(defineProps<{
}>(), {});
const serversSets = ref<{ id: IServer; name: TranslateResult }[]>([
{ id: 'BtfileServer', name: i18n.t('GSE File服务地址') },
{ id: 'DataServer', name: i18n.t('GSE Data服务地址') },
{ id: 'TaskServer', name: i18n.t('GSE Cluster服务地址') },
{ id: 'TaskServer', name: i18n.t('GSECluster服务地址') },
{ id: 'BtfileServer', name: i18n.t('GSEFile服务地址') },
{ id: 'DataServer', name: i18n.t('GSEData服务地址') },
]);
const state = reactive<{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ export const stepHost = [
ruleName: 'name',
placeholder: window.i18n.t('用户创建的接入点'),
},
{
label: window.i18n.t('接入点版本'),
key: 'version',
required: true,
ruleName: 'version',
desc: window.i18n.t('接入点描述'),
type: 'select',
options: [
{
id: 'V1',
name: 'V1'
},
{
id: 'V2',
name: 'V2'
},
],
},
{
label: window.i18n.t('接入点说明'),
key: 'description',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- zk&server - table -->
<template v-if="formItem.type === 'zk'">
<!-- Zookeeper -->
<div
<div v-if="formData.version === 'V1'"
:style="{ width: `${relatedContentWidth}px` }"
class="bk-form-item ip-related-item clearfix mb40"
:key="itemIndex">
Expand Down Expand Up @@ -129,7 +129,7 @@
</bk-form-item>

<bk-form-item
v-else-if="formItem.type === 'zkPassword'"
v-else-if="formItem.type === 'zkPassword' && formData.version === 'V1'"
:key="itemIndex"
:label="$t('Zookeeper密码')"
property="zk_password">
Expand Down Expand Up @@ -165,7 +165,20 @@
</template>

<bk-form-item
v-else
v-else-if="formItem.type === 'select'"
:key="itemIndex"
:label="formItem.label"
:required="formItem.required"
:desc="formItem.desc"
:property="formItem.key">
<InstallInputType
type="select"
v-model.trim="formData.version"
:options="formItem.options"/>
</bk-form-item>

<bk-form-item
v-else-if="formItem.key !== 'zk_account' || (formItem.key === 'zk_account' && formData.version === 'V1')"
:class="formItem.extCls"
:key="itemIndex"
:label="formItem.label"
Expand Down Expand Up @@ -252,6 +265,7 @@ const checkedResultList = ref<{
const formData = ref<IApBase>({
name: '',
version: props.isEdit ? '' : 'V2',
description: '',
region_id: '',
city_id: '',
Expand Down Expand Up @@ -314,9 +328,9 @@ const labelTableList = ref<{
thead: 'zkHead'| 'head';
}[]>([
// { name: 'Zookeeper', key: 'zk_hosts', thead: 'zkHead' },
{ name: i18n.t('GSECluster服务地址'), key: 'taskserver', thead: 'head' },
{ name: i18n.t('GSEFile服务地址'), key: 'btfileserver', thead: 'head' },
{ name: i18n.t('GSEData服务地址'), key: 'dataserver', thead: 'head' },
{ name: i18n.t('GSECluster服务地址'), key: 'taskserver', thead: 'head' },
]);
const checkConfig = ref({
zkHead: [
Expand Down Expand Up @@ -594,6 +608,13 @@ defineExpose({
>>> .bk-form-content .bk-form-control {
width: 580px;
}
.input-select {
width: 580px;
height: 32px;
color: #63656e;
background-color: #fff;
border-radius: 2px;
}
.access-point-host {
.bg-white {
background: $whiteColor;
Expand Down

0 comments on commit 1a07a44

Please sign in to comment.