From 6434f4cd7a8b01c65123010826b1c0d43f5ce0d9 Mon Sep 17 00:00:00 2001 From: David Newell Date: Wed, 8 Nov 2023 11:34:13 +0000 Subject: [PATCH 1/2] hide table timings --- frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx index 3808db86bea3a..9b262bc694125 100644 --- a/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx +++ b/frontend/src/scenes/notebooks/Nodes/NotebookNodeQuery.tsx @@ -66,6 +66,7 @@ const Component = ({ attributes }: NotebookNodeProps Date: Wed, 8 Nov 2023 12:12:45 +0000 Subject: [PATCH 2/2] add full query as resource --- frontend/src/scenes/cohorts/CohortEdit.tsx | 4 +--- frontend/src/scenes/insights/InsightPageHeader.tsx | 7 ++++++- .../notebookSelectButtonLogic.ts | 14 ++++++++++++-- frontend/src/scenes/persons/PersonPreview.tsx | 4 +--- frontend/src/scenes/persons/PersonScene.tsx | 4 +--- .../session-recordings/SessionRecordings.tsx | 4 +--- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/frontend/src/scenes/cohorts/CohortEdit.tsx b/frontend/src/scenes/cohorts/CohortEdit.tsx index ed5f3767cbfd2..b72a0f20a3a8b 100644 --- a/frontend/src/scenes/cohorts/CohortEdit.tsx +++ b/frontend/src/scenes/cohorts/CohortEdit.tsx @@ -110,9 +110,7 @@ export function CohortEdit({ id }: CohortLogicProps): JSX.Element { type="secondary" resource={{ type: NotebookNodeType.Cohort, - attrs: { - id, - }, + attrs: { id }, }} /> )} diff --git a/frontend/src/scenes/insights/InsightPageHeader.tsx b/frontend/src/scenes/insights/InsightPageHeader.tsx index 6213bb6785eac..e6ba4ea5b9f2f 100644 --- a/frontend/src/scenes/insights/InsightPageHeader.tsx +++ b/frontend/src/scenes/insights/InsightPageHeader.tsx @@ -286,7 +286,12 @@ export function InsightPageHeader({ insightLogicProps }: { insightLogicProps: In diff --git a/frontend/src/scenes/notebooks/NotebookSelectButton/notebookSelectButtonLogic.ts b/frontend/src/scenes/notebooks/NotebookSelectButton/notebookSelectButtonLogic.ts index 15f13b70f4141..9cb172c18cce5 100644 --- a/frontend/src/scenes/notebooks/NotebookSelectButton/notebookSelectButtonLogic.ts +++ b/frontend/src/scenes/notebooks/NotebookSelectButton/notebookSelectButtonLogic.ts @@ -1,6 +1,6 @@ import { actions, kea, key, listeners, path, props, reducers, selectors } from 'kea' import { loaders } from 'kea-loaders' -import { NotebookListItemType, NotebookNodeResource } from '~/types' +import { NotebookListItemType, NotebookNodeResource, NotebookNodeType } from '~/types' import api from 'lib/api' @@ -69,7 +69,17 @@ export const notebookSelectButtonLogic = kea([ } const response = await api.notebooks.list( props.resource && typeof props.resource !== 'boolean' - ? [{ type: props.resource.type, attrs: { id: props.resource.attrs?.id } }] + ? [ + { + type: props.resource.type, + attrs: { + id: + props.resource.type === NotebookNodeType.Query + ? props.resource.attrs.query.shortId + : props.resource.attrs.id, + }, + }, + ] : undefined, undefined, values.searchQuery ?? undefined diff --git a/frontend/src/scenes/persons/PersonPreview.tsx b/frontend/src/scenes/persons/PersonPreview.tsx index 7b9e61fe377aa..b303e6a05ba92 100644 --- a/frontend/src/scenes/persons/PersonPreview.tsx +++ b/frontend/src/scenes/persons/PersonPreview.tsx @@ -43,10 +43,8 @@ export function PersonPreview(props: PersonPreviewProps): JSX.Element | null { props.onClose?.()} size="small" diff --git a/frontend/src/scenes/persons/PersonScene.tsx b/frontend/src/scenes/persons/PersonScene.tsx index bce2a2b72d130..282f287083d25 100644 --- a/frontend/src/scenes/persons/PersonScene.tsx +++ b/frontend/src/scenes/persons/PersonScene.tsx @@ -147,10 +147,8 @@ export function PersonScene(): JSX.Element | null {
diff --git a/frontend/src/scenes/session-recordings/SessionRecordings.tsx b/frontend/src/scenes/session-recordings/SessionRecordings.tsx index 7e44843bf4d92..9d76cf1659789 100644 --- a/frontend/src/scenes/session-recordings/SessionRecordings.tsx +++ b/frontend/src/scenes/session-recordings/SessionRecordings.tsx @@ -67,10 +67,8 @@ export function SessionsRecordings(): JSX.Element { <>