Skip to content

feat(ops): Deploy Workshop from CSV — inline toggle panel#3150

Closed
d-jana wants to merge 5 commits intomainfrom
feat/deploy-from-csv-toggle
Closed

feat(ops): Deploy Workshop from CSV — inline toggle panel#3150
d-jana wants to merge 5 commits intomainfrom
feat/deploy-from-csv-toggle

Conversation

@d-jana
Copy link
Copy Markdown
Contributor

@d-jana d-jana commented Mar 27, 2026

Overview

Adds a "Deploy Workshop from CSV" mode to the Admin → Ops Workshop Control page, following the exact same visual pattern as the existing "Multi-namespace mode" toggle — no structural UI changes, no new navigation, no modal.


Design

Deploy Workshop from CSV — design with real Red Hat Summit 2026 data


User Flow

  1. Admin navigates to Admin → Ops Workshop Control.
  2. Toggles "Deploy Workshop from CSV" — an inline panel opens below, styled with a blue border.
  3. Clicks Upload CSV → picks the deploy handoff spreadsheet (.csv).
  4. CSV is parsed client-side. CI name and CI namespace are automatically extracted from each row's Order URL (/catalog/{namespace}/order/{ci_name}).
  5. Preview table renders immediately. Rows without an Order URL are dimmed and skipped at deploy time.
  6. Admin sets per-row Target Namespace (pre-filled from a target_namespace CSV column if present). A global Default Namespace field serves as fallback.
  7. Clicks Deploy All (N) — rows are deployed. Each row shows live status: Queued → Deploying… → ✓ Deployed / ✗ Failed.
  8. Toggling the switch off resets all state.

Mode Semantics

Mode Users/Inst Instances (deploy_count) Total Seats Kubernetes objects created
Per Attendee 1 = total attendees = deploy_count Workshop + WorkshopProvision per row
Shared csv Users csv Deploy Count (N) Users × N Workshop + WorkshopProvision per row
Multi Asset csv Users csv Deploy Count Users × Deploy Count MultiWorkshop — rows sharing the same base Lab Code (e.g. LB1846-1, -2, -3) are grouped into one MultiWorkshop with each row as an asset

After a Multi Asset group deploys, the status cell shows "✓ View MultiWorkshops →" linking to /admin/multiworkshops.


CSV Format

Designed to match the existing Red Hat Summit deploy handoff spreadsheet:

Column Notes
Lab Code Workshop identifier (e.g. LB1088) — base code used to group Multi Asset rows (LB1846-1,-2,-3LB1846)
Room Room assignment — displayed in table
Session Time e.g. 10:30–12:00 — displayed in table
Deploy On (UTC) Deployment start time — ISO or YYYY-MM-DD HH:MM
Order URL Required for deploy — CI name and namespace extracted from /catalog/{ns}/order/{ci_name}
Users Users per instance (Shared / Multi Asset) or total attendees (Per Attendee)
Deploy Count WorkshopProvision.spec.count — number of instances to provision
Mode Per Attendee, Shared, Multi Asset Workshop, Multi Asset Workshop (Nx)
Cloud CNV, AWS, Tenant Namespace — displayed only
Region AWS region — displayed only
target_namespace (optional column) Per-row deploy namespace override

Example (Summit 2026 format)

Lab Code,Room,Session Time,Deploy On (UTC),Order URL,Users,Deploy Count,Mode,Cloud,Region,Instances
LB1088,A312,10:30–12:00,2026-05-11 14:30:00,https://.../catalog/babylon-catalog-dev/order/summit-2026.lb1088-...,30,2,Multi Asset Workshop (2x),CNV,,
LB1127,A313,10:30–12:00,2026-05-11 14:30:00,https://.../catalog/babylon-catalog-dev/order/summit-2026.lb1127-...,62,62,Per Attendee,AWS,us-east-1,
LB1401,A313,15:30–17:00,2026-05-12 19:30:00,https://.../catalog/babylon-catalog-dev/order/summit-2026.lb1401-...,62,1,Shared,CNV,,
LB1846-1,A311,13:00–14:30,2026-05-11 17:00:00,https://.../catalog/babylon-catalog-dev/order/summit-2026.lb1846-rhelevant-1.dev,62,62,Multi Asset Workshop,CNV,,
LB1846-2,A311,13:00–14:30,2026-05-11 17:00:00,https://.../catalog/babylon-catalog-dev/order/summit-2026.lb1846-rhelevant-2.dev,62,62,Multi Asset Workshop,CNV,,
LB1846-3,A311,13:00–14:30,2026-05-11 17:00:00,https://.../catalog/babylon-catalog-dev/order/summit-2026.lb1846-rhelevant-3.dev,62,62,Multi Asset Workshop,CNV,,

Files Changed

File Change
catalog/ui/src/app/Admin/Ops.tsx CSV interfaces, parser (Order URL extraction, mode flags, baseLabCode grouping), deployStandardRow(), deployMultiAssetGroup() using createMultiWorkshop(), handleDeployAll() with group logic, per-row namespace inputs, status links
catalog/ui/src/app/Admin/ops.css ops-deploy-csv-bar--active, panel, table, and no-url row styles
docs/ops-screenshots/deploy-from-csv-design.png Design mockup using real Summit 2026 data

