feat: move Apps from admin to main tab bar with container config
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m20s
CI / docker (push) Successful in 1m8s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Failing after 2m16s

- Apps tab visible to OPERATOR+ (hidden for VIEWER), scoped by
  sidebar app selection and environment filter
- List view: DataTable with name, environment, updated, created columns
- Detail view: deployments across all envs, version upload with
  per-env deploy target, container config form (resources, ports,
  custom env vars) with explicit Save
- Memory reserve field disabled for non-production environments
  with info hint
- Admin sidebar sorted alphabetically, Applications entry removed
- Old admin AppsPage deleted

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-08 16:23:30 +02:00
parent 875062e59a
commit de4ca10fa5
9 changed files with 726 additions and 417 deletions

View File

@@ -7,7 +7,9 @@ export interface App {
environmentId: string;
slug: string;
displayName: string;
containerConfig: Record<string, unknown>;
createdAt: string;
updatedAt: string;
}
export interface AppVersion {
@@ -59,6 +61,13 @@ async function appFetch<T>(path: string, options?: RequestInit): Promise<T> {
// --- Apps ---
export function useAllApps() {
return useQuery({
queryKey: ['apps', 'all'],
queryFn: () => appFetch<App[]>(''),
});
}
export function useApps(environmentId: string | undefined) {
return useQuery({
queryKey: ['apps', environmentId],
@@ -85,6 +94,15 @@ export function useDeleteApp() {
});
}
export function useUpdateContainerConfig() {
const qc = useQueryClient();
return useMutation({
mutationFn: ({ appId, config }: { appId: string; config: Record<string, unknown> }) =>
appFetch<App>(`/${appId}/container-config`, { method: 'PUT', body: JSON.stringify(config) }),
onSuccess: () => qc.invalidateQueries({ queryKey: ['apps'] }),
});
}
// --- Versions ---
export function useAppVersions(appId: string | undefined) {