Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f826af3
OSAC-2936: add field definition value model and protobuf Value serial…
ElayAharoni Jul 26, 2026
6518dd5
OSAC-2936: add shared field definition primitives
ElayAharoni Jul 26, 2026
e6d7878
OSAC-2936: add NodeSetsFieldEditor for cluster catalog item configura…
ElayAharoni Jul 26, 2026
b154320
OSAC-2936: add template, organization, and project list hooks for the…
ElayAharoni Jul 26, 2026
8af9995
OSAC-2936: add CatalogItemGeneralFields shared wizard step
ElayAharoni Jul 26, 2026
e51aa0e
OSAC-2936: bind the wizard Name field to title, not metadata.name
ElayAharoni Jul 26, 2026
c58ac0f
OSAC-2936: add cluster catalog item step components and create hook
ElayAharoni Jul 26, 2026
9f8342f
OSAC-2936: add VM catalog item step components and create hook
ElayAharoni Jul 26, 2026
cae826f
OSAC-2936: add bare metal catalog item step components and create hook
ElayAharoni Jul 26, 2026
8f189ea
OSAC-2936: add kind-specific catalog item create wizard pages
ElayAharoni Jul 26, 2026
2235067
OSAC-2936: add test for unrecognized :type route fallback
ElayAharoni Jul 26, 2026
112ef6d
OSAC-2936: address CodeRabbit review feedback on catalog item wizards
ElayAharoni Jul 27, 2026
a5f2671
OSAC-2936: address second round of CodeRabbit feedback, fix i18n lint…
ElayAharoni Jul 27, 2026
da2392f
OSAC-2936: scope cluster node sets to the selected template's host types
ElayAharoni Jul 27, 2026
9e9a173
OSAC-2936: fix imports dropped by rebase in baremetal-instance.test.ts
ElayAharoni Jul 28, 2026
7d8c0c7
OSAC-2936: regenerate translation.json after rebasing onto main
ElayAharoni Jul 28, 2026
e7d22af
OSAC-2936: regenerate translation.json after rebasing onto latest main
ElayAharoni Jul 28, 2026
6652a02
OSAC-2936: fix AdminCatalogRoutes test after rebasing onto OSAC-2932
ElayAharoni Jul 28, 2026
cb69e1e
OSAC-2936: fix import order after rebase conflict resolution
ElayAharoni Jul 28, 2026
21b3583
OSAC-2936: fix organizations 404 and stop polling wizard lookup data
ElayAharoni Jul 28, 2026
c24a572
OSAC-2936: register well-known types so Any-packed template defaults …
ElayAharoni Jul 28, 2026
4522c5f
OSAC-2936: fix catalog item wizard validation, authz, and layout issues
ElayAharoni Jul 28, 2026
8acc8d7
OSAC-2936: use project.metadata.name for the project selector label
ElayAharoni Jul 28, 2026
157bb8e
OSAC-2936: fix PR review comments (rawagner takes precedence)
ElayAharoni Jul 28, 2026
cf9fb16
OSAC-2936: enhance the node sets editor's layout
ElayAharoni Jul 29, 2026
c133279
OSAC-2936: make field-definition group headings bolder and clearer
ElayAharoni Jul 29, 2026
01e629b
OSAC-2936: give NodeSetsFieldEditor a top-level Node Sets heading
ElayAharoni Jul 29, 2026
6ad2812
OSAC-2936: remove cores/memory_gib fields from VM catalog item wizard
ElayAharoni Jul 29, 2026
f3a373b
OSAC-2936: rename Display name/Resource name to Title/Name, make Titl…
ElayAharoni Jul 29, 2026
91547e8
OSAC-2936: remove deprecated is_windows field, rename Image to Source…
ElayAharoni Jul 29, 2026
3d60a9e
OSAC-2936: address rawagner and batzionb review comments
ElayAharoni Jul 29, 2026
5d19b80
OSAC-2936: clean up node set headers and field labels
ElayAharoni Jul 30, 2026
6406e9a
OSAC-2936: show host type alone as each node set's header
ElayAharoni Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/app-frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import { ApiProvider, connectErrorInterceptor } from '@osac/ui-components/api/ap

import App from './App';
import './i18n';
import { wellKnownTypeRegistry } from './wellKnownTypeRegistry';

const connectTransport = createConnectTransport({
baseUrl: '/api/fulfillment',
interceptors: [connectErrorInterceptor],
jsonOptions: { registry: wellKnownTypeRegistry },
});

// CSS load order is intentional: base → addons → local overrides
Expand Down
57 changes: 57 additions & 0 deletions apps/app-frontend/src/shell/AdminCatalogRoutes.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { render, screen } from '@testing-library/react';
import { describe, expect, it, vi } from 'vitest';

