Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(modeling): manage dags in the /models scene (#56956)

andrew j. mcgehee9fa8111cdcff
diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts
index d1b8197aecc2..6057ef0f8ae6 100644
--- a/frontend/src/lib/api.ts
+++ b/frontend/src/lib/api.ts
@@ -1446,6 +1446,10 @@ export class ApiRequest {
return this.environmentsDetail(teamId).addPathComponent('data_modeling_dags')
}
+ public dataModelingDag(id: DataModelingDAG['id'], teamId?: TeamType['id']): ApiRequest {
+ return this.dataModelingDags(teamId).addPathComponent(id)
+ }
+
// # Data Modeling Nodes
public dataModelingNodes(teamId?: TeamType['id']): ApiRequest {
return this.environmentsDetail(teamId).addPathComponent('data_modeling_nodes')
@@ -5332,6 +5336,15 @@ const api = {
async create(data: { name: string; description?: string; sync_frequency?: string }): Promise<DataModelingDAG> {
return await new ApiRequest().dataModelingDags().create({ data })
},
+ async update(
+ dagId: DataModelingDAG['id'],
+ data: Partial<Pick<DataModelingDAG, 'name' | 'description' | 'sync_frequency'>>
+ ): Promise<DataModelingDAG> {
+ return await new ApiRequest().dataModelingDag(dagId).update({ data })
+ },
+ async delete(dagId: DataModelingDAG['id']): Promise<void> {
+ await new ApiRequest().dataModelingDag(dagId).delete()
+ },
},
dataModelingNodes: {
diff --git a/frontend/src/products.tsx b/frontend/src/products.tsx
index 2bdcae132531..18a6c8dedf4b 100644
--- a/frontend/src/products.tsx
+++ b/frontend/src/products.tsx
@@ -34,6 +34,7 @@ import type {
import type { SourceSceneTab } from '../../products/data_warehouse/frontend/scenes/SourceScene/SourceScene'
import { LLM_ANALYTICS_CLUSTER_URL_PATTERN } from '../../products/llm_analytics/frontend/clusters/constants'
import type { WorkflowsSceneTab } from '../../products/workflows/frontend/WorkflowsScene'
+import type { ModelsSceneTab } from './scenes/models/modelsSceneLogic'
import {
ActionType,
DashboardType,
@@ -162,6 +163,7 @@ export const productRoutes: Record<string, [string, string]> = {
'/customer_analytics/configuration': ['CustomerAnalyticsConfiguration', 'customerAnalyticsConfiguration'],
'/data-ops': ['DataOps', 'dataOps'],
'/models': ['Models', 'models'],
+ '/models/dags': ['Models', 'models'],
'/models/:id': ['NodeDetail', 'nodeDetail'],
'/data-management/sources': ['Sources', 'sources'],
'/data-management/sources/:sourceId/schemas/:schemaId': ['DataWarehouseSourceSchema', 'dataWarehouseSourceSchema'],
@@ -693,7 +695,7 @@ export const productUrls = {
`/dashboard/${id}/subscriptions/${subscriptionId}`,
sharedDashboard: (shareToken: string): string => `/shared_dashboard/${shareToken}`,
dataOps: (tab?: string): string => (tab ? `/data-warehouse?tab=${tab}` : '/data-ops'),
- models: (): string => '/models',
+ models: (tab?: ModelsSceneTab): string => `/models${tab ? `/${tab}` : ''}`,
nodeDetail: (id: string): string => `/models/${id}`,
sources: (): string => '/data-management/sources',
dataWarehouseSource: (id: string, tab?: SourceSceneTab): string =>
diff --git a/frontend/src/scenes/models/DagsTab.tsx b/frontend/src/scenes/models/DagsTab.tsx
new file mode 100644
index 000000000000..0614d0cf7d16
--- /dev/null
+++ b/frontend/src/scenes/models/DagsTab.tsx
@@ -0,0 +1,167 @@
+import { useActions, useValues } from 'kea'
+import { useEffect } from 'react'
+
+import {
+ LemonButton,
+ LemonDialog,
+ LemonInput,
+ LemonSelect,
+ LemonTable,
+ LemonTableColumns,
+ Tooltip,
+} from '@posthog/lemon-ui'
+
+import { More } from 'lib/lemon-ui/LemonButton/More'
+import { LemonField } from 'lib/lemon-ui/LemonField'
+import { pluralize } from 'lib/utils'
+
+import { DataModelingDAG, DataModelingSyncInterval } from '~/types'
+
+import { SYNC_FREQUENCY_OPTIONS, dagsLogic } from './dagsLogic'
+
+const DEFAULT_DAG_NAME = 'Default'
+
+export function DagsTab(): JSX.Element {
+ const { dags, dagsLoading } = useValues(dagsLogic)
+ const { loadDags, updateDag, deleteDag } = useActions(dagsLogic)
+
+ useEffect(() => {
+ loadDags()
+ }, [loadDags])
+
+ const columns: LemonTableColumns<DataModelingDAG> = [
+ {
+ title: 'Name',
+ key: 'name',
+ render: (_, dag) => (
+ <div className="flex flex-col">
+ <span className="font-semibold">{dag.name}</span>
+ {dag.description && <span className="text-muted text-xs">{dag.description}</span>}
+ </div>
+ ),
+ },
+ {
+ title: 'Models',
+ key: 'node_count',
+ render: (_, dag) => pluralize(dag.node_count, 'model', 'models'),
+ },
+ {
+ title: 'Sync frequency',
+ key: 'sync_frequency',
+ render: (_, dag) => (
+ <LemonSelect<DataModelingSyncInterval>
+ value={dag.sync_frequency ?? '24hour'}
+ options={SYNC_FREQUENCY_OPTIONS}
+ size="small"
+ onChange={(value) => {
+ if (value && value !== dag.sync_frequency) {
+ updateDag({ ...dag, sync_frequency: value })
+ }
+ }}
+ />
+ ),
+ },
+ {
+ key: 'actions',
+ width: 0,
+ render: (_, dag) => {
+ const isDefault = dag.name === DEFAULT_DAG_NAME
+ return (
+ <div className="flex justify-end">
+ <More
+ overlay={
+ <>
+ <LemonButton
+ type="tertiary"
+ size="xsmall"
+ fullWidth
+ onClick={() => openRenameDagDialog({ dag, onSubmit: updateDag })}
+ disabledReason={isDefault ? 'The default DAG cannot be renamed' : undefined}
+ >
+ Rename
+ </LemonButton>
+ <Tooltip
+ title={
+ isDefault
+ ? 'The default DAG cannot be deleted.'
+ : 'Deleting a DAG will also remove all of its model assignments.'
+ }
+ >
+ <LemonButton
+ type="tertiary"
+ size="xsmall"
+ fullWidth
+ status="danger"
+ disabledReason={isDefault ? 'The default DAG cannot be deleted' : undefined}
+ onClick={() => {
+ LemonDialog.open({
+ title: `Delete ${dag.name}?`,
+ description:
+ dag.node_count > 0
+ ? `This DAG currently has ${pluralize(dag.node_count, 'model', 'models')} assigned to it. Deleting it will remove those assignments.`
+ : 'This action cannot be undone.',
+ primaryButton: {
+ children: 'Delete',
+ status: 'danger',
+ onClick: () => deleteDag(dag),
+ },
+ secondaryButton: { children: 'Cancel', type: 'tertiary' },
+ })
+ }}
+ >
+ Delete
+ </LemonButton>
+ </Tooltip>
+ </>
+ }
+ />
+ </div>
+ )
+ },
+ },
+ ]
+
+ return (
+ <LemonTable<DataModelingDAG>
+ dataSource={dags}
+ loading={dagsLoading}
+ disableTableWhileLoading={false}
+ columns={columns}
+ emptyState="No DAGs yet"
+ rowKey="id"
+ rowClassName="[&>td]:py-2"
+ />
+ )
+}
+
+function openRenameDagDialog({
+ dag,
+ onSubmit,
+}: {
+ dag: DataModelingDAG
+ onSubmit: (dag: DataModelingDAG) => void
+}): void {
+ LemonDialog.openForm({
+ title: `Rename ${dag.name}`,
+ initialValues: {
+ name: dag.name,
+ description: dag.description ?? '',
+ },
+ content: (
+ <>
+ <LemonField name="name" label="Name">
+ <LemonInput placeholder="Enter a DAG name" autoFocus />
+ </LemonField>
+ <LemonField name="description" label="Description" className="mt-2">
+ <LemonInput placeholder="Optional description" />
+ </LemonField>
+ </>
+ ),
+ errors: {
+ name: (name) => (name?.trim() ? undefined : 'You must enter a DAG name'),
+ },
+ onSubmit: ({ name, description }) => {
+ onSubmit({ ...dag, name: name.trim(), description: description?.trim() ?? '' })
+ },
+ })
+}
diff --git a/frontend/src/scenes/models/ModelsScene.tsx b/frontend/src/scenes/models/ModelsScene.tsx
index c0d13e3534c9..ef1ca24cb51f 100644
--- a/frontend/src/scenes/models/ModelsScene.tsx
+++ b/frontend/src/scenes/models/ModelsScene.tsx
@@ -1,4 +1,4 @@
-import { useValues } from 'kea'
+import { useActions, useValues } from 'kea'
import { useCallback } from 'react'
import { LemonButton } from '@posthog/lemon-ui'
@@ -7,6 +7,7 @@ import { AccessControlAction } from 'lib/components/AccessControlAction'
import { AccessDenied } from 'lib/components/AccessDenied'
import { AppShortcut } from 'lib/components/AppShortcuts/AppShortcut'
import { keyBinds } from 'lib/components/AppShortcuts/shortcuts'
+import { LemonTab, LemonTabs } from 'lib/lemon-ui/LemonTabs'
import { userHasAccess } from 'lib/utils/accessControlUtils'
import { sceneConfigurations } from 'scenes/scenes'
import { Scene, SceneExport } from 'scenes/sceneTypes'
@@ -18,7 +19,8 @@ import { ProductKey } from '~/queries/schema/schema-general'
import { AccessControlLevel, AccessControlResourceType, DataWarehouseSavedQuery } from '~/types'
import { ViewsTab } from '../data-warehouse/scene/ViewsTab'
-import { modelsSceneLogic } from './modelsSceneLogic'
+import { DagsTab } from './DagsTab'
+import { ModelsSceneTab, modelsSceneLogic } from './modelsSceneLogic'
export const scene: SceneExport = {
component: ModelsScene,
@@ -27,7 +29,8 @@ export const scene: SceneExport = {
}
export function ModelsScene(): JSX.Element {
- const { savedQueryIdToNodeId } = useValues(modelsSceneLogic)
+ const { savedQueryIdToNodeId, currentTab } = useValues(modelsSceneLogic)
+ const { setCurrentTab } = useActions(modelsSceneLogic)
const getViewUrl = useCallback(
(view: DataWarehouseSavedQuery): string => {
@@ -37,6 +40,18 @@ export function ModelsScene(): JSX.Element {
[savedQueryIdToNodeId]
)
+ const tabs: LemonTab<ModelsSceneTab>[] = [
+ {
+ label: 'Views',
+ key: 'views',
+ content: <ViewsTab getViewUrl={getViewUrl} />,
+ },
+ {
+ label: 'DAGs',
+ key: 'dags',
+ content: <DagsTab />,
+ },
+ ]
if (!userHasAccess(AccessControlResourceType.WarehouseObjects, AccessControlLevel.Viewer)) {
return (
<AccessDenied reason="You don't have access to Data warehouse tables & views, so this page isn't available." />
@@ -52,33 +67,35 @@ export function ModelsScene(): JSX.Element {
type: sceneConfigurations[Scene.Models].iconType || 'default_icon_type',
}}
actions={
- <div className="flex gap-2">
- <AppShortcut
- name="NewModel"
- keybind={[keyBinds.new]}
- intent="New view"
- interaction="click"
- scope={Scene.Models}
- >
- <AccessControlAction
- resourceType={AccessControlResourceType.WarehouseObjects}
- minAccessLevel={AccessControlLevel.Editor}
+ currentTab === 'views' ? (
+ <div className="flex gap-2">
+ <AppShortcut
+ name="NewModel"
+ keybind={[keyBinds.new]}
+ intent="New view"
+ interaction="click"
+ scope={Scene.Models}
>
- <LemonButton
- type="primary"
- to={urls.sqlEditor()}
- size="small"
- tooltip="Create view"
- data-attr="new-view-button"
+ <AccessControlAction
+ resourceType={AccessControlResourceType.WarehouseObjects}
+ minAccessLevel={AccessControlLevel.Editor}
>
- Create view
- </LemonButton>
- </AccessControlAction>
- </AppShortcut>
- </div>
+ <LemonButton
+ type="primary"
+ to={urls.sqlEditor()}
+ size="small"
+ tooltip="Create view"
+ data-attr="new-view-button"
+ >
+ Create view
+ </LemonButton>
+ </AccessControlAction>
+ </AppShortcut>
+ </div>
+ ) : undefined
}
/>
- <ViewsTab getViewUrl={getViewUrl} />
+ <LemonTabs activeKey={currentTab} tabs={tabs} onChange={setCurrentTab} sceneInset />
</SceneContent>
)
}
diff --git a/frontend/src/scenes/models/dagsLogic.ts b/frontend/src/scenes/models/dagsLogic.ts
new file mode 100644
index 000000000000..6446f24b55d5
--- /dev/null
+++ b/frontend/src/scenes/models/dagsLogic.ts
@@ -0,0 +1,60 @@
+import { kea, listeners, path } from 'kea'
+import { loaders } from 'kea-loaders'
+
+import { lemonToast } from '@posthog/lemon-ui'
+
+import api from 'lib/api'
+
+import { DataModelingDAG, DataModelingSyncInterval } from '~/types'
+
+import type { dagsLogicType } from './dagsLogicType'
+
+export const SYNC_FREQUENCY_OPTIONS: { value: DataModelingSyncInterval; label: string }[] = [
+ { value: '15min', label: '15 minutes' },
+ { value: '30min', label: '30 minutes' },
+ { value: '1hour', label: '1 hour' },
+ { value: '6hour', label: '6 hours' },
+ { value: '12hour', label: '12 hours' },
+ { value: '24hour', label: 'Daily' },
+ { value: '7day', label: 'Weekly' },
+ { value: '30day', label: 'Monthly' },
+]
+
+export const dagsLogic = kea<dagsLogicType>([
+ path(['scenes', 'models', 'dagsLogic']),
+ loaders(({ values }) => ({
+ dags: {
+ __default: [] as DataModelingDAG[],
+ loadDags: async (): Promise<DataModelingDAG[]> => {
+ const response = await api.dataModelingDags.list()
+ return response.results
+ },
+ updateDag: async (dag: DataModelingDAG): Promise<DataModelingDAG[]> => {
+ const updated = await api.dataModelingDags.update(dag.id, {
+ name: dag.name,
+ description: dag.description,
+ sync_frequency: dag.sync_frequency,
+ })
+ return values.dags.map((d) => (d.id === updated.id ? updated : d))
+ },
+ deleteDag: async (dag: DataModelingDAG): Promise<DataModelingDAG[]> => {
+ await api.dataModelingDags.delete(dag.id)
+ return values.dags.filter((d) => d.id !== dag.id)
+ },
+ },
+ })),
+ listeners(() => ({
+ updateDagSuccess: () => {
+ lemonToast.success('DAG updated')
+ },
+ updateDagFailure: ({ error }) => {
+ lemonToast.error(`Failed to update DAG: ${error ?? 'Unknown error'}`)
+ },
+ deleteDagSuccess: () => {
+ lemonToast.success('DAG deleted')
+ },
+ deleteDagFailure: ({ error }) => {
+ lemonToast.error(`Failed to delete DAG: ${error ?? 'Unknown error'}`)
+ },
+ })),
+])
diff --git a/frontend/src/scenes/models/modelsSceneLogic.ts b/frontend/src/scenes/models/modelsSceneLogic.ts
index bb5f0b876fb4..4b8409eef426 100644
--- a/frontend/src/scenes/models/modelsSceneLogic.ts
+++ b/frontend/src/scenes/models/modelsSceneLogic.ts
@@ -1,19 +1,38 @@
-import { afterMount, connect, kea, path, selectors } from 'kea'
+import { actions, afterMount, connect, kea, path, reducers, selectors } from 'kea'
import { loaders } from 'kea-loaders'
+import { actionToUrl, urlToAction } from 'kea-router'
import api from 'lib/api'
import { dataWarehouseViewsLogic } from 'scenes/data-warehouse/saved_queries/dataWarehouseViewsLogic'
+import { urls } from 'scenes/urls'
import { DataModelingNode } from '~/types'
import type { modelsSceneLogicType } from './modelsSceneLogicType'
+export const MODELS_SCENE_TABS = ['views', 'dags'] as const
+export type ModelsSceneTab = (typeof MODELS_SCENE_TABS)[number]
+export const DEFAULT_MODELS_SCENE_TAB: ModelsSceneTab = 'views'
+
export const modelsSceneLogic = kea<modelsSceneLogicType>([
path(['scenes', 'models', 'modelsSceneLogic']),
connect(() => ({
values: [dataWarehouseViewsLogic, ['dataWarehouseSavedQueries', 'dataWarehouseSavedQueriesLoading']],
actions: [dataWarehouseViewsLogic, ['loadDataWarehouseSavedQueries']],
})),
+ actions({
+ setCurrentTab: (tab: ModelsSceneTab) => ({ tab }),
+ _setCurrentTab: (tab: ModelsSceneTab) => ({ tab }),
+ }),
+ reducers({
+ currentTab: [
+ DEFAULT_MODELS_SCENE_TAB as ModelsSceneTab,
+ {
+ setCurrentTab: (_, { tab }) => tab,
+ _setCurrentTab: (_, { tab }) => tab,
+ },
+ ],
+ }),
loaders({
nodes: {
__default: [] as DataModelingNode[],
@@ -37,6 +56,21 @@ export const modelsSceneLogic = kea<modelsSceneLogicType>([
},
],
}),
+ actionToUrl(() => ({
+ setCurrentTab: ({ tab }) => urls.models(tab === DEFAULT_MODELS_SCENE_TAB ? undefined : tab),
+ })),
+ urlToAction(({ actions, values }) => ({
+ [urls.models()]: () => {
+ if (values.currentTab !== DEFAULT_MODELS_SCENE_TAB) {
+ actions._setCurrentTab(DEFAULT_MODELS_SCENE_TAB)
+ }
+ },
+ [urls.models('dags')]: () => {
+ if (values.currentTab !== 'dags') {
+ actions._setCurrentTab('dags')
+ }
+ },
+ })),
afterMount(({ actions }) => {
actions.loadDataWarehouseSavedQueries()
actions.loadNodes()
diff --git a/frontend/src/scenes/urls.ts b/frontend/src/scenes/urls.ts
index 10559f543026..f622ba22348b 100644
--- a/frontend/src/scenes/urls.ts
+++ b/frontend/src/scenes/urls.ts
@@ -10,6 +10,7 @@ import type { BillingSectionId } from './billing/types'
import { DataPipelinesNewSceneKind } from './data-pipelines/DataPipelinesNewScene'
import { OutputTab } from './data-warehouse/editor/outputPaneLogic'
import type { HogFunctionSceneTab } from './hog-functions/HogFunctionScene'
+import type { ModelsSceneTab } from './models/modelsSceneLogic'
import type { SettingId, SettingLevelId, SettingSectionId } from './settings/types'
/**
@@ -43,7 +44,7 @@ export const urls = {
webScripts: (): string => '/web-scripts',
webScriptsNew: (): string => '/web-scripts/new',
destinations: (): string => '/data-management/destinations',
- models: (): string => '/models',
+ models: (tab?: ModelsSceneTab): string => `/models${tab ? `/${tab}` : ''}`,
transformations: (): string => '/data-management/transformations',
activity: (tab: ActivityTab | ':tab' = ActivityTab.ExploreEvents): string => `/activity/${tab}`,
event: (id: string, timestamp: string): string =>
diff --git a/products/data_modeling/backend/api/dag.py b/products/data_modeling/backend/api/dag.py
index 4e8f9990de59..92a38aaa238d 100644
--- a/products/data_modeling/backend/api/dag.py
+++ b/products/data_modeling/backend/api/dag.py
@@ -1,6 +1,7 @@
from django.db.models import Count
from rest_framework import serializers, viewsets
+from rest_framework.exceptions import ValidationError
from posthog.api.routing import TeamAndOrgViewSetMixin
@@ -54,6 +55,11 @@ class DAGSerializer(serializers.ModelSerializer):
raise serializers.ValidationError(f"Invalid sync frequency: {value}")
return value
+ def validate_name(self, value: str) -> str:
+ if self.instance is not None and self.instance.is_default and value != self.instance.name:
+ raise serializers.ValidationError("The default DAG cannot be renamed.")
+ return value
+
def create(self, validated_data: dict) -> DAG:
validated_data["team_id"] = self.context["team_id"]
sync_frequency = validated_data.pop("sync_frequency", None)
@@ -72,7 +78,12 @@ class DAGViewSet(TeamAndOrgViewSetMixin, viewsets.ModelViewSet):
scope_object = "INTERNAL"
queryset = DAG.objects.all()
serializer_class = DAGSerializer
- http_method_names = ["get", "post", "patch", "head", "options"]
+ http_method_names = ["get", "post", "patch", "delete", "head", "options"]
def safely_get_queryset(self, queryset):
return queryset.filter(team_id=self.team_id).annotate(node_count=Count("node")).order_by("name")
+
+ def perform_destroy(self, instance: DAG) -> None:
+ if instance.is_default:
+ raise ValidationError("The default DAG cannot be deleted.")
+ instance.delete()
diff --git a/products/data_modeling/backend/api/test/test_dag_api.py b/products/data_modeling/backend/api/test/test_dag_api.py
index 3b7c3f76ad9f..b35ffd2a689d 100644
--- a/products/data_modeling/backend/api/test/test_dag_api.py
+++ b/products/data_modeling/backend/api/test/test_dag_api.py
@@ -50,12 +50,33 @@ class TestDAGViewSet(APIBaseTest):
self.assertEqual(response.status_code, status.HTTP_200_OK)
self.assertEqual(response.json()["description"], "updated description")
- def test_delete_not_allowed(self):
+ def test_delete_dag(self):
dag = DAG.objects.create(team=self.team, name="my_dag")
response = self.client.delete(f"/api/environments/{self.team.id}/data_modeling_dags/{dag.id}/")
- self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
+ self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
+ self.assertFalse(DAG.objects.filter(team=self.team, id=dag.id).exists())
+
+ def test_cannot_delete_default_dag(self):
+ dag = DAG.get_or_create_default(self.team)
+
+ response = self.client.delete(f"/api/environments/{self.team.id}/data_modeling_dags/{dag.id}/")
+
+ self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
+ self.assertTrue(DAG.objects.filter(team=self.team, id=dag.id).exists())
+
+ def test_cannot_rename_default_dag(self):
+ dag = DAG.get_or_create_default(self.team)
+
+ response = self.client.patch(
+ f"/api/environments/{self.team.id}/data_modeling_dags/{dag.id}/",
+ {"name": "renamed"},
+ )
+
+ self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
+ dag.refresh_from_db()
+ self.assertEqual(dag.name, "Default")
def test_node_count_reflects_nodes(self):
dag = DAG.objects.create(team=self.team, name="my_dag")
diff --git a/products/data_warehouse/manifest.tsx b/products/data_warehouse/manifest.tsx
index ee575b95307f..5addb8e7e48a 100644
--- a/products/data_warehouse/manifest.tsx
+++ b/products/data_warehouse/manifest.tsx
@@ -4,6 +4,7 @@ import { urls } from 'scenes/urls'
import { ProductItemCategory, ProductKey } from '~/queries/schema/schema-general'
import { ActivityScope, ProductManifest } from '~/types'
+import type { ModelsSceneTab } from '../../frontend/src/scenes/models/modelsSceneLogic'
import type { SchemaConfigurationSection, SchemaSceneTab } from './frontend/scenes/SchemaScene/SchemaScene'
import type { SourceSceneTab } from './frontend/scenes/SourceScene/SourceScene'
@@ -66,6 +67,7 @@ export const manifest: ProductManifest = {
routes: {
'/data-ops': ['DataOps', 'dataOps'],
'/models': ['Models', 'models'],
+ '/models/dags': ['Models', 'models'],
'/models/:id': ['NodeDetail', 'nodeDetail'],
'/data-management/sources': ['Sources', 'sources'],
'/data-management/sources/:sourceId/schemas/:schemaId': [
@@ -89,7 +91,7 @@ export const manifest: ProductManifest = {
},
urls: {
dataOps: (tab?: string): string => (tab ? `/data-warehouse?tab=${tab}` : '/data-ops'),
- models: (): string => '/models',
+ models: (tab?: ModelsSceneTab): string => `/models${tab ? `/${tab}` : ''}`,
nodeDetail: (id: string): string => `/models/${id}`,
sources: (): string => '/data-management/sources',
dataWarehouseSource: (id: string, tab?: SourceSceneTab): string =>