Skip to content

Commit

Permalink
feat(experiments): add Started column (#24265)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajmajerik authored Aug 9, 2024
1 parent 9f20b2a commit 03c59f2
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions frontend/src/scenes/experiments/Experiments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { More } from 'lib/lemon-ui/LemonButton/More'
import { LemonDivider } from 'lib/lemon-ui/LemonDivider'
import { LemonTable, LemonTableColumn, LemonTableColumns } from 'lib/lemon-ui/LemonTable'
import { createdAtColumn, createdByColumn } from 'lib/lemon-ui/LemonTable/columnUtils'
import { atColumn, createdAtColumn, createdByColumn } from 'lib/lemon-ui/LemonTable/columnUtils'
import { LemonTableLink } from 'lib/lemon-ui/LemonTable/LemonTableLink'
import { LemonTabs } from 'lib/lemon-ui/LemonTabs'
import { Link } from 'lib/lemon-ui/Link'
Expand Down Expand Up @@ -64,13 +64,14 @@ export function Experiments(): JSX.Element {
},
createdByColumn<Experiment>() as LemonTableColumn<Experiment, keyof Experiment | undefined>,
createdAtColumn<Experiment>() as LemonTableColumn<Experiment, keyof Experiment | undefined>,
atColumn('start_date', 'Started') as LemonTableColumn<Experiment, keyof Experiment | undefined>,
{
title: 'Duration',
key: 'duration',
render: function Render(_, experiment: Experiment) {
const duration = getExperimentDuration(experiment)

return <div>{duration !== undefined ? `${duration} day${duration !== 1 ? 's' : ''}` : '--'}</div>
return <div>{duration !== undefined ? `${duration} day${duration !== 1 ? 's' : ''}` : ''}</div>
},
sorter: (a, b) => {
const durationA = getExperimentDuration(a) ?? -1
Expand Down

0 comments on commit 03c59f2

Please sign in to comment.