fix issues

pull/330/head
vapao 2021-06-03 16:02:35 +08:00
parent 502557c95a
commit 5f828b30ad
5 changed files with 11 additions and 3 deletions

View File

@ -45,7 +45,7 @@ class TaskIndex extends React.Component {
<Form layout="vertical"> <Form layout="vertical">
<Form.Item required label="目标主机"> <Form.Item required label="目标主机">
{store.host_ids.length > 0 && ( {store.host_ids.length > 0 && (
<Alert style={{width: 200}} type="info" message={`已选择 ${store.host_ids.length}`}/> <Alert style={{width: 200}} type="info" message={`已选择 ${store.host_ids.length}主机`}/>
)} )}
</Form.Item> </Form.Item>
<Button <Button

View File

@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { Modal, Row, Col, Tree, Table, Button, Alert } from 'antd'; import { Modal, Row, Col, Tree, Table, Button, Alert } from 'antd';
import store from './store'; import store from './store';
import styles from './index.module.less';
export default observer(function (props) { export default observer(function (props) {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
@ -65,6 +66,7 @@ export default observer(function (props) {
<Modal <Modal
visible={[undefined, true].includes(props.visible)} visible={[undefined, true].includes(props.visible)}
width={1000} width={1000}
className={styles.selector}
title={props.title || '主机列表'} title={props.title || '主机列表'}
onOk={handleSubmit} onOk={handleSubmit}
confirmLoading={loading} confirmLoading={loading}
@ -88,6 +90,8 @@ export default observer(function (props) {
<Table <Table
rowKey="id" rowKey="id"
dataSource={dataSource} dataSource={dataSource}
pagination={false}
scroll={{y: 480}}
onRow={record => { onRow={record => {
return { return {
onClick: () => handleClickRow(record) onClick: () => handleClickRow(record)

View File

@ -25,3 +25,7 @@
padding: 4px 16px !important; padding: 4px 16px !important;
} }
} }
.selector :global(.ant-modal-footer) {
border-top: none
}

View File

@ -4,7 +4,7 @@
* Released under the AGPL-3.0 License. * Released under the AGPL-3.0 License.
*/ */
import React from 'react'; import React from 'react';
import { Drawer, Breadcrumb, Table, Divider, Switch, Button, Progress, Modal, message } from 'antd'; import { Drawer, Breadcrumb, Table, Switch, Progress, Modal, message } from 'antd';
import { import {
DeleteOutlined, DeleteOutlined,
DownloadOutlined, DownloadOutlined,

View File

@ -5,7 +5,7 @@
*/ */
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { Tabs, Tree, Button, Spin } from 'antd'; import { Tabs, Tree, Spin } from 'antd';
import { FolderOutlined, FolderOpenOutlined, CloudServerOutlined } from '@ant-design/icons'; import { FolderOutlined, FolderOpenOutlined, CloudServerOutlined } from '@ant-design/icons';
import { NotFound, AuthButton } from 'components'; import { NotFound, AuthButton } from 'components';
import Terminal from './Terminal'; import Terminal from './Terminal';