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
9660832b
Commit
9660832b
authored
Oct 09, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复基础服务及业务服务镜像和分支显示问题,新增filters
parent
9e1cc19c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
index.js
src/filters/index.js
+15
-0
main.js
src/main.js
+5
-0
EnvDetail.vue
src/views/docker/EnvDetail.vue
+1
-5
No files found.
src/filters/index.js
0 → 100644
View file @
9660832b
// 格式化基础镜像名
export
function
formatImages
(
images
)
{
// return images.map(i => i.split(':')[1]).join(',')
if
(
images
!==
null
)
{
return
images
.
replace
(
'
ccr.ccs.tencentyun.com/qa-base/
'
,
''
)
}
}
// 格式化java、ui、node等服务的分支名
export
function
filterTag
(
image
)
{
if
(
image
!=
null
)
{
const
arr
=
image
.
split
(
'
:
'
)
return
(
arr
&&
arr
[
1
])
||
''
}
}
src/main.js
View file @
9660832b
...
...
@@ -13,6 +13,7 @@ import store from './store/store'
import
JsonViewer
from
'
vue-json-viewer
'
import
bus
from
'
../src/utils/bus
'
import
directives
from
'
@/directives
'
import
*
as
filters
from
'
./filters
'
// global filters
// import Sortable from 'sortablejs'
import
{
...
...
@@ -73,6 +74,10 @@ Vue.prototype.$bus = bus
// axios.defaults.baseURL = 'https://qa-platform-pre.liangkebang.net'
// axios.defaults.baseURL = 'http://localhost:8082'
// register global utility filters.
Object
.
keys
(
filters
).
forEach
(
key
=>
{
Vue
.
filter
(
key
,
filters
[
key
])
})
Vue
.
use
(
Container
)
Vue
.
use
(
Header
)
Vue
.
use
(
Aside
)
...
...
src/views/docker/EnvDetail.vue
View file @
9660832b
...
...
@@ -146,7 +146,7 @@
</el-table-column>
<el-table-column
prop=
"image"
label=
"镜像"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
image
|
f
ormatImages
}}
{{
scope
.
row
.
image
|
f
ilterTag
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"createdAt"
width=
"200"
label=
"创建时间"
/>
...
...
@@ -415,10 +415,6 @@ export default {
})
},
methods
:
{
// 格式化镜像名
formatImages
(
images
)
{
return
images
.
replace
(
'
ccr.ccs.tencentyun.com/qa-base/
'
,
''
)
},
indexMethod
(
index
)
{
return
index
+
1
},
...
...
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