Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sean King
admin-fe
Commits
a2649dbb
Commit
a2649dbb
authored
4 years ago
by
Angelina Filippova
Browse files
Options
Downloads
Patches
Plain Diff
Add ability to evict and ban multiple URLs
parent
0b36c5bb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lang/en.js
+4
-1
4 additions, 1 deletion
src/lang/en.js
src/views/mediaProxyCache/index.vue
+21
-6
21 additions, 6 deletions
src/views/mediaProxyCache/index.vue
with
25 additions
and
7 deletions
src/lang/en.js
+
4
−
1
View file @
a2649dbb
...
...
@@ -99,7 +99,10 @@ export default {
evict
:
'
Evict
'
,
evictedMessage
:
'
This URL was evicted
'
,
actions
:
'
Actions
'
,
remove
:
'
Remove from Cachex
'
remove
:
'
Remove from Cachex
'
,
evictObjectsHeader
:
'
Evict object from the MediaProxy cache
'
,
listBannedUrlsHeader
:
'
List of all banned MediaProxy URLs
'
,
multipleInput
:
'
You can enter a single URL or several comma separated links
'
},
documentation
:
{
documentation
:
'
Documentation
'
,
...
...
This diff is collapsed.
Click to expand it.
src/views/mediaProxyCache/index.vue
+
21
−
6
View file @
a2649dbb
...
...
@@ -4,17 +4,20 @@
<h1>
{{
$t
(
'
mediaProxyCache.mediaProxyCache
'
)
}}
</h1>
<reboot-button/>
</div>
<p
class=
"media-proxy-cache-header"
>
Evict object from the M
ediaProxy
c
ache
</p>
<p
class=
"media-proxy-cache-header"
>
{{
$t
(
'
m
ediaProxy
C
ache
.evictObjectsHeader
'
)
}}
</p>
<div
class=
"url-input-container"
>
<el-input
:placeholder=
"$t('mediaProxyCache.url')"
v-model=
"url"
v-model=
"urls"
type=
"textarea"
autosize
clearable
class=
"url-input"
/>
<el-checkbox
v-model=
"ban"
>
{{
$t
(
'
mediaProxyCache.ban
'
)
}}
</el-checkbox>
<el-button
class=
"evict-button"
@
click=
"evictURL"
>
{{
$t
(
'
mediaProxyCache.evict
'
)
}}
</el-button>
</div>
<p
class=
"media-proxy-cache-header"
>
List of all banned MediaProxy URLs
</p>
<span
class=
"expl url-input-expl"
>
{{
$t
(
'
mediaProxyCache.multipleInput
'
)
}}
</span>
<p
class=
"media-proxy-cache-header"
>
{{
$t
(
'
mediaProxyCache.listBannedUrlsHeader
'
)
}}
</p>
<el-table
v-loading=
"loading"
:data=
"bannedUrls"
...
...
@@ -48,7 +51,7 @@ export default {
components
:
{
RebootButton
},
data
()
{
return
{
url
:
''
,
url
s
:
''
,
ban
:
false
,
selectedUrls
:
[]
}
...
...
@@ -71,7 +74,7 @@ export default {
},
methods
:
{
evictURL
()
{
const
urls
=
t
ypeof
this
.
url
===
'
string
'
?
[
this
.
url
]
:
this
.
url
const
urls
=
t
his
.
urls
.
split
(
'
,
'
).
map
(
url
=>
url
.
trim
()).
filter
(
el
=>
el
.
length
>
0
)
this
.
$store
.
dispatch
(
'
PurgeUrls
'
,
{
urls
,
ban
:
this
.
ban
})
this
.
url
=
''
},
...
...
@@ -90,6 +93,15 @@ export default {
h1
{
margin
:
0
;
}
.expl
{
color
:
#666666
;
font-size
:
13px
;
line-height
:
22px
;
margin
:
5px
0
0
0
;
overflow-wrap
:
break-word
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.banned-urls-table
{
margin-top
:
15px
;
margin-bottom
:
15px
;
...
...
@@ -114,7 +126,10 @@ h1 {
.url-input-container
{
display
:
flex
;
align-items
:
baseline
;
margin
:
15px
15px
;
margin
:
15px
15px
5px
15px
;
}
.url-input-expl
{
margin-left
:
15px
;
}
@media
only
screen
and
(
max-width
:
480px
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment