@@ -25,6 +25,7 @@ import {
2525 BAITable ,
2626 filterOutEmpty ,
2727 filterOutNullAndUndefined ,
28+ isValidUUID ,
2829 toLocalId ,
2930 useBAILogger ,
3031 type BAIColumnType ,
@@ -53,9 +54,9 @@ const COLUMN_KEY_TO_FIELD: Record<string, string> = {
5354 name : 'NAME' ,
5455 createdAt : 'CREATED_AT' ,
5556 domainName : 'DOMAIN' ,
56- projectName : 'PROJECT' ,
57+ projectId : 'PROJECT' ,
5758 resourceGroup : 'RESOURCE_GROUP' ,
58- tag : 'TAG' ,
59+ tags : 'TAG' ,
5960} ;
6061
6162/** All valid order strings accepted by BAITable for deployments. */
@@ -64,6 +65,14 @@ export const availableDeploymentOrderValues = [
6465 '-name' ,
6566 'createdAt' ,
6667 '-createdAt' ,
68+ 'domainName' ,
69+ '-domainName' ,
70+ 'projectId' ,
71+ '-projectId' ,
72+ 'resourceGroup' ,
73+ '-resourceGroup' ,
74+ 'tags' ,
75+ '-tags' ,
6776] as const ;
6877
6978export type DeploymentOrderValue =
@@ -159,16 +168,20 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
159168 edges {
160169 node {
161170 id
171+ createdUserId
162172 metadata {
163173 name
164174 status
165175 createdAt
176+ updatedAt
166177 domainName
167178 projectId
179+ resourceGroupName
168180 ...DeploymentTagChips_metadata
169181 }
170182 networkAccess {
171183 endpointUrl
184+ openToPublic
172185 }
173186 replicaState {
174187 desiredReplicaCount
@@ -207,6 +220,11 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
207220 const supportsExtendedFilter =
208221 baiClient ?. supports ( 'model-deployment-extended-filter' ) ?? false ;
209222
223+ const uuidRule = {
224+ message : t ( 'general.InvalidUUID' ) ,
225+ validate : ( value : string ) => isValidUUID ( value . toLowerCase ( ) ) ,
226+ } ;
227+
210228 const baseFilterProperties = [
211229 {
212230 key : 'name' ,
@@ -223,6 +241,11 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
223241 propertyLabel : t ( 'deployment.filter.EndpointUrl' ) ,
224242 type : 'string' as const ,
225243 } ,
244+ {
245+ key : 'openToPublic' ,
246+ propertyLabel : t ( 'deployment.filter.OpenToPublic' ) ,
247+ type : 'boolean' as const ,
248+ } ,
226249 ] ;
227250
228251 const extendedAdminFilterProperties =
@@ -238,13 +261,34 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
238261 propertyLabel : t ( 'deployment.filter.ResourceGroup' ) ,
239262 type : 'string' as const ,
240263 } ,
264+ {
265+ key : 'projectId' ,
266+ propertyLabel : t ( 'deployment.filter.ProjectId' ) ,
267+ type : 'uuid' as const ,
268+ fixedOperator : 'equals' as const ,
269+ rule : uuidRule ,
270+ } ,
271+ {
272+ key : 'createdUserId' ,
273+ propertyLabel : t ( 'deployment.filter.CreatedUserId' ) ,
274+ type : 'uuid' as const ,
275+ fixedOperator : 'equals' as const ,
276+ rule : uuidRule ,
277+ } ,
241278 {
242279 key : 'createdAt' ,
243280 propertyLabel : t ( 'deployment.filter.CreatedAt' ) ,
244281 type : 'datetime' as const ,
245282 operators : [ 'after' as const , 'before' as const ] ,
246283 defaultOperator : 'after' as const ,
247284 } ,
285+ {
286+ key : 'destroyedAt' ,
287+ propertyLabel : t ( 'deployment.filter.DestroyedAt' ) ,
288+ type : 'datetime' as const ,
289+ operators : [ 'after' as const , 'before' as const ] ,
290+ defaultOperator : 'after' as const ,
291+ } ,
248292 ]
249293 : [ ] ;
250294
@@ -388,6 +432,7 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
388432 key : 'tags' ,
389433 title : t ( 'deployment.Tags' ) ,
390434 defaultHidden : true ,
435+ sorter : true ,
391436 render : ( _text , row ) => (
392437 < DeploymentTagChips
393438 metadataFrgmt = { row . metadata }
@@ -406,10 +451,49 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
406451 return createdAt ? dayjs ( createdAt ) . format ( 'll LT' ) : '-' ;
407452 } ,
408453 } ,
454+ {
455+ key : 'updatedAt' ,
456+ title : t ( 'deployment.UpdatedAt' ) ,
457+ defaultHidden : true ,
458+ render : ( _text , row ) => {
459+ const updatedAt = row . metadata ?. updatedAt ;
460+ return updatedAt ? dayjs ( updatedAt ) . format ( 'll LT' ) : '-' ;
461+ } ,
462+ } ,
463+ {
464+ key : 'openToPublic' ,
465+ title : t ( 'deployment.OpenToPublic' ) ,
466+ defaultHidden : true ,
467+ render : ( _text , row ) => {
468+ const isPublic = row . networkAccess ?. openToPublic ;
469+ return isPublic == null ? (
470+ < Typography . Text type = "secondary" > -</ Typography . Text >
471+ ) : (
472+ < Typography . Text >
473+ { isPublic ? t ( 'deployment.Public' ) : t ( 'deployment.Private' ) }
474+ </ Typography . Text >
475+ ) ;
476+ } ,
477+ } ,
478+ {
479+ key : 'resourceGroup' ,
480+ title : t ( 'deployment.ResourceGroup' ) ,
481+ defaultHidden : true ,
482+ sorter : true ,
483+ render : ( _text , row ) => {
484+ const resourceGroup = row . metadata ?. resourceGroupName ;
485+ return resourceGroup ? (
486+ < Typography . Text > { resourceGroup } </ Typography . Text >
487+ ) : (
488+ < Typography . Text type = "secondary" > -</ Typography . Text >
489+ ) ;
490+ } ,
491+ } ,
409492 isAdminMode && {
410493 key : 'domainName' ,
411494 title : t ( 'deployment.Domain' ) ,
412495 defaultHidden : true ,
496+ sorter : true ,
413497 render : ( _text , row ) => {
414498 const domain = row . metadata ?. domainName ;
415499 return domain ? (
@@ -419,6 +503,33 @@ const DeploymentList: React.FC<DeploymentListProps> = ({
419503 ) ;
420504 } ,
421505 } ,
506+ isAdminMode && {
507+ key : 'projectId' ,
508+ title : t ( 'deployment.ProjectId' ) ,
509+ defaultHidden : true ,
510+ sorter : true ,
511+ render : ( _text , row ) => {
512+ const projectId = row . metadata ?. projectId ;
513+ return projectId ? (
514+ < BAIId globalId = { projectId } copyable />
515+ ) : (
516+ < Typography . Text type = "secondary" > -</ Typography . Text >
517+ ) ;
518+ } ,
519+ } ,
520+ isAdminMode && {
521+ key : 'createdUserId' ,
522+ title : t ( 'deployment.CreatedBy' ) ,
523+ defaultHidden : true ,
524+ render : ( _text , row ) => {
525+ const userId = row . createdUserId ;
526+ return userId ? (
527+ < BAIId globalId = { userId } copyable />
528+ ) : (
529+ < Typography . Text type = "secondary" > -</ Typography . Text >
530+ ) ;
531+ } ,
532+ } ,
422533 isAdminMode && {
423534 key : 'owner' ,
424535 title : t ( 'deployment.Owner' ) ,
0 commit comments