Skip to content

Commit

Permalink
remove notification bell until we find a way to fix it - jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
rbjornstad committed Oct 24, 2023
1 parent bcb91dc commit 8dee530
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
5 changes: 3 additions & 2 deletions src/routes/team/[team]/[env]/app/[app]/+layout.gql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
query AppNotificationState($app: String!, $team: String!, $env: String!) {
app(name: $app, team: $team, env: $env) @loading(cascade: true) {
query AppNotificationState($app: String!, $team: String!, $env: String!)
@cache(policy: NetworkOnly) {
app(name: $app, team: $team, env: $env) {
appState {
state
errors {
Expand Down
18 changes: 10 additions & 8 deletions src/routes/team/[team]/[env]/app/[app]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Tab from '$lib/Tab.svelte';
import Tabs from '$lib/Tabs.svelte';
import { replacer } from '$lib/replacer';
import type { PageData } from './$houdini';
$: team = $page.params.team;
$: env = $page.params.env;
Expand Down Expand Up @@ -36,11 +37,12 @@
routeId: '/team/[team]/[env]/app/[app]/cost'
}
];
//export let data: PageData;
//$: ({ AppNotificationState } = data);
export let data: PageData;
$: ({ AppNotificationState } = data);
//$: state = $AppNotificationState.data?.app.appState.state;
//$: numberOfErrors = $AppNotificationState.data?.app.appState.errors.length;
$: state = $AppNotificationState.data?.app.appState.state;
$: numberOfErrors = $AppNotificationState.data?.app.appState.errors.length;
$: console.log($AppNotificationState);
</script>

<svelte:head><title>{team} - Console</title></svelte:head>
Expand Down Expand Up @@ -70,19 +72,19 @@
title={tab}
/>
{/if}
<!--{#if tab === 'Status' && state !== 'NAIS'}
{#if tab === 'Status' && state !== 'NAIS'}
{#if state === 'NOTNAIS'}
<div class="circle warning">{numberOfErrors}</div>
{:else if state === 'FAILING' || state !== 'UNKNOWN'}
<div class="circle error">{numberOfErrors}</div>
{/if}
{/if}-->
{/if}
{/each}
</Tabs>
<slot />

<style>
/*.error {
.error {
background-color: var(--a-icon-danger);
color: var(--a-text-on-danger);
}
Expand All @@ -102,5 +104,5 @@
font:
8px Arial,
sans-serif;
}*/
}
</style>
2 changes: 1 addition & 1 deletion src/routes/team/[team]/[env]/app/[app]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import Card from '$lib/Card.svelte';
import Cost from '$lib/components/Cost.svelte';
import { Alert } from '@nais/ds-svelte-community';
import type { PageData } from './$houdini';
import Authentications from './Authentications.svelte';
Expand All @@ -11,6 +10,7 @@
import Status from './Status.svelte';
import Storage from './Storage.svelte';
import Traffic from './Traffic.svelte';
import Cost from '$lib/components/Cost.svelte';
export let data: PageData;
$: ({ App } = data);
Expand Down
18 changes: 8 additions & 10 deletions src/routes/team/[team]/[env]/job/[job]/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<script lang="ts">
import { page } from '$app/stores';
import { State } from '$houdini';
import Tab from '$lib/Tab.svelte';
import Tabs from '$lib/Tabs.svelte';
import { replacer } from '$lib/replacer';
import type { PageData } from './$houdini';
$: team = $page.params.team;
$: env = $page.params.env;
Expand Down Expand Up @@ -37,11 +35,11 @@
routeId: '/team/[team]/[env]/job/[job]/cost'
}
];
export let data: PageData;
$: ({ JobNotificationState } = data);
//export let data: PageData;
//$: ({ JobNotificationState } = data);
$: state = $JobNotificationState.data?.naisjob.jobState.state;
$: numberOfErrors = $JobNotificationState.data?.naisjob.jobState.errors.length;
//$: state = $JobNotificationState.data?.naisjob.jobState.state;
//$: numberOfErrors = $JobNotificationState.data?.naisjob.jobState.errors.length;
</script>

<svelte:head><title>{team} - Console</title></svelte:head>
Expand All @@ -68,19 +66,19 @@
title={tab}
/>
{/if}
{#if tab === 'Status' && state !== State.NAIS}
<!--{#if tab === 'Status' && state !== State.NAIS}
{#if state === State.NOTNAIS}
<div class="circle warning">{numberOfErrors}</div>
{:else if state === State.FAILING || state !== State.UNKNOWN}
<div class="circle error">{numberOfErrors}</div>
{/if}
{/if}
{/if}-->
{/each}
</Tabs>
<slot />

<style>
.error {
/*.error {
background-color: var(--a-icon-danger);
color: var(--a-text-on-danger);
}
Expand All @@ -100,5 +98,5 @@
font:
8px Arial,
sans-serif;
}
}*/
</style>

0 comments on commit 8dee530

Please sign in to comment.