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
dd7daae4
Commit
dd7daae4
authored
Apr 02, 2019
by
kewei.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加域名 删除基础服务点击功能 去掉 console
parent
6095a29e
Changes
2
Hide 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 @
dd7daae4
...
...
@@ -23,3 +23,10 @@ export function deleteProject(query) {
params
:
query
})
}
export
function
getHostName
(
query
)
{
return
request
({
url
:
'
/proconfig/getHostName
'
,
method
:
'
get
'
,
params
:
query
})
}
src/views/docker/envDetail.vue
View file @
dd7daae4
...
...
@@ -31,11 +31,7 @@
<el-table-column
prop=
"serviceName"
label=
"服务名"
>
<template
slot-scope=
"scope"
>
<span
class=
"link-type"
@
click=
"handleDetail(scope.row)"
>
{{
scope
.
row
.
serviceName
}}
</span>
</
template
>
</el-table-column>
/>
<el-table-column
prop=
"createdAt"
label=
"日期"
...
...
@@ -65,7 +61,7 @@
<svg-icon
icon-class=
"service"
/>
{{ item._id }}服务
<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>
</div>
</div>
...
...
@@ -262,6 +258,8 @@ import {
}
from
'
@/api/docker
'
import
JsonEditor
from
'
@/components/JsonEditor
'
import
{
getHostName
}
from
'
@/api/proconfig
'
export
default
{
components
:
{
JsonEditor
},
data
()
{
...
...
@@ -277,6 +275,8 @@ export default {
typeList
:
[],
tagName
:
''
,
server
:
''
,
lable
:
''
,
domain
:
''
,
type
:
''
,
value
:
null
,
images
:
null
,
...
...
@@ -321,20 +321,24 @@ export default {
type
:
'
success
'
})
},
getRepository
(
type
,
item
)
{
this
.
type
=
type
getRepository
(
label
)
{
this
.
label
=
label
this
.
reponame
=
''
this
.
tagName
=
''
this
.
options
=
[]
this
.
tagOptions
=
[]
fetchUserrepository
({
'
namespace
'
:
'
qa-
'
+
type
}).
then
(
res
=>
{
fetchUserrepository
({
'
namespace
'
:
'
qa-
'
+
label
}).
then
(
res
=>
{
this
.
options
=
res
.
data
.
data
.
repoInfo
this
.
server
=
res
.
data
.
data
.
server
})
// fetchHost({ system_name: 'xjd-ui', namespace: this.namespace }).then(res => { console.log(res) })
this
.
dialogVisible
=
true
},
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
=>
{
if
(
res
.
data
.
data
.
tagCount
)
{
this
.
tagOptions
=
res
.
data
.
data
.
tagInfo
...
...
@@ -343,12 +347,15 @@ export default {
},
CreateClusterService
()
{
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
({
serviceName
:
this
.
reponame
.
split
(
'
/
'
)[
1
],
namespace
:
this
.
namespace
,
image
:
image
,
type
:
this
.
type
label
:
this
.
label
,
type
:
this
.
type
,
domain
:
this
.
domain
.
split
(
'
.
'
)[
0
]
}).
then
(
res
=>
{
if
(
res
.
data
.
code
===
'
0000
'
)
{
this
.
$message
({
...
...
@@ -370,7 +377,6 @@ export default {
},
handleDetail
(
data
)
{
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
window
.
open
(
`http://
${
url
}
/`
,
'
_blank
'
)
})
...
...
@@ -476,7 +482,6 @@ export default {
this
.
form
.
host
=
''
this
.
ingressName
=
data
.
serviceName
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
})
},
...
...
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