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.Item required label="目标主机">
{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>
<Button

View File

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

View File

@ -24,4 +24,8 @@
:global(.ant-descriptions-item-content) {
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.
*/
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 {
DeleteOutlined,
DownloadOutlined,

View File

@ -5,7 +5,7 @@
*/
import React, { useEffect, useState } from '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 { NotFound, AuthButton } from 'components';
import Terminal from './Terminal';