Skip to content

Commit

Permalink
feat(experiments): Always allow refreshing experiment results (#26811)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber authored Dec 13, 2024
1 parent 875fd4b commit 5dd300a
Showing 1 changed file with 32 additions and 38 deletions.
70 changes: 32 additions & 38 deletions frontend/src/scenes/experiments/ExperimentView/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -493,44 +493,38 @@ export function PageHeaderCustom(): JSX.Element {
)}
{experiment && isExperimentRunning && (
<div className="flex flex-row gap-2">
{!isExperimentStopped && !experiment.archived && (
<>
<More
overlay={
<>
<LemonButton
onClick={() =>
exposureCohortId ? undefined : createExposureCohort()
}
fullWidth
data-attr={`${
exposureCohortId ? 'view' : 'create'
}-exposure-cohort`}
to={exposureCohortId ? urls.cohort(exposureCohortId) : undefined}
targetBlank={!!exposureCohortId}
>
{exposureCohortId ? 'View' : 'Create'} exposure cohort
</LemonButton>
<LemonButton
onClick={() => loadExperimentResults(true)}
fullWidth
data-attr="refresh-experiment"
>
Refresh experiment results
</LemonButton>
<LemonButton
onClick={() => loadSecondaryMetricResults(true)}
fullWidth
data-attr="refresh-secondary-metrics"
>
Refresh secondary metrics
</LemonButton>
</>
}
/>
<LemonDivider vertical />
</>
)}
<>
<More
overlay={
<>
<LemonButton
onClick={() => (exposureCohortId ? undefined : createExposureCohort())}
fullWidth
data-attr={`${exposureCohortId ? 'view' : 'create'}-exposure-cohort`}
to={exposureCohortId ? urls.cohort(exposureCohortId) : undefined}
targetBlank={!!exposureCohortId}
>
{exposureCohortId ? 'View' : 'Create'} exposure cohort
</LemonButton>
<LemonButton
onClick={() => loadExperimentResults(true)}
fullWidth
data-attr="refresh-experiment"
>
Refresh experiment results
</LemonButton>
<LemonButton
onClick={() => loadSecondaryMetricResults(true)}
fullWidth
data-attr="refresh-secondary-metrics"
>
Refresh secondary metrics
</LemonButton>
</>
}
/>
<LemonDivider vertical />
</>
<ResetButton experimentId={experiment.id} />
{!experiment.end_date && (
<LemonButton
Expand Down

0 comments on commit 5dd300a

Please sign in to comment.