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
94f9ad5d
Commit
94f9ad5d
authored
Apr 02, 2019
by
智勇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kewei.jia' into 'master'
添加域名 删除基础服务点击功能 去掉 console See merge request !14
parents
6095a29e
dd7daae4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
14 deletions
+26
-14
proconfig.js
src/api/proconfig.js
+7
-0
envDetail.vue
src/views/docker/envDetail.vue
+19
-14
No files found.
src/api/proconfig.js
View file @
94f9ad5d
...
@@ -23,3 +23,10 @@ export function deleteProject(query) {
...
@@ -23,3 +23,10 @@ export function deleteProject(query) {
params
:
query
params
:
query
})
})
}
}
export
function
getHostName
(
query
)
{
return
request
({
url
:
'
/proconfig/getHostName
'
,
method
:
'
get
'
,
params
:
query
})
}
src/views/docker/envDetail.vue
View file @
94f9ad5d
...
@@ -31,11 +31,7 @@
...
@@ -31,11 +31,7 @@
<el-table-column
<el-table-column
prop=
"serviceName"
prop=
"serviceName"
label=
"服务名"
label=
"服务名"
>
/>
<template
slot-scope=
"scope"
>
<span
class=
"link-type"
@
click=
"handleDetail(scope.row)"
>
{{
scope
.
row
.
serviceName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
<el-table-column
prop=
"createdAt"
prop=
"createdAt"
label=
"日期"
label=
"日期"
...
@@ -65,7 +61,7 @@
...
@@ -65,7 +61,7 @@
<svg-icon
icon-class=
"service"
/>
<svg-icon
icon-class=
"service"
/>
{{ item._id }}服务
{{ item._id }}服务
<div
style=
"float: right"
>
<div
style=
"float: right"
>
<el-button
type=
"warning"
size=
"mini"
round
@
click=
"getRepository(item._id
,item
)"
>
新增服务
</el-button>
<el-button
type=
"warning"
size=
"mini"
round
@
click=
"getRepository(item._id)"
>
新增服务
</el-button>
<el-button
type=
"warning"
size=
"mini"
round
@
click=
"refresh"
>
刷新状态
</el-button>
<el-button
type=
"warning"
size=
"mini"
round
@
click=
"refresh"
>
刷新状态
</el-button>
</div>
</div>
</div>
</div>
...
@@ -262,6 +258,8 @@ import {
...
@@ -262,6 +258,8 @@ import {
}
from
'
@/api/docker
'
}
from
'
@/api/docker
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
{
getHostName
}
from
'
@/api/proconfig
'
export
default
{
export
default
{
components
:
{
JsonEditor
},
components
:
{
JsonEditor
},
data
()
{
data
()
{
...
@@ -277,6 +275,8 @@ export default {
...
@@ -277,6 +275,8 @@ export default {
typeList
:
[],
typeList
:
[],
tagName
:
''
,
tagName
:
''
,
server
:
''
,
server
:
''
,
lable
:
''
,
domain
:
''
,
type
:
''
,
type
:
''
,
value
:
null
,
value
:
null
,
images
:
null
,
images
:
null
,
...
@@ -321,20 +321,24 @@ export default {
...
@@ -321,20 +321,24 @@ export default {
type
:
'
success
'
type
:
'
success
'
})
})
},
},
getRepository
(
type
,
item
)
{
getRepository
(
label
)
{
this
.
type
=
type
this
.
label
=
label
this
.
reponame
=
''
this
.
reponame
=
''
this
.
tagName
=
''
this
.
tagName
=
''
this
.
options
=
[]
this
.
options
=
[]
this
.
tagOptions
=
[]
this
.
tagOptions
=
[]
fetchUserrepository
({
'
namespace
'
:
'
qa-
'
+
type
}).
then
(
res
=>
{
fetchUserrepository
({
'
namespace
'
:
'
qa-
'
+
label
}).
then
(
res
=>
{
this
.
options
=
res
.
data
.
data
.
repoInfo
this
.
options
=
res
.
data
.
data
.
repoInfo
this
.
server
=
res
.
data
.
data
.
server
this
.
server
=
res
.
data
.
data
.
server
})
})
// fetchHost({ system_name: 'xjd-ui', namespace: this.namespace }).then(res => { console.log(res) })
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
},
},
getTag
()
{
getTag
()
{
getHostName
({
project_name
:
this
.
reponame
.
split
(
'
/
'
)[
1
]
}).
then
(
res
=>
{
if
(
res
.
data
.
data
)
{
this
.
domain
=
res
.
data
.
data
.
host_name
}
})
fetchTaglist
({
reponame
:
this
.
reponame
}).
then
(
res
=>
{
fetchTaglist
({
reponame
:
this
.
reponame
}).
then
(
res
=>
{
if
(
res
.
data
.
data
.
tagCount
)
{
if
(
res
.
data
.
data
.
tagCount
)
{
this
.
tagOptions
=
res
.
data
.
data
.
tagInfo
this
.
tagOptions
=
res
.
data
.
data
.
tagInfo
...
@@ -343,12 +347,15 @@ export default {
...
@@ -343,12 +347,15 @@ export default {
},
},
CreateClusterService
()
{
CreateClusterService
()
{
const
self
=
this
const
self
=
this
const
image
=
`
${
this
.
server
}
/
${
this
.
reponame
}
:
${
this
.
tagName
}
`
const
image
=
`
${
this
.
reponame
}
:
${
this
.
tagName
}
`
this
.
type
=
this
.
label
===
'
base
'
?
this
.
reponame
.
split
(
'
/
'
)[
1
]
:
this
.
label
CreateCluService
({
CreateCluService
({
serviceName
:
this
.
reponame
.
split
(
'
/
'
)[
1
],
serviceName
:
this
.
reponame
.
split
(
'
/
'
)[
1
],
namespace
:
this
.
namespace
,
namespace
:
this
.
namespace
,
image
:
image
,
image
:
image
,
type
:
this
.
type
label
:
this
.
label
,
type
:
this
.
type
,
domain
:
this
.
domain
.
split
(
'
.
'
)[
0
]
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
data
.
code
===
'
0000
'
)
{
if
(
res
.
data
.
code
===
'
0000
'
)
{
this
.
$message
({
this
.
$message
({
...
@@ -370,7 +377,6 @@ export default {
...
@@ -370,7 +377,6 @@ export default {
},
},
handleDetail
(
data
)
{
handleDetail
(
data
)
{
ingressHost
({
namespace
:
data
.
namespace
,
serviceName
:
data
.
serviceName
}).
then
(
res
=>
{
ingressHost
({
namespace
:
data
.
namespace
,
serviceName
:
data
.
serviceName
}).
then
(
res
=>
{
// console.log(res.data.data.body.spec.rules[0].host)
const
url
=
res
.
data
.
data
.
body
.
spec
.
rules
[
0
].
host
const
url
=
res
.
data
.
data
.
body
.
spec
.
rules
[
0
].
host
window
.
open
(
`http://
${
url
}
/`
,
'
_blank
'
)
window
.
open
(
`http://
${
url
}
/`
,
'
_blank
'
)
})
})
...
@@ -476,7 +482,6 @@ export default {
...
@@ -476,7 +482,6 @@ export default {
this
.
form
.
host
=
''
this
.
form
.
host
=
''
this
.
ingressName
=
data
.
serviceName
this
.
ingressName
=
data
.
serviceName
ingressHost
({
namespace
:
data
.
namespace
,
serviceName
:
data
.
serviceName
}).
then
(
res
=>
{
ingressHost
({
namespace
:
data
.
namespace
,
serviceName
:
data
.
serviceName
}).
then
(
res
=>
{
// console.log(res.data.data.body.spec.rules[0].host)
this
.
form
.
host
=
res
.
data
.
data
.
body
.
spec
.
rules
[
0
].
host
this
.
form
.
host
=
res
.
data
.
data
.
body
.
spec
.
rules
[
0
].
host
})
})
},
},
...
...
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