mirror of
https://github.com/harness/drone.git
synced 2025-05-08 19:00:30 +08:00
feat: [CDE-458]: updated last activated in gitspace listing (#2936)
* feat: [CDE-458]: updated last activated in gitspace listing
This commit is contained in:
parent
affbffc2ea
commit
ba5fb10683
@ -103,6 +103,15 @@ export const DetailsCard = ({
|
||||
<ResourceDetails resource={resource} />
|
||||
</Layout.Vertical>
|
||||
|
||||
<Layout.Vertical spacing="small" flex={{ justifyContent: 'center', alignItems: 'flex-start' }}>
|
||||
<Text className={css.rowHeaders}>{getString('cde.lastActivated')}</Text>
|
||||
{instance?.active_time_started ? (
|
||||
<ReactTimeago date={instance?.active_time_started || 0} />
|
||||
) : (
|
||||
<Text color={Color.GREY_500}>{getString('cde.na')}</Text>
|
||||
)}
|
||||
</Layout.Vertical>
|
||||
|
||||
<Layout.Vertical spacing="small" flex={{ justifyContent: 'center', alignItems: 'flex-start' }}>
|
||||
<Text className={css.rowHeaders}>{getString('cde.lastUsed')}</Text>
|
||||
{instance?.last_used ? (
|
||||
|
@ -235,12 +235,12 @@ export const RenderStorageUsage: Renderer<CellProps<TypesGitspaceConfig>> = ({ r
|
||||
export const RenderLastActivity: Renderer<CellProps<TypesGitspaceConfig>> = ({ row }) => {
|
||||
const { getString } = useStrings()
|
||||
const instance = row.original.instance
|
||||
const { last_used } = instance || {}
|
||||
const { active_time_started } = instance || {}
|
||||
return (
|
||||
<Layout.Horizontal spacing={'small'} flex={{ alignItems: 'center', justifyContent: 'start' }}>
|
||||
<Clock />
|
||||
{last_used ? (
|
||||
<ReactTimeago date={last_used} />
|
||||
{active_time_started ? (
|
||||
<ReactTimeago date={active_time_started} />
|
||||
) : (
|
||||
<Text color={Color.GREY_500} font={{ align: 'left', size: 'normal' }}>
|
||||
{getString('cde.na')}
|
||||
|
Loading…
Reference in New Issue
Block a user