tooltip with exact time for created_at/started_at

This commit is contained in:
Ruben Fiszel
2023-11-02 19:28:11 +01:00
parent a75ae3bfdb
commit dce7ada19c
3 changed files with 6 additions and 2 deletions
@@ -156,7 +156,7 @@
{/if}{#if typeof result == 'object' && Object.keys(result).length > 0}<div
class="top-0 mb-2 w-full min-w-[400px] text-sm relative"
>{#if !disableExpand}
<div class="text-tertiary text-xs absolute top-5.5 right-0 inline-flex gap-2">
<div class="text-tertiary text-xs absolute top-5.5 right-0 inline-flex gap-2 z-10">
<button on:click={() => copyToClipboard(toJsonStr(result))}
><ClipboardCopy size={16} /></button
>
@@ -311,7 +311,7 @@
</div>
{:else}
<Highlight
class={forceJson ? '' : 'absolute top-1 h-full'}
class={forceJson ? '' : 'absolute top-1 h-full w-full'}
language={json}
code={toJsonStr(result).replace(/\\n/g, '\n')}
/>
@@ -15,6 +15,7 @@
import ScheduleEditor from './ScheduleEditor.svelte'
import TimeAgo from './TimeAgo.svelte'
import { workspaceStore } from '$lib/stores'
import Tooltip from './Tooltip.svelte'
export let job: Job
const SMALL_ICON_SCALE = 0.7
@@ -36,12 +37,14 @@
{:else}
Received job <TimeAgo date={job.created_at ?? ''} />
{/if}
<Tooltip>{job?.created_at}</Tooltip>
</span>
</div>
{#if job && 'started_at' in job && job.started_at}
<div>
<Icon class="text-secondary" data={faClock} scale={SMALL_ICON_SCALE} /><span class="mx-2">
Started <TimeAgo withDate agoOnlyIfRecent date={job.started_at ?? ''} />
<Tooltip>{job?.started_at}</Tooltip>
</span>
</div>
{/if}
@@ -47,6 +47,7 @@
if (!loaded) {
loaded = true
}
console.log(resolvedConfig?.extraConfig)
}
const { worldStore, selectedComponent, componentControl, darkMode } =