From b6eaf7649701b5af1db3b6cf27969c0c501e317c Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Sun, 5 Oct 2025 05:44:58 -0700 Subject: [PATCH] Include templates in onboarding selector --- bin/core/src/api/read/deployment.rs | 4 +++- bin/core/src/api/read/repo.rs | 6 +++++- bin/core/src/api/read/server.rs | 4 +++- bin/core/src/api/read/stack.rs | 6 +++++- frontend/src/pages/settings/onboarding.tsx | 7 ++++++- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/bin/core/src/api/read/deployment.rs b/bin/core/src/api/read/deployment.rs index dd40a6574..f03a0ed61 100644 --- a/bin/core/src/api/read/deployment.rs +++ b/bin/core/src/api/read/deployment.rs @@ -325,7 +325,9 @@ impl Resolve for GetDeploymentsSummary { res.not_deployed += 1; } DeploymentState::Unknown => { - res.unknown += 1; + if !deployment.template { + res.unknown += 1; + } } _ => { res.unhealthy += 1; diff --git a/bin/core/src/api/read/repo.rs b/bin/core/src/api/read/repo.rs index 1b99a1f52..e1f670870 100644 --- a/bin/core/src/api/read/repo.rs +++ b/bin/core/src/api/read/repo.rs @@ -142,7 +142,11 @@ impl Resolve for GetReposSummary { } (RepoState::Ok, _) => res.ok += 1, (RepoState::Failed, _) => res.failed += 1, - (RepoState::Unknown, _) => res.unknown += 1, + (RepoState::Unknown, _) => { + if !repo.template { + res.unknown += 1 + } + } // will never come off the cache in the building state, since that comes from action states (RepoState::Cloning, _) | (RepoState::Pulling, _) diff --git a/bin/core/src/api/read/server.rs b/bin/core/src/api/read/server.rs index a048f5e0d..caa578c79 100644 --- a/bin/core/src/api/read/server.rs +++ b/bin/core/src/api/read/server.rs @@ -90,7 +90,9 @@ impl Resolve for GetServersSummary { res.unhealthy += 1; } ServerState::Disabled => { - res.disabled += 1; + if !server.template { + res.disabled += 1; + } } } } diff --git a/bin/core/src/api/read/stack.rs b/bin/core/src/api/read/stack.rs index a7377f6de..6f8bbc581 100644 --- a/bin/core/src/api/read/stack.rs +++ b/bin/core/src/api/read/stack.rs @@ -366,7 +366,11 @@ impl Resolve for GetStacksSummary { StackState::Running => res.running += 1, StackState::Stopped | StackState::Paused => res.stopped += 1, StackState::Down => res.down += 1, - StackState::Unknown => res.unknown += 1, + StackState::Unknown => { + if !stack.template { + res.unknown += 1 + } + } _ => res.unhealthy += 1, } } diff --git a/frontend/src/pages/settings/onboarding.tsx b/frontend/src/pages/settings/onboarding.tsx index 35c2022ea..acfe72c86 100644 --- a/frontend/src/pages/settings/onboarding.tsx +++ b/frontend/src/pages/settings/onboarding.tsx @@ -26,6 +26,7 @@ import { DataTable, SortableHeader } from "@ui/data-table"; import { fmt_date_with_minutes } from "@lib/formatting"; import { Switch } from "@ui/switch"; import { ResourceSelector, TagSelector } from "@components/resources/common"; +import { Types } from "komodo_client"; export const Onboarding = () => { useSetTitle("Onboarding"); @@ -64,7 +65,11 @@ export const Onboarding = () => { accessorKey: "copy_server", header: "Template", cell: ({ row }) => ( - + ), }, {