fix: umami + ghost issues

This commit is contained in:
Andras Bacsai
2022-11-08 14:42:04 +01:00
parent 82d7fb883d
commit 0ebc0217f3
7 changed files with 42 additions and 63 deletions

View File

@@ -79,9 +79,7 @@
$isDeploymentEnabled = checkIfDeploymentEnabledServices($appSession.isAdmin, service);
let statusInterval: any;
let loading = {
refreshTemplates: false
};
async function deleteService() {
const sure = confirm($t('application.confirm_to_delete', { name: service.name }));
@@ -106,20 +104,6 @@
await startService();
}
}
async function refreshTemplate() {
try {
loading.refreshTemplates = true;
await post(`/internal/refreshTemplates`, {});
addToast({
message: 'Services refreshed.',
type: 'success'
});
} catch (error) {
return errorNotification(error);
} finally {
loading.refreshTemplates = false;
}
}
async function stopService(skip = false) {
if (skip) {
$status.service.initialLoading = true;
@@ -278,14 +262,6 @@
Delete Service
</button>
{/if}
{#if $page.url.pathname === `/services/${id}/configuration/type` && dev}
<button
disabled={loading.refreshTemplates}
class:loading={loading.refreshTemplates}
class="btn btn-sm btn-primary text-sm"
on:click={refreshTemplate}>Refresh Services List</button
>
{/if}
</div>
</nav>
<div