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
ac3fd6c8
Commit
ac3fd6c8
authored
Jul 08, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '网关配置获取数据接口路径问题导致只有第一次能获取数据问题修复'
parent
91fa20e1
Pipeline
#54967
passed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
gateWay.jsx
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
+32
-0
hostmanager.js
src/services/hostmanager/hostmanager.js
+3
-2
No files found.
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
View file @
ac3fd6c8
/* eslint-disable no-unused-expressions */
/* eslint-disable no-else-return */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
...
...
@@ -29,6 +30,7 @@ import {
GetGateWay
,
UpdateGeteWay
,
GetReRoutes
,
GetReRoutesFirst
,
DelRoutes
,
}
from
'@/services/hostmanager/hostmanager'
;
import
configuration
from
'../../../../assets/images/icons/消息.svg'
;
...
...
@@ -83,7 +85,21 @@ const GateConfig = () => {
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
console
.
log
(
res
.
data
);
setTableData
(
res
.
data
);
}
else
{
GetReRoutesFirst
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
resdata
=>
{
setLoading
(
false
);
if
(
resdata
.
code
===
0
)
{
console
.
log
(
resdata
.
data
);
setTableData
(
resdata
.
data
);
}
else
{
console
.
log
(
123
);
}
});
}
});
},
[
flag
]);
...
...
@@ -175,6 +191,22 @@ const GateConfig = () => {
}
},
},
{
title
:
'优先级'
,
dataIndex
:
'priority'
,
key
:
'priority'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
{
console
.
log
(
text
);
return
(
<
span
>
<
Tooltip
placement=
"top"
title=
{
text
}
>
{
text
}
</
Tooltip
>
</
span
>
);
},
},
{
title
:
'操作'
,
key
:
'action'
,
...
...
src/services/hostmanager/hostmanager.js
View file @
ac3fd6c8
...
...
@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-0
6-23 16:42:21
* @LastEditTime: 2022-0
7-08 16:37:26
* @LastEditors: leizhe
*/
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
,
PandaCore
}
from
'@/services/index'
;
...
...
@@ -40,7 +40,8 @@ export const ReloadNginx = param => get(`${PUBLISH_SERVICE}/HostManager/ReloadNg
export
const
GetGateWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/GetGateWay`
,
param
);
export
const
UpdateGeteWay
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/UpdateGeteWay`
,
param
);
// 网关配置
export
const
GetReRoutes
=
param
=>
get
(
`
${
PandaCore
}
/OcelotSettings/GetReRoutes`
,
param
);
export
const
GetReRoutesFirst
=
param
=>
get
(
`
${
PandaCore
}
/OcelotSettings/GetReRoutes`
,
param
);
export
const
GetReRoutes
=
param
=>
get
(
`/OcelotSettings/GetReRoutes`
,
param
);
export
const
SaveRoutes
=
param
=>
post
(
`/OcelotSettings/SaveRoutes`
,
param
);
export
const
DelRoutes
=
param
=>
get
(
`/OcelotSettings/DelRoutes`
,
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