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
a844e298
Commit
a844e298
authored
Jun 24, 2019
by
kewei.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
admin下支持创建多个mysql服务
parent
09e1bfb4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
envDetail.vue
src/views/docker/envDetail.vue
+22
-5
No files found.
src/views/docker/envDetail.vue
View file @
a844e298
...
@@ -218,7 +218,14 @@
...
@@ -218,7 +218,14 @@
</el-select>
</el-select>
</el-col>
</el-col>
</el-row>
</el-row>
<div
v-permission=
"['admin']"
v-show=
"is_show"
>
<p
class=
"title-sub"
>
服务名称
<span
style=
"font-size: 12px"
>
(创建多个mysql时需要填写此字段)
</span></p>
<el-row
:gutter=
"20"
>
<el-col
:span=
"14"
>
<el-input
v-model=
"mysqlName"
placeholder=
"请输入服务名称"
clearable
/>
</el-col>
</el-row>
</div>
<p
class=
"title-sub"
>
选择镜像
</p>
<p
class=
"title-sub"
>
选择镜像
</p>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"14"
>
<el-col
:span=
"14"
>
...
@@ -328,11 +335,11 @@ import {
...
@@ -328,11 +335,11 @@ import {
ingressHost
ingressHost
}
from
'
@/api/docker
'
}
from
'
@/api/docker
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
permission
from
'
@/directive/permission/index.js
'
// 权限判断指令
import
{
getHostName
}
from
'
@/api/proconfig
'
import
{
getHostName
}
from
'
@/api/proconfig
'
export
default
{
export
default
{
components
:
{
JsonEditor
},
components
:
{
JsonEditor
},
directives
:
{
permission
},
data
()
{
data
()
{
return
{
return
{
debugOptions
:
[
debugOptions
:
[
...
@@ -347,6 +354,8 @@ export default {
...
@@ -347,6 +354,8 @@ export default {
tagOptions
:
[],
tagOptions
:
[],
FormatTabledata
:
{},
FormatTabledata
:
{},
reponame
:
''
,
reponame
:
''
,
is_show
:
false
,
mysqlName
:
''
,
typeList
:
[],
typeList
:
[],
tagName
:
''
,
tagName
:
''
,
server
:
''
,
server
:
''
,
...
@@ -431,6 +440,7 @@ export default {
...
@@ -431,6 +440,7 @@ export default {
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
},
},
getTag
()
{
getTag
()
{
this
.
is_show
=
this
.
reponame
.
split
(
'
/
'
)[
1
]
===
'
mysql
'
getHostName
({
project_name
:
this
.
reponame
.
split
(
'
/
'
)[
1
]
}).
then
(
res
=>
{
getHostName
({
project_name
:
this
.
reponame
.
split
(
'
/
'
)[
1
]
}).
then
(
res
=>
{
if
(
res
.
data
)
{
if
(
res
.
data
)
{
this
.
domain
=
res
.
data
.
host_name
this
.
domain
=
res
.
data
.
host_name
...
@@ -445,8 +455,14 @@ export default {
...
@@ -445,8 +455,14 @@ export default {
createClusterService
()
{
createClusterService
()
{
const
self
=
this
const
self
=
this
this
.
type
=
this
.
label
===
'
base
'
?
this
.
reponame
.
split
(
'
/
'
)[
1
]
:
this
.
label
this
.
type
=
this
.
label
===
'
base
'
?
this
.
reponame
.
split
(
'
/
'
)[
1
]
:
this
.
label
let
serviceName
=
''
if
(
this
.
is_show
&&
this
.
mysqlName
!==
''
)
{
serviceName
=
this
.
reponame
.
split
(
'
/
'
)[
1
]
+
'
-
'
+
this
.
mysqlName
}
else
{
serviceName
=
this
.
reponame
.
split
(
'
/
'
)[
1
]
}
CreateCluService
({
CreateCluService
({
serviceName
:
this
.
reponame
.
split
(
'
/
'
)[
1
]
,
serviceName
:
serviceName
,
namespace
:
this
.
namespace
,
namespace
:
this
.
namespace
,
image
:
this
.
tagName
,
image
:
this
.
tagName
,
label
:
this
.
label
,
label
:
this
.
label
,
...
@@ -479,7 +495,8 @@ export default {
...
@@ -479,7 +495,8 @@ export default {
window
.
open
(
`http://
${
data
.
lanIp
}
:
${
port
}
/`
,
'
_blank
'
)
window
.
open
(
`http://
${
data
.
lanIp
}
:
${
port
}
/`
,
'
_blank
'
)
},
},
getServiceDetails
(
value
)
{
getServiceDetails
(
value
)
{
fetchServiceDetails
({
serviceName
:
value
.
serviceName
,
namespace
:
this
.
namespace
}).
then
(
res
=>
{
console
.
log
(
value
)
fetchServiceDetails
({
serviceName
:
value
.
serviceName
,
namespace
:
this
.
namespace
,
type
:
value
.
labels
.
type
}).
then
(
res
=>
{
this
.
centerDialogVisible
=
true
this
.
centerDialogVisible
=
true
this
.
value
=
res
.
data
this
.
value
=
res
.
data
})
})
...
...
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