Skip to content

Commit 7b0f643

Browse files
committed
Refactor error messages and add todo count to Status component
1 parent 1ce395a commit 7b0f643

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/lib/AppErrorTypeToMessage.svelte

+8-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@
7171
{:else if $data.__typename === 'DeprecatedRegistryError'}
7272
<div class="wrapper">
7373
<Alert variant="info">
74-
Deprecated image registry <strong>{$data.registry}</strong> for image
74+
<h4>Todo</h4>
75+
Deprecated image registry
76+
<strong>{$data.registry}</strong> for image
7577
<strong>{$data.name}</strong>. See
7678
<a href="https://doc.nais.io/guides/oci-migration/">docker-build-push</a> on how to migrate to
7779
Google Artifact Registry.
@@ -86,7 +88,8 @@
8688
{:else if $data.__typename === 'DeprecatedIngressError'}
8789
<div class="wrapper">
8890
<Alert variant="info">
89-
Deprecated ingress <strong>{$data.ingress}</strong>. See
91+
<h4>Todo</h4>
92+
Deprecated ingress<strong>{$data.ingress}</strong>. See
9093
{#if env === 'dev-gcp'}
9194
<a href="https://doc.nais.io/reference/environments/?h=#dev-gcp">
9295
ingress documentation</a
@@ -227,4 +230,7 @@
227230
.wrapper {
228231
padding-bottom: 1rem;
229232
}
233+
.wrapper h4 {
234+
margin-bottom: 0.5rem;
235+
}
230236
</style>

src/routes/team/[team]/[env]/app/[app]/Status.svelte

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
state @loading
2121
errors {
2222
__typename
23+
level
2324
}
2425
}
2526
}
@@ -41,6 +42,13 @@
4142
aria-label="Application is nais"
4243
role="image"
4344
/>
45+
{#if $data.appState?.errors.length > 0}
46+
<p>
47+
<a href="/team/{teamName}/{envName}/app/{appName}/status"
48+
>{$data.appState.errors.length} todo{$data.appState.errors.length > 1 ? 's' : ''}</a
49+
>
50+
</p>
51+
{/if}
4452
</div>
4553
{:else if $data.appState.state === 'FAILING'}
4654
<h4>Status <ExclamationmarkTriangleFillIcon style="color: var(--a-icon-danger)" /></h4>

0 commit comments

Comments
 (0)