Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CacheManagement
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
tsai
CacheManagement
Commits
3dc65fb0
Commit
3dc65fb0
authored
Mar 27, 2020
by
gdlcf88
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add clear all button in keys list page.
parent
772e86dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
KeyList.cshtml
...Pages/CacheManagement/CacheItems/CacheItem/KeyList.cshtml
+9
-0
keyList.js
...Web/Pages/CacheManagement/CacheItems/CacheItem/keyList.js
+12
-0
No files found.
src/EasyAbp.CacheManagement.Web/Pages/CacheManagement/CacheItems/CacheItem/KeyList.cshtml
View file @
3dc65fb0
@page
@using EasyAbp.CacheManagement.Authorization
@using Microsoft.AspNetCore.Authorization
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@inherits EasyAbp.CacheManagement.Web.Pages.CacheManagementPage
@model EasyAbp.CacheManagement.Web.Pages.CacheManagement.CacheItems.CacheItem.KeyListModel
@inject IAuthorizationService Authorization
@inject IPageLayout PageLayout
@{
PageLayout.Content.Title = L["CacheItemData"].Value;
...
...
@@ -29,6 +32,12 @@
<abp-card-title>@L["CacheItemData"] - @Model.CacheItem.DisplayName</abp-card-title>
</abp-column>
<abp-column size-md="_6" class="text-right">
@if (await Authorization.IsGrantedAsync(CacheManagementPermissions.CacheItems.ClearCache))
{
<abp-button id="ClearAllCacheButton"
text="@L["ClearAllCache"].Value"
button-type="Danger"/>
}
</abp-column>
</abp-row>
</abp-card-header>
...
...
src/EasyAbp.CacheManagement.Web/Pages/CacheManagement/CacheItems/CacheItem/keyList.js
View file @
3dc65fb0
...
...
@@ -48,4 +48,16 @@ $(function () {
{
data
:
"
cacheKey
"
},
]
}));
$
(
'
#ClearAllCacheButton
'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
abp
.
message
.
confirm
(
l
(
'
ClearAllCacheConfirmationMessage
'
),
l
(
'
ClearAllCache
'
))
.
done
(
function
(
accepted
)
{
if
(
accepted
)
{
service
.
clear
({
cacheItemId
:
cacheItemId
}).
done
(
function
()
{
abp
.
notify
.
info
(
l
(
'
SuccessCleared
'
));
})
}
});
});
});
\ No newline at end of file
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