From 2ad8356c0a28ed93657c93beb358ca739fdb2e27 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 11 Sep 2020 10:36:08 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E6=96=B0=E5=BB=BA=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E4=B8=BB=E6=9C=BA=E5=8F=97=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/deploy/app/Ext1Setup2.js | 3 ++- spug_web/src/pages/deploy/app/Ext2Setup2.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spug_web/src/pages/deploy/app/Ext1Setup2.js b/spug_web/src/pages/deploy/app/Ext1Setup2.js index 633a482..c0a574f 100644 --- a/spug_web/src/pages/deploy/app/Ext1Setup2.js +++ b/spug_web/src/pages/deploy/app/Ext1Setup2.js @@ -6,6 +6,7 @@ import React from 'react'; import { observer } from 'mobx-react'; import { Form, Input, Select, Button, Icon, message } from "antd"; +import { hasHostPermission } from 'libs'; import store from './store'; import hostStore from 'pages/host/store'; import styles from './index.module.css'; @@ -58,7 +59,7 @@ class Ext1Setup2 extends React.Component { optionFilterProp="children" filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} onChange={v => store.editHost(index, v)}> - {hostStore.records.map(item => ( + {hostStore.records.filter(x => hasHostPermission(x.id)).map(item => ( {`${item.name}(${item['hostname']}:${item['port']})`} diff --git a/spug_web/src/pages/deploy/app/Ext2Setup2.js b/spug_web/src/pages/deploy/app/Ext2Setup2.js index 47f50b9..d5dfc02 100644 --- a/spug_web/src/pages/deploy/app/Ext2Setup2.js +++ b/spug_web/src/pages/deploy/app/Ext2Setup2.js @@ -6,6 +6,7 @@ import React from 'react'; import { observer } from 'mobx-react'; import { Form, Select, Button, Icon } from "antd"; +import { hasHostPermission } from 'libs'; import store from './store'; import hostStore from 'pages/host/store'; import styles from './index.module.css'; @@ -34,7 +35,7 @@ class Ext2Setup2 extends React.Component { style={{width: '80%', marginRight: 10}} filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0} onChange={v => store.editHost(index, v)}> - {hostStore.records.map(item => ( + {hostStore.records.filter(x => hasHostPermission(x.id)).map(item => ( {`${item.name}(${item['hostname']}:${item['port']})`}