Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty state for upcoming runs #2354

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/lib/components/schedule/schedule-upcoming-runs.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import Panel from '$lib/components/panel.svelte';
import EmptyState from '$lib/holocene/empty-state.svelte';
import { translate } from '$lib/i18n/translate';
import { relativeTime, timeFormat } from '$lib/stores/time-format';
import { formatDate } from '$lib/utilities/format-date';
Expand All @@ -9,7 +10,7 @@
export let futureRuns: Timestamp[] = [];
</script>

<Panel>
<Panel class="w-full">
<h2 class="mb-4">{translate('schedules.upcoming-runs')}</h2>
{#each futureRuns.slice(0, 5) as run}
<div class="row">
Expand All @@ -20,6 +21,10 @@
})}
</p>
</div>
{:else}
<EmptyState
title={translate('schedules.upcoming-runs-empty-state-title')}
/>
{/each}
</Panel>

Expand Down
1 change: 1 addition & 0 deletions src/lib/i18n/locales/en/schedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const Strings = {
'recent-runs': 'Recent Runs',
'recent-runs-empty-state-title': 'No Recent Runs',
'upcoming-runs': 'Upcoming Runs',
'upcoming-runs-empty-state-title': 'No Upcoming Runs',
loading: 'Loading Schedule...',
deleting: 'Deleting Schedule...',
'delete-schedule-error': 'Cannot delete schedule. {{error}}',
Expand Down
Loading