You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ya...@apache.org on 2026/10/17 18:23:40 UTC

(airavata-custos) 02/03: display group_provisioned_at field on the frontend

This is an automated email from the ASF dual-hosted git repository.

yasithdev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git

commit 70568c89bcdb9de877e53fd62b1df36d7f352e36
Author: Yasith Jayawardana <ya...@icloud.com>
AuthorDate: Sat Oct 17 14:20:54 2026 -0400

    display group_provisioned_at field on the frontend
---
 .../admin/users/management/__tests__/AddUserDialog.test.tsx  |  1 +
 .../features/core/allocations/__fixtures__/allocations.json  | 12 ++++++++----
 .../core/allocations/__tests__/AllocationHistoryTab.test.tsx |  1 +
 .../allocations/__tests__/AllocationOverviewTab.test.tsx     |  1 +
 .../core/allocations/__tests__/AllocationUsageTab.test.tsx   |  1 +
 .../core/allocations/__tests__/AllocationsList.test.tsx      |  1 +
 web/src/features/core/allocations/__tests__/api.test.ts      |  1 +
 web/src/features/core/allocations/__tests__/schemas.test.ts  |  1 +
 .../core/allocations/components/AllocationDetailHeader.tsx   | 11 ++++++++++-
 web/src/features/core/allocations/schemas.ts                 |  1 +
 10 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/web/src/app/(portal)/admin/users/management/__tests__/AddUserDialog.test.tsx b/web/src/app/(portal)/admin/users/management/__tests__/AddUserDialog.test.tsx
index 49d1d1728..ffe6a0685 100644
--- a/web/src/app/(portal)/admin/users/management/__tests__/AddUserDialog.test.tsx
+++ b/web/src/app/(portal)/admin/users/management/__tests__/AddUserDialog.test.tsx
@@ -38,6 +38,7 @@ function renderDialog(overrides: Partial<Parameters<typeof AddUserDialog>[0]> =
           initial_su_amount: 1000,
           start_time: "2026-01-01T00:00:00Z",
           end_time: "2027-01-01T00:00:00Z",
+          group_provisioned_at: null,
         },
       ]}
       {...overrides}
diff --git a/web/src/features/core/allocations/__fixtures__/allocations.json b/web/src/features/core/allocations/__fixtures__/allocations.json
index 733304016..d7e0c9f0c 100644
--- a/web/src/features/core/allocations/__fixtures__/allocations.json
+++ b/web/src/features/core/allocations/__fixtures__/allocations.json
@@ -7,7 +7,8 @@
     "compute_cluster_id": "cluster-001",
     "initial_su_amount": 250000,
     "start_time": "2026-04-01T00:00:00.000Z",
-    "end_time": "2027-03-31T00:00:00.000Z"
+    "end_time": "2027-03-31T00:00:00.000Z",
+    "group_provisioned_at": null
   },
   {
     "id": "alloc-002",
@@ -17,7 +18,8 @@
     "compute_cluster_id": "cluster-002",
     "initial_su_amount": 80000,
     "start_time": "2026-04-01T00:00:00.000Z",
-    "end_time": "2027-03-31T00:00:00.000Z"
+    "end_time": "2027-03-31T00:00:00.000Z",
+    "group_provisioned_at": null
   },
   {
     "id": "alloc-003",
@@ -27,7 +29,8 @@
     "compute_cluster_id": "cluster-001",
     "initial_su_amount": 150000,
     "start_time": "2026-04-12T00:00:00.000Z",
-    "end_time": "2027-04-11T00:00:00.000Z"
+    "end_time": "2027-04-11T00:00:00.000Z",
+    "group_provisioned_at": null
   },
   {
     "id": "alloc-004",
@@ -37,6 +40,7 @@
     "compute_cluster_id": "cluster-002",
     "initial_su_amount": 50000,
     "start_time": "2026-02-09T00:00:00.000Z",
-    "end_time": "2026-08-09T00:00:00.000Z"
+    "end_time": "2026-08-09T00:00:00.000Z",
+    "group_provisioned_at": null
   }
 ]
diff --git a/web/src/features/core/allocations/__tests__/AllocationHistoryTab.test.tsx b/web/src/features/core/allocations/__tests__/AllocationHistoryTab.test.tsx
index 76e3fcdb5..fbe28ba83 100644
--- a/web/src/features/core/allocations/__tests__/AllocationHistoryTab.test.tsx
+++ b/web/src/features/core/allocations/__tests__/AllocationHistoryTab.test.tsx
@@ -36,6 +36,7 @@ const allocation: ComputeAllocation = {
   initial_su_amount: 250000,
   start_time: "2026-04-01T00:00:00.000Z",
   end_time: "2027-03-31T00:00:00.000Z",
+  group_provisioned_at: null,
 };
 
 beforeEach(() => {
diff --git a/web/src/features/core/allocations/__tests__/AllocationOverviewTab.test.tsx b/web/src/features/core/allocations/__tests__/AllocationOverviewTab.test.tsx
index 3113d278f..e0802e96f 100644
--- a/web/src/features/core/allocations/__tests__/AllocationOverviewTab.test.tsx
+++ b/web/src/features/core/allocations/__tests__/AllocationOverviewTab.test.tsx
@@ -49,6 +49,7 @@ const allocation: ComputeAllocation = {
   initial_su_amount: 250000,
   start_time: "2026-04-01T00:00:00.000Z",
   end_time: "2027-03-31T00:00:00.000Z",
+  group_provisioned_at: null,
 };
 
 beforeEach(() => {
diff --git a/web/src/features/core/allocations/__tests__/AllocationUsageTab.test.tsx b/web/src/features/core/allocations/__tests__/AllocationUsageTab.test.tsx
index 11da594e5..d1bf1c422 100644
--- a/web/src/features/core/allocations/__tests__/AllocationUsageTab.test.tsx
+++ b/web/src/features/core/allocations/__tests__/AllocationUsageTab.test.tsx
@@ -48,6 +48,7 @@ const allocation: ComputeAllocation = {
   initial_su_amount: 250000,
   start_time: "2026-04-12T00:00:00.000Z",
   end_time: "2027-04-11T00:00:00.000Z",
+  group_provisioned_at: null,
 };
 
 function usageRow(overrides: Partial<AllocationUsage>): AllocationUsage {
diff --git a/web/src/features/core/allocations/__tests__/AllocationsList.test.tsx b/web/src/features/core/allocations/__tests__/AllocationsList.test.tsx
index f5b59b4b9..4a8e36d1d 100644
--- a/web/src/features/core/allocations/__tests__/AllocationsList.test.tsx
+++ b/web/src/features/core/allocations/__tests__/AllocationsList.test.tsx
@@ -29,6 +29,7 @@ const allocation: ComputeAllocation = {
   initial_su_amount: 250000,
   start_time: "2026-04-01T00:00:00.000Z",
   end_time: "2027-03-31T00:00:00.000Z",
+  group_provisioned_at: null,
 };
 
 function renderList(overrides: Partial<React.ComponentProps<typeof AllocationsList>> = {}) {
diff --git a/web/src/features/core/allocations/__tests__/api.test.ts b/web/src/features/core/allocations/__tests__/api.test.ts
index 136f4590b..c1762b4ce 100644
--- a/web/src/features/core/allocations/__tests__/api.test.ts
+++ b/web/src/features/core/allocations/__tests__/api.test.ts
@@ -54,6 +54,7 @@ const allocation = {
   initial_su_amount: 100000,
   start_time: "2026-04-01T00:00:00Z",
   end_time: "2027-03-31T00:00:00Z",
+  group_provisioned_at: null,
 };
 
 const member = {
diff --git a/web/src/features/core/allocations/__tests__/schemas.test.ts b/web/src/features/core/allocations/__tests__/schemas.test.ts
index 5cdb8e0f7..f3e034e9c 100644
--- a/web/src/features/core/allocations/__tests__/schemas.test.ts
+++ b/web/src/features/core/allocations/__tests__/schemas.test.ts
@@ -37,6 +37,7 @@ const validAllocation = {
   initial_su_amount: 100000,
   start_time: "2026-04-01T00:00:00.000Z",
   end_time: "2027-03-31T00:00:00.000Z",
+  group_provisioned_at: null,
 };
 
 const validMember = {
diff --git a/web/src/features/core/allocations/components/AllocationDetailHeader.tsx b/web/src/features/core/allocations/components/AllocationDetailHeader.tsx
index 87d8ff47e..99f834909 100644
--- a/web/src/features/core/allocations/components/AllocationDetailHeader.tsx
+++ b/web/src/features/core/allocations/components/AllocationDetailHeader.tsx
@@ -17,7 +17,7 @@
 
 "use client";
 
-import { Calendar, Gauge, Server, UserSquare } from "lucide-react";
+import { Calendar, Gauge, Server, UserSquare, Users } from "lucide-react";
 import { MetaItem, MetaRow } from "@/shared/ui/MetaRow";
 import type { ComputeAllocation } from "../schemas";
 
@@ -78,6 +78,15 @@ export function AllocationDetailHeader({ allocation, memberCount }: AllocationDe
           />
           <MetaItem icon={Calendar} label="End date" value={formatDate(allocation.end_time)} />
           <MetaItem icon={UserSquare} label="Members" value={memberCount} />
+          <MetaItem
+            icon={Users}
+            label="Group provisioned"
+            value={
+              allocation.group_provisioned_at
+                ? formatDate(allocation.group_provisioned_at)
+                : "Pending first member"
+            }
+          />
         </MetaRow>
       </div>
     </header>
diff --git a/web/src/features/core/allocations/schemas.ts b/web/src/features/core/allocations/schemas.ts
index 3abd4dffe..eee28292c 100644
--- a/web/src/features/core/allocations/schemas.ts
+++ b/web/src/features/core/allocations/schemas.ts
@@ -42,6 +42,7 @@ export const computeAllocationSchema = z.object({
   initial_su_amount: z.number(),
   start_time: z.string(),
   end_time: z.string(),
+  group_provisioned_at: z.string().nullable(),
 });
 export type ComputeAllocation = z.infer<typeof computeAllocationSchema>;