Added cache reload button to admin panel so restarts are needed less often.

This commit is contained in:
2026-03-06 06:12:23 +01:00
parent 9a59448933
commit 6c1f1c2a1c
12 changed files with 78 additions and 10 deletions

View File

@@ -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;