Include templates in onboarding selector

This commit is contained in:
mbecker20
2025-10-05 05:44:58 -07:00
parent 073893da0e
commit b6eaf76497
5 changed files with 22 additions and 5 deletions

View File

@@ -325,7 +325,9 @@ impl Resolve<ReadArgs> for GetDeploymentsSummary {
res.not_deployed += 1;
}
DeploymentState::Unknown => {
res.unknown += 1;
if !deployment.template {
res.unknown += 1;
}
}
_ => {
res.unhealthy += 1;

View File

@@ -142,7 +142,11 @@ impl Resolve<ReadArgs> 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, _)

View File

@@ -90,7 +90,9 @@ impl Resolve<ReadArgs> for GetServersSummary {
res.unhealthy += 1;
}
ServerState::Disabled => {
res.disabled += 1;
if !server.template {
res.disabled += 1;
}
}
}
}

View File

@@ -366,7 +366,11 @@ impl Resolve<ReadArgs> 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,
}
}

View File

@@ -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 }) => (
<ResourceSelector type="Server" selected={row.original.copy_server} />
<ResourceSelector
type="Server"
selected={row.original.copy_server}
templates={Types.TemplatesQueryBehavior.Include}
/>
),
},
{