Skip to content

Commit

Permalink
feat: --story=119198632 页面若干配置项调整
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 15639
  • Loading branch information
hyunfa authored and wyyalt committed Sep 10, 2024
1 parent ec9f19c commit a2092c3
Show file tree
Hide file tree
Showing 18 changed files with 135 additions and 132 deletions.
44 changes: 22 additions & 22 deletions frontend/src/components/common/strategy-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'Agent',
targetAdress: 'Proxy(GSE_agent)',
targetAdress: 'Proxy(gse_agent)',
protocol: 'TCP',
portKey: 'io_port',
use: this.$t('任务服务端口'),
Expand All @@ -321,7 +321,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'Agent',
targetAdress: 'Proxy(GSE_transit)',
targetAdress: 'Proxy(gse_data)',
protocol: 'TCP',
portKey: 'data_port',
use: this.$t('数据上报端口'),
Expand All @@ -332,7 +332,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'Agent',
targetAdress: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(gse_file)',
protocol: 'TCP',
portKey: 'file_svr_port',
use: this.$t('BT传输'),
Expand All @@ -343,7 +343,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'Agent',
targetAdress: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(gse_file)',
protocol: 'TCP,UDP',
portKey: 'bt_port',
use: this.$t('BT传输'),
Expand All @@ -354,7 +354,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'Agent',
targetAdress: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(gse_file)',
protocol: 'UDP',
portKey: 'tracker_port',
use: this.$t('BT传输'),
Expand All @@ -364,7 +364,7 @@ export default class StrategyTable extends Vue {
targetKey: 'proxy',
},
{
source: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'Agent',
protocol: 'TCP,UDP',
portKey: 'bt_range',
Expand Down Expand Up @@ -396,7 +396,7 @@ export default class StrategyTable extends Vue {
],
Proxy: [
{
source: 'Proxy(GSE_agent)',
source: 'Proxy(gse_agent)',
targetAdress: 'GSE_task',
protocol: 'TCP',
portKey: 'io_port',
Expand All @@ -407,7 +407,7 @@ export default class StrategyTable extends Vue {
targetKey: 'taskserver',
},
{
source: 'Proxy(GSE_transit)',
source: 'Proxy(gse_data)',
targetAdress: 'GSE_data',
protocol: 'TCP',
portKey: 'data_port',
Expand All @@ -418,7 +418,7 @@ export default class StrategyTable extends Vue {
targetKey: 'dataserver',
},
{
source: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'GSE_btsvr',
protocol: 'TCP',
portKey: 'btsvr_thrift_port',
Expand All @@ -429,7 +429,7 @@ export default class StrategyTable extends Vue {
targetKey: 'btfileserver',
},
{
source: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'GSE_btsvr',
protocol: 'TCP,UDP',
portKey: 'bt_port',
Expand All @@ -440,7 +440,7 @@ export default class StrategyTable extends Vue {
targetKey: 'btfileserver',
},
{
source: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'GSE_btsvr',
protocol: 'UDP',
portKey: 'tracker_port',
Expand All @@ -452,7 +452,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'GSE_btsvr',
targetAdress: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(gse_file)',
protocol: 'TCP',
portKey: 'btsvr_thrift_port',
use: this.$t('BT传输'),
Expand All @@ -463,7 +463,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'GSE_btsvr',
targetAdress: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(gse_file)',
protocol: 'TCP,UDP',
portKey: 'bt_port',
use: this.$t('BT传输'),
Expand All @@ -474,7 +474,7 @@ export default class StrategyTable extends Vue {
},
{
source: 'GSE_btsvr',
targetAdress: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(gse_file)',
protocol: 'UDP',
portKey: 'tracker_port',
use: this.$t('BT传输'),
Expand All @@ -484,8 +484,8 @@ export default class StrategyTable extends Vue {
targetKey: 'agent',
},
{
source: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'Proxy(gse_file)',
protocol: 'TCP',
portKey: 'btsvr_thrift_port',
use: `${this.$t('BT传输')}${this.$t('同一子网')}`,
Expand All @@ -495,8 +495,8 @@ export default class StrategyTable extends Vue {
targetKey: 'agent',
},
{
source: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'Proxy(gse_file)',
protocol: 'TCP,UDP',
portKey: 'bt_port',
use: `${this.$t('BT传输')}${this.$t('同一子网')}`,
Expand All @@ -506,8 +506,8 @@ export default class StrategyTable extends Vue {
targetKey: 'agent',
},
{
source: 'Proxy(GSE_btsvr)',
targetAdress: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: 'Proxy(gse_file)',
protocol: 'UDP',
portKey: 'tracker_port',
use: `${this.$t('BT传输')}${this.$t('同一子网')}`,
Expand All @@ -517,7 +517,7 @@ export default class StrategyTable extends Vue {
targetKey: 'agent',
},
{
source: 'Proxy(GSE_agent)',
source: 'Proxy(gse_file)',
targetAdress: '',
protocol: '',
port: this.$t('监听随机端口'),
Expand All @@ -526,7 +526,7 @@ export default class StrategyTable extends Vue {
sourceKey: 'agent',
},
{
source: 'Proxy(GSE_btsvr)',
source: 'Proxy(gse_file)',
targetAdress: '',
protocol: '',
port: this.$t('监听随机端口'),
Expand Down
55 changes: 29 additions & 26 deletions frontend/src/components/common/strategy-template.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,33 @@
:key="`operation${index}`">
{{ `${ index + 1 }. ${ item }` }}
</p>
<div class="cloud-panel" v-if="cloudAreaList.length">
<RightPanel
v-for="cloudArea in cloudAreaList"
:key="`${cloudArea.bk_cloud_id}_${cloudArea.ap_id}`"
:class="['cloud-panel-item', { 'is-close': !cloudArea.collapse }]"
:need-border="false"
:icon-style="{ padding: '4px 4px', fontSize: '12px' }"
collapse-color="#979BA5"
title-bg-color="#F0F1F5"
:collapse="cloudArea.collapse"
:type="`${cloudArea.bk_cloud_id}_${cloudArea.ap_id}`"
@change="handleToggle">
<div class="collapse-header" slot="title">
{{ `${ cloudArea.bk_cloud_name } - ${ cloudArea.ap_name }` }}
</div>
<div class="collapse-container" slot>
<StrategyTable
:has-cloud="!!cloudArea.bk_cloud_name"
:host-type="cloudArea.type"
:area="cloudArea">
</StrategyTable>
</div>
</RightPanel>
</div>
<div class="mt15" v-else>
<StrategyTable :host-type="hostType === 'mixed' ? 'Agent' : hostType"></StrategyTable>
<div class="cloud-panel" v-if="this.cloudAreaList.length">
<template v-if="hostType === 'Pagent'">
<RightPanel
v-for="cloudArea in cloudAreaList"
:key="`${cloudArea.bk_cloud_id}_${cloudArea.ap_id}`"
:class="['cloud-panel-item', { 'is-close': !cloudArea.collapse }]"
:need-border="false"
:icon-style="{ padding: '4px 4px', fontSize: '12px' }"
collapse-color="#979BA5"
title-bg-color="#F0F1F5"
:collapse="cloudArea.collapse"
:type="`${cloudArea.bk_cloud_id}_${cloudArea.ap_id}`"
@change="handleToggle">
<div class="collapse-header" slot="title">
{{ `${ cloudArea.bk_cloud_name } - ${ cloudArea.ap_name }` }}
</div>
<div class="collapse-container" slot>
<StrategyTable
:has-cloud="!!cloudArea.bk_cloud_name"
:host-type="cloudArea.type"
:area="cloudArea">
</StrategyTable>
</div>
</RightPanel>
</template>
</div>

</div>
</template>

Expand Down Expand Up @@ -61,6 +61,7 @@ export default class StrategyTemplate extends Vue {
private cloudAreaList: any[] = [];
private get tipList() {
if (this.hostType === 'Proxy') {
return [
this.$t('Agent安装Tip1'),
Expand Down Expand Up @@ -152,6 +153,8 @@ export default class StrategyTemplate extends Vue {
}, arr);
return arr;
}, []);
console.log("🚀 ~ StrategyTemplate ~ this.cloudAreaList=Object.values ~ this.cloudAreaList:", this.cloudAreaList)
}
/**
* 手风琴模式
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ export default {
Agent安装Tip2: 'When using non-root installation on Linux system, it is required to sudo execute /tmp/setup_agent.sh script without secret',
Agent安装Tip3: 'Directly connected to the proxy: ensure that it can communicate with the following ports of the BlueKing server, you can use telnet <IP> <PORT> to confirm whether the port is reachable',
Proxy安装Tip1: 'When using non-root installation on Linux / Unix system , it is required to sudo execute the /tmp/setup_agent.sh script without secret',
Proxy安装Tip2: 'Directly connected to the Agent: ensure that it can communicate with the following ports of the BlueKing server. You can use telnet <IP> <PORT> to confirm whether the port is reachable',
Proxy安装Tip2: 'Directly connect to the Agent: Ensure full bidirectional communication with the BlueKing server. If there are policy restrictions, you can add a control area to manage it',
agent数量: '({num} in total)',
请将操作指令中的数据替换再执行: 'Please replace the {0} {1} {2} in the installation instruction with {3} before executing.',
等待手动操作查看: 'Wait for manual operation to view {0}',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/i18n/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ export default {
Agent安装Tip2: 'Linux 系统使用非 root 安装时,要求可以免密sudo执行/tmp/setup_agent.sh 脚本',
Agent安装Tip3: '直连 Proxy 端:保证与蓝鲸服务端以下端口互通, 可使用telnet<IP><PORT>来确认端口是否可通',
Proxy安装Tip1: 'Linux/Unix 系统使用非 root 安装时,要求可以免密sudo执行/tmp/setup_agent.sh 脚本',
Proxy安装Tip2: '直连 Agent 端:保证与蓝鲸服务端以下端口互通,可使用telnet<IP><PORT>来确认端口是否可通',
Proxy安装Tip2: '直连Agent端:保证与蓝鲸服务端双向全通,若存在策略限制,可新增管控区域来管理',
agent数量: '(共 {num} 个)',
请将操作指令中的数据替换再执行: '请将操作指令中的 {0} {1} {2} 替换成 {3} 再执行。',
等待手动操作查看: '等待手动操作,查看 {0}',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/modules/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class AgentStore extends VuexModule {
job_result: item.job_result ? item.job_result : {} as any,
topology: item.topology && item.topology.length ? item.topology : [],
bt_speed_limit: btSpeedLimit || '',
peer_exchange_switch_for_agent: !!peerExchangeSwitchForAgent || false,
peer_exchange_switch_for_agent: false,
};
});
return data;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/store/modules/cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default class CloudStore extends VuexModule {
status: item.status ? item.status.toLowerCase() : '',
bt_speed_limit,
data_path,
peer_exchange_switch_for_agent: !!peer_exchange_switch_for_agent,
peer_exchange_switch_for_agent: false,
...extraOther,
};
});
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/views/agent/agent-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@
{{ row.is_manual ? $t('手动') : $t('远程') }}
</template>
</NmColumn>
<NmColumn
<!-- <NmColumn
key="bt"
prop="peer_exchange_switch_for_agent"
:label="$t('BT节点探测')"
Expand All @@ -374,7 +374,7 @@
{{ row.peer_exchange_switch_for_agent ? $t('启用') : $t('停用')}}
</span>
</template>
</NmColumn>
</NmColumn> -->
<NmColumn
key="speedLimit"
prop="bt_speed_limit"
Expand Down Expand Up @@ -796,13 +796,13 @@ export default class AgentList extends Mixins(pollMixin, TableHeaderMixins, auth
name: window.i18n.t('更新时间'),
id: 'updated_at',
},
bt: {
checked: false,
disabled: false,
mockChecked: false,
name: window.i18n.t('BT节点探测'),
id: 'peer_exchange_switch_for_agent',
},
// bt: {
// checked: false,
// disabled: false,
// mockChecked: false,
// name: window.i18n.t('BT节点探测'),
// id: 'peer_exchange_switch_for_agent',
// },
speedLimit: {
checked: false,
disabled: false,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/agent/agent-setup/agent-import.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export default class AgentImport extends Mixins(mixin) {
} else {
item.bt_speed_limit = Number(item.bt_speed_limit);
}
item.peer_exchange_switch_for_agent = Number(item.peer_exchange_switch_for_agent);
item.peer_exchange_switch_for_agent = 0;
if (item.install_channel_id === 'default') {
item.install_channel_id = null;
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/agent/agent-setup/agent-setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export default class AgentSetup extends Mixins(mixin, formLabelMixin) {
if (item[authType]) {
item[authType] = this.$safety.encrypt(item[authType] as string);
}
item.peer_exchange_switch_for_agent = Number(item.peer_exchange_switch_for_agent);
item.peer_exchange_switch_for_agent = 0;
if (this.$DHCP && regIPv6.test(item.inner_ip as string)) {
item.inner_ipv6 = item.inner_ip;
delete item.inner_ip;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/agent/components/create-excel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config: IHead[] = [
{ name: window.i18n.t('业务'), prop: 'bk_biz_id', optional: true },
{ name: window.i18n.t('管控区域'), prop: 'bk_cloud_id', optional: true },
{ name: window.i18n.t('接入点'), prop: 'ap_id', optional: true },
{ name: window.i18n.t('BT节点探测'), prop: 'peer_exchange_switch_for_agent', optional: true, width: 120 },
// { name: window.i18n.t('BT节点探测'), prop: 'peer_exchange_switch_for_agent', optional: true, width: 120 },
{ name: window.i18n.t('传输限速Unit'), prop: 'bt_speed_limit', optional: true, width: 140 },
{ name: window.i18n.t('寻址方式'), prop: 'bk_addressing', optional: true, width: 110 },
{ name: window.i18n.t('数据压缩'), prop: 'enable_compression', optional: true, width: 110 },
Expand All @@ -47,7 +47,7 @@ export const demoData = [
bk_biz_id: '蓝鲸',
bk_cloud_id: '直连区域',
ap_id: '自动选择',
peer_exchange_switch_for_agent: true,
peer_exchange_switch_for_agent: false,
bt_speed_limit: '',
bk_addressing: window.i18n.t('静态'),
},
Expand Down
26 changes: 13 additions & 13 deletions frontend/src/views/agent/config/editTableConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,19 +270,19 @@ export const config: ISetupHead[] = [
manualProp: true,
rules: [reguIPMixins],
},
{
label: 'BT节点探测',
prop: 'peer_exchange_switch_for_agent',
tips: 'BT节点探测提示',
type: 'switcher',
default: getDefaultConfig(defaultOsType, 'peer_exchange_switch_for_agent', false),
batch: true,
required: false,
noRequiredMark: false,
width: 90,
parentProp: 'trans_info',
manualProp: true,
},
// {
// label: 'BT节点探测',
// prop: 'peer_exchange_switch_for_agent',
// tips: 'BT节点探测提示',
// type: 'switcher',
// default: getDefaultConfig(defaultOsType, 'peer_exchange_switch_for_agent', false),
// batch: true,
// required: false,
// noRequiredMark: false,
// width: 90,
// parentProp: 'trans_info',
// manualProp: true,
// },
{
label: '传输限速Unit',
prop: 'bt_speed_limit',
Expand Down
Loading

0 comments on commit a2092c3

Please sign in to comment.