diff --git a/spug_web/package.json b/spug_web/package.json index b24107a..08c4401 100644 --- a/spug_web/package.json +++ b/spug_web/package.json @@ -5,7 +5,7 @@ "dependencies": { "@ant-design/icons": "^4.3.0", "ace-builds": "^1.4.13", - "antd": "4.21.4", + "antd": "4.21.5", "axios": "^0.21.0", "bizcharts": "^3.5.9", "history": "^4.10.1", diff --git a/spug_web/src/index.less b/spug_web/src/index.less index 5c1cbab..012b426 100644 --- a/spug_web/src/index.less +++ b/spug_web/src/index.less @@ -8,16 +8,6 @@ body { overflow: hidden; } -div::-webkit-scrollbar, textarea::-webkit-scrollbar { - width: 6px; - height: 6px; -} - -div::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { - border-radius: 6px; - background: rgba(0, 0, 0, .2); -} - code { font-family: Source Code Pro, Menlo, Monaco, Consolas, Courier New, monospace, Courier, PingFang SC, Microsoft YaHei; } diff --git a/spug_web/src/pages/host/IPAddress.js b/spug_web/src/pages/host/IPAddress.js new file mode 100644 index 0000000..6755bc5 --- /dev/null +++ b/spug_web/src/pages/host/IPAddress.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) OpenSpug Organization. https://github.com/openspug/spug + * Copyright (c) + * Released under the AGPL-3.0 License. + */ +import React from 'react'; + +function IPAddress(props) { + const style = { + background: '#ffe7ba', + borderRadius: 4, + color: '#333', + fontSize: 10, + marginRight: 4, + padding: '0 8px' + } + + const style2 = { + background: '#bae7ff', + borderRadius: 4, + color: '#333', + fontSize: 10, + marginRight: 4, + padding: '0 8px' + } + return (props.ip && props.ip.length > 0) ? ( +
+ {props.isPublic ? : } + {props.ip[0]} +
+ ) : null +} + +export default IPAddress diff --git a/spug_web/src/pages/host/Selector.js b/spug_web/src/pages/host/Selector.js index 2ceac24..4bd76a0 100644 --- a/spug_web/src/pages/host/Selector.js +++ b/spug_web/src/pages/host/Selector.js @@ -7,6 +7,7 @@ import React, { useEffect, useState } from 'react'; import { observer } from 'mobx-react'; import { Modal, Row, Col, Tree, Table, Button, Space, Input } from 'antd'; import { FolderOpenOutlined, FolderOutlined } from '@ant-design/icons'; +import IPAddress from './IPAddress'; import hStore from './store'; import store from './store2'; import styles from './index.module.less'; @@ -45,7 +46,7 @@ export default observer(function (props) { }, [props.selectedRowKeys]) useEffect(() => { - if (props.oneGroup) { + if (props.onlySelf) { setSelectedRowKeys([]) } // eslint-disable-next-line react-hooks/exhaustive-deps @@ -118,8 +119,9 @@ export default observer(function (props) { okButtonProps={{disabled: selectedRowKeys.length === 0}} confirmLoading={loading} onCancel={props.onCancel}> - - + + +
分组列表
store.group = node} /> - +
store.f_word = e.target.value}/> @@ -157,9 +159,14 @@ export default observer(function (props) { onSelect: handleClickRow, onSelectAll: handleSelectAll }}> - a.name.localeCompare(b.name)}/> - a.name.localeCompare(b.name)}/> - + + ( + + + + + )}/> + diff --git a/spug_web/src/pages/host/Table.js b/spug_web/src/pages/host/Table.js index 355011d..6bbb29f 100644 --- a/spug_web/src/pages/host/Table.js +++ b/spug_web/src/pages/host/Table.js @@ -8,6 +8,7 @@ import { observer } from 'mobx-react'; import { Table, Modal, Dropdown, Button, Menu, Avatar, Tooltip, Space, Tag, Radio, Input, message } from 'antd'; import { PlusOutlined, DownOutlined, SyncOutlined, FormOutlined } from '@ant-design/icons'; import { Action, TableCard, AuthButton, AuthFragment } from 'components'; +import IPAddress from './IPAddress'; import { http, hasPermission } from 'libs'; import store from './store'; import icons from './icons'; @@ -37,16 +38,6 @@ function ComTable() { } } - function IpAddress(props) { - if (props.ip && props.ip.length > 0) { - return ( -
{props.ip[0]}({props.isPublic ? '公' : '私'})
- ) - } else { - return null - } - } - return ( a.name.localeCompare(b.name)}/> (
- - + +
)}/> ( diff --git a/spug_web/src/pages/host/index.module.less b/spug_web/src/pages/host/index.module.less index 9e900ba..c502150 100644 --- a/spug_web/src/pages/host/index.module.less +++ b/spug_web/src/pages/host/index.module.less @@ -30,6 +30,15 @@ :global(.ant-modal-footer) { border-top: none } + + .gTitle { + height: 44px; + line-height: 44px; + padding-left: 12px; + font-weight: bold; + margin-bottom: 12px; + background: #fafafa; + } } .formAddress1 {