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
8f10a3f7
Commit
8f10a3f7
authored
Jun 24, 2019
by
智勇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jiakewei' into 'master'
admin下支持创建多个mysql服务 See merge request !28
parents
09e1bfb4
a844e298
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 @
8f10a3f7
...
...
@@ -218,7 +218,14 @@
</el-select>
</el-col>
</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>
<el-row
:gutter=
"20"
>
<el-col
:span=
"14"
>
...
...
@@ -328,11 +335,11 @@ import {
ingressHost
}
from
'
@/api/docker
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
permission
from
'
@/directive/permission/index.js
'
// 权限判断指令
import
{
getHostName
}
from
'
@/api/proconfig
'
export
default
{
components
:
{
JsonEditor
},
directives
:
{
permission
},
data
()
{
return
{
debugOptions
:
[
...
...
@@ -347,6 +354,8 @@ export default {
tagOptions
:
[],
FormatTabledata
:
{},
reponame
:
''
,
is_show
:
false
,
mysqlName
:
''
,
typeList
:
[],
tagName
:
''
,
server
:
''
,
...
...
@@ -431,6 +440,7 @@ export default {
this
.
dialogVisible
=
true
},
getTag
()
{
this
.
is_show
=
this
.
reponame
.
split
(
'
/
'
)[
1
]
===
'
mysql
'
getHostName
({
project_name
:
this
.
reponame
.
split
(
'
/
'
)[
1
]
}).
then
(
res
=>
{
if
(
res
.
data
)
{
this
.
domain
=
res
.
data
.
host_name
...
...
@@ -445,8 +455,14 @@ export default {
createClusterService
()
{
const
self
=
this
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
({
serviceName
:
this
.
reponame
.
split
(
'
/
'
)[
1
]
,
serviceName
:
serviceName
,
namespace
:
this
.
namespace
,
image
:
this
.
tagName
,
label
:
this
.
label
,
...
...
@@ -479,7 +495,8 @@ export default {
window
.
open
(
`http://
${
data
.
lanIp
}
:
${
port
}
/`
,
'
_blank
'
)
},
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
.
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