-
Notifications
You must be signed in to change notification settings - Fork 71
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
Schedule Frequency as JSON #1598
Changes from 8 commits
47360e7
f756cd1
920b934
7c2efbb
3abb122
235af37
188052e
fabe533
eb60cb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
<script lang="ts"> | ||
import CodeBlock from '$lib/holocene/code-block.svelte'; | ||
import type { StructuredCalendar } from '$lib/types/schedule'; | ||
import { intervalToComment } from '$lib/utilities/schedule-comment-formatting'; | ||
import { commentOrCalendarToFrequency } from '$lib/utilities/schedule-frequency-formatting'; | ||
|
||
|
||
import type { IntervalSpec } from '$types'; | ||
|
||
export let calendar: StructuredCalendar | undefined = undefined; | ||
export let interval: IntervalSpec | undefined = undefined; | ||
|
||
const intervalSecs = interval?.interval as string; | ||
const phaseSecs = interval?.phase as string; | ||
export let inline = false; | ||
</script> | ||
|
||
<div class="flex flex-col {$$props.class}"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nah I want to show the whole thing, and with this layout we get quite a bit of height on the right side so there's no reason to not take it up. |
||
{#if calendar} | ||
<p data-testid="schedule-calendar-frequency"> | ||
{commentOrCalendarToFrequency(calendar)} | ||
</p> | ||
{:else} | ||
<p data-testid="schedule-interval-frequency"> | ||
{intervalToComment(intervalSecs)} | ||
</p> | ||
<p data-testid="schedule-phase-frequency"> | ||
{intervalToComment(phaseSecs, true)} | ||
</p> | ||
{/if} | ||
<CodeBlock | ||
copyable | ||
{inline} | ||
testId="schedule-calendar" | ||
language="json" | ||
content={JSON.stringify(calendar || interval, null, 2)} | ||
/> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<script lang="ts"> | ||
import { page } from '$app/stores'; | ||
|
||
import WorkflowStatus from '$lib/components/workflow-status.svelte'; | ||
import Link from '$lib/holocene/link.svelte'; | ||
import TableRow from '$lib/holocene/table/table-row.svelte'; | ||
|
@@ -15,10 +15,9 @@ | |
routeForEventHistory, | ||
routeForSchedule, | ||
} from '$lib/utilities/route-for'; | ||
|
||
import ScheduleFrequency from './schedule-frequency.svelte'; | ||
|
||
|
||
|
||
import type { ScheduleActionResult, ScheduleListEntry } from '$types'; | ||
|
||
let { namespace } = $page.params; | ||
|
@@ -53,9 +52,6 @@ | |
</td> | ||
<td class="cell whitespace-pre-line break-words"> | ||
<p class="text-base">{schedule.scheduleId}</p> | ||
<p> | ||
<ScheduleFrequency {calendar} {interval} class="text-sm" /> | ||
</p> | ||
</td> | ||
<td class="cell whitespace-pre-line break-words max-md:hidden"> | ||
{schedule?.info?.workflowType?.name ?? ''} | ||
|
@@ -87,6 +83,17 @@ | |
{/each} | ||
</td> | ||
</TableRow> | ||
<TableRow> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do users need to see the entire Or, at the very least, maybe we could add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's really hard to read the spec when it's small, so we wanted to give it as much width as possible. I'll remove the top border though. |
||
<td colspan="5" class="hidden xl:table-cell !p-0"> | ||
<ScheduleFrequency {calendar} {interval} inline class="text-sm w-auto" /> | ||
</td> | ||
<td colspan="3" class="hidden md:table-cell xl:hidden !p-0"> | ||
<ScheduleFrequency {calendar} {interval} inline class="text-sm w-auto" /> | ||
</td> | ||
<td colspan="2" class="md:hidden !p-0"> | ||
<ScheduleFrequency {calendar} {interval} inline class="text-sm w-auto" /> | ||
</td> | ||
</TableRow> | ||
|
||
<style lang="postcss"> | ||
.cell { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we want this
Panel
to come afterUpcoming Runs
(or aboveRecent Runs
) instead ofAdvanced Settings
on smaller screensThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes sense