mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-12-03 16:10:37 +00:00
fix: show the token owner in the token row's tooltip
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4357aa4986
commit
c5ed41fbb7
@@ -57,6 +57,7 @@ export interface FieldConfig {
|
||||
label: string
|
||||
getValue: (job: Job) => string | null
|
||||
getHref?: (job: Job, workspaceId: string) => string | null
|
||||
getTitle?: (job: Job) => string | null
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,9 +244,9 @@ export const fieldConfigs: Record<JobField, FieldConfig> = {
|
||||
getValue: (job) => {
|
||||
if (!job.token_prefix) return null
|
||||
const label = job.token_label === 'session' ? 'Session' : job.token_label
|
||||
const owner = job.token_owner ? `, owned by ${job.token_owner}` : ''
|
||||
return `${job.token_prefix}****${label ? ` (${label})` : ''}${owner}`
|
||||
return `${job.token_prefix}****${label ? ` (${label})` : ''}`
|
||||
},
|
||||
getTitle: (job) => (job.token_owner ? `Owned by ${job.token_owner}` : null),
|
||||
getHref: (job, workspaceId) =>
|
||||
job.token_prefix
|
||||
? `${AUDIT_LOGS_PATH}?token=${encodeURIComponent(job.token_prefix)}&workspace=${encodeURIComponent(job.workspace_id || workspaceId)}`
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
? 'Flow version'
|
||||
: 'Script hash'
|
||||
}: ${fullValue}`
|
||||
: fullValue}
|
||||
: (config.getTitle?.(job) ?? fullValue)}
|
||||
>
|
||||
<span class="truncate flex-shrink min-w-0">{displayValue}</span>
|
||||
<ExternalLink size={12} class="flex-shrink-0" />
|
||||
|
||||
Reference in New Issue
Block a user