{dashboard?.title || $t.dashboard?.overview}

{#if hasGitRepository() && gitDashboardRef}
{/if}

{$t.common?.id}: {resolvedDashboardId ?? dashboardRef}{#if dashboard?.slug} • {dashboard.slug}{/if} | Git: {gitMeta.label} {#if gitStatus?.ahead_count > 0} ({gitStatus.ahead_count}) {/if}

{#if !llmReady}
{$t.dashboard?.llm_not_configured || "LLM is not configured"}
{#if llmStatusReason === "no_active_provider"} {$t.dashboard?.llm_configure_provider || "No active LLM provider. Configure it in Admin -> LLM Settings."} {:else if llmStatusReason === "invalid_api_key"} {$t.dashboard?.llm_configure_key || "Invalid LLM API key. Update and save a real key in Admin -> LLM Settings."} {:else} {$t.dashboard?.llm_status_unavailable || "LLM status is unavailable. Check settings and backend logs."} {/if}
{/if} {#if error}
{error}
{/if} {#if isLoading}
{#each Array(3) as _}
{/each}
{:else if dashboard}

{$t.dashboard?.api_thumbnail || "Dashboard thumbnail"}

{#if isThumbnailLoading}
{:else if thumbnailUrl} Dashboard thumbnail {:else}
{thumbnailError || $t.dashboard?.thumbnail_unavailable || "Thumbnail is unavailable"}
{/if}

{$t.git?.management || "Git Repository"}

{#if isGitStatusLoading}
{#each Array(3) as _}
{/each}
{:else if gitStatusError}
{gitStatusError}
{:else if !hasGitRepository()}
{$t.git?.not_linked || "Этот дашборд еще не привязан к Git-репозиторию."}
{:else}

{#if gitSyncState === "CHANGES"} Обнаружены изменения конфигурации в Superset. {:else} Конфигурация Superset совпадает с веткой {gitStatus?.current_branch || "main"}. {/if}

charts: {changedChartsCount} datasets: {changedDatasetsCount} files: {allChangedFiles().length}
{#if gitDiffPreview}
{gitDiffPreview}
{/if}
{/if}

{$t.dashboard?.last_modified}

{formatDate(dashboard.last_modified)}

{$t.dashboard?.charts}

{dashboard.chart_count || 0}

{$t.nav?.datasets}

{dashboard.dataset_count || 0}

{#if activeTab === "resources"} {#if dashboard.description}

{$t.dashboard?.overview}

{dashboard.description}

{/if}

{$t.dashboard?.charts}

{#if dashboard.charts && dashboard.charts.length > 0}
{#each dashboard.charts as chart} {/each}
{$t.settings?.type_chart} {$t.nav?.datasets} {$t.dashboard?.overview} {$t.dashboard?.last_modified}
{chart.title}
ID: {chart.id}{#if chart.viz_type} • {chart.viz_type}{/if}
{#if chart.dataset_id} {:else} - {/if} {chart.overview || "-"} {formatDate(chart.last_modified)}
{:else}
{$t.dashboard?.no_charts}
{/if}

{$t.nav?.datasets}

{#if dashboard.datasets && dashboard.datasets.length > 0}
{#each dashboard.datasets as dataset} {/each}
{:else}
{$t.dashboard?.no_datasets}
{/if}
{:else if activeTab === "git-history"} {#if hasGitRepository() && gitDashboardRef} {:else}
{$t.git?.not_linked || "This dashboard is not yet linked to a Git repository."}
{/if} {:else}

{$t.tasks?.recent || "Recent tasks"}

{#if isTaskHistoryLoading}
{#each Array(4) as _}
{/each}
{:else if taskHistoryError}
{taskHistoryError}
{:else if taskHistory.length === 0}
{$t.tasks?.select_task || "No backup/LLM tasks yet"}
{:else}
{#each taskHistory as task} {@const validation = getValidationStatus(task)} {/each}
{$t.common?.type || "Type"} {$t.common?.status || "Status"} {$t.tasks?.result || "Check"} {$t.common?.started || "Started"} {$t.common?.finished || "Finished"} {$t.common?.actions || "Actions"}
{toTaskTypeLabel(task.plugin_id)} {task.status} {#if validation.icon} {validation.icon} {/if} {validation.label} {formatDate(task.started_at)} {formatDate(task.finished_at)}
{#if task.plugin_id === "llm_dashboard_validation"} {/if}
{/if}
{/if}
{/if}
{#if showGitManager && gitDashboardRef} {/if}