-
Notifications
You must be signed in to change notification settings - Fork 144
Workflow table #159
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
Workflow table #159
Changes from all commits
6cb54bf
1cd7873
3e35d5d
10d162e
661dc68
db041bb
5b87a75
edb102b
372219f
bca54e8
5770840
0cbeccb
6a91a0b
b4abb7a
6742f54
0460beb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,83 +2,50 @@ | |
| import type { WorkflowExecution } from '$lib/models/workflow-execution'; | ||
|
|
||
| import { namespace } from '$lib/stores/namespace'; | ||
| import { page } from '$app/stores'; | ||
| import { getWorkflowExecutionUrl } from '$lib/utilities/get-workflow-execution-url'; | ||
| import { pathMatches } from '$lib/utilities/path-matches'; | ||
| import Time from '$lib/components/workflow-time.svelte'; | ||
| import WorkflowStatus from '$lib/components/workflow-status.svelte'; | ||
|
|
||
| export let workflow: WorkflowExecution; | ||
| export let timeFormat: string; | ||
|
|
||
| $: href = getWorkflowExecutionUrl($namespace, workflow); | ||
| $: isActive = pathMatches(href, $page.path); | ||
| </script> | ||
|
|
||
| <tr class:active={isActive}> | ||
| <td class=""> | ||
| <a sveltekit:noscroll {href}> | ||
| <a sveltekit:noscroll {href}> | ||
|
softwarecurator marked this conversation as resolved.
|
||
| <article class="row flex flex-row border-b-2"> | ||
| <div class="links w-3/12 text-left"> | ||
| {workflow.id} | ||
| </div> | ||
| <div class="links w-3/12 text-left"> | ||
| <h3> | ||
|
Contributor
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 not a blocker, but I wonder if we really need the |
||
| {workflow.name} | ||
| </h3> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a sveltekit:noscroll {href}> | ||
| <p> | ||
| {workflow.id} | ||
| <!-- / <span class="run-id">{workflow.runId}</span> --> | ||
| </p></a | ||
| > | ||
| </td> | ||
| <td> | ||
| <a sveltekit:noscroll {href}> | ||
| <div class={`flex justify-center `}> | ||
| </div> | ||
| <div class="w-3/12 text-left"> | ||
| <div> | ||
| <WorkflowStatus status={workflow.status} /> | ||
| </div> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a sveltekit:noscroll {href} class="font-mono text-right"> | ||
| </div> | ||
| <div class="w-2/12 text-left"> | ||
| <Time time={workflow.startTime} {timeFormat} /> | ||
| </a> | ||
| </td> | ||
| <td> | ||
| <a sveltekit:noscroll {href} class="font-mono text-right"> | ||
| </div> | ||
| <div class="w-2/12 text-left"> | ||
| <Time time={workflow.endTime} {timeFormat} /> | ||
| </a> | ||
| </td> | ||
| </tr> | ||
| </div> | ||
| </article> | ||
| </a> | ||
|
|
||
| <style lang="postcss"> | ||
| p { | ||
| @apply m-0 text-gray-500 text-sm; | ||
| .row { | ||
| @apply w-full h-full flex no-underline p-2; | ||
| } | ||
|
|
||
| tr { | ||
| @apply bg-gray-50; | ||
| .row:hover { | ||
|
softwarecurator marked this conversation as resolved.
|
||
| @apply bg-green-100; | ||
| } | ||
|
|
||
| tr:hover { | ||
| @apply bg-gray-100; | ||
| } | ||
|
|
||
| td { | ||
| @apply p-0; | ||
| } | ||
|
|
||
| a { | ||
| @apply w-full h-full block no-underline p-2; | ||
| } | ||
|
|
||
| .active { | ||
| @apply bg-yellow-200; | ||
| } | ||
|
|
||
| .active:hover { | ||
| @apply bg-yellow-200; | ||
| } | ||
| .run-id { | ||
| font-size: 0.5rem; | ||
| .row:hover .links { | ||
| @apply underline text-blue-500; | ||
| } | ||
| </style> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,20 @@ | ||
| <table class="border-collapse w-full"> | ||
| <thead> | ||
| <tr class="bg-gray-200"> | ||
| <th class="w-3/12 text-left ">Workflow Name</th> | ||
| <th class="w-3/12 text-left">Workflow ID</th> | ||
| <th class="w-1/12">Status</th> | ||
| <th class="w-2/12 text-right">Started</th> | ||
| <th class="w-2/12 text-right">Ended</th> | ||
| </tr> | ||
| </thead> | ||
| <slot name="rows" /> | ||
| </table> | ||
| <section | ||
| class="workflow-table border-collapse border-2 border-gray-300 overflow-hidden w-full rounded-lg" | ||
| > | ||
| <div class="bg-gray-200 flex flex-row p-2"> | ||
| <div class="w-3/12 text-left">Workflow ID</div> | ||
| <div class="w-3/12 text-left">Type</div> | ||
| <div class="w-3/12 text-left">Status</div> | ||
| <div class="w-2/12 text-left">Started</div> | ||
| <div class="w-2/12 text-left">End</div> | ||
| </div> | ||
| <slot /> | ||
| </section> | ||
|
|
||
| <!-- this style is mainly for keeping the height a certain level so the scroll | ||
| will feel more natural | may need revisions --> | ||
| <style lang="postcss"> | ||
| th { | ||
| @apply bg-gray-200 text-gray-500 text-xs h-6 m-0 p-3 uppercase table-fixed; | ||
| .workflow-table { | ||
| height: calc(100vh - 25%); | ||
|
Contributor
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. This definitely has some weird implications on the layout. When we scroll down, there is a lot of extra space. We probably are going to want to get rid of this. I'm not going to block this PR over it though. Now that we have no sidebar and we're about to remove the navigation on the other side, we can probably simplify the layout and remove this later. |
||
| } | ||
| </style> | ||
Uh oh!
There was an error while loading. Please reload this page.