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
79912660
Commit
79912660
authored
Apr 28, 2019
by
xuezj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
运行中环境增加同步mysql、部署应用服务、同步mq未完成
parent
650e0fc6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
23 deletions
+69
-23
docker.js
src/api/docker.js
+12
-0
docker.js
src/router/modules/docker.js
+7
-0
sync.vue
src/views/dbconfig/sync.vue
+6
-2
createEnv.vue
src/views/docker/createEnv.vue
+14
-4
envDetail.vue
src/views/docker/envDetail.vue
+2
-2
runingEnv.vue
src/views/docker/runingEnv.vue
+28
-15
No files found.
src/api/docker.js
View file @
79912660
...
...
@@ -6,6 +6,18 @@ export function getAllRepos() {
})
}
export
function
getBaseRepos
()
{
return
request
({
url
:
'
/repo/getBase
'
})
}
export
function
getAppRepos
()
{
return
request
({
url
:
'
/repo/getApp
'
})
}
export
function
getAllEnvTemplate
()
{
return
request
({
url
:
'
/envTemplate/getAll
'
...
...
src/router/modules/docker.js
View file @
79912660
...
...
@@ -41,6 +41,13 @@ const dockersRouter = {
name
:
'
Detail
'
,
meta
:
{
title
:
'
detail
'
,
noCache
:
true
},
hidden
:
true
},
{
path
:
'
deployEnv/:name
'
,
component
:
()
=>
import
(
'
@/views/docker/deployEnv
'
),
name
:
'
deploy
'
,
meta
:
{
title
:
'
部署应用服务
'
,
noCache
:
true
},
hidden
:
true
}
]
}
...
...
src/views/dbconfig/sync.vue
View file @
79912660
...
...
@@ -24,8 +24,9 @@
</el-form>
<div
style=
"margin-left:420px"
>
<el-button
:disabled=
"disableBool"
type=
"primary"
@
click=
"sync()"
>
{{
$t
(
'
table.confirm
'
)
}}
</el-button>
<el-button
:disabled=
"disableBool"
@
click=
"resetTemp()"
>
{{
$t
(
'
table.cancel
'
)
}}
</el-button>
<el-button
@
click=
"goBack()"
>
{{
$t
(
'
table.cancel
'
)
}}
</el-button>
<el-button
:disabled=
"disableBool"
type=
"primary"
@
click=
"sync()"
>
{{
$t
(
'
table.confirm
'
)
}}
</el-button>
</div
>
</div
>
<div
style=
"padding:10px 20px 0px"
>
...
...
@@ -82,6 +83,9 @@ export default {
this
.
getDBName
()
},
methods
:
{
goBack
()
{
this
.
$router
.
go
(
-
1
)
},
getNamespace
()
{
getNamespaceTke
().
then
(
res
=>
{
this
.
namespaces
=
res
.
data
&&
res
.
data
.
namespaces
.
map
(
item
=>
item
.
name
)
...
...
src/views/docker/createEnv.vue
View file @
79912660
<
template
>
<div
class=
"app-container"
style=
""
>
<div
class=
"app-container"
>
<el-form
ref=
"dataForm"
label-position=
"left"
label-width=
"130px"
style=
"width: 95%; margin-left:20px;"
>
<el-alert
type=
"warning"
style=
"margin-bottom: 20px; font-size: 14px;"
show-icon
>
<slot
name=
"description"
>
<p>
环境创建成功后,到运行中环境页面
</p>
<p>
1. 同步数据库 和 rabbitmq
</p>
<p>
2. 再部署应用服务
</p>
</slot>
</el-alert>
<el-form-item
label=
"Namespace名称"
>
<el-input
v-model=
"namespace"
placeholder=
"请输入"
/>
...
...
@@ -28,7 +38,7 @@
</
template
>
<
script
>
import
{
get
All
Repos
,
getAllEnvTemplate
,
createEnv
}
from
'
@/api/docker
'
import
{
get
Base
Repos
,
getAllEnvTemplate
,
createEnv
}
from
'
@/api/docker
'
export
default
{
...
...
@@ -57,8 +67,8 @@ export default {
methods
:
{
getAllRepos
()
{
get
All
Repos
().
then
(
res
=>
{
this
.
repoNamespaces
=
res
.
data
get
Base
Repos
().
then
(
res
=>
{
this
.
repoNamespaces
=
res
.
data
.
filter
(
item
=>
item
.
type
===
'
base
'
)
})
},
...
...
src/views/docker/envDetail.vue
View file @
79912660
...
...
@@ -12,8 +12,8 @@
更多操作
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click.native=
"syncDb"
>
从线上同步DB
</el-dropdown-item>
<el-dropdown-item
@
click.native=
"syncMq"
>
从线上同步
MQ
</el-dropdown-item>
<el-dropdown-item
@
click.native=
"syncDb"
>
同步线上MySQL
</el-dropdown-item>
<el-dropdown-item
@
click.native=
"syncMq"
>
同步线上
MQ
</el-dropdown-item>
<el-dropdown-item
@
click.native=
"clearRedis"
>
清理Redis缓存
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
...
...
src/views/docker/runingEnv.vue
View file @
79912660
...
...
@@ -18,33 +18,32 @@
<el-table-column
prop=
"name"
label=
"名称"
>
width=
"100"
>
<template
slot-scope=
"scope"
>
<span
class=
"link-type"
@
click=
"handleDetail(scope.row)"
>
{{
scope
.
row
.
name
}}
</span>
<span
class=
"link-type"
@
click=
"handleDetail(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"
>
{{
scope
.
row
.
status
|
formatStatus
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"description"
label=
"描述信息"
/>
<!--<el-table-column label="操作" min-width="100px">-->
<!--<template slot-scope="scope">-->
<!--<el-button type="infos" size="mini">备份</el-button>-->
<!--<el-button size="mini" type="primary">挂起</el-button>-->
<!--<el-button size="mini" type="danger">删除</el-button>-->
<!--</template>-->
<!--</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>
<el-button
size=
"mini"
type=
"primary"
@
click=
"deploy(scope.row.name)"
>
部署应用服务
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
...
...
@@ -64,6 +63,20 @@ export default {
this
.
fetchK8sList
()
},
methods
:
{
syncMySQL
(
namespace
)
{
this
.
$router
.
push
({
path
:
'
/dbsync
'
,
query
:
{
namespace
:
namespace
}
})
},
syncMQ
(
namespace
)
{
console
.
log
(
'
todo
'
)
},
deploy
(
namespace
)
{
this
.
$router
.
push
({
path
:
`/dockers/deployEnv/
${
namespace
}
`
})
},
fetchK8sList
()
{
fetchKubernetesList
().
then
(
res
=>
{
const
exculde
=
[
'
default
'
,
'
kube-system
'
]
...
...
@@ -80,9 +93,9 @@ export default {
indexMethod
(
index
)
{
return
index
+
1
},
handleDetail
(
scop
e
)
{
handleDetail
(
namespac
e
)
{
this
.
$router
.
push
({
path
:
`/dockers/runingEnv/
${
scope
.
nam
e
}
`
path
:
`/dockers/runingEnv/
${
namespac
e
}
`
})
},
handleEdit
()
{
...
...
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