diff --git a/frontend/src/component/admin/license/License.tsx b/frontend/src/component/admin/license/License.tsx
index d25eb5b299..094e02a399 100644
--- a/frontend/src/component/admin/license/License.tsx
+++ b/frontend/src/component/admin/license/License.tsx
@@ -68,6 +68,12 @@ export const License = () => {
}
};
+ const resources = {
+ Seats: license.resources.seats,
+ 'Release templates': license.resources.releaseTemplates,
+ 'Edge instances': license.resources.edgeInstances,
+ };
+
return (
}>
@@ -97,20 +103,21 @@ export const License = () => {
{license.plan}
-
- Seats
-
- {license.seats}
-
-
-
-
- Release templates
-
-
- {license.releaseTemplates}
-
-
+ {Object.entries(resources).map(
+ ([resourceName, resourceValue]) =>
+ resourceValue && (
+
+
+ {resourceName}
+
+
+ {resourceValue}
+
+
+ ),
+ )}
Expire at
diff --git a/frontend/src/hooks/api/getters/useLicense/useLicense.ts b/frontend/src/hooks/api/getters/useLicense/useLicense.ts
index 21a9924957..27874d494a 100644
--- a/frontend/src/hooks/api/getters/useLicense/useLicense.ts
+++ b/frontend/src/hooks/api/getters/useLicense/useLicense.ts
@@ -18,14 +18,19 @@ const fallback = {
loading: false,
};
+type LicenseResources = {
+ seats?: number;
+ releaseTemplates?: number;
+ edgeInstances?: number;
+};
+
export interface License {
license?: {
token: string;
customer: string;
instanceName: string;
plan: string;
- seats: number;
- releaseTemplates: number;
+ resources: LicenseResources;
expireAt: Date;
};
loading: boolean;
@@ -58,7 +63,7 @@ export const useLicense = (): License => {
);
return {
- license: { ...data },
+ license: data,
loading: !error && !data,
refetchLicense: () => mutate(),
error,