Skip to content

feat - Job Tracker #160

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

Merged
merged 61 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
39a1082
add svelte-headless-table
ken-zlai Dec 16, 2024
092a678
code to generate job sample data
ken-zlai Dec 16, 2024
5e3a22f
v1 job tracker table
ken-zlai Dec 16, 2024
3b37509
basic styles
ken-zlai Dec 17, 2024
3858866
dont show celldivider on the final status cell
ken-zlai Dec 17, 2024
24e2d61
pointer-events-none to celldivider
ken-zlai Dec 17, 2024
0d37de0
adjust some first column styles
ken-zlai Dec 17, 2024
6548f68
no border on table rows
ken-zlai Dec 17, 2024
6663ffb
add children count badge
ken-zlai Dec 17, 2024
7a34236
add all statuses from design
ken-zlai Dec 17, 2024
78ec6eb
generate sample data based on all statuses
ken-zlai Dec 17, 2024
cce4ded
adjust table to new, compact data structure using colspans
ken-zlai Dec 19, 2024
459482c
add hover state to status cell
ken-zlai Dec 20, 2024
9ddfe64
basic popover impl
ken-zlai Dec 20, 2024
3b25990
track isPopoverOpen to apply styles
ken-zlai Dec 20, 2024
8aac037
use new backend data structure for hierarchy
ken-zlai Dec 20, 2024
7ac0f05
make RunRowList which maps job_id to RunRow
ken-zlai Dec 20, 2024
4fcfc86
refactor names for JobStatusType, RunRowList, and RunRow
ken-zlai Dec 20, 2024
d53ab1f
rename AdjacencyList
ken-zlai Dec 20, 2024
68481bc
more naming changes
ken-zlai Dec 20, 2024
5931909
move job related examples into job-sample-data.ts
ken-zlai Dec 20, 2024
e40434e
generateRunSampleData -> generateJobRunListSampleData
ken-zlai Dec 20, 2024
1b4f5fb
runSampleData -> jobRunListSampleData
ken-zlai Dec 20, 2024
ea98ec6
Merge branch 'main' into ken/job-tracker
ken-zlai Dec 21, 2024
5d11a64
npm run format
ken-zlai Dec 21, 2024
57b5f86
npm install w/ fresh package-lock.json
ken-zlai Dec 21, 2024
bb84a0c
put optionalDependencies back outside overrrides
ken-zlai Dec 21, 2024
15be1d2
use new icon pack
ken-zlai Dec 21, 2024
c20103a
Merge branch 'main' into ken/job-tracker
ken-zlai Dec 23, 2024
ea62413
npm install
ken-zlai Dec 23, 2024
6fcb611
JobNodeWithRuns -> JobTreeNode
ken-zlai Dec 23, 2024
d2912b6
create JobTracker component
ken-zlai Dec 23, 2024
f50e10c
remove unused isAllSubRowsExpanded
ken-zlai Dec 23, 2024
9e0b2a0
some ui matches
ken-zlai Dec 23, 2024
ca746ec
adjust border
ken-zlai Dec 23, 2024
b5a98c0
use ring to better emphasize hovered/clicked cell
ken-zlai Dec 23, 2024
d1df904
move popover up
ken-zlai Dec 23, 2024
b39dbd2
add scrollbar-none utility
ken-zlai Jan 7, 2025
22ca07b
implement a custom scrollbar
ken-zlai Jan 7, 2025
e30a50b
Merge remote-tracking branch 'origin/main' into ken/job-tracker
ken-zlai Jan 14, 2025
ca72b2f
npm install
ken-zlai Jan 14, 2025
9025973
styling
ken-zlai Jan 15, 2025
1262591
download logs button
ken-zlai Jan 15, 2025
4bff158
use correct colors for status
ken-zlai Jan 15, 2025
ad4cb4b
proper font colors
ken-zlai Jan 15, 2025
a861e38
collapsible sections
ken-zlai Jan 15, 2025
1cdb192
remove gap
ken-zlai Jan 15, 2025
3ee7370
add metadata
ken-zlai Jan 15, 2025
65a1985
download logs button
ken-zlai Jan 15, 2025
754a64c
add JobOverviewChart in scrollbar
ken-zlai Jan 15, 2025
86eb456
Merge branch 'main' into ken/job-tracker
ken-zlai Jan 16, 2025
c7cfc82
separate tables
ken-zlai Jan 16, 2025
7ea17dc
move job tracker code into its respective tab, remove /job_tracker route
ken-zlai Jan 16, 2025
2b5848e
feat: add relative imports for src, routes, and test
ken-zlai Jan 16, 2025
77ac841
use relative import for routes
ken-zlai Jan 16, 2025
a335496
Merge branch 'ken/relative-imports' into ken/job-tracker
ken-zlai Jan 16, 2025
8681df6
create services folder
ken-zlai Jan 16, 2025
f7f4c8b
fix ts issues
ken-zlai Jan 16, 2025
46ba357
track tab in query params
ken-zlai Jan 17, 2025
5cce5d1
Merge branch 'main' into ken/job-tracker
ken-zlai Jan 17, 2025
3cf3977
dont need this
ken-zlai Jan 17, 2025
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
1,661 changes: 77 additions & 1,584 deletions frontend/package-lock.json

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"prettier-plugin-svelte": "^3.3.2",
"svelte": "^5.15.0",
"svelte-check": "^4.1.1",
"svelte-headless-table": "^0.18.3",
"svelte-intersection-observer": "^1.0.0",
"svelte-radix": "^1.1.1",
"sveltekit-search-params": "^4.0.0-next.0",
Expand Down Expand Up @@ -74,7 +75,10 @@
"cookie": "^0.7.0",
"glob": "^9.0.0",
"vite": "^6.0.5",
"nanoid": "^3.3.8"
"nanoid": "^3.3.8",
"svelte-headless-table": {
"svelte": "^5.0.0"
}
},
"optionalDependencies": {
"@rollup/rollup-linux-x64-gnu": "^4.29.0"
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,19 @@
--destructive-foreground: 0 0% 98%;

--ring: 0 0% 83.1%;

--job-waiting-bg: 0 0% 10%;
--job-waiting-text: 245 40% 72%;
--job-running-bg: 250 40% 15%;
--job-running-text: 245 40% 72%;
--job-failed-bg: 10 55% 13%;
--job-failed-text: 10 40% 58%;
--job-completed-bg: 160 47% 11%;
--job-completed-text: 160 30% 48%;
--job-queued-bg: 0 0% 10%;
--job-queued-text: 0 0% 64%;
--job-invalid-bg: 44 82% 11%;
--job-invalid-text: 44 35% 55%;
}
}

Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/components/CellDivider/CellDivider.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div
class="absolute inset-x-[-0.5px] inset-y-[0px] border-border border-r pointer-events-none"
></div>
44 changes: 44 additions & 0 deletions frontend/src/lib/components/ExpandableCell/ExpandableCell.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<script lang="ts">
import IconChevronDown from '~icons/heroicons/chevron-down-16-solid';
import type { Writable } from 'svelte/store';
import CellDivider from '$lib/components/CellDivider/CellDivider.svelte';
import Badge from '$lib/components/ui/badge/badge.svelte';

let {
isExpanded,
canExpand,
depth,
name,
childrenCount
}: {
isExpanded: Writable<boolean>;
canExpand: Writable<boolean>;
depth: number;
name: string;
childrenCount: number;
} = $props();
</script>

<div class="flex items-center justify-center h-full relative">
<CellDivider />
<div
class="flex items-center bg-neutral-300 border border-neutral-400 rounded-md p-2 pl-0 w-full mr-4"
style:margin-left={`calc(${depth * 0.75}rem)`}
>
{#if $canExpand}
<button class="mr-1 ml-1" onclick={() => ($isExpanded = !$isExpanded)}>
<IconChevronDown
class="size-4 transition-transform duration-200 text-neutral-900 {$isExpanded
? ''
: '-rotate-90'}"
/>
</button>
{/if}
{#if childrenCount > 0}
<Badge variant="secondary" class="border-none rounded-xl bg-neutral-50 text-neutral-900">
{childrenCount}
</Badge>
{/if}
<span class="whitespace-nowrap pl-2 text-neutral-900">{name}</span>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<script lang="ts">
import type { JobTreeNode } from '$lib/types/Job/Job';
import { statusColors, statusBorderColors } from '$lib/types/Job/Job';

let {
job,
dates,
getDaysInRange,
formatDate
}: {
job: JobTreeNode;
dates: string[];
getDaysInRange: (start: string, end: string, availableDates: string[]) => number;
formatDate: (dateString: string) => string;
} = $props();
</script>

<div class="flex items-center px-2 bg-transparent w-full h-full">
{#if job}
<div class="flex items-center w-full">
{#each job.runs as run}
{@const daysInRange = getDaysInRange(run.start, run.end, dates)}
{@const widthPercentage = (daysInRange / dates.length) * 100}
<div
class={`h-4 rounded-sm ${statusColors[run.status]} ${statusBorderColors[run.status]}`}
style="width: {widthPercentage}%"
title={`${run.status}: ${formatDate(run.start)} - ${formatDate(run.end)}`}
></div>
{/each}
</div>
{:else}
<span class="text-sm text-neutral-600">No data available</span>
{/if}
</div>
Loading
Loading