Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform-ui
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
qa-platform-ui
Commits
edfb6d23
Commit
edfb6d23
authored
Sep 16, 2021
by
晓彤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据状态以及服务配置KuKubernetes设置默认值功能
parent
ebf2cb94
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
24 deletions
+51
-24
ProConfig.vue
src/views/docker/ProConfig.vue
+48
-22
DbSync.vue
src/views/effect/DbSync.vue
+1
-1
GenData.vue
src/views/vcc/GenData.vue
+2
-1
No files found.
src/views/docker/ProConfig.vue
View file @
edfb6d23
<
template
>
<!-- 顶部搜索框 -->
<!-- 顶部搜索框 -->
<div
class=
"app-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.projectName"
placeholder=
"服务名称"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"getProjectList"
/>
<el-input
v-model=
"listQuery.projectName"
placeholder=
"服务名称"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"getProjectList"
/>
<el-select
v-model=
"listQuery.projectType"
placeholder=
"服务类型"
clearable
style=
"width: 200px"
class=
"filter-item"
>
<el-option
v-for=
"item in typeOptions"
:key=
"item.projectType"
:label=
"item.projectType"
:value=
"item.projectType"
/>
<el-option
v-for=
"item in typeOptions"
:key=
"item.projectType"
:label=
"item.projectType"
:value=
"item.projectType"
/>
</el-select>
<el-select
v-model=
"listQuery.isActive"
placeholder=
"是否服役"
clearable
style=
"width: 200px"
class=
"filter-item"
@
clear=
"clearIsActive()"
>
<el-select
v-model=
"listQuery.isActive"
placeholder=
"是否服役"
clearable
style=
"width: 200px"
class=
"filter-item"
@
clear=
"clearIsActive()"
>
<el-option
v-for=
"item in avtiveOptions"
:key=
"item.key"
:label=
"item.label"
:value=
"item.key"
/>
</el-select>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"getProjectList"
>
搜索
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-circle-plus"
v-permission=
"('docker:proconfig:add')"
@
click=
"handleCreate"
>
新增
</el-button>
<el-button
class=
"filter-item"
style=
"margin-left: 10px;"
type=
"primary"
icon=
"el-icon-circle-plus"
v-permission=
"('docker:proconfig:add')"
@
click=
"handleCreate"
>
新增
</el-button>
</div>
<!-- 表格 -->
<el-table
:data=
"proconfigs"
fit
max-height=
"700"
size=
"medium"
style=
"width: 100%;"
>
<el-table-column
label=
"ID"
type=
"index"
align=
"center"
width=
"55"
>
<el-table-column
label=
"ID"
type=
"index"
align=
"center"
width=
"55"
>
<template
slot-scope=
"scope"
>
<span>
{{
(
listQuery
.
pageNum
-
1
)
*
(
listQuery
.
pageSize
)
+
scope
.
$index
+
1
}}
</span>
</
template
>
...
...
@@ -51,7 +55,8 @@
<el-table-column
label=
"API地址"
align=
"center"
width=
"80px"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
:content=
"scope.row.api"
class=
"item"
effect=
"dark"
placement=
"top"
>
<el-button
v-show=
"scope.row.api"
type=
"primary"
icon=
"el-icon-time"
circle
@
click=
"openUrl(scope.row.api)"
/>
<el-button
v-show=
"scope.row.api"
type=
"primary"
icon=
"el-icon-time"
circle
@
click=
"openUrl(scope.row.api)"
/>
</el-tooltip>
</
template
>
</el-table-column>
...
...
@@ -59,7 +64,8 @@
<el-table-column
label=
"DDL地址"
width=
"80px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
:content=
"scope.row.ddl"
class=
"item"
effect=
"dark"
placement=
"top"
>
<el-button
v-show=
"scope.row.ddl"
type=
"success"
icon=
"el-icon-time"
circle
@
click=
"openUrl(scope.row.ddl)"
/>
<el-button
v-show=
"scope.row.ddl"
type=
"success"
icon=
"el-icon-time"
circle
@
click=
"openUrl(scope.row.ddl)"
/>
</el-tooltip>
</
template
>
</el-table-column>
...
...
@@ -67,7 +73,8 @@
<el-table-column
label=
"Wiki"
width=
"80px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
:content=
"scope.row.wiki"
class=
"item"
effect=
"dark"
placement=
"top"
>
<el-button
v-show=
"scope.row.wiki"
type=
"warning"
icon=
"el-icon-time"
circle
@
click=
"openUrl(scope.row.wiki)"
/>
<el-button
v-show=
"scope.row.wiki"
type=
"warning"
icon=
"el-icon-time"
circle
@
click=
"openUrl(scope.row.wiki)"
/>
</el-tooltip>
</
template
>
</el-table-column>
...
...
@@ -82,18 +89,23 @@
<el-table-column
label=
"操作"
align=
"center"
width=
"80"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
v-permission=
"('docker:proconfig:edit')"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
<el-button
type=
"primary"
size=
"mini"
v-permission=
"('docker:proconfig:edit')"
@
click=
"handleUpdate(scope.row)"
>
编辑
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- 分页 -->
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page.sync=
"listQuery.pageNum"
:page-sizes=
"[10, 20, 50, 100, 200, 300]"
:page-size=
"listQuery.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></el-pagination>
<el-pagination
background
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page.sync=
"listQuery.pageNum"
:page-sizes=
"[10, 20, 50, 100, 200, 300]"
:page-size=
"listQuery.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></el-pagination>
<el-dialog
:title=
"dialogName"
:visible.sync=
"dialogFormVisible"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"temp"
label-position=
"left"
label-width=
"115px"
style=
"width: 90%; margin-left:40px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"temp"
label-position=
"left"
label-width=
"115px"
style=
"width: 90%; margin-left:40px;"
>
<el-form-item
label=
"类型"
prop=
"projectType"
>
<el-select
v-model=
"temp.projectType"
class=
"filter-item"
placeholder=
"Please select"
>
<el-option
v-for=
"item in typeOptions"
:key=
"item.projectType"
:label=
"item.projectType"
:value=
"item.projectType"
/>
<el-option
v-for=
"item in typeOptions"
:key=
"item.projectType"
:label=
"item.projectType"
:value=
"item.projectType"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"Git地址"
prop=
"gitPath"
style=
"width: 100%;"
>
...
...
@@ -104,7 +116,8 @@
<el-input
v-model=
"temp.owner"
/>
</el-form-item>
<el-form-item
label=
"服务描述"
style=
"width: 100%;"
>
<el-input
:autosize=
"{ minRows: 1, maxRows: 4}"
v-model=
"temp.desc"
type=
"textarea"
placeholder=
"Please input"
/>
<el-input
:autosize=
"{ minRows: 1, maxRows: 4}"
v-model=
"temp.desc"
type=
"textarea"
placeholder=
"Please input"
/>
</el-form-item>
<el-form-item
label=
"API"
style=
"width: 100%;"
>
<el-input
v-model=
"temp.api"
/>
...
...
@@ -145,20 +158,23 @@
<el-input
v-model=
"temp.buildCommand"
/>
</el-form-item>
<el-form-item
v-if=
"temp.deployToDocker === 1"
label=
"Sonar扫描"
prop=
"sonar"
>
<
!-- <
el-form-item v-if="temp.deployToDocker === 1" label="Sonar扫描" prop="sonar">
<el-select v-model="temp.sonar" class="filter-item" placeholder="Please select">
<el-option v-for="item in deployOptions" :key="item.key" :label="item.label" :value="item.key" />
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item
v-show=
"temp.projectType==='java' && temp.deployToDocker"
label=
"Database"
style=
"width: 100%;"
>
<el-input
:autosize=
"{ minRows: 1, maxRows: 2}"
v-model=
"temp.database"
type=
"textarea"
placeholder=
"依赖的数据库,库名与库名之间使用空格分隔"
/>
<el-input
:autosize=
"{ minRows: 1, maxRows: 2}"
v-model=
"temp.database"
type=
"textarea"
placeholder=
"依赖的数据库,库名与库名之间使用空格分隔"
/>
</el-form-item>
<el-alert
v-show=
"temp.projectType==='java' && temp.deployToDocker"
style=
"margin-bottom:20px"
title=
"编辑启动命令需要管理员权限"
type=
"warning"
/>
<el-alert
v-show=
"temp.projectType==='java' && temp.deployToDocker"
style=
"margin-bottom:20px"
title=
"编辑启动命令需要管理员权限"
type=
"warning"
/>
<el-form-item
v-show=
"temp.projectType==='java' && temp.deployToDocker"
label=
"启动命令"
style=
"width: 100%;"
>
<el-input
:autosize=
"{ minRows: 2, maxRows: 10}"
v-model=
"temp.startCommand"
:disabled=
"disabled"
type=
"textarea"
placeholder=
"Please input"
/>
<el-input
:autosize=
"{ minRows: 2, maxRows: 10}"
v-model=
"temp.startCommand"
:disabled=
"disabled"
type=
"textarea"
placeholder=
"Please input"
/>
</el-form-item>
<el-card
v-if=
"temp.deployToDocker"
class=
"box-card"
>
...
...
@@ -201,7 +217,11 @@
</template>
<
script
>
import
{
getDockerProjectList
,
getDockerProjectType
,
addDockerProject
}
from
'
@/api/k8s
'
import
{
getDockerProjectList
,
getDockerProjectType
,
addDockerProject
}
from
'
@/api/k8s
'
export
default
{
data
()
{
return
{
...
...
@@ -274,7 +294,12 @@ export default {
// 打开新建项目对话框
handleCreate
()
{
this
.
dialogName
=
'
新建项目
'
this
.
temp
=
{}
this
.
temp
=
{
cpuRequest
:
200
,
cpuLimit
:
1000
,
memRequest
:
100
,
memLimit
:
1000
}
this
.
dialogFormVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
dataForm
'
].
clearValidate
()
...
...
@@ -293,9 +318,10 @@ export default {
createData
()
{
var
projectName
=
this
.
temp
.
gitPath
.
split
(
'
/
'
)[
1
].
split
(
'
.
'
)[
0
]
this
.
temp
.
projectName
=
projectName
this
.
temp
.
sonar
=
1
this
.
$refs
[
'
dataForm
'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
addDockerProject
(
this
.
temp
).
then
(
resp
=>
{
addDockerProject
(
this
.
temp
).
then
(
(
resp
)
=>
{
if
(
resp
.
data
.
data
===
true
)
{
this
.
dialogFormVisible
=
false
this
.
getProjectList
()
...
...
src/views/effect/DbSync.vue
View file @
edfb6d23
...
...
@@ -57,7 +57,7 @@ export default {
dbName
:
''
,
host
:
''
,
port
:
''
,
replaceDomain
:
tru
e
,
replaceDomain
:
fals
e
,
notDeleteBusinessData
:
true
,
useCache
:
true
},
...
...
src/views/vcc/GenData.vue
View file @
edfb6d23
...
...
@@ -115,12 +115,13 @@ export default {
const
tLoading
=
this
.
$loading
.
service
(
this
.
loadingOptions
)
genVccData
(
formData
)
.
then
((
resp
)
=>
{
console
.
log
(
'
接口返回信息
'
,
resp
)
if
(
resp
.
data
.
success
===
true
)
{
this
.
tableData
.
push
(
resp
.
data
.
data
)
tLoading
.
close
()
}
else
{
this
.
$message
.
error
(
resp
.
data
.
msg
)
tLoading
.
close
()
return
this
.
$message
.
error
(
resp
.
data
.
msg
)
}
})
.
catch
((
error
)
=>
{
...
...
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