Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
cf398fb9
Commit
cf398fb9
authored
Nov 26, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加宿主管理网关配置
parent
96afec15
Pipeline
#38819
skipped with stages
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
17 deletions
+99
-17
gateWay.jsx
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
+63
-0
gateWay.less
src/pages/platformCenter/hostmanager/gateWay/gateWay.less
+27
-0
index.jsx
src/pages/platformCenter/hostmanager/index.jsx
+4
-1
schemeDetail.jsx
src/pages/platformCenter/schemeDetail/schemeDetail.jsx
+0
-16
hostmanager.jsx
src/services/platform/hostmanager.jsx
+5
-0
No files found.
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
0 → 100644
View file @
cf398fb9
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Card
,
Form
,
Switch
,
message
,
Divider
,
Row
,
Col
,
Spin
}
from
'antd'
import
styles
from
'./gateWay.less'
import
{
GetGateWay
,
UpdateGeteWay
}
from
'@/services/platform/hostmanager'
import
configuration
from
'../../../../assets/images/icons/消息.svg'
const
GateConfig
=
()
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
form
]
=
Form
.
useForm
();
const
[
flag
,
setFlag
]
=
useState
(
1
)
const
[
currentConfig
,
setCurrentConfig
]
=
useState
()
const
OperateNginx
=
(
checked
)
=>
{
console
.
log
(
checked
)
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
if
(
res
.
code
===
0
){
setFlag
(
flag
+
1
)
message
.
success
(
"设置成功"
)
}
})
}
useEffect
(()
=>
{
GetGateWay
().
then
(
res
=>
{
if
(
res
.
code
===
0
){
setCurrentConfig
(
res
.
data
)
console
.
log
(
res
.
data
)
console
.
log
(
currentConfig
)
}
})
},
[
flag
])
return
(
<
div
className=
{
styles
.
gateWay_container
}
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
div
style=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
marginTop
:
'40px'
}
}
>
<
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'
,
marginRight
:
'-10px'
}
}
>
服务运行
</
div
>
</
Col
>
<
Col
span=
{
22
}
>
{
console
.
log
(
currentConfig
)
}
<
Switch
checkedChildren=
'开启'
unCheckedChildren=
'关闭'
checked=
{
currentConfig
}
onChange=
{
OperateNginx
}
style=
{
{
marginLeft
:
'30px'
}
}
/>
</
Col
>
</
Row
>
</
div
>
</
Spin
>
</
Card
>
</
div
>
)
}
export
default
GateConfig
;
\ No newline at end of file
src/pages/platformCenter/hostmanager/gateWay/gateWay.less
0 → 100644
View file @
cf398fb9
.getWay_container{
display: flex;
height: 100%;
width: 100%;
flex-direction: row;
justify-content: flex-start;
.operate_container{
display: flex;
flex-direction: column;
justify-content: space-around;
width: 100%;
height: 100%;
.operate_item{
display: flex;
flex-direction: row;
justify-content:flex-start;
align-items: center;
height: 50px;
margin-left:25px;
}
}
}
.anticon svg {
margin-top:-5px;
}
\ No newline at end of file
src/pages/platformCenter/hostmanager/index.jsx
View file @
cf398fb9
...
@@ -5,7 +5,7 @@ import BaseConfig from './baseConfig/BaseConfig'
...
@@ -5,7 +5,7 @@ import BaseConfig from './baseConfig/BaseConfig'
import
IotConfig
from
'./IotConfig/IotConfig'
import
IotConfig
from
'./IotConfig/IotConfig'
import
MessageConfig
from
'./messageConfig/messageConfig'
import
MessageConfig
from
'./messageConfig/messageConfig'
import
ProxyConfig
from
'./proxyConfig/ProxyConfig'
import
ProxyConfig
from
'./proxyConfig/ProxyConfig'
import
GateConfig
from
'./gateWay/gateWay'
const
{
TabPane
}
=
Tabs
;
const
{
TabPane
}
=
Tabs
;
...
@@ -30,6 +30,9 @@ const HostManager = () => {
...
@@ -30,6 +30,9 @@ const HostManager = () => {
<
TabPane
tab=
"代理配置"
key=
"4"
>
<
TabPane
tab=
"代理配置"
key=
"4"
>
<
ProxyConfig
/>
<
ProxyConfig
/>
</
TabPane
>
</
TabPane
>
<
TabPane
tab=
"网关配置"
key=
"5"
>
<
GateConfig
/>
</
TabPane
>
</
Tabs
>
</
Tabs
>
</
PageContainer
>
</
PageContainer
>
)
)
...
...
src/pages/platformCenter/schemeDetail/schemeDetail.jsx
View file @
cf398fb9
...
@@ -77,22 +77,6 @@ const EditModal = props => {
...
@@ -77,22 +77,6 @@ const EditModal = props => {
)
)
},
[])
},
[])
useEffect
(()
=>
{
useEffect
(()
=>
{
let
ab
=
[]
GetMessageTemplate
().
then
(
res
=>
{
console
.
log
(
2121212
)
if
(
res
.
code
===
0
)
{
res
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
Type
===
"企业微信"
)
{
console
.
log
(
index
)
ab
.
push
(
item
)
}
})
}
}
)
console
.
log
(
ab
)
console
.
log
()
console
.
log
(
'template'
,
template
);
console
.
log
(
'template'
,
template
);
console
.
log
(
template
.
WorkWeiXinTemplateId
)
console
.
log
(
template
.
WorkWeiXinTemplateId
)
let
aa
let
aa
...
...
src/services/platform/hostmanager.jsx
View file @
cf398fb9
...
@@ -38,6 +38,11 @@ export const NginxCache = param =>
...
@@ -38,6 +38,11 @@ export const NginxCache = param =>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/NginxCache`
,
param
);
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/NginxCache`
,
param
);
export
const
ReloadNginx
=
param
=>
export
const
ReloadNginx
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/ReloadNginx`
,
param
);
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/ReloadNginx`
,
param
);
//获取网关配置
export
const
GetGateWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/GetGateWay`
,
param
);
export
const
UpdateGeteWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/UpdateGeteWay`
,
param
);
//代理服务老接口
//代理服务老接口
export
const
GetNginxConfigInfoOLD
=
param
=>
export
const
GetNginxConfigInfoOLD
=
param
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment