Skip to content

Commit

Permalink
fix(insights): Update some stuff around refreshing (#20237)
Browse files Browse the repository at this point in the history
Update refresh stuff
  • Loading branch information
webjunkie authored Feb 13, 2024
1 parent 81a1473 commit 857da0e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

.InsightDetails__footer {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(3, 1fr);

.profile-package {
vertical-align: middle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@ function InsightDetailsInternal({ insight }: { insight: InsightModel }, ref: Rea
<TZLabel time={insight.last_modified_at} />
</section>
</div>
{insight.last_refresh && (
<div>
<h5>Last computed</h5>
<section>
<TZLabel time={insight.last_refresh} />
</section>
</div>
)}
</div>
</div>
)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/scenes/dashboard/dashboardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
if (values.autoRefresh.enabled) {
// Refresh right now after enabling if we haven't refreshed recently
if (
!values.itemsLoading &&
values.lastRefreshed &&
values.lastRefreshed.isBefore(now().subtract(values.autoRefresh.interval, 'seconds'))
) {
Expand Down

0 comments on commit 857da0e

Please sign in to comment.