-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor event details link, add link support for endpointId (#2360)
* Refactor event details link, add link support for endpointId. * More refactoring * Make reactive with type * Refactor to add link to timeline details * Update based on feedback. Remove max width constraints * Add shrink-0 to icon * Lots of small styling updates
- Loading branch information
1 parent
7a19ad5
commit 5b6371b
Showing
14 changed files
with
174 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<script lang="ts"> | ||
import { page } from '$app/stores'; | ||
import Link from '$lib/holocene/link.svelte'; | ||
import type { CombinedAttributes } from '$lib/utilities/format-event-attributes'; | ||
import { type EventLinkType } from '$lib/utilities/get-single-attribute-for-event'; | ||
import { | ||
routeForEventHistory, | ||
routeForNexusEndpoint, | ||
routeForTaskQueue, | ||
} from '$lib/utilities/route-for'; | ||
export let value: string; | ||
export let attributes: CombinedAttributes; | ||
export let type: EventLinkType; | ||
export let light = false; | ||
$: ({ workflow, namespace } = $page.params); | ||
$: executionLink = routeForEventHistory({ | ||
namespace, | ||
workflow, | ||
run: value, | ||
}); | ||
$: taskQueueLink = routeForTaskQueue({ namespace, queue: value }); | ||
$: childWorkflowLink = routeForEventHistory({ | ||
namespace, | ||
workflow: attributes.workflowExecutionWorkflowId, | ||
run: attributes.workflowExecutionRunId, | ||
}); | ||
$: nexusEndpointLink = routeForNexusEndpoint(value); | ||
$: hrefs = { | ||
execution: executionLink, | ||
'task-queue': taskQueueLink, | ||
'child-workflow': childWorkflowLink, | ||
'nexus-endpoint': nexusEndpointLink, | ||
} as Record<Exclude<EventLinkType, 'none'>, string>; | ||
$: href = hrefs[type]; | ||
</script> | ||
|
||
<Link class="truncate break-all" {href} {light}> | ||
{value} | ||
</Link> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.