Skip to content

Commit

Permalink
minor fixes: do not show link when github-url annotation is missing. …
Browse files Browse the repository at this point in the history
…fix job page
  • Loading branch information
rbjornstad committed Nov 28, 2023
1 parent 28a09a1 commit 9cdcf53
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
8 changes: 6 additions & 2 deletions src/routes/team/[team]/[env]/app/[app]/Image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,13 @@
{#if deployInfo?.timestamp === PendingValue}
<Skeleton variant="text" width="40%" />
{:else if deployInfo.timestamp !== null}
<a href={deployInfo.url}>Deployed</a>
{#if deployInfo.url === ''}
Deployed
{:else}
<a href={deployInfo.url}>Deployed</a>
{/if}
<Time time={deployInfo.timestamp} distance={true} />
{#if deployInfo.deployer && deployInfo.url}
{#if deployInfo.deployer !== ''}
by
<a href="https://github.com/{deployInfo.deployer}">{deployInfo.deployer}</a>.
{/if}
Expand Down
5 changes: 0 additions & 5 deletions src/routes/team/[team]/[env]/job/[job]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@
</div>
{/if}
{/if}
{#if tab === 'Status' && (state === State.NOTNAIS || state === State.FAILING)}
<div class="notification">
<NotificationBadge color={'var(--a-border-action)'} size={'8px'} />
</div>
{/if}
{/each}
</Tabs>
<slot />
Expand Down
2 changes: 1 addition & 1 deletion src/routes/team/[team]/[env]/job/[job]/+page.gql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
query Job($job: String!, $team: String!, $env: String!) {
query Job($job: String!, $team: String!, $env: String!) @cache(policy: NetworkOnly) {
naisjob(name: $job, team: $team, env: $env) @loading(cascade: true) {
name
schedule
Expand Down
12 changes: 7 additions & 5 deletions src/routes/team/[team]/[env]/job/[job]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@
<div class="grid">
<Status job={$Job.data.naisjob} />

<Card columns={4}>
<Cost app={jobName} {env} {team} />
</Card>
<Card columns={6}>
<Card columns={9} rows={1}>
<Image {job} />
</Card>
<Card columns={6}>

<Card columns={3} rows={1}>
<Cost app={jobName} {env} {team} />
</Card>

<Card columns={3}>
<h4>Schedule</h4>
{#if job.schedule === PendingValue}
<Skeleton variant="text" />
Expand Down
10 changes: 7 additions & 3 deletions src/routes/team/[team]/[env]/job/[job]/Image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,15 @@
</h4>
<p class="lastActivity">
{#if deployInfo?.timestamp === PendingValue}
<Skeleton variant="text" />
<Skeleton variant="text" width="40%" />
{:else if deployInfo.timestamp !== null}
<a href={deployInfo.url}>Deployed</a>
{#if deployInfo.url === ''}
Deployed
{:else}
<a href={deployInfo.url}>Deployed</a>
{/if}
<Time time={deployInfo.timestamp} distance={true} />
{#if deployInfo.deployer && deployInfo.url}
{#if deployInfo.deployer !== ''}
by
<a href="https://github.com/{deployInfo.deployer}">{deployInfo.deployer}</a>.
{/if}
Expand Down
5 changes: 4 additions & 1 deletion src/routes/team/[team]/[env]/job/[job]/Status.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
.card {
border-radius: 0.5rem;
padding: 1rem;
grid-column: span 2;
grid-column: span 3;
grid-row: span 1;
border: 1px solid var(--a-gray-200);
background-color: var(--a-bg-default);
}
.NAIS {
Expand Down

0 comments on commit 9cdcf53

Please sign in to comment.