Commit Graph
1755 Commits
Author SHA1 Message Date
jialinandjialin 95ffe0350e fix(style): k8s form 2026-06-01 21:06:56 +08:00
jialinandjialin e314f25a77 style: gpu instance service 2026-06-01 21:06:56 +08:00
gitlawrandjialin 65ea65e9ae feat(api-keys): rename User Name column to Creator and move before Created
Rename the api-keys list column from User Name to Creator for clarity and reorder it to sit immediately before the Created column. Add the common.table.creator locale key across all supported languages.
2026-06-01 19:13:44 +08:00
jialinandjialin 4ce975562e chore(deps): update ui 1.0.20 2026-06-01 13:36:14 +08:00
jialinandjialin 07e625f2bc chore: add locales 2026-06-01 13:36:14 +08:00
jialinandjialin d95fd8dc90 fix: instance type format in list 2026-05-31 22:23:32 +08:00
jialinandjialin 55028cf3a3 fix: parse quality data 2026-05-31 22:23:32 +08:00
jialinandLawrence Li 16a97772d3 fix: instance type api update v2.2.0rc1 2026-05-30 08:28:38 +08:00
jialinandLawrence Li d33167d070 style: page segment fontsize 2026-05-30 08:28:38 +08:00
Yuxing Dengandjialin f62e0ba372 feat(cluster): add default container registry field to advanced config
Surface the top-level system_default_container_registry as a dedicated
input (both Docker and K8s), coerce blank to null, and drop its
redundant worker_config YAML hint.
2026-05-29 23:11:46 +08:00
jialinandjialin 1b6466ae78 chore: menu sorting 2026-05-29 18:04:31 +08:00
jialinandjialin 29c5987bf1 style: menu 2026-05-29 18:04:31 +08:00
Yuxing Deng fcd1d01e83 feat(cluster): update K8s cluster form for new k8s_options API
Align the Kubernetes cluster create/edit page with the backend's
promotion of operator/K8s knobs out of worker_config and the removal
of gpuVendorOverrides.

- k8s_options: drop gpuVendorOverrides; add operatorImage, namespace,
  and gpuInstanceOptions (presence = GPU instances enabled, carrying an
  optional gpuInstancesAccessStaticAddress).
- Add a top-level system_default_container_registry to the cluster type
  (promoted out of worker_config on the backend).
- Group all k8s_options fields into a new top-level "K8s Deployment
  Options" collapsible section (sibling of Advanced, rendered above it),
  with namespace first followed by volume mounts, image credentials,
  node selector, operator image, and GPU instances.
- Drive the GPU instances toggle from local state instead of
  Form.useWatch (an unregistered nested path never re-rendered, leaving
  the switch unresponsive); use antd's borderless Switch and keep the
  label/switch grouped together. Namespace gains a gpustack-system
  placeholder.
- Remove the gpuVendorOverrides validation from the form and the stale
  operator_image / namespace / gpu_instances_access_static_address hints
  from the worker_config YAML template and JSON schema.
- Add-worker GPU picker: always allow multi-select for K8s clusters
  (runtime node selectors are now auto-derived), dropping the
  override-gating, cluster fetch, and single-only hint.
- Update locales (en/zh/ja/ru/tr) for the removed and added keys.
2026-05-29 17:56:01 +08:00
gitlawrandjialin a80b889760 refactor(access): fold allowed_users into allowed_principals
Move the model-route access modal off the deprecated allowed_users
policy/field onto the unified allowed_principals + principals surface,
persisting everything through a single /access POST.

- "specific users" radio now uses allowed_principals; a returned legacy
  allowed_users value is normalized so existing routes still select it.
- derive the picker's selection and the full grant set from `principals`
  in GET /access (fall back to legacy `items` if a backend doesn't
  return principals yet).
- save as `principals`: the principal-based override sends its staged
  set; the user picker maps its selection to USER-kind grants and
  preserves any non-user grants from the snapshot (no longer sends
  `users`).
- guard saving before the GET seeds principals (would wipe grants);
  share the ALLOWED_PRINCIPALS_POLICY constant.
- AccessControlFormData: `users` optional, add `principals`.
2026-05-29 17:11:12 +08:00
jialinandjialin f71bf1b074 chore(deps): update ui 1.0.19 2026-05-29 16:19:17 +08:00
jialinandjialin 7e048ee537 fix: click twice for submitting deployment form, using iconfont static files 2026-05-29 16:19:17 +08:00
jialinandjialin 34098e8950 fix: orgname not be shown in playground 2026-05-29 13:35:22 +08:00
jialinandjialin faf0d4d605 chore(deps): update ui 1.0.18 2026-05-29 11:30:17 +08:00
jialinandjialin 85ade88d55 fix: instance name text overflow 2026-05-29 11:24:03 +08:00
jialinandjialin 7d0b94330d fix: adapter request not be triggered 2026-05-29 11:24:03 +08:00
gitlawrandjialin 5cff1298fc feat(management): show only own rows on Clusters / Storage Types lists
The two management pages now pass ``mine=true`` to their list APIs.
With multi-tenant cluster_access in place an Org Owner would
otherwise see rows that came in via cross-Org grants — usable but
read-only — and editing/deleting them would 403 from the backend.
Restricting the management lists to rows the caller's scope owns
keeps the UX honest. PV-create / GPU-instance-create pickers still
query without ``mine`` so usable cross-Org clusters and types are
selectable there.
2026-05-28 18:16:15 +08:00
gitlawrandjialin d3a3d4e96e feat(templates): fix unresponsive action dropdown for non-admin
Two changes that together restore the per-row Edit / Delete menu
for non-admin users:

- ``templateActions`` drops the blanket ``access: 'canSeeAdmin'``
  gate on every menu item. With the gate on, non-admin callers got
  an empty filtered menu, so clicking the "..." did nothing.

- The management page passes ``mine=true`` to the list API. The
  endpoint now drops Global rows for non-admin callers (rows they
  can't edit anyway), so the dropdown shows up only on rows the
  caller may manage. The GPU-instance create picker reuses the
  same API without ``mine``, keeping Global presets visible there.
2026-05-28 18:16:15 +08:00
jialinandjialin f99621ec92 fix: catalog hidden fields 2026-05-28 15:51:51 +08:00
jialinandjialin e47a9304f4 fix: cluster worker_config refill 2026-05-28 15:51:51 +08:00
jialinandjialin 9488fc1251 fix: update instance item type 2026-05-28 15:51:51 +08:00
jialinandjialin b590aa746b fix: update onceMaxRequest field 2026-05-28 15:51:51 +08:00
jialinandjialin ef61134b8b chore(deps): update ui 1.0.17 2026-05-28 10:02:32 +08:00
jialinandjialin a9daa0b586 fix: max gpu count 2026-05-27 20:18:33 +08:00
jialinandjialin ae0ad25ed6 fix: an error occured in switch language in stt 2026-05-27 20:18:33 +08:00
jialinandjialin a4c48c1981 fix: remove description json format 2026-05-27 17:10:15 +08:00
jialinandjialin 3497590d2e fix: using select handler for provider hint 2026-05-27 17:10:15 +08:00
jialinandjialin 11cf1329c8 fix: always show max label 2026-05-27 17:10:15 +08:00
jialinandjialin ba5b41cf3a chore: update locales 2026-05-27 17:10:15 +08:00
gitlawrandjialin 1d70446cc4 fix(routes): let Org owners see Storage Types menu
The route was gated on ``canSeeAdmin`` so only platform admins ever
saw Storage Types in the sidebar. But the backend route
(``gpu_instance_persistent_volume_types``) is tenant-scoped — Org
owners can create / list their own — so hiding the menu from them
left an admin-defined feature reachable only by URL.

Relax to ``canSeeOrgAdmin`` to match. OSS keeps the platform-admin-only
behaviour (predicate defaults to ``isPlatformAdmin``); the enterprise
access extension widens it to the current-org owner.
2026-05-27 16:57:49 +08:00
gitlawrandjialin f15d0ab243 fix(cluster-create): hide ProviderCatalog when entering via providerHint
The catalog was gated on ``currentStep === startStep`` so it would
re-appear at step 1 whenever ``providerHint`` skipped the catalog (e.g.
GPU Service's "Add a Kubernetes Cluster" empty-state CTA). Result: the
configure step rendered the catalog *plus* the Name/Description/Advanced
form together, with Kubernetes shown as already selected — confusing
and ugly.

Pin the catalog to step 0 explicitly. ``startStep`` was only used to
seed ``currentStep``, so it's inlined into the ``useState`` initializer
to keep the "skip the catalog when providerHint is set" intent in one
place. Pre-selecting a provider now correctly lands the user straight
on the configure form alone.
2026-05-27 15:53:39 +08:00
jialinandjialin 34be4800d7 fix: lora tag 2026-05-27 15:45:28 +08:00
jialinandjialin e40b0c2e07 fix: get back lora_module_name 2026-05-27 15:45:28 +08:00
lizw2andjialin 45e0ad9e93 fix(model-routes): use overridden model name for provider targets 2026-05-27 15:45:28 +08:00
gitlawrandjialin 96e6ddfe8a fix: collapse GPU Service menu in Personal Org; add K8s-direct CTA
Two follow-ups to the GPU Service gating:

- In Personal-Org view the access extension was stripping
  canSeeAdmin/canSeeOrgAdmin but leaving canSeeGpuService at its
  admin-shortcut value, so platform admins switched into Personal
  still saw the menu even though Personal scope can't host a K8s
  cluster. Mirror the probe result through sessionStorage so the
  extension can fall back to the strict cluster-availability signal
  in that branch.

- The empty-state CTA now reads 'Add a Kubernetes Cluster' and, on
  click, opens the cluster-create flow with Kubernetes preselected
  via clusterSession.providerHint. ClusterCreate consumes the hint
  on mount: it seeds extraData.provider and starts at the configure
  step instead of the provider catalog, so the user lands one click
  closer to the form they actually need.
2026-05-27 13:41:32 +08:00
gitlawrandjialin 6b47bacfac feat: gate GPU Service on Kubernetes cluster availability
GPU Service today only schedules on Kubernetes clusters; Docker / cloud
clusters can't host the CRDs. Without any awareness of that, Org
members whose Org has no K8s cluster (and no cluster_access grant on
one) saw a menu they couldn't use and a form that bottomed out with
backend errors.

Two changes lock the UX down:

- Boot probes the caller's cluster list once and stashes
  hasKubernetesCluster in initialState. A new canSeeGpuService
  predicate gates the menu — admins and Org owners always see it
  (they can add the cluster); everyone else only sees it when a
  reachable K8s cluster actually exists.

- The instances page filters its own cluster list to Kubernetes
  before deciding what to show. With nothing reachable we render the
  Deployments-style 'No clusters available. Add a Kubernetes cluster
  to get started.' empty state and hide the create-instance CTA;
  admins and Org owners additionally get the 'Add cluster' button
  that jumps to cluster management.
2026-05-27 13:41:32 +08:00
gitlawrandjialin 099b419e34 fix: source owner_principal_id from current organization
OwnerPrincipalIdField was reading currentClusterAtom, which no callers
ever wrote — so every form submission ended up with
owner_principal_id=null and the backend rejected non-admins with
"Only platform admin can create global ...". Pin the field to
currentOrganizationId instead (the Org the caller is acting under).
Cluster ownership is the wrong source: a cluster_access grant lets one
Org schedule on another Org's cluster, but the new resource is still
owned by the caller's Org, and the backend enforces
owner_principal_id == ctx.current_principal_id.

Also drops the dead currentClusterAtom.
2026-05-27 13:41:32 +08:00
jialinandjialin e343ec0a1e fix: instance type width 2026-05-27 12:14:15 +08:00
jialinandjialin e3d6d08916 fix: show max gpu 2026-05-27 12:14:15 +08:00
jialinandjialin d0bc206c83 fix: instance type missing when using CPU type 2026-05-27 12:14:15 +08:00
jialinandjialin 7287f8c81b style: subdrawer width 2026-05-27 12:14:15 +08:00
jialinandjialin 1878753cde fix: show cluster in table 2026-05-26 23:02:28 +08:00
jialinandjialin 2f04e01f4f fix: default instance type, storageMode 2026-05-26 22:40:02 +08:00
jialinandjialin a51f44c135 fix: select a useable instance type for initial 2026-05-26 22:40:02 +08:00
jialinandjialin 7f14eb544c fix: pvc events api 2026-05-26 19:16:50 +08:00
jialinandjialin c6e34db329 fix: ux issues 2026-05-26 19:16:50 +08:00