{#await promise} {translate('Loading...', language)} {:then data} {@const servicesDown = data?.filter(d => d.heartbeat[d.heartbeat.length - 1]?.down == true)} {@const servicesUp = data?.filter(d => d.heartbeat[d.heartbeat.length - 1]?.down != true)} {#if servicesDown?.length}
{@html icons.warning}
{translate('there are services down', language)}
{#each servicesDown as service}
{service.name[language] || service.name.en}
{/each}
{/if} {#if servicesUp?.length}
{#if servicesDown.length}
{translate('services up', language)}
{#each servicesUp as service}
{service.name[language] || service.name.en}
{/each} {:else}
{@html icons.check}
{translate('all services are up', language)}
{#each servicesUp as service}
{service.name[language] || service.name.en}
{/each}
{/if}
{/if} {:catch}
{translate('Encountered an error while fetching web service data.', language)}
{/await}