import { AdminCatalogRoutes } from './AdminCatalogRoutes';
Comment thread
coderabbitai[bot] marked this conversation as resolved.

vi.mock('@osac/ui-components/pages/admin/cluster/ClusterCatalogItemCreatePage', () => ({
default: () => <div>Cluster create page</div>,
}));
vi.mock(
'@osac/ui-components/pages/admin/compute-instance/ComputeInstanceCatalogItemCreatePage',
() => ({
default: () => <div>Compute instance create page</div>,
}),
);
vi.mock(
'@osac/ui-components/pages/admin/baremetal-instance/BareMetalInstanceCatalogItemCreatePage',
() => ({
default: () => <div>Bare metal create page</div>,
}),
);
vi.mock('@osac/ui-components/pages/admin/CatalogManagementListPage', () => ({
default: () => <div>Catalog management list page</div>,
}));
vi.mock('@osac/ui-components/hooks/useTranslation', () => ({
useTranslation: () => ({ t: (key: string) => key }),
}));

// Mounted at /admin/catalog/* to match the real route registered in AppShell.tsx.
const renderAt = (path: string) =>
render(
<MemoryRouter initialEntries={[path]}>
<Routes>
<Route path="/admin/catalog/*" element={<AdminCatalogRoutes />} />
</Routes>
</MemoryRouter>,
);

describe('AdminCatalogRoutes', () => {
it('renders the cluster create page for :type = cluster', () => {
renderAt('/admin/catalog/cluster/create');

expect(screen.getByText('Cluster create page')).toBeInTheDocument();
});

it('renders the compute instance create page for :type = compute-instance', () => {
renderAt('/admin/catalog/compute-instance/create');

expect(screen.getByText('Compute instance create page')).toBeInTheDocument();
});

it('renders the bare metal create page for :type = baremetal-instance', () => {
renderAt('/admin/catalog/baremetal-instance/create');

expect(screen.getByText('Bare metal create page')).toBeInTheDocument();
});
});
10 changes: 9 additions & 1 deletion apps/app-frontend/src/shell/AdminCatalogRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import { Route, Routes } from 'react-router-dom';

import BareMetalInstanceCatalogItemCreatePage from '@osac/ui-components/pages/admin/baremetal-instance/BareMetalInstanceCatalogItemCreatePage';
import CatalogManagementListPage from '@osac/ui-components/pages/admin/CatalogManagementListPage';
import ClusterCatalogItemCreatePage from '@osac/ui-components/pages/admin/cluster/ClusterCatalogItemCreatePage';
import ComputeInstanceCatalogItemCreatePage from '@osac/ui-components/pages/admin/compute-instance/ComputeInstanceCatalogItemCreatePage';

