feat: add restart server action for vendor and tenant
Vendor: POST /api/vendor/tenants/{id}/restart (platform:admin scope)
Tenant: POST /api/tenant/server/restart (tenant:manage scope)
Both call TenantProvisioner.stop() then start() on the server + UI
containers. Restart button on vendor TenantDetailPage (Actions card)
and tenant TenantDashboardPage (Server card). Allowed in any status
including PROVISIONING.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,14 @@ export function useTenantDashboard() {
|
||||
});
|
||||
}
|
||||
|
||||
export function useRestartServer() {
|
||||
const qc = useQueryClient();
|
||||
return useMutation<void, Error, void>({
|
||||
mutationFn: () => api.post('/tenant/server/restart'),
|
||||
onSuccess: () => qc.invalidateQueries({ queryKey: ['tenant', 'dashboard'] }),
|
||||
});
|
||||
}
|
||||
|
||||
export function useTenantLicense() {
|
||||
return useQuery<TenantLicenseData>({
|
||||
queryKey: ['tenant', 'license'],
|
||||
|
||||
Reference in New Issue
Block a user