Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
qa-platform-ui
Commits
405b7003
Commit
405b7003
authored
Sep 28, 2021
by
晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对比mq多少显示
parent
b364ea6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
7 deletions
+64
-7
k8s.js
src/api/k8s.js
+8
-0
EnvDetail.vue
src/views/docker/EnvDetail.vue
+56
-7
No files found.
src/api/k8s.js
View file @
405b7003
...
...
@@ -170,3 +170,11 @@ export function dbsyncQuery(queryInfo) {
params
:
queryInfo
})
}
// jenkins构建控制台信息获取
export
function
mqDiff
(
queryInfo
)
{
return
request
({
url
:
'
/k8s/mq/diff
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
src/views/docker/EnvDetail.vue
View file @
405b7003
...
...
@@ -46,21 +46,21 @@
{{
scope
.
row
.
serviceName
}}
</span>
<
!--
<
el-popover
v-if=
"moreShow"
placement=
"top-start"
trigger=
"hover"
title=
"本地比线上多出的配置"
>
<el-popover
v-if=
"moreShow"
placement=
"top-start"
trigger=
"hover"
title=
"本地比线上多出的配置"
>
<el-table
:data=
"moreArray"
max-height=
"500"
>
<el-table-column
width=
"100"
property=
"type"
label=
"Type"
/>
<el-table-column
width=
"500"
property=
"value"
label=
"Value"
/>
</el-table>
<i
slot=
"reference"
class=
"el-icon-
sort-up"
style=
"color: #67c23a
"
/>
</el-popover>
-->
<i
slot=
"reference"
class=
"el-icon-
top"
style=
"color: #67c23a;font:caption
"
/>
</el-popover>
<
!--
<
el-popover
v-if=
"lostShow"
placement=
"top-start"
trigger=
"hover"
title=
"本地比线上缺少的配置"
>
<el-popover
v-if=
"lostShow"
placement=
"top-start"
trigger=
"hover"
title=
"本地比线上缺少的配置"
>
<el-table
:data=
"lostArray"
max-height=
"500"
>
<el-table-column
width=
"100"
property=
"type"
label=
"Type"
/>
<el-table-column
width=
"500"
property=
"value"
label=
"Value"
/>
</el-table>
<i
slot=
"reference"
class=
"el-icon-
sort-down"
style=
"color: #f56c6c
"
/>
</el-popover>
-->
<i
slot=
"reference"
class=
"el-icon-
bottom"
style=
"color: #f56c6c;font:caption
"
/>
</el-popover>
</span>
<span
...
...
@@ -352,7 +352,8 @@ import {
serviceDelete
,
getDockerProjectType
,
syncMq
,
flushRedis
flushRedis
,
mqDiff
}
from
'
@/api/k8s
'
import
bus
from
'
@/utils/bus
'
export
default
{
...
...
@@ -402,9 +403,11 @@ export default {
},
created
()
{
this
.
getServiceList
()
this
.
fetchRabbitmqDetails
()
bus
.
$on
(
'
refreshEnv
'
,
(
name
)
=>
{
this
.
namespace
=
name
this
.
getServiceList
()
this
.
fetchRabbitmqDetails
()
})
getDockerProjectType
({}).
then
((
resp
)
=>
{
...
...
@@ -708,6 +711,52 @@ export default {
},
handleDetail
(
data
)
{
window
.
open
(
`https://
${
data
.
host
}
/`
,
'
_blank
'
)
},
fetchRabbitmqDetails
()
{
getServiceDetail
({
namespace
:
this
.
namespace
,
serviceType
:
'
base
'
,
serviceName
:
'
rabbitmq
'
}).
then
((
resp
)
=>
{
var
data
=
resp
.
data
.
data
data
.
portMappings
.
forEach
((
item
)
=>
{
if
(
item
.
port
===
15672
)
{
// 重新组装ip和端口号
var
ip
=
data
.
lanIp
var
newPort
=
item
.
nodePort
var
newHost
=
ip
+
'
:
'
+
newPort
// 调取接口
mqDiff
({
host
:
newHost
}).
then
((
resp
)
=>
{
const
mqDiffData
=
resp
.
data
.
data
this
.
moreShow
=
mqDiffData
.
more
.
show
this
.
lostShow
=
mqDiffData
.
lost
.
show
this
.
moreArray
=
[]
// 判断本地比线上多出来的配置
for
(
const
i
in
mqDiffData
.
more
)
{
// 判断是否是数组类型
if
(
mqDiffData
.
more
[
i
]
instanceof
Array
)
{
this
.
moreArray
.
push
({
type
:
i
,
value
:
mqDiffData
.
more
[
i
].
join
(
'
,
'
)
})
}
}
this
.
lostArray
=
[]
// 判断本地比线上少出来的配置
for
(
const
i
in
mqDiffData
.
lost
)
{
if
(
mqDiffData
.
lost
[
i
]
instanceof
Array
)
{
this
.
lostArray
.
push
({
type
:
i
,
value
:
mqDiffData
.
lost
[
i
].
join
(
'
,
'
)
})
}
}
})
}
})
})
}
}
}
...
...
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