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
1f534c58
Commit
1f534c58
authored
Sep 03, 2021
by
晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交环境不刷新问题
parent
83790203
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
18 deletions
+49
-18
DevEnv.vue
src/views/docker/DevEnv.vue
+3
-0
EnvDetail.vue
src/views/docker/EnvDetail.vue
+34
-15
TestEnv.vue
src/views/docker/TestEnv.vue
+8
-1
Header.vue
src/views/layout/rightMain/Header.vue
+4
-2
No files found.
src/views/docker/DevEnv.vue
View file @
1f534c58
...
...
@@ -50,6 +50,7 @@
<
script
>
import
{
getNamespaceList
,
getServiceDetail
,
syncMq
}
from
'
@/api/k8s
'
import
{
mapGetters
}
from
'
vuex
'
import
bus
from
'
@/utils/bus
'
export
default
{
data
()
{
return
{
...
...
@@ -80,6 +81,8 @@ export default {
// 跳转到详情页面
jumpToDetail
(
name
)
{
window
.
sessionStorage
.
setItem
(
'
env
'
,
name
)
// 向菜单栏中的下拉框传递环境名称
bus
.
$emit
(
'
TransEnv
'
,
name
)
this
.
$router
.
push
({
path
:
`/docker/env`
})
...
...
src/views/docker/EnvDetail.vue
View file @
1f534c58
...
...
@@ -6,7 +6,8 @@
<i
class=
"el-icon-menu"
></i>
基础服务
<div
style=
"float: right;"
>
<el-button
type=
"warning"
size=
"mini"
round
v-show=
"nsList.indexOf(namespace) > -1"
@
click=
"getRepository('base')"
>
新增服务
</el-button>
<el-button
type=
"warning"
size=
"mini"
round
v-show=
"nsList.indexOf(namespace) > -1"
@
click=
"getRepository('base')"
>
新增服务
</el-button>
<el-button
type=
"success"
size=
"mini"
round
@
click=
"refresh"
>
刷新状态
</el-button>
<el-dropdown>
<el-button
type=
"primary"
size=
"mini"
round
v-show=
"nsList.indexOf(namespace) > -1"
>
...
...
@@ -20,7 +21,8 @@
</el-dropdown>
</div>
</div>
<el-table
:data=
"FormatTabledata.base"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}" size="medium" align="center" style="width: 100%">
<el-table
:data=
"FormatTabledata.base"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}" size="medium"
align="center" style="width: 100%">
<el-table-column
:index=
"indexMethod"
type=
"index"
label=
"#"
/>
<el-table-column
v-if=
"serviceName!=='rabbitmq'"
label=
"服务名"
>
<template
slot-scope=
"scope"
>
...
...
@@ -61,7 +63,8 @@
</el-popover>
-->
</span>
<span
v-if=
"scope.row.serviceName !== 'rabbitmq'&& scope.row.serviceName !== 'consul' && scope.row.serviceName !== 'redash'"
>
{{
scope
.
row
.
serviceName
}}
</span>
<span
v-if=
"scope.row.serviceName !== 'rabbitmq'&& scope.row.serviceName !== 'consul' && scope.row.serviceName !== 'redash'"
>
{{
scope
.
row
.
serviceName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"lanIp"
width=
"110"
label=
"IP地址"
/>
...
...
@@ -69,9 +72,11 @@
<
template
slot-scope=
"scope"
>
<el-tooltip
v-show=
"scope.row.serviceName === 'redis-sentinel'"
placement=
"top"
>
<div
slot=
"content"
>
四个端口分别为一主二从一哨兵
<br>
哨兵名称:qsmaster,没有密码
</div>
<div><span
v-for=
"item in scope.row.portMappings"
:key=
"item.port"
>
{{
item
.
nodePort
}}
->
{{
item
.
port
}}
</span></div>
<div><span
v-for=
"item in scope.row.portMappings"
:key=
"item.port"
>
{{
item
.
nodePort
}}
->
{{
item
.
port
}}
</span></div>
</el-tooltip>
<span
v-for=
"item in scope.row.portMappings"
v-show=
"scope.row.serviceName !== 'redis-sentinel'"
:key=
"item.port"
>
{{
item
.
nodePort
}}
->
{{
item
.
port
}}
</span>
<span
v-for=
"item in scope.row.portMappings"
v-show=
"scope.row.serviceName !== 'redis-sentinel'"
:key=
"item.port"
>
{{
item
.
nodePort
}}
->
{{
item
.
port
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"image"
label=
"镜像"
>
...
...
@@ -106,7 +111,8 @@
<i
class=
"el-icon-refresh"
></i>
重置服务
</el-dropdown-item>
<el-dropdown-item
v-show=
"nsList.indexOf(namespace) > -1"
style=
"color: red"
@
click.native=
"deleteService(scope.row) "
>
<el-dropdown-item
v-show=
"nsList.indexOf(namespace) > -1"
style=
"color: red"
@
click.native=
"deleteService(scope.row) "
>
<i
class=
"el-icon-delete"
></i>
删除服务
</el-dropdown-item>
...
...
@@ -123,11 +129,13 @@
<i
class=
"el-icon-menu"
></i>
{{ item.projectType.toUpperCase() }} 服务
<div
style=
"float: right"
>
<el-button
v-show=
"nsList.indexOf(namespace) > -1"
type=
"warning"
size=
"mini"
round
@
click=
"getRepository(item.projectType)"
>
新增服务
</el-button>
<el-button
v-show=
"nsList.indexOf(namespace) > -1"
type=
"warning"
size=
"mini"
round
@
click=
"getRepository(item.projectType)"
>
新增服务
</el-button>
<el-button
type=
"success"
size=
"mini"
round
@
click=
"refresh"
>
刷新状态
</el-button>
</div>
</div>
<el-table
:data=
"FormatTabledata[item.projectType]"
:header-cell-style=
"{background:'#F3F4F7',color:'#555'}"
size=
"medium"
align=
"center"
style=
"width: 100%"
>
<el-table
:data=
"FormatTabledata[item.projectType]"
:header-cell-style=
"{background:'#F3F4F7',color:'#555'}"
size=
"medium"
align=
"center"
style=
"width: 100%"
>
<el-table-column
:index=
"indexMethod"
label=
"#"
type=
"index"
/>
<el-table-column
prop=
"serviceName"
label=
"服务名"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -165,7 +173,8 @@
<el-table-column
v-if=
"item.projectType==='java'"
width=
"150"
label=
"调试"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.serviceType==='NodePort'"
>
{{
scope
.
row
.
lanIp
}}
:
{{
scope
.
row
.
portMappings
[
1
].
nodePort
}}
</span>
<span
v-if=
"scope.row.serviceType==='NodePort'"
>
{{
scope
.
row
.
lanIp
}}
:
{{
scope
.
row
.
portMappings
[
1
].
nodePort
}}
</span>
</
template
>
</el-table-column>
...
...
@@ -193,7 +202,8 @@
<i
class=
"el-icon-document"
></i>
详细信息
</el-dropdown-item>
<el-dropdown-item
v-show=
"nsList.indexOf(namespace) > -1"
@
click.native=
"openUpdateServiceDialog(scope.row)"
>
<el-dropdown-item
v-show=
"nsList.indexOf(namespace) > -1"
@
click.native=
"openUpdateServiceDialog(scope.row)"
>
<i
class=
"el-icon-refresh"
></i>
更新服务
</el-dropdown-item>
...
...
@@ -203,7 +213,8 @@
重置服务
</el-dropdown-item>
<el-dropdown-item
v-show=
"nsList.indexOf(namespace) > -1"
style=
"color: red"
@
click.native=
"deleteService(scope.row, item) "
>
<el-dropdown-item
v-show=
"nsList.indexOf(namespace) > -1"
style=
"color: red"
@
click.native=
"deleteService(scope.row, item) "
>
<i
class=
"el-icon-delete"
></i>
删除服务
</el-dropdown-item>
...
...
@@ -221,8 +232,10 @@
<p
class=
"title-sub"
>
选择服务
</p>
<el-row
:gutter=
"20"
>
<el-col
:span=
"14"
>
<el-select
v-model=
"reponame"
clearable
filterable
class=
"elSelect"
placeholder=
"请选择服务,支持模糊搜索"
@
change=
"getTag"
>
<el-option
v-for=
"(item,index) in options"
:key=
"index"
:label=
"item.repoName.split('/')[1]"
:value=
"item.repoName"
/>
<el-select
v-model=
"reponame"
clearable
filterable
class=
"elSelect"
placeholder=
"请选择服务,支持模糊搜索"
@
change=
"getTag"
>
<el-option
v-for=
"(item,index) in options"
:key=
"index"
:label=
"item.repoName.split('/')[1]"
:value=
"item.repoName"
/>
</el-select>
</el-col>
</el-row>
...
...
@@ -256,7 +269,8 @@
</el-col>
</el-row>
<p
v-if=
"label==='node'||label==='java'||label==='go'"
class=
"title-sub"
>
是否调试模式
<span
style=
"font-size: 12px"
>
(执行测试时选择默认选项否即可)
</span>
</p>
<p
v-if=
"label==='node'||label==='java'||label==='go'"
class=
"title-sub"
>
是否调试模式
<span
style=
"font-size: 12px"
>
(执行测试时选择默认选项否即可)
</span>
</p>
<el-row
v-if=
"label==='node'||label==='java'||label==='go'"
:gutter=
"20"
>
<el-col
:span=
"14"
>
<el-select
v-model=
"debug.key"
filterable
clearable
class=
"elSelect"
placeholder=
"请选择是否调试模式,执行测试时请选择否"
>
...
...
@@ -340,6 +354,7 @@ import {
syncMq
,
flushRedis
}
from
'
@/api/k8s
'
import
bus
from
'
@/utils/bus
'
export
default
{
data
()
{
return
{
...
...
@@ -386,7 +401,11 @@ export default {
}
},
created
()
{
this
.
getServiceList
()
bus
.
$on
(
'
TransEnv
'
,
(
name
)
=>
{
this
.
namespace
=
name
this
.
getServiceList
()
})
getDockerProjectType
({}).
then
((
resp
)
=>
{
this
.
typeList
=
resp
.
data
.
data
})
...
...
src/views/docker/TestEnv.vue
View file @
1f534c58
...
...
@@ -5,7 +5,8 @@
测试环境列表
</div>
<div>
<el-table
:data=
"tableData"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}" size="medium" align="center" style="width: 100%;margin-bottom: 30px;">
<el-table
:data=
"tableData"
:header-cell-style=
"
{background:'#F3F4F7',color:'#555'}" size="medium" align="center"
style="width: 100%;margin-bottom: 30px;">
<el-table-column
:index=
"indexMethod"
label=
"#"
type=
"index"
/>
<el-table-column
prop=
"name"
label=
"名称"
width=
"100"
>
<template
slot-scope=
"scope"
>
...
...
@@ -50,6 +51,8 @@
<
script
>
import
{
getNamespaceList
,
getServiceDetail
,
syncMq
}
from
'
@/api/k8s
'
import
{
mapGetters
}
from
'
vuex
'
// 引入组件
import
bus
from
'
@/utils/bus
'
export
default
{
data
()
{
return
{
...
...
@@ -80,9 +83,13 @@ export default {
// 跳转到详情页面
jumpToDetail
(
name
)
{
window
.
sessionStorage
.
setItem
(
'
env
'
,
name
)
// 向菜单栏中的下拉框传递环境名称
bus
.
$emit
(
'
TransEnv
'
,
name
)
this
.
$router
.
push
({
// 环境详情页面
path
:
`/docker/env`
})
// 强制刷新整个页面
// this.$router.go(0)
},
...
...
src/views/layout/rightMain/Header.vue
View file @
1f534c58
...
...
@@ -15,7 +15,6 @@
<Crumbs
:crumbs=
"getCrumbs"
></Crumbs>
</div>
<div
class=
"right"
>
<!--
<el-tag>
当前环境:
{{
env
}}
</el-tag>
-->
<el-select
v-model=
"env"
filterable
@
change=
"envChange"
placeholder=
"请选择环境"
style=
"width:110px"
>
<el-option
v-for=
"item in envList"
:key=
"item.name"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
...
...
@@ -63,7 +62,7 @@ export default {
}
},
getEnvList
()
{
getNamespaceList
({
env
:
'
all
'
}).
then
((
resp
)
=>
{
getNamespaceList
({
env
:
'
all
'
}).
then
((
resp
)
=>
{
this
.
envList
=
resp
.
data
.
data
})
},
...
...
@@ -85,6 +84,9 @@ export default {
}
},
created
()
{
this
.
$bus
.
$on
(
'
TransEnv
'
,
(
name
)
=>
{
this
.
env
=
name
})
this
.
getEnvList
()
},
components
:
{
...
...
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