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
39b07fea
Commit
39b07fea
authored
May 17, 2021
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增清除缓存页面
parent
4e6101fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
0 deletions
+93
-0
effect.js
src/api/effect.js
+17
-0
index.js
src/router/index.js
+5
-0
ClearCache.vue
src/views/effect/ClearCache.vue
+65
-0
menu.json
src/views/layout/leftAside/menu.json
+6
-0
No files found.
src/api/effect.js
View file @
39b07fea
import
request
from
'
@/utils/request
'
import
request
from
'
@/utils/request
'
import
holmesRequest
from
'
@/utils/holmesRequest
'
export
function
kdspDecrypt
(
queryInfo
)
{
export
function
kdspDecrypt
(
queryInfo
)
{
return
request
({
return
request
({
...
@@ -38,3 +39,19 @@ export function getLoginInfoList(queryInfo) {
...
@@ -38,3 +39,19 @@ export function getLoginInfoList(queryInfo) {
params
:
queryInfo
params
:
queryInfo
})
})
}
}
export
function
getClearCacheList
(
queryInfo
)
{
return
holmesRequest
({
url
:
'
/effect/cacheList
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
export
function
clearCache
(
queryInfo
)
{
return
holmesRequest
({
url
:
'
/effect/clearcache
'
,
method
:
'
get
'
,
params
:
queryInfo
})
}
src/router/index.js
View file @
39b07fea
...
@@ -16,6 +16,7 @@ import JenkinsBuildInfo from '../views/effect/JenkinsBuildInfo'
...
@@ -16,6 +16,7 @@ import JenkinsBuildInfo from '../views/effect/JenkinsBuildInfo'
import
LoginWhiteList
from
'
../views/effect/LoginWhiteList
'
import
LoginWhiteList
from
'
../views/effect/LoginWhiteList
'
import
JiraNotify
from
'
../views/jira/Notify
'
import
JiraNotify
from
'
../views/jira/Notify
'
import
RiskControl
from
'
../views/vcc/RiskControl
'
import
RiskControl
from
'
../views/vcc/RiskControl
'
import
ClearCache
from
'
../views/effect/ClearCache
'
Vue
.
use
(
Router
)
Vue
.
use
(
Router
)
...
@@ -86,6 +87,10 @@ const router = new Router({
...
@@ -86,6 +87,10 @@ const router = new Router({
{
{
'
path
'
:
'
/vcc/risk
'
,
'
path
'
:
'
/vcc/risk
'
,
component
:
RiskControl
component
:
RiskControl
},
{
'
path
'
:
'
/effect/clearcache
'
,
component
:
ClearCache
}
}
]
]
}
}
...
...
src/views/effect/ClearCache.vue
0 → 100644
View file @
39b07fea
<
template
>
<div>
<el-table
:data=
"cacheList"
border
style=
"width: 100%"
>
<el-table-column
type=
"index"
width=
"50"
></el-table-column>
<el-table-column
prop=
"name"
label=
"描述"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"url"
label=
"地址"
width=
"500"
>
</el-table-column>
<el-table-column
label=
"操作"
>
<slot
slot-scope=
"scope"
>
<el-button
type=
"primary"
@
click=
"clearCache(scope.row)"
>
清除缓存
</el-button>
</slot>
</el-table-column>
</el-table>
<!--
<div
class=
"result"
>
清除结果:
{{
clearResult
}}
</div>
-->
</div>
</
template
>
<
script
>
import
{
getClearCacheList
,
clearCache
}
from
'
@/api/effect
'
export
default
{
data
()
{
return
{
getCacheListParam
:
{
pageNum
:
1
,
pageSize
:
10
},
cacheList
:
[],
clearCacheParams
:
{
id
:
''
,
namespace
:
window
.
sessionStorage
.
getItem
(
'
env
'
)
},
clearResult
:
''
}
},
created
()
{
this
.
getCacheList
()
},
methods
:
{
getCacheList
()
{
getClearCacheList
(
this
.
getCacheListParam
).
then
((
resp
)
=>
{
this
.
cacheList
=
resp
.
data
.
data
})
},
clearCache
(
row
)
{
this
.
clearCacheParams
.
id
=
row
.
id
clearCache
(
this
.
clearCacheParams
).
then
((
resp
)
=>
{
this
.
clearResult
=
resp
.
data
.
data
if
(
resp
.
data
.
data
.
code
===
'
0000
'
)
{
this
.
$message
.
success
(
'
缓存清除成功!
'
)
}
else
{
this
.
$message
.
error
(
'
缓存清除失败!
'
)
}
})
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.result {
margin-top: 20px;
}
</
style
>
src/views/layout/leftAside/menu.json
View file @
39b07fea
...
@@ -91,6 +91,12 @@
...
@@ -91,6 +91,12 @@
"title"
:
"jira-钉钉通知"
,
"title"
:
"jira-钉钉通知"
,
"icon"
:
"el-icon-ice-tea"
,
"icon"
:
"el-icon-ice-tea"
,
"path"
:
"/effect/jira/notify"
"path"
:
"/effect/jira/notify"
},
{
"id"
:
5
,
"title"
:
"缓存清理"
,
"icon"
:
"el-icon-milk-tea"
,
"path"
:
"/effect/clearcache"
}
}
]
]
}
}
...
...
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