Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr committed Jul 25, 2024
1 parent 19d8107 commit ae90ea3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions frontend/src/scenes/dashboard/dashboardLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ export const dashboardLogic = kea<dashboardLogicType>([
newTiles[tileIndex] = {
...newTiles[tileIndex],
insight: insight,
last_refresh: insight.last_refresh,
}
} else if (!insight.dashboards?.includes(props.id)) {
newTiles.splice(tileIndex, 1)
Expand Down Expand Up @@ -972,7 +971,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
uuid(),
'force_async'
)
dashboardsModel.actions.updateDashboardInsight(refreshedInsight, [], props.id ? [props.id] : undefined)
dashboardsModel.actions.updateDashboardInsight(refreshedInsight)
// Start polling for results
tile.insight = refreshedInsight
actions.refreshAllDashboardItems({ tiles: [tile], action: 'refresh' })
Expand Down Expand Up @@ -1035,11 +1034,7 @@ export const dashboardLogic = kea<dashboardLogicType>([
'async',
methodOptions
)
dashboardsModel.actions.updateDashboardInsight(
polledInsight,
[],
props.id ? [props.id] : undefined
)
dashboardsModel.actions.updateDashboardInsight(polledInsight)
actions.setRefreshStatus(insight.short_id)
}
} catch (e: any) {
Expand Down Expand Up @@ -1137,7 +1132,7 @@ export const dashboardLogic = kea<dashboardLogicType>([

const dashboard = values.dashboard
const { action, dashboardQueryId, startTime, responseBytes } = values.dashboardLoadTimerData
const lastRefresh = sortDates(dashboard.tiles.map((tile) => tile.last_refresh))
const lastRefresh = sortDates(dashboard.tiles.map((tile) => tile.insight?.last_refresh || null))

const initialLoad = action === 'initial_load'
const allLoaded = false // TODO: Check this
Expand Down

0 comments on commit ae90ea3

Please sign in to comment.