Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qahome-diamond
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
qahome-diamond
Commits
0980a11b
Commit
0980a11b
authored
Aug 16, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加mq差异
parent
eb80e24a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
4 deletions
+71
-4
docker.js
src/api/docker.js
+9
-0
envDetail.vue
src/views/docker/envDetail.vue
+62
-4
No files found.
src/api/docker.js
View file @
0980a11b
...
...
@@ -173,6 +173,15 @@ export function reloadMq(data) {
data
})
}
export
function
mqDiff
(
data
)
{
return
request
({
url
:
'
/docker/mqDiff
'
,
method
:
'
post
'
,
data
})
}
export
function
ingressHost
(
query
)
{
return
request
({
url
:
'
/k8s/ingress
'
,
...
...
src/views/docker/envDetail.vue
View file @
0980a11b
...
...
@@ -43,7 +43,28 @@
<i
v-if=
"scope.row.status == 'Normal'"
class=
"el-icon-success"
style=
"color: #67c23a"
/>
<i
v-else
class=
"el-icon-error"
style=
"color: #f56c6c"
/>
<span
v-if=
"scope.row.serviceName !== 'rabbitmq'"
>
{{
scope
.
row
.
serviceName
}}
</span>
<span
v-if=
"scope.row.serviceName === 'rabbitmq'"
class=
"link-type"
@
click=
"openRabbitmq(scope.row)"
>
{{
scope
.
row
.
serviceName
}}
</span>
<span
v-if=
"scope.row.serviceName === 'rabbitmq'"
>
<span
class=
"link-type"
style=
"margin-right:10px"
@
click=
"openRabbitmq(scope.row)"
>
{{
scope
.
row
.
serviceName
}}
</span>
<el-popover
v-if=
"moreShow"
placement=
"top-start"
trigger=
"hover"
title=
"本地比线上多出的配置"
>
<el-table
:data=
"moreArray"
>
<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>
<el-popover
v-if=
"lostShow"
placement=
"top-start"
trigger=
"hover"
title=
"本地比线上缺少的配置"
>
<el-table
:data=
"lostArray"
>
<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>
</span>
</
template
>
</el-table-column>
<el-table-column
...
...
@@ -135,7 +156,6 @@
</el-table-column>
<el-table-column
prop=
"image"
width=
"280"
label=
"镜像"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
image
|
filterTag
}}
...
...
@@ -143,10 +163,12 @@
</el-table-column>
<el-table-column
prop=
"createdAt"
width=
"120"
label=
"创建时间"
/>
<el-table-column
prop=
"status"
width=
"100"
label=
"运行状态"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
status
|
formatStatus
}}
...
...
@@ -156,6 +178,7 @@
<el-table-column
v-if=
"item._id==='java'"
show-overflow-tooltip
width=
"90"
label=
"Mock"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
v-show=
"scope.row.labels.mock==='1'"
placement=
"top"
>
...
...
@@ -167,6 +190,7 @@
<el-table-column
v-if=
"item._id==='java'"
width=
"140"
label=
"调试"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.serviceType==='NodePort'"
>
{{
scope
.
row
.
lanIp
}}
:
{{
scope
.
row
.
portMappings
[
1
].
nodePort
}}
</span>
...
...
@@ -395,7 +419,8 @@ import {
redeployClusterService
,
flushRedis
,
modifyIngressHost
,
ingressHost
ingressHost
,
mqDiff
}
from
'
@/api/docker
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
permission
from
'
@/directive/permission/index.js
'
// 权限判断指令
...
...
@@ -450,7 +475,11 @@ export default {
},
dialogHost
:
false
,
timer
:
this
.
$store
.
getters
.
timer
,
timerFunction
:
null
timerFunction
:
null
,
moreShow
:
false
,
lostShow
:
false
,
moreArray
:
[],
lostArray
:
[]
}
},
created
()
{
...
...
@@ -464,6 +493,7 @@ export default {
this
.
refreshInterval
(
this
.
timer
)
}
else
{
this
.
getServicelist
()
this
.
fetchRabbitmqDetails
()
}
},
destroyed
()
{
...
...
@@ -581,6 +611,34 @@ export default {
this
.
value
=
res
.
data
})
},
fetchRabbitmqDetails
()
{
fetchServiceDetails
({
namespace
:
this
.
namespace
,
serviceName
:
'
rabbitmq
'
,
type
:
'
base
'
})
.
then
(
res
=>
{
const
data
=
res
.
data
for
(
const
port
of
data
.
portMappings
)
{
if
(
port
.
port
===
15672
)
{
mqDiff
({
host
:
`
${
data
.
lanIp
}
:
${
port
.
nodePort
}
`
}).
then
(
res
=>
{
const
mqDiffData
=
res
.
data
this
.
moreShow
=
mqDiffData
.
more
.
show
this
.
lostShow
=
mqDiffData
.
lost
.
show
for
(
const
i
in
mqDiffData
.
more
)
{
if
(
mqDiffData
.
more
[
i
]
instanceof
Array
)
{
this
.
moreArray
.
push
({
type
:
i
,
value
:
mqDiffData
.
more
[
i
].
join
(
'
'
)
})
}
}
for
(
const
i
in
mqDiffData
.
lost
)
{
if
(
mqDiffData
.
lost
[
i
]
instanceof
Array
)
{
this
.
lostArray
.
push
({
type
:
i
,
value
:
mqDiffData
.
lost
[
i
].
join
(
'
'
)
})
}
}
})
}
}
})
},
submitHost
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
...
...
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