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
fa4d7d4e
Commit
fa4d7d4e
authored
Mar 26, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
创建ns
parent
57a72942
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
153 additions
and
17 deletions
+153
-17
dev.env.js
config/dev.env.js
+2
-1
docker.js
src/api/docker.js
+22
-0
manager.vue
src/views/dbconfig/manager.vue
+1
-3
createEnv.vue
src/views/docker/createEnv.vue
+127
-0
index.vue
src/views/index/index.vue
+0
-1
application.vue
src/views/pipeline/application.vue
+0
-3
index.vue
src/views/proconfig/index.vue
+0
-3
index.vue
src/views/statistics/index.vue
+0
-3
index.vue
src/views/testdata/index.vue
+1
-3
No files found.
config/dev.env.js
View file @
fa4d7d4e
module
.
exports
=
{
module
.
exports
=
{
NODE_ENV
:
'
"development"
'
,
NODE_ENV
:
'
"development"
'
,
ENV_CONFIG
:
'
"dev"
'
,
ENV_CONFIG
:
'
"dev"
'
,
QA_API
:
'
"http://172.30.220.22:3003"
'
,
// QA_API: '"http://172.30.220.22:3003"',
QA_API
:
'
"http://127.0.0.1:3003"
'
,
TESTDATA_API
:
'
"http://172.30.220.22:3333"
'
,
TESTDATA_API
:
'
"http://172.30.220.22:3333"
'
,
PIPELINE_API
:
'
"http://pipes.liangkebang.com"
'
PIPELINE_API
:
'
"http://pipes.liangkebang.com"
'
}
}
src/api/docker.js
View file @
fa4d7d4e
...
@@ -116,3 +116,25 @@ export function modifyIngressHost(data) {
...
@@ -116,3 +116,25 @@ export function modifyIngressHost(data) {
data
data
})
})
}
}
export
function
getNamespaceTemplate
()
{
return
request
({
url
:
'
/docker/get_namespace_template
'
,
method
:
'
get
'
})
}
export
function
getSystemByType
()
{
return
request
({
url
:
'
/docker/get_systems_by_type
'
,
method
:
'
get
'
})
}
export
function
initNamespace
(
data
)
{
return
request
({
url
:
'
/k8s/namespace/init
'
,
method
:
'
post
'
,
data
})
}
src/views/dbconfig/manager.vue
View file @
fa4d7d4e
...
@@ -114,10 +114,8 @@ export default {
...
@@ -114,10 +114,8 @@ export default {
getConfig
()
{
getConfig
()
{
getConfig
(
this
.
listQuery
).
then
(
res
=>
{
getConfig
(
this
.
listQuery
).
then
(
res
=>
{
this
.
configs
=
res
.
data
.
data
this
.
configs
=
res
.
data
.
data
})
setTimeout
(()
=>
{
this
.
listLoading
=
false
this
.
listLoading
=
false
}
,
0.5
*
1000
)
})
},
},
resetTemp
()
{
resetTemp
()
{
...
...
src/views/docker/createEnv.vue
View file @
fa4d7d4e
<
template
>
<div
class=
"app-container"
style=
""
>
<el-form
ref=
"dataForm"
:rules=
"rules"
label-position=
"left"
label-width=
"130px"
style=
"width: 95%; margin-left:20px;"
>
<el-form-item
label=
"Namespace名称"
>
<el-input
v-model=
"namespace"
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item
label=
"创建环境确认码"
>
<el-input
v-model=
"code"
placeholder=
"请输入"
/>
</el-form-item>
<el-form-item
label=
"选择模板"
>
<el-select
v-model=
"currentTemplate"
value-key=
"label"
style=
"width:100%"
@
change=
"refershTemplateSelect"
>
<el-option
v-for=
"item in templateArray"
:value=
"item"
:label=
"item.label"
:key=
"item.label"
/>
</el-select>
</el-form-item>
<el-form-item
v-for=
"(value,key) in system"
:label=
"key | serviceType"
:key=
"key"
>
<el-card
>
<el-button
v-for=
"item in value"
:key=
"item.label"
:type=
"item.select?'success':''"
style=
"margin:3px"
@
click=
"item.select=!item.select"
>
{{
item
.
label
}}
</el-button>
</el-card>
</el-form-item>
</el-form>
<!--
<el-button
@
click=
"dialogFormVisible = false"
>
{{
$t
(
'
table.cancel
'
)
}}
</el-button>
-->
<el-button
style=
"margin-right:40px;margin-bottom:40px;float:right"
type=
"primary"
@
click=
"createData()"
>
{{
$t
(
'
table.confirm
'
)
}}
</el-button>
</div>
</
template
>
<
script
>
import
{
getNamespaceTemplate
,
getSystemByType
,
initNamespace
}
from
'
@/api/docker
'
export
default
{
filters
:
{
serviceType
(
service
)
{
const
serviceObj
=
{
common
:
'
基础服务
'
,
backend
:
'
后端服务
'
,
frontend
:
'
前端服务
'
}
return
serviceObj
[
service
]
}
},
data
()
{
return
{
rules
:
{
dbname
:
[{
required
:
true
,
message
:
'
请输入
'
,
trigger
:
'
change
'
}]
},
namespace
:
''
,
code
:
undefined
,
templateArray
:
[],
currentTemplate
:
undefined
,
system
:
[]
}
},
created
()
{
this
.
getNamespaceTemplate
()
this
.
getSystem
()
},
methods
:
{
getNamespaceTemplate
()
{
getNamespaceTemplate
().
then
(
res
=>
{
this
.
templateArray
=
res
.
data
.
data
})
},
getSystem
()
{
getSystemByType
().
then
(
res
=>
{
this
.
system
=
res
.
data
.
data
})
},
refershTemplateSelect
(
template
)
{
const
keys
=
Object
.
keys
(
template
.
template
)
for
(
const
k
of
keys
)
{
for
(
const
o
of
this
.
system
[
k
])
{
if
(
template
.
template
[
k
][
o
.
label
])
{
o
.
select
=
true
}
else
{
o
.
select
=
false
}
}
}
},
fullshTemplate
(
template
)
{
const
keys
=
Object
.
keys
(
template
)
for
(
const
k
of
keys
)
{
for
(
const
o
of
this
.
systems
[
k
])
{
if
(
template
[
k
][
o
.
label
])
{
o
.
select
=
true
}
else
{
o
.
select
=
false
}
}
}
},
createData
()
{
const
data
=
{
code
:
this
.
code
,
namespace
:
this
.
namespace
,
systems
:
this
.
system
}
console
.
log
(
1
,
data
)
initNamespace
(
data
).
then
(
res
=>
{
if
(
res
.
data
.
code
===
'
0000
'
)
{
this
.
$message
({
message
:
res
.
data
.
msg
,
type
:
'
success
'
,
duration
:
1000
})
}
else
{
this
.
$message
({
message
:
res
.
data
.
msg
,
type
:
'
error
'
})
}
})
}
}
}
</
script
>
src/views/index/index.vue
View file @
fa4d7d4e
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
<Button
v-for=
"data in item.data"
:key=
"data.remark"
:class=
"`pan-btn $
{item.color}-btn`" style="padding:10px;margin:5px" @click="openNewWindow(data.url)">
{{
data
.
remark
}}
</Button>
<Button
v-for=
"data in item.data"
:key=
"data.remark"
:class=
"`pan-btn $
{item.color}-btn`" style="padding:10px;margin:5px" @click="openNewWindow(data.url)">
{{
data
.
remark
}}
</Button>
</el-card>
</el-card>
</el-row>
</el-row>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/pipeline/application.vue
View file @
fa4d7d4e
...
@@ -177,9 +177,6 @@ export default {
...
@@ -177,9 +177,6 @@ export default {
this
.
applications
=
res
.
data
.
data
this
.
applications
=
res
.
data
.
data
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
setTimeout
(()
=>
{
this
.
listLoading
=
false
},
0.5
*
1000
)
},
},
getRefs
(
repo
)
{
getRefs
(
repo
)
{
...
...
src/views/proconfig/index.vue
View file @
fa4d7d4e
...
@@ -219,9 +219,6 @@ export default {
...
@@ -219,9 +219,6 @@ export default {
this
.
proconfigs
=
res
.
data
.
data
this
.
proconfigs
=
res
.
data
.
data
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
setTimeout
(()
=>
{
this
.
listLoading
=
false
},
0.5
*
1000
)
},
},
handleFilter
()
{
handleFilter
()
{
this
.
getProjects
()
this
.
getProjects
()
...
...
src/views/statistics/index.vue
View file @
fa4d7d4e
...
@@ -120,9 +120,6 @@ export default {
...
@@ -120,9 +120,6 @@ export default {
this
.
logs
=
res
.
data
.
data
this
.
logs
=
res
.
data
.
data
this
.
listLoading
=
false
this
.
listLoading
=
false
})
})
setTimeout
(()
=>
{
this
.
listLoading
=
false
},
0.5
*
1000
)
},
},
getLogCount
()
{
getLogCount
()
{
...
...
src/views/testdata/index.vue
View file @
fa4d7d4e
...
@@ -116,9 +116,7 @@ export default {
...
@@ -116,9 +116,7 @@ export default {
getAll
(
query
).
then
(
res
=>
{
getAll
(
query
).
then
(
res
=>
{
this
.
peopleInfo
=
res
.
data
.
data
this
.
peopleInfo
=
res
.
data
.
data
this
.
total
=
res
.
data
.
count
this
.
total
=
res
.
data
.
count
setTimeout
(()
=>
{
this
.
listLoading
=
false
this
.
listLoading
=
false
},
0.3
*
1000
)
})
})
},
},
generate
()
{
generate
()
{
...
...
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