export const AdminCatalogRoutes = () => {
return (
<Routes>
<Route index element={<CatalogManagementListPage />} />
<Route path=":type/create" element={<div />} />
<Route path="cluster/create" element={<ClusterCatalogItemCreatePage />} />
<Route path="compute-instance/create" element={<ComputeInstanceCatalogItemCreatePage />} />
<Route
path="baremetal-instance/create"
element={<BareMetalInstanceCatalogItemCreatePage />}
/>
<Route path=":type/:id" element={<div />} />
<Route path=":type/:id/edit" element={<div />} />
</Routes>
Expand Down
41 changes: 41 additions & 0 deletions apps/app-frontend/src/wellKnownTypeRegistry.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { fromJson } from '@bufbuild/protobuf';
import { AnySchema } from '@bufbuild/protobuf/wkt';
import { describe, expect, it } from 'vitest';

import { wellKnownTypeRegistry } from './wellKnownTypeRegistry';

describe('wellKnownTypeRegistry', () => {
it.each([
['google.protobuf.BoolValue', true],
['google.protobuf.BytesValue', 'AQI='],
['google.protobuf.StringValue', 'hello'],
['google.protobuf.Int32Value', 42],
['google.protobuf.Int64Value', '42'],
['google.protobuf.UInt32Value', 42],
['google.protobuf.UInt64Value', '42'],
['google.protobuf.DoubleValue', 4.2],
['google.protobuf.FloatValue', 4.2],
['google.protobuf.Value', { nested: true }],
['google.protobuf.Struct', { nested: true }],
['google.protobuf.ListValue', [1, 2, 3]],
['google.protobuf.Timestamp', '2026-01-01T00:00:00Z'],
['google.protobuf.Duration', '5s'],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
])('resolves %s packed in a google.protobuf.Any', (typeName, value) => {
const decode = () =>
fromJson(
AnySchema,
{ '@type': `type.googleapis.com/${typeName}`, value },
{ registry: wellKnownTypeRegistry },
);
expect(decode).not.toThrow();
});

it('fails to resolve an Any-packed well-known type without the registry', () => {
const decode = () =>
fromJson(AnySchema, {
'@type': 'type.googleapis.com/google.protobuf.BoolValue',
value: true,
});
expect(decode).toThrow(/not in the type registry/);
});
});
42 changes: 42 additions & 0 deletions apps/app-frontend/src/wellKnownTypeRegistry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { createRegistry } from '@bufbuild/protobuf';
import {
BoolValueSchema,
BytesValueSchema,
DoubleValueSchema,
DurationSchema,
FloatValueSchema,
Int32ValueSchema,
Int64ValueSchema,
ListValueSchema,
StringValueSchema,
StructSchema,
TimestampSchema,
UInt32ValueSchema,
UInt64ValueSchema,
ValueSchema,
} from '@bufbuild/protobuf/wkt';

// google.protobuf.Any is decoded by looking up its packed type by name in a registry — unlike a
// field with a static well-known type (e.g. metadata.creation_timestamp), Any's packed type is
// only known at runtime from its "@type" URL. Without an entry here, @bufbuild/protobuf throws
// "cannot decode message google.protobuf.Any from JSON: <type> is not in the type registry".
//
// ClusterTemplateParameterDefinition.default (and the equivalent field on other template types) is
// documented to pack one of these well-known types, so all of them must be registered for the
// catalog item wizards' template dropdowns to decode successfully.
export const wellKnownTypeRegistry = createRegistry(
BoolValueSchema,
BytesValueSchema,
DoubleValueSchema,
DurationSchema,
FloatValueSchema,
Int32ValueSchema,
Int64ValueSchema,
ListValueSchema,
StringValueSchema,
StructSchema,
TimestampSchema,
UInt32ValueSchema,
UInt64ValueSchema,
ValueSchema,
);
54 changes: 54 additions & 0 deletions libs/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
{
"Access": "Access",
"Actions": "Actions",
"Actions for {{name}}": "Actions for {{name}}",
"Add": "Add",
"Add additional disk": "Add additional disk",
"Add node set": "Add node set",
"Add rule": "Add rule",
"Additional disk {{number}}": "Additional disk {{number}}",
"Additional disk size (GiB)": "Additional disk size (GiB)",
"Administration": "Administration",
"All": "All",
"API URL": "API URL",
"At least one CIDR (IPv4 or IPv6) is required": "At least one CIDR (IPv4 or IPv6) is required",
"At least one node set is required": "At least one node set is required",
"Attach": "Attach",
"Attach public IP": "Attach public IP",
"Back": "Back",
"Bare Metal": "Bare Metal",
"bare metal instance": "bare metal instance",
"Bare metal instance conditions": "Bare metal instance conditions",
"Bare metal instances": "Bare metal instances",
"Bare Metal Machines": "Bare Metal Machines",
"Bare metal provisioning wizard": "Bare metal provisioning wizard",
"Boot disk size (GiB)": "Boot disk size (GiB)",
"Browse catalog items and launch virtual machines, clusters, or bare metal machines from published offerings.": "Browse catalog items and launch virtual machines, clusters, or bare metal machines from published offerings.",
"Cancel": "Cancel",
"Catalog": "Catalog",
Expand Down Expand Up @@ -106,17 +112,30 @@
"Console URL": "Console URL",
"Copied": "Copied",
"Copy": "Copy",
"Could not create catalog item": "Could not create catalog item",
"Could not load host types": "Could not load host types",
"Could not load instance types": "Could not load instance types",
"Create": "Create",
"Create bare metal catalog item": "Create bare metal catalog item",
"Create bare metal catalog item steps": "Create bare metal catalog item steps",
"Create cluster": "Create cluster",
"Create cluster catalog item": "Create cluster catalog item",
"Create cluster catalog item steps": "Create cluster catalog item steps",
"Create cluster wizard": "Create cluster wizard",
"Create security group": "Create security group",
"Create subnet": "Create subnet",
"Create virtual machine": "Create virtual machine",
"Create virtual machine catalog item": "Create virtual machine catalog item",
"Create virtual machine catalog item steps": "Create virtual machine catalog item steps",
"Create virtual network": "Create virtual network",
"Created": "Created",
"Creator": "Creator",
"Default nodes": "Default nodes",
"Default value": "Default value",
"Default value is required for non-editable fields": "Default value is required for non-editable fields",
"Define a curated bare metal offering for tenants to provision from.": "Define a curated bare metal offering for tenants to provision from.",
"Define a curated cluster offering for tenants to provision from.": "Define a curated cluster offering for tenants to provision from.",
"Define a curated virtual machine offering for tenants to provision from.": "Define a curated virtual machine offering for tenants to provision from.",
"Delete": "Delete",
"Delete {{name}}?": "Delete {{name}}?",
"Delete rule": "Delete rule",
Expand All @@ -125,6 +144,7 @@
"Delete security group?": "Delete security group?",
"Deleting": "Deleting",
"deprecated": "deprecated",
"Description": "Description",
"Destination CIDR": "Destination CIDR",
"Details": "Details",
"Download kubeconfig": "Download kubeconfig",
Expand Down Expand Up @@ -187,17 +207,28 @@
"Loading cluster password": "Loading cluster password",
"Loading security groups...": "Loading security groups...",
"Loading subnets...": "Loading subnets...",
"Loading...": "Loading...",
"Manage firewall rules for your virtual networks.": "Manage firewall rules for your virtual networks.",
"Manage virtual networks for your compute instances.": "Manage virtual networks for your compute instances.",
"Maximum (optional)": "Maximum (optional)",
"Maximum must be greater than or equal to minimum": "Maximum must be greater than or equal to minimum",
"Maximum nodes": "Maximum nodes",
"Message": "Message",
"Minimum (optional)": "Minimum (optional)",
"Minimum nodes": "Minimum nodes",
"Must be a number": "Must be a number",
"Must be a valid IPv4 CIDR notation (for example 10.128.0.0/14)": "Must be a valid IPv4 CIDR notation (for example 10.128.0.0/14)",
"Must be a valid regular expression": "Must be a valid regular expression",
"Name": "Name",
"Name cannot end with a hyphen": "Name cannot end with a hyphen",
"Name cannot start with a hyphen": "Name cannot start with a hyphen",
"Name is required": "Name is required",
"Name must be a valid DNS label (RFC 1035).": "Name must be a valid DNS label (RFC 1035).",
"Name must be at most 63 characters long": "Name must be at most 63 characters long",
"Name must only contain lowercase letters (a-z), digits (0-9), and hyphens (-)": "Name must only contain lowercase letters (a-z), digits (0-9), and hyphens (-)",
"Network attachments": "Network attachments",
"Networking": "Networking",
"Next": "Next",
"No bare metal instances match your search.": "No bare metal instances match your search.",
"No bare metal instances yet.": "No bare metal instances yet.",
"No catalog items found": "No catalog items found",
Expand All @@ -222,6 +253,7 @@
"Open catalog item details for {{title}}": "Open catalog item details for {{title}}",
"Optional cloud-init user data (max 64 KB).": "Optional cloud-init user data (max 64 KB).",
"Organization": "Organization",
"Organization is required": "Organization is required",
"Organization: {{name}}": "Organization: {{name}}",
"Outbound Rules": "Outbound Rules",
"Overview": "Overview",
Expand All @@ -240,6 +272,8 @@
"Port To": "Port To",
"Port To is required for TCP/UDP": "Port To is required for TCP/UDP",
"Port To must be >= Port From": "Port To must be >= Port From",
"Project": "Project",
"Project is required": "Project is required",
"Project: {{name}}": "Project: {{name}}",
"Protocol": "Protocol",
"Protocol is required": "Protocol is required",
Expand All @@ -253,28 +287,42 @@
"Pull secret": "Pull secret",
"Pull secret is required": "Pull secret is required",
"Pull secrets download OpenShift components and connect clusters to your Red Hat account. Copy the full JSON from OpenShift Cluster Manager (console.redhat.com/openshift/install/pull-secret).": "Pull secrets download OpenShift components and connect clusters to your Red Hat account. Copy the full JSON from OpenShift Cluster Manager (console.redhat.com/openshift/install/pull-secret).",
"Regular expression the tenant-provided value must match.": "Regular expression the tenant-provided value must match.",
"Release image": "Release image",
"Release image is required": "Release image is required",
"Remove additional disk": "Remove additional disk",
"Remove node set": "Remove node set",
"Restart": "Restart",
"Retry": "Retry",
"Run strategy": "Run strategy",
"Running": "Running",
"Save": "Save",
"Scope": "Scope",
"Search by name": "Search by name",
"Search catalog items": "Search catalog items",
"Search security groups by name…": "Search security groups by name…",
"Search virtual networks by name…": "Search virtual networks by name…",
"Security groups": "Security groups",
"Select a catalog item": "Select a catalog item",
"Select a catalog item, configure, and provision an OpenShift cluster.": "Select a catalog item, configure, and provision an OpenShift cluster.",
"Select a project": "Select a project",
"Select a template": "Select a template",
"Select a template to configure node sets": "Select a template to configure node sets",
"Select a value": "Select a value",
"Select a virtual network": "Select a virtual network",
"Select an organization": "Select an organization",
"Select host type": "Select host type",
"Select organization": "Select organization",
"Select project": "Select project",
"Service CIDR": "Service CIDR",
"Service CIDR must not overlap the pod CIDR.": "Service CIDR must not overlap the pod CIDR.",
"Services": "Services",
"Sign in again": "Sign in again",
"Size": "Size",
"Size (GiB)": "Size (GiB)",
"Size must be a positive number": "Size must be a positive number",
"Source CIDR": "Source CIDR",
"Source Ref": "Source Ref",
"SSH public key": "SSH public key",
"SSH public key must be in the form \"[TYPE] key [[EMAIL]]\". Supported types are ssh-rsa, ssh-ed25519, and ecdsa-sha2-nistp256/384/521.": "SSH public key must be in the form \"[TYPE] key [[EMAIL]]\". Supported types are ssh-rsa, ssh-ed25519, and ecdsa-sha2-nistp256/384/521.",
"Start": "Start",
Expand All @@ -287,15 +335,20 @@
"Subnets": "Subnets",
"Take over": "Take over",
"TCP": "TCP",
"Template": "Template",
"Template is required": "Template is required",
"The console is available when the virtual machine is running.": "The console is available when the virtual machine is running.",
"This console is already open in another tab in this browser. Take over to continue here, or switch to that tab.": "This console is already open in another tab in this browser. Take over to continue here, or switch to that tab.",
"This field is required": "This field is required",
"This might be because the console is already open in another session.": "This might be because the console is already open in another session.",
"This permanently deletes the bare metal instance. This action cannot be undone.": "This permanently deletes the bare metal instance. This action cannot be undone.",
"This permanently deletes the cluster and all its resources. This action cannot be undone.": "This permanently deletes the cluster and all its resources. This action cannot be undone.",
"This step has validation errors": "This step has validation errors",
"This template has no node sets defined": "This template has no node sets defined",
"This will permanently delete the rule. This action cannot be undone. Traffic matching this rule will be blocked.": "This will permanently delete the rule. This action cannot be undone. Traffic matching this rule will be blocked.",
"This will permanently delete the security group and all its rules. This action cannot be undone.": "This will permanently delete the security group and all its rules. This action cannot be undone.",
"Timed out waiting for the graphical console to finish connecting": "Timed out waiting for the graphical console to finish connecting",
"Title": "Title",
"UDP": "UDP",
"Unauthorized": "Unauthorized",
"Unknown": "Unknown",
Expand All @@ -305,6 +358,7 @@
"User data": "User data",
"User Data is required": "User Data is required",
"User data must not exceed 64 KB.": "User data must not exceed 64 KB.",
"Validation pattern (optional)": "Validation pattern (optional)",
"View and manage your bare metal instances.": "View and manage your bare metal instances.",
"View password": "View password",
"Virtual machine conditions": "Virtual machine conditions",
Expand Down
11 changes: 8 additions & 3 deletions libs/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export * from './osac/public/v1/compute_instance_catalog_items_service_pb.js'
export * from './osac/public/v1/instance_type_type_pb.js'
export * from './osac/public/v1/instance_types_service_pb.js'

export * from './osac/public/v1/organization_type_pb.js'
export * from './osac/public/v1/organizations_service_pb.js'
export * from './osac/public/v1/tenant_type_pb.js'
export * from './osac/public/v1/tenants_service_pb.js'

export * from './osac/public/v1/user_type_pb.js'
export * from './osac/public/v1/users_service_pb.js'
Expand Down Expand Up @@ -55,4 +55,9 @@ export * from './osac/public/v1/field_definition_type_pb.js'
export * from './osac/public/v1/baremetal_instance_type_pb.js';
export * from './osac/public/v1/baremetal_instances_service_pb.js';
export * from './osac/public/v1/baremetal_instance_catalog_item_type_pb.js';
export * from './osac/public/v1/baremetal_instance_catalog_items_service_pb.js';
export * from './osac/public/v1/baremetal_instance_catalog_items_service_pb.js';
export * from './osac/public/v1/baremetal_instance_template_type_pb.js';
export * from './osac/public/v1/baremetal_instance_templates_service_pb.js';

export * from './osac/public/v1/project_type_pb.js';
export * from './osac/public/v1/projects_service_pb.js';
Loading
Loading