fix: DatasetPreview dashboard links missing env_id
Dashboard links in DatasetPreview were constructed without env_id query parameter, causing 'Отсутствует ID дашборда или окружения' error when clicking through from dataset detail. Use ROUTES.dashboards.detail() helper which correctly appends ?env_id= to the URL.
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
<!-- @UX_STATE Error -> Error banner with retry. -->
|
<!-- @UX_STATE Error -> Error banner with retry. -->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { t } from "$lib/i18n/index.svelte.js";
|
import { t } from "$lib/i18n/index.svelte.js";
|
||||||
|
import { ROUTES } from "$lib/routes.js";
|
||||||
import ColumnsTable from "./ColumnsTable.svelte";
|
import ColumnsTable from "./ColumnsTable.svelte";
|
||||||
import MetricsTable from "./MetricsTable.svelte";
|
import MetricsTable from "./MetricsTable.svelte";
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
{#if dataset.linked_dashboards?.length}
|
{#if dataset.linked_dashboards?.length}
|
||||||
<div class="flex gap-1.5 mt-2 flex-wrap">
|
<div class="flex gap-1.5 mt-2 flex-wrap">
|
||||||
{#each dataset.linked_dashboards as dash}
|
{#each dataset.linked_dashboards as dash}
|
||||||
<a href={`/dashboards/${dash.slug || dash.id}`} class="inline-block px-2 py-0.5 text-xs bg-primary-light text-primary rounded-full hover:bg-primary-light">
|
<a href={ROUTES.dashboards.detail(String(dash.slug || dash.id), envId)} class="inline-block px-2 py-0.5 text-xs bg-primary-light text-primary rounded-full hover:bg-primary-light">
|
||||||
{dash.title}
|
{dash.title}
|
||||||
</a>
|
</a>
|
||||||
{/each}
|
{/each}
|
||||||
|
|||||||
Reference in New Issue
Block a user