Skip to content

Commit 676e4b3

Browse files
committed
workload deploy fallback text and unwrap app status
1 parent ca0d1e6 commit 676e4b3

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

src/lib/components/WorkloadDeploy.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { fragment, graphql, type WorkloadDeploy } from '$houdini';
33
import Time from '$lib/Time.svelte';
4-
import { Link, BodyShort, Heading } from '@nais/ds-svelte-community';
4+
import { BodyShort, Heading, Link } from '@nais/ds-svelte-community';
55
import { ExternalLinkIcon } from '@nais/ds-svelte-community/icons';
66
77
interface Props {
@@ -58,7 +58,7 @@
5858
>
5959
{/if}
6060
{:else}
61-
<BodyShort>No deployments</BodyShort>
61+
<BodyShort>No deployment metadata found for workload.</BodyShort>
6262
{/if}
6363
</div>
6464

Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script lang="ts">
22
import AppErrorTypeToMessage from '$lib/AppErrorTypeToMessage.svelte';
3-
import Card from '$lib/Card.svelte';
43
import GraphErrors from '$lib/GraphErrors.svelte';
54
import { Alert } from '@nais/ds-svelte-community';
65
import type { PageData } from './$houdini';
@@ -14,21 +13,18 @@
1413
let { AppNotificationState } = $derived(data);
1514
</script>
1615

17-
<Card>
16+
<GraphErrors errors={$AppNotificationState.errors} />
17+
18+
{#if $AppNotificationState.data}
19+
{@const app = $AppNotificationState.data.team.environment.application}
20+
1821
<div>
19-
<GraphErrors errors={$AppNotificationState.errors} />
22+
{#if app.status.errors && app.status.errors.length > 0}
23+
{#each app.status.errors as error (error)}
24+
<AppErrorTypeToMessage {error} />
25+
{/each}
26+
{:else}
27+
<Alert variant="info">All nais!</Alert>
28+
{/if}
2029
</div>
21-
{#if $AppNotificationState.data}
22-
{@const app = $AppNotificationState.data.team.environment.application}
23-
24-
<div>
25-
{#if app.status.errors && app.status.errors.length > 0}
26-
{#each app.status.errors as error (error)}
27-
<AppErrorTypeToMessage {error} />
28-
{/each}
29-
{:else}
30-
<Alert variant="info">All nais!</Alert>
31-
{/if}
32-
</div>
33-
{/if}
34-
</Card>
30+
{/if}

0 commit comments

Comments
 (0)