Skip to content

Commit 278422d

Browse files
authored
Merge pull request #67 from DTStack/dev
Dev
2 parents f854bb9 + 2112934 commit 278422d

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

app/router.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@ module.exports = app => {
9393
app.post('/api/tags/delete-tag', app.controller.tagManagement.deleteTag);
9494

9595
// io.of('/').route('getShellCommand', io.controller.home.getShellCommand)
96-
io.of('/').route('loginServer', io.controller.home.loginServer)
96+
// 暂时close Terminal相关功能
97+
// io.of('/').route('loginServer', io.controller.home.loginServer)
9798
};

app/web/pages/hostManagement/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ export default (props: any) => {
5959
width: 200,
6060
render: (value: any, row: any) => {
6161
return <span>
62-
<a onClick={handleOpenTerminal.bind(this, row)}>终端</a>
63-
<Divider type="vertical" />
62+
{/** 暂时close Terminal相关功能 */}
63+
{/* <a onClick={handleOpenTerminal.bind(this, row)}>终端</a>
64+
<Divider type="vertical" /> */}
6465
<a onClick={handleTableRowEdit.bind(this, row)}>编辑</a>
6566
<Divider type="vertical" />
6667
<Popconfirm title={`确认是否删除该主机「${row.hostName}」?`} onConfirm={handleTableRowDelete.bind(this, row)}>

app/web/pages/proxyServer/components/proxyRuleModal/index.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class ProxyRuleModal extends React.PureComponent<any, any>{
5656
target: undefined
5757
})
5858
}
59+
addressValidator = (rules: any, value: any, callback: any) => {
60+
if (value?.includes('doraemon')) {
61+
return callback('请使用 portalfront 地址,请勿使用 portalfront-doraemon 地址');
62+
}
63+
return callback();
64+
}
5965
render() {
6066
const { visible, editable, proxyServer, confirmLoading, targetAddrs, localIp } = this.props;
6167
const { ip, target, remark, mode } = proxyServer;
@@ -114,7 +120,11 @@ class ProxyRuleModal extends React.PureComponent<any, any>{
114120
<Form.Item
115121
label="目标服务地址"
116122
name="target"
117-
rules={[{ required: true, pattern: urlReg, message: '请输入正确格式的目标服务地址,以 http(s):// 开头' }]}
123+
validateFirst
124+
rules={[
125+
{ required: true, pattern: urlReg, message: '请输入正确格式的目标服务地址,以 http(s):// 开头' },
126+
{ validator: this.addressValidator }
127+
]}
118128
>
119129
<Input placeholder="请输入正确格式的目标服务地址,以 http(s):// 开头" />
120130
</Form.Item>

app/web/pages/proxyServer/components/proxyServerModal/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class ProxyServerModal extends React.PureComponent<any, any> {
8585
if (!target) {
8686
callback('请输入目标服务地址');
8787
}
88+
if (target?.includes('doraemon')) {
89+
callback('请使用 portalfront 地址,请勿使用 portalfront-doraemon 地址');
90+
}
8891
if (!urlReg.test(target)) {
8992
callback('请输入正确格式的目标服务地址,以 http(s):// 开头');
9093
}

0 commit comments

Comments
 (0)