Commit 787a7bda authored by 皮倩雯's avatar 皮倩雯

宿主管理增加域名端口验证,连接状态显示,界面优化

parent 0bf2a783
Pipeline #35121 skipped with stages
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.3.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 14 14" style="enable-background:new 0 0 14 14;" xml:space="preserve">
<style type="text/css">
.st0{fill:#27DA99;}
</style>
<g>
<g>
<path class="st0" d="M7,0C5.143,0,3.363,0.738,2.05,2.05C0.738,3.363,0,5.143,0,7c0,3.866,3.134,7,7,7c3.866,0,7-3.134,7-7
C14,3.134,10.866,0,7,0L7,0z M10.443,5.285L7.151,9.726c-0.229,0.31-0.761,0.532-1.139,0.271L3.645,8.363
c-0.361-0.25-0.551-0.648-0.3-1.037c0.208-0.324,0.778-0.522,1.141-0.271L6.232,8.26c0.924-1.247,1.847-2.493,2.771-3.739
C9.599,3.716,11.045,4.473,10.443,5.285L10.443,5.285z M10.443,5.285"/>
</g>
</g>
</svg>
This diff is collapsed.
import React, { useState, useEffect } from 'react';
import styles from './maintenance.less'
import {
Form,
Card,
Space,
Table,
Popconfirm,
Spin,
Tooltip,
notification,
Tree,
Button,
} from 'antd';
import {
DoubleLeftOutlined,
DoubleRightOutlined,
PlusSquareFilled,
RightOutlined,
EditTwoTone,
DeleteOutlined,
OrderedListOutlined,
ApartmentOutlined,
DesktopOutlined,
PlusOutlined
} from '@ant-design/icons';
import AddModal from './AddModal'
const maintenance = () => {
const [addVisible, setAddVisible] = useState(false)
const [type, setType] = useState('')
const [formObj, setFormObj] = useState('')
const [tableData, setTableData] = useState([])
const columns = [
{
title: '业务名称',
dataIndex: 'businessName',
key: 'businessName',
width: 100,
align:'center',
},
{
title: '业务类型',
dataIndex: 'businessType',
key: 'businessType',
width: 100,
ellipsis: true,
align:'center',
},
{
title: '执行周期',
dataIndex: 'docycle',
key: 'docycle',
width: 100,
align:'center',
},
{
title: '台账名称',
dataIndex: 'accountName',
key: 'accountName',
width: 200,
ellipsis: true,
align:'center',
},
{
title: '反馈名称',
dataIndex: 'feedbackName',
key: 'feedbackName',
width: 200,
align:'center',
},
{
title: '台账过滤条件',
dataIndex: 'filterCondition',
key: 'filterCondition',
width: 200,
ellipsis: true,
align:'center',
},
{
title: '是否送审',
dataIndex: 'isSubmit',
key: 'isSubmit',
width: 100,
align:'center',
},
{
title: '执行角色',
dataIndex: 'doRole',
key: 'doRole',
width: 200,
ellipsis: true,
align:'center',
},
{
title: '预生成天数',
dataIndex: 'produceDays',
key: 'produceDays',
width: 100,
align:'center',
},
{
title: '在线任务量',
dataIndex: 'onLines',
key: 'onLines',
width: 100,
ellipsis: true,
align:'center',
},
{
title: '启停',
dataIndex: 'doNot',
key: 'doNot',
width: 100,
align:'center',
},
{
title: '操作',
key: 'action',
align:'center',
rener: record =>{
<Space size="middle">
<Tooltip title="修改">
<EditTwoTone
onClick={() => editEventType(record)}
style={{ fontSize: '16px' }}
/>
</Tooltip>
<Tooltip title="删除">
<Popconfirm
placement="bottomRight"
title={
<p>
是否确认删除?
</p>
}
okText="确认"
cancelText="取消"
onConfirm={() => deleteEventType(record)}
>
<DeleteOutlined style={{ fontSize: '16px', color: '#e86060' }} />
</Popconfirm>
</Tooltip>
</Space>
}
}
]
const add =()=>{
setAddVisible(true)
setType('add')
}
const editEventType =record=>{
setAddVisible(true)
setType('edit')
setFormObj(record);
}
const deleteEventType =record=>{
}
const onSubmit =()=>{
setAddVisible(false)
}
return (
<div className={styles.maintenanceContainer}>
<div className={styles.contentContainers}>
<div style={{ height: '50px', backgroundColor: 'white' }}>
<span style={{ float: 'right', marginRight: '10px' }}>
<Button icon={<PlusOutlined className={styles.icon} />} onClick={add} style={{ marginLeft: '30px', verticalAlign: 'middle', marginTop: '10px' }}>
添加
</Button>
</span>
</div>
<Table
// rowClassName={setRowClassName}
size="small"
rowKey='ID'
bordered
onRow={record => {
return {
onDoubleClick: event => { event.stopPropagation(); editEventType(record) }, //双击
};
}}
columns={columns}
dataSource={tableData}
scroll={{ y: 'calc(100vh - 155px)' }}
pagination={{
showTotal: (total, range) =>
`第${range[0]}-${range[1]} 条/共 ${total} 条`,
pageSizeOptions: [10, 20, 50, 100],
defaultPageSize: 20,
showQuickJumper: true,
showSizeChanger: true,
}}
/>
{/* 添加事件 */}
<AddModal
visible={addVisible}
type={type}
onCancel={() => setAddVisible(false)}
callBackSubmit={onSubmit}
formObj={formObj}
/>
</div>
</div>
)
};
export default maintenance
\ No newline at end of file
.maintenanceContainer{
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.linkDrowp{
position: absolute;
top: 0px;
left: 92.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-btn .anticon.anticon-plus > svg, .ant-btn .anticon.anticon-minus > svg {
margin-top: -5px;
}
.pickItem{
background-color: #F5F6F9;
}
}
.formData{
height: 38rem;
overflow-y: scroll;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
display: none;
}
.formData_label{
display: flex;
align-items: center;
}
.filed_listItem{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
\ No newline at end of file
......@@ -651,7 +651,7 @@ const AddModal = props => {
{
validator: (rule, value) => {
if (form.getFieldsValue().BusinessType == '') {
return Promise.reject('摘要字段必选')
return Promise.reject('业务类型必填')
}
return Promise.resolve();
}
......
......@@ -214,7 +214,7 @@ const incident = () => {
{
title: '操作',
key: 'action',
aligin: 'center',
align: 'center',
render: record => (
<Space size="middle">
......
......@@ -9,5 +9,6 @@
width: 100%;
height: 20px;
margin-bottom: 10px;
}
}
\ No newline at end of file
......@@ -55,14 +55,14 @@ const BaseConfig = () => {
</div>
<Divider />
<Row>
<Col span={2}>
<Col span={3}>
<span style={{ marginLeft: '27px', lineHeight: '32px', color: 'gray' }}>站点编号</span>
</Col>
<Col span={22}>
<Col span={21}>
{
currentSiteInfo ? <Input value={currentSiteInfo} disabled={true} />
currentSiteInfo ? <Input value={currentSiteInfo} disabled={true} style={{width:'80%'}}/>
: <div>
<Input value={currentSiteInfo} />
<Input value={currentSiteInfo} style={{width:'80%'}} />
<Button style={{ marginLeft: "10px" }}>生成编号</Button>
</div>
}
......@@ -73,28 +73,28 @@ const BaseConfig = () => {
</div>
<Divider />
<Row gutter={[8, 16]} >
<Col span={2}>
<Col span={3}>
<span style={{ marginLeft: '27px', lineHeight: '32px', color: 'gray' }}>服务器IP</span>
</Col>
<Col span={22}>
<Col span={21}>
<span style={{ lineHeight: '32px' }}>{currentDataBase.ip}</span>
</Col>
<Col span={2}>
<Col span={3}>
<span style={{ marginLeft: '27px', lineHeight: '32px', color: 'gray' }}>数据库名称</span>
</Col>
<Col span={22}>
<Col span={21}>
<span style={{ lineHeight: '32px' }}>{currentDataBase.dbName}</span>
</Col>
<Col span={2}>
<Col span={3}>
<span style={{ marginLeft: '27px', lineHeight: '32px', color: 'gray' }}>登录名</span>
</Col>
<Col span={22}>
<Col span={21}>
<span style={{ lineHeight: '32px' }}>{currentDataBase.userName}</span>
</Col>
<Col span={2}>
<Col span={3}>
<span style={{ marginLeft: '27px', lineHeight: '32px', color: 'gray' }}>密码</span>
</Col>
<Col span={22}>
<Col span={21}>
<span style={{ lineHeight: '32px' }}>{encrypt(currentDataBase.password)}</span>
</Col>
</Row>
......
import React, { useEffect, useState } from 'react'
import { Card, Form, Input, Button, Select, message, Divider } from 'antd'
import { Card, Form, Input, Button, Select, message, Divider, Spin } from 'antd'
import styles from './messageConfig.less';
import { GetMessageConfigInfo, SaveSystemInfo, ConnectMessPlatform, GetBasicInfo, GetDataBaseConfig } from '@/services/platform/hostmanager'
import message11 from '../../../../assets/images/icons/消息.svg'
......@@ -15,7 +15,7 @@ const tailLayout = {
};
const MessageConfig = () => {
const [loading, setLoading] = useState(false); // 加载
const [currentAddress, setCurrentAddress] = useState("")
const [currentDataBase, setCurrentDataBase] = useState({});
const [currentSiteInfo, setcurrentSiteInfo] = useState("");
......@@ -24,6 +24,7 @@ const MessageConfig = () => {
const onFinish = (values) => {
//先测试连接再保存
//1.测试链接
setLoading(true)
ConnectMessPlatform({
messAddress: values.messageAddress,
sqlServerIP: currentDataBase.ip,
......@@ -32,6 +33,7 @@ const MessageConfig = () => {
sqlName: currentDataBase.dbName,
siteCode: currentSiteInfo
}).then(res => {
setLoading(false)
if (res.code === 0) {
//2.保存连接
SaveSystemInfo({
......@@ -42,12 +44,12 @@ const MessageConfig = () => {
if (res.code === 0) {
message.info("配置保存成功")
} else {
message.errorInfo(res.msg)
message.error(res.msg)
}
}
)
} else {
message.errorInfo(res.msg)
message.error(res.msg)
}
})
......@@ -94,6 +96,7 @@ const MessageConfig = () => {
return (
<div className={styles.message_container}>
<Card style={{ width: "100%", height: 'calc(100vh - 130px)' }}>
<Spin spinning={loading} tip="loading">
<Form
{...layout}
form={form}
......@@ -107,10 +110,9 @@ const MessageConfig = () => {
</div>
<Divider />
<Form.Item
label="服务地址(平台)"
label="服务地址(平台)"
name="messageAddress"
rules={[{ required: true, message: '请输入域名(IP):端口,例如:192.168.19.102:8131' }]}
rules={[{ required: true, pattern: new RegExp(/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(:\d*)$/, "g"), message: '请输入正确的IP例如:192.168.12.231:8231' }]}
>
<Input style={{width:'94%'}}/>
</Form.Item>
......@@ -120,6 +122,7 @@ const MessageConfig = () => {
</Button>
</Form.Item>
</Form>
</Spin>
</Card>
</div>
)
......
import React, { useEffect, useState } from 'react'
import { Card, Form, Input, Button, Switch, message, Divider, Row, Col } from 'antd'
import { Card, Form, Input, Button, Switch, message, Divider, Row, Col, Spin } from 'antd'
import styles from './ProxyConfig.less'
import { GetNginxConfigInfo, InsertNginxConfig, StartNginx, StopNginx, ReloadNginx, NginxCache, NginxLog } from '@/services/platform/hostmanager'
import { ReloadOutlined } from '@ant-design/icons';
......@@ -17,7 +17,7 @@ const tailLayout = {
const ProxyConfig = () => {
const [loading, setLoading] = useState(false); // 加载
const [form] = Form.useForm();
const [flag, setFlag] = useState(1)
......@@ -31,12 +31,13 @@ const ProxyConfig = () => {
})
const onFinish = (values) => {
setLoading(true)
InsertNginxConfig({
port: values.NginxPort,
iisLocation: values.IISIPProt,
emqLocation: values.EMQIPPort
}).then(
res => {
}).then(res => {
setLoading(false)
if (res.code === 0) {
message.success("保存成功")
} else {
......@@ -180,6 +181,7 @@ const ProxyConfig = () => {
return (
<div className={styles.proxy_container}>
<Card style={{ width: '100%', height: 'calc(100vh - 130px)' }}>
<Spin spinning={loading} tip="loading">
<Form
{...layout}
form={form}
......@@ -196,7 +198,6 @@ const ProxyConfig = () => {
label="端口(ngnix)"
name="NginxPort"
rules={[{ required: true, pattern: new RegExp(/^[1-9]\d*$/, 'g'), message: '请输入ngnix端口,例如:8091' }]}
>
<Input style={{marginLeft:'30px', width:'98%'}}/>
</Form.Item>
......@@ -204,7 +205,7 @@ const ProxyConfig = () => {
<Form.Item
label="地址(IIS)"
name="IISIPProt"
rules={[{ required: true, message: '请输入服务器地址!' }]}
rules={[{ required: true, pattern: new RegExp(/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(:\d*)$/, "g"), message: '请输入正确的IP例如:192.168.12.231:8231' }]}
hasFeedback
>
<Input style={{marginLeft:'30px', width:'98%'}}/>
......@@ -213,8 +214,7 @@ const ProxyConfig = () => {
label="地址(EMQ)"
name="EMQIPPort"
hasFeedback
rules={[{ required: true, message: '请选择是否!' }]}
rules={[{ required: true, pattern: new RegExp(/^(([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])(:\d*)$/, "g"), message: '请输入正确的IP例如:192.168.12.231:8231' }]}
>
<Input style={{marginLeft:'30px', width:'98%'}}/>
</Form.Item>
......@@ -224,38 +224,40 @@ const ProxyConfig = () => {
</Button>
</Form.Item>
</Form>
<div style={{ display: 'flex', alignItems: 'center', marginTop: '40px' }}>
<img src={configuration} style={{ height: '16px' }} /><span style={{ marginLeft: '10px', fontWeight: 'bold' }}>服务管理</span>
<img src={configuration} style={{ height: '16px' }} /><span style={{ marginLeft: '10px', fontWeight: 'bold' }}>服务管理</span>
</div>
<Divider />
<div className={styles.operate_container}>
<Row gutter={[20, 25]} style={{display:'flex', alignItems:'center'}}>
<Col span={2}>
<div style={{display:'flex', justifyContent:'flex-end'}}>服务器运行</div>
<div style={{display:'flex', justifyContent:'flex-end', marginRight:'-10px'}}>服务运行</div>
</Col>
<Col span={22}>
<Switch checkedChildren='开启' unCheckedChildren='关闭' checked={currentConfig.IsStartNginx} onChange={OperateNginx} style={{marginLeft:'25px'}}/>
<Switch checkedChildren='开启' unCheckedChildren='关闭' checked={currentConfig.IsStartNginx} onChange={OperateNginx} style={{marginLeft:'30px'}}/>
</Col>
<Col span={2}>
<div style={{display:'flex', justifyContent:'flex-end'}}>服务器日志</div>
<div style={{display:'flex', justifyContent:'flex-end', marginRight:'-10px'}}>服务日志</div>
</Col>
<Col span={22}>
<Switch checkedChildren='开启' unCheckedChildren='关闭' checked={currentConfig.IsStartNginxLog} onChange={OperateNginxLog} disabled={currentConfig.IsStartNginx > 0 ? 0 : 1} style={{marginLeft:'25px'}}/>
<Switch checkedChildren='开启' unCheckedChildren='关闭' checked={currentConfig.IsStartNginxLog} onChange={OperateNginxLog} disabled={currentConfig.IsStartNginx > 0 ? 0 : 1} style={{marginLeft:'30px'}}/>
</Col>
<Col span={2}>
<div style={{display:'flex', justifyContent:'flex-end'}}>服务器缓存</div>
<div style={{display:'flex', justifyContent:'flex-end', marginRight:'-10px'}}>服务缓存</div>
</Col>
<Col span={22}>
<Switch checkedChildren='开启' unCheckedChildren='关闭' checked={currentConfig.IsStartNginxCache} onChange={OperateNginxCache} disabled={currentConfig.IsStartNginx > 0 ? 0 : 1} style={{marginLeft:'25px'}}/>
<Switch checkedChildren='开启' unCheckedChildren='关闭' checked={currentConfig.IsStartNginxCache} onChange={OperateNginxCache} disabled={currentConfig.IsStartNginx > 0 ? 0 : 1} style={{marginLeft:'30px'}}/>
</Col>
<Col span={2}>
<div style={{display:'flex', justifyContent:'flex-end'}}>服务器重载</div>
<div style={{display:'flex', justifyContent:'flex-end', marginRight:'-10px'}}>服务重载</div>
</Col>
<Col span={22}>
<Button type="primary" icon={<ReloadOutlined />} onClick={OperateReloadNginx} disabled={currentConfig.IsStartNginx > 0 ? 0 : 1} style={{marginLeft:'25px'}}>重载</Button>
<Button type="primary" icon={<ReloadOutlined style={{marginTop:'-10px'}}/>} onClick={OperateReloadNginx} disabled={currentConfig.IsStartNginx > 0 ? 0 : 1} style={{marginLeft:'30px'}}>重载</Button>
</Col>
</Row>
</div>
</Spin>
</Card>
</div>
)
......
......@@ -18,5 +18,9 @@
height: 50px;
margin-left:25px;
}
}
}
\ No newline at end of file
}
.anticon svg {
margin-top:-5px;
}
......@@ -51,6 +51,7 @@ import TableManager from '@/pages/platformCenter/bsmanager/tablemanager';
import StandingBook from '@/pages/platformCenter/standingBook/standingBook';
import FiledConfig from '@/pages/platformCenter/filedConfig/filedConfig';
import Incident from '@/pages/platformCenter/bsmanager/workOrder/incident';
import Maintenance from '@/pages/platformCenter/bsmanager/maintenance/maintenance'
import Flow from '@/pages/platformCenter/bsmanager/workFlow/flow';
import FlowNode from '@/pages/platformCenter/bsmanager/workFlow/flowNode/flowNode';
// import Workflow from '@/pages/platformCenter/bsmanager/workflowEdit/Workflow';
......@@ -301,6 +302,11 @@ export default {
hideMenu: true,
component: FlowNode,
},
{
path: '/platformCenter/bsmanger/maintenance',
name: '巡维保',
component: Maintenance,
},
// {
// path: '/platformCenter/bsmanger/Workflow',
// name: '工作流编辑',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment