Added cache reload button to admin panel so restarts are needed less often.
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
>Entity Health</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<button
|
||||
class="button"
|
||||
@click="initCaches"
|
||||
><Icon icon="database-refresh" />Reload caches</button>
|
||||
</nav>
|
||||
|
||||
<div class="content">
|
||||
@@ -37,7 +42,17 @@
|
||||
<script setup>
|
||||
import { inject } from 'vue';
|
||||
|
||||
import { post } from '#/src/api.js';
|
||||
|
||||
const pageContext = inject('pageContext');
|
||||
|
||||
async function initCaches() {
|
||||
await post('/caches', null, {
|
||||
successFeedback: 'Reloaded caches',
|
||||
errorFeedback: 'Failed to reload caches',
|
||||
appendErrorMessage: true,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -50,6 +65,7 @@ const pageContext = inject('pageContext');
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 1rem 1rem .75rem 1rem;
|
||||
border-bottom: solid 1px var(--shadow-weak-30);
|
||||
margin-bottom: .25rem;
|
||||
|
||||
Reference in New Issue
Block a user