Skip to content

Commit

Permalink
account for views
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Aug 6, 2024
1 parent 0a359a1 commit e9153e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ export const hogQLQueryEditorLogic = kea<hogQLQueryEditorLogicType>([
selectors({
aiAvailable: [() => [preflightLogic.selectors.preflight], (preflight) => preflight?.openai_available],
multitab: [
(s) => [s.featureFlags],
(featureFlags) =>
(s) => [s.featureFlags, () => !!dataWarehouseSceneLogic.findMounted()?.values.editingView],
(featureFlags, isEditingView) =>
!!(
featureFlags[FEATURE_FLAGS.MULTITAB_EDITOR] &&
router.values.location.pathname.includes(urls.dataWarehouse()) &&
Object.keys(router.values.hashParams).length === 0
Object.keys(router.values.hashParams).length === 0 &&
!isEditingView
),
],
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { insightSceneLogic } from 'scenes/insights/insightSceneLogic'
import { Scene } from 'scenes/sceneTypes'
import { urls } from 'scenes/urls'

import { examples } from '~/queries/examples'
import { DataVisualizationNode, NodeKind } from '~/queries/schema'
import { Breadcrumb, InsightShortId, ItemMode } from '~/types'

Expand Down Expand Up @@ -103,12 +102,6 @@ export const dataWarehouseExternalSceneLogic = kea<dataWarehouseExternalSceneLog
ItemMode.Edit,
undefined
)
insightDataLogic
.findMounted({
dashboardItemId: DATAWAREHOUSE_EDITOR_ITEM_ID,
cachedInsight: null,
})
?.actions.setQuery(examples.DataWarehouse)
},
'/data-warehouse/view/:id': ({ id }) => {
insightSceneLogic.actions.setSceneState(
Expand Down
1 change: 0 additions & 1 deletion frontend/src/scenes/scenes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ export const redirects: Record<
'/i/:shortId': ({ shortId }) => urls.insightView(shortId),
'/action/:id': ({ id }) => urls.action(id),
'/action': urls.createAction(),
'/data-warehouse/*': urls.dataWarehouse(),
'/events/actions': urls.actions(),
'/events/stats': urls.eventDefinitions(),
'/events/stats/:id': ({ id }) => urls.eventDefinition(id),
Expand Down

0 comments on commit e9153e5

Please sign in to comment.