1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 13:59:40 +02:00

fix(namespace): create ns qa feedback [EE-2226] (#10474)

This commit is contained in:
Ali 2023-10-16 19:15:44 +01:00 committed by GitHub
parent bcb3f918d1
commit 07ec2ffe5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 34 additions and 43 deletions

View file

@ -1,12 +1,14 @@
import { CreateNamespaceFormValues, CreateNamespacePayload } from './types';
export function transformFormValuesToNamespacePayload(
createNamespaceFormValues: CreateNamespaceFormValues
createNamespaceFormValues: CreateNamespaceFormValues,
owner: string
): CreateNamespacePayload {
const memoryInBytes =
Number(createNamespaceFormValues.resourceQuota.memory) * 10 ** 6;
return {
Name: createNamespaceFormValues.name,
Owner: owner,
ResourceQuota: {
enabled: createNamespaceFormValues.resourceQuota.enabled,
cpu: createNamespaceFormValues.resourceQuota.cpu,