Not included: Update Password functionality — out of scope.

d-jana added 2 commits March 27, 2026 18:32
…mode

Adds a new "Deploy Workshop from CSV" switch in the Ops Workshop Control
page, styled identically to the existing "Multi-namespace mode" bar.

When toggled on, an inline section expands below it with:
- A hidden file input triggered by an "Upload CSV" button
- Client-side CSV parsing (quoted fields, flexible column names)
- A preview table showing workshop title, catalog item, CI namespace,
  seat count, workshop-UI flag, stop/destroy times, and per-row status
- An optional namespace override field (defaults to current namespace)
- A "Deploy All" button that sequentially creates Workshop +
  WorkshopProvision objects (or ResourceClaim when workshop UI is off)
  via direct Kubernetes API calls using apiFetch

No new modal, no new top-level navigation, no existing card changes.
Update Password functionality is not included (out of scope).

Made-with: Cursor
@aleixhub
Copy link
Copy Markdown
Contributor

How will you specify the parameters that the catalog item might require?

@d-jana
Copy link
Copy Markdown
Contributor Author

d-jana commented Mar 27, 2026

wait. I am updating logic with updated CSV from labgator. give me some more time

d-jana added 3 commits March 27, 2026 18:45
…rmat

- Parse Summit-style CSV: Lab Code, Room, Session Time, Deploy On (UTC),
  Order URL, Users, Deploy Count, Mode, Cloud, Region, Instances
- Extract CI name and namespace automatically from Order URL path
  (/catalog/{namespace}/order/{ci_name})
- Preview table now shows: Lab Code, Room, Session, Catalog Item,
  CI Namespace, Users, Deploy #, Mode, Cloud, Deploy On (UTC), Status
- Rows without an Order URL are shown dimmed with a warning tooltip
  and skipped during deploy
- Updated design screenshot uses real Red Hat Summit 2026 data

Made-with: Cursor
…d / Multi Asset

Per Attendee: 1 instance per user (Users/Inst=1, Instances=deploy_count,
  Total Seats=deploy_count)
Shared: 1 instance for all (Users/Inst=csv_users, Instances=1,
  Total Seats=csv_users)
Multi Asset (Nx): N instances x users each (Total=users x deploy_count)

Adds Total Seats column (bold green) and mode tooltips explaining the
instance math. WorkshopProvision.spec.count = deploy_count in all cases.

Made-with: Cursor
Per Attendee: deploy_count = total users (1 instance × 1 user each)
Shared: N instances × X users, deploy_count = N, total = N × X
Multi Asset: rows with same base Lab Code (LB1846-1,-2,-3) are grouped
  and deployed as ONE MultiWorkshop via createMultiWorkshop() API.
  On success the status cell shows a link to /admin/multiworkshops.

Changes:
- Import createMultiWorkshop from @app/api
- CsvScheduleRow gains baseLabCode, isMultiAsset, isPerAttendee,
  isShared, totalSeats (pre-computed)
- deployStandardRow() handles Per Attendee / Shared
- deployMultiAssetGroup() groups rows and calls createMultiWorkshop()
- handleDeployAll() separates standard vs multi-asset, processes groups
- Table: Users/Inst, Instances, Total Seats columns use pre-computed values
- Mode tooltip shows correct instance math per mode
- Updated design screenshot using real Summit 2026 data

Made-with: Cursor
@d-jana
Copy link
Copy Markdown
Contributor Author

d-jana commented Mar 27, 2026

@aleixhub @bbethell-1 @rhjcd Please review this first draft.

@d-jana d-jana marked this pull request as draft March 27, 2026 14:09
@bbethell-1
Copy link
Copy Markdown
Contributor

How will you specify the parameters that the catalog item might require?

This is great DJ and just what myself and Josh were planning for phase 2

we need all rhdp flow logic added in bit by bit - this is a good start; but need to ensure lots of rhdp flow is added.

  1. All logic from the order csv page

  2. QA logic

  3. later on showroom logic for the Operations piece.

We need to be super careful though - lets try and modulize it a bit - potentially even split into 3 sub sections which we can each work on? - therefore we can test things and not step on each others toes

Styling should also be consistant

@bbethell-1
Copy link
Copy Markdown
Contributor

Lets revisist stuff this week - @d-jana please find a time to meet to work further with myself and the team to dicuss the next stages and we need to go slow too

@bbethell-1 bbethell-1 requested a review from rhjcd April 1, 2026 09:56
@d-jana d-jana closed this Apr 14, 2026
@d-jana
Copy link
Copy Markdown
Contributor Author

d-jana commented Apr 14, 2026

Still now management is not confident on implementing this in the UI, so as of now closing this.
But our UI developer is already worked on to enable all assets for multi-asset workshop including multiuser workshop inside multi-asset. So we should use that feature.
@bbethell-1 @rhjcd ^^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants