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
46b5e980
Commit
46b5e980
authored
Aug 19, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
容器平台迁移
parent
056a0afd
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
521 additions
and
0 deletions
+521
-0
k8s.js
src/api/k8s.js
+10
-0
DevEnv.vue
src/views/docker/DevEnv.vue
+79
-0
EnvDetail.vue
src/views/docker/EnvDetail.vue
+349
-0
TestEnv.vue
src/views/docker/TestEnv.vue
+83
-0
No files found.
src/api/k8s.js
0 → 100644
View file @
46b5e980
import
request
from
'
@/utils/holmesRequest
'
// 获取namespace列表
export
function
getNamespaceList
(
queryInfo
)
{
return
request
({
url
:
'
/k8s/namespace/list
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
src/views/docker/DevEnv.vue
0 → 100644
View file @
46b5e980
<
template
>
<div>
<div
class=
"title"
>
<i
class=
"el-icon-s-promotion"
></i>
开发环境列表
</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-column
:index=
"indexMethod"
label=
"#"
type=
"index"
/>
<el-table-column
prop=
"name"
label=
"名称"
width=
"100"
>
<template
slot-scope=
"scope"
>
<span
class=
"link-type"
@
click=
"jumpToDetail(scope.row.name)"
>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"createdAt"
label=
"创建时间"
width=
"160"
/>
<el-table-column
prop=
"status"
label=
"运行状态"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.status ==='Active'"
>
正常
</el-tag>
<el-tag
type=
"danger"
v-if=
"scope.row.status !== 'Active'"
>
异常
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"owner"
label=
"所有者"
width=
"120"
/>
<el-table-column
prop=
"operation"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"syncMySQL(scope.row.name)"
>
同步线上MySQL
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"syncMQ(scope.row.name)"
>
同步线上MQ
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
<
script
>
import
{
getNamespaceList
}
from
'
@/api/k8s
'
export
default
{
data
()
{
return
{
tableData
:
[]
}
},
methods
:
{
// 获取环境列表
getNamespaceList
()
{
getNamespaceList
({
env
:
'
dev
'
}).
then
((
resp
)
=>
{
this
.
tableData
=
resp
.
data
.
data
})
},
indexMethod
(
index
)
{
return
index
+
1
},
// 跳转到详情页面
jumpToDetail
()
{},
syncMySQL
()
{}
},
created
()
{
this
.
getNamespaceList
()
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.title {
background: rgba(66, 185, 131, 0.1);
border-radius: 2px;
line-height: 40px;
margin: 0 0 10px 0px;
padding: 0 0 0 5px;
}
.link-type,
.link-type:focus {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
</
style
>
src/views/docker/EnvDetail.vue
0 → 100644
View file @
46b5e980
This diff is collapsed.
Click to expand it.
src/views/docker/TestEnv.vue
0 → 100644
View file @
46b5e980
<
template
>
<div>
<div
class=
"title"
>
<i
class=
"el-icon-s-promotion"
></i>
测试环境列表
</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-column
:index=
"indexMethod"
label=
"#"
type=
"index"
/>
<el-table-column
prop=
"name"
label=
"名称"
width=
"100"
>
<template
slot-scope=
"scope"
>
<span
class=
"link-type"
@
click=
"jumpToDetail(scope.row.name)"
>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"createdAt"
label=
"创建时间"
width=
"160"
/>
<el-table-column
prop=
"status"
label=
"运行状态"
width=
"100"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
v-if=
"scope.row.status ==='Active'"
>
正常
</el-tag>
<el-tag
type=
"danger"
v-if=
"scope.row.status !== 'Active'"
>
异常
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"owner"
label=
"所有者"
width=
"120"
/>
<el-table-column
prop=
"operation"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"syncMySQL(scope.row.name)"
>
同步线上MySQL
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"syncMQ(scope.row.name)"
>
同步线上MQ
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
<
script
>
import
{
getNamespaceList
}
from
'
@/api/k8s
'
export
default
{
data
()
{
return
{
tableData
:
[]
}
},
methods
:
{
// 获取环境列表
getNamespaceList
()
{
getNamespaceList
({
env
:
'
test
'
}).
then
((
resp
)
=>
{
this
.
tableData
=
resp
.
data
.
data
})
},
indexMethod
(
index
)
{
return
index
+
1
},
// 跳转到详情页面
jumpToDetail
()
{
this
.
$router
.
push
({
path
:
`/docker/env`
})
},
syncMySQL
()
{}
},
created
()
{
this
.
getNamespaceList
()
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.title {
background: rgba(66, 185, 131, 0.1);
border-radius: 2px;
line-height: 40px;
margin: 0 0 10px 0px;
padding: 0 0 0 5px;
}
.link-type,
.link-type:focus {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
</
style
>
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