Commit Graph
64 Commits
Author SHA1 Message Date
jialinandjialin 34098e8950 fix: orgname not be shown in playground 2026-05-29 13:35:22 +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 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 7287f8c81b style: subdrawer width 2026-05-27 12:14:15 +08:00
jialinandjialin b5ed64de51 chore: ssh key selection 2026-05-25 22:42:02 +08:00
jialinandjialin 052d5aa474 fix: colorPrimary cache cleared 2026-05-21 19:58:16 +08:00
gitlawrandjialin e7a376db70 refactor: adapt org-namespace lookup to principal name rename
Tracks the gpustack identity-consolidation effort: the unified
``principals`` table's URL-safe identifier column was renamed
``slug`` → ``name`` (with the legacy display ``name`` → ``display_name``).
The enterprise plugin's persisted org caches (``organizationList``,
``allOrganizations`` in localStorage) now write ``name`` instead of
``slug`` on each Organization row.

``getCurrentOrgNamespace`` reads those caches to compose the k8s
namespace (``gpustack-{name}``) for GPU-instance / storage CRDs.
Updated to read ``item.name`` so namespace resolution stays in sync
with what the enterprise plugin writes — otherwise every gpu-service
write would fall through to ``gpustack-default`` even when the user
has an Org context.

Stale ``slug`` references in surrounding comments also retitled to
``name`` to avoid divergence between code and prose. The namespace
format itself (``gpustack-{...}``) is unchanged — only the column it
sources is.
2026-05-21 12:15:39 +08:00
gitlawrandjialin 2dae886fd1 fix(gpu-service): use gpustack-{slug} namespace for org resources
The legacy ``getCurrentOrganizationId`` helper returned the raw numeric
org id from localStorage, which the GPU-service / storage call sites
then used as the K8s namespace path segment — producing requests like
``/v2/clusters/1/proxy/.../namespaces/5/instances``. The backend
creates a namespace named ``gpustack-{slug}`` (matching
``get_namespace_name``), so the request hit a namespace that doesn't
exist.

Replace the helper with ``getCurrentOrgNamespace`` that:

- prefers the Org the caller is acting under (numeric
  ``currentOrganizationId`` from localStorage, slug looked up in the
  persisted ``organizationList`` or ``allOrganizations`` cache);
- falls back to the selected cluster's owner Org slug for the admin
  "All" view, where there is no explicit Org context but the resource
  still has to land in some Org's namespace — call sites pass
  ``currentCluster?.owner_principal_id`` through;
- falls back to ``gpustack-default`` only if neither path resolves a
  slug (first load before any cache hydrates, etc.).

``ClusterListItem`` is widened with the optional ``owner_principal_id``
field so TypeScript accepts the fallback argument; the backend has
been returning it via ``ClusterPublic`` all along.
2026-05-13 12:29:09 +08:00
jialinandjialin 01fe2e66fb fix: style issues 2026-05-11 19:49:21 +08:00
jialinandjialin b13ba0a229 fix: alignment api 2026-05-11 19:49:21 +08:00
jialinandjialin 4128de61f9 fix: api test 2026-05-11 19:49:21 +08:00
jialinandjialin 898c7f1be2 refactor: dashboard usage 2026-05-06 12:27:22 +08:00
jialinandjialin 7d75714662 feat: usage 2026-04-22 13:16:48 +08:00
jialinandjialin ed4be2328f chore: store pagination for list 2026-03-17 16:35:55 +08:00
jialin 07664b5f22 chore: quick create route 2026-02-12 12:20:05 +08:00
jialin f35ba8f8e5 fix: success message in creation cluster 2026-02-08 10:27:49 +08:00
jialin 4ff5b3e05a chore: grafana entry 2026-02-06 14:27:05 +08:00
jialin 4e8b5e26ae feat: monitor button 2026-02-04 20:14:25 +08:00
jialin 7fd2b43704 fix: refresh enable backend state 2026-02-04 14:58:48 +08:00
jialin 32f95f5d7d fix: revert backend selection 2026-02-03 15:41:16 +08:00
jialin f651ab7fd9 fix: default benchmark form values 2026-02-02 14:10:46 +08:00
jialinandLawrence Li 4a4a02eb0d chore: update env vars from backend version 2026-01-30 20:48:55 +08:00
jialinandLawrence Li a2be7f6b36 chore: backend api 2026-01-30 20:48:55 +08:00
jialin 0cde6f7dbc chore: add models and gpus in cluster detail page 2026-01-12 20:30:24 +08:00
jialin 66e8f83395 fix: did not cache workers and clusters in model files 2025-12-31 10:23:15 +08:00
jialin 1b4d335b09 fix: store hideModel value in global session 2025-12-25 20:36:48 +08:00
jialin 9dcdb6b6e7 fix: reset userSettings first login 2025-12-25 13:14:59 +08:00
jialin 530e8f7537 fix: replicas, ready_replicas sorting 2025-12-23 18:35:33 +08:00
jialin ab146b6b6b fix: allow to enter seed 2025-12-22 18:11:46 +08:00
jialin 7e25b64689 fix: remove instance from cache after deleting 2025-12-22 16:19:47 +08:00
jialin 3dbb0de683 feat: add resource for first login 2025-12-11 17:50:39 +08:00
jialin a274349ace chore: upgrade info 2025-12-04 16:43:33 +08:00
jialin d8f1e95e1a fix: use image label in inputbox 2025-12-03 16:00:59 +08:00
jialin 962df859f1 chore: get started for add cluster 2025-11-27 11:35:45 +08:00
jialin ff67fba2c9 chore: reset the primary color after logout 2025-11-21 16:56:23 +08:00
jialin cbc000d35a fix: playground formref is invalid 2025-11-12 14:57:39 +08:00
jialin 84187eedc4 fix: access control, voices options 2025-11-11 15:47:32 +08:00
jialin 23b7936924 fix: custom backend and versions ux 2025-11-04 13:37:53 +08:00
jialin df65d3e2f6 fix: kv cache support in builtin backend 2025-10-27 14:13:47 +08:00
jialin bca1e8140e feat: dynamic backends 2025-10-13 14:40:26 +08:00
jialin d063dfd652 chore: display available clusters 2025-09-16 20:32:26 +08:00
jialin d9d5ca95df style: add worker ux 2025-09-16 11:26:17 +08:00
jialin c467280170 fix: display instance type spec 2025-09-16 11:26:17 +08:00
jialin 07ade24ea1 refactor: cluster list 2025-09-16 11:26:17 +08:00
jialin ada120c1b9 fix: the theme align with the system 2025-07-30 11:12:13 +08:00
jialin 51450c2b02 style: flatten menu items 2025-07-10 09:47:12 +08:00
jialin 830ee45161 fix: update evaluation result issue 2025-06-24 20:47:27 +08:00
jialin 00a60b8948 chore: update error components for loading file failed 2025-05-15 22:57:24 +08:00
jialin ac03a93c64 chore: add dark mask, remove clear button in audio and image 2025-05-15 18:02:07 +08:00
jialin 5e8692eae5 fix: theme setting miss after refreshing 2025-05-15 11:53:10 +08:00