diff --git a/packages/grid_client/src/modules/models.ts b/packages/grid_client/src/modules/models.ts index 4d4f3fd9a7..4f378a4b33 100644 --- a/packages/grid_client/src/modules/models.ts +++ b/packages/grid_client/src/modules/models.ts @@ -635,6 +635,7 @@ class FilterOptions { @Expose() @IsOptional() @Transform(({ value }) => NodeStatus[value]) @IsEnum(NodeStatus) status?: NodeStatus; @Expose() @IsOptional() @IsString() region?: string; @Expose() @IsOptional() @IsBoolean() healthy?: boolean; + @Expose() @IsOptional() @IsInt() rentableOrRentedBy?: number; } enum CertificationType { diff --git a/packages/grid_client/src/primitives/nodes.ts b/packages/grid_client/src/primitives/nodes.ts index 3c22b5eeb4..2a107bec85 100644 --- a/packages/grid_client/src/primitives/nodes.ts +++ b/packages/grid_client/src/primitives/nodes.ts @@ -423,6 +423,7 @@ class Nodes { healthy: options.healthy, sort_by: SortBy.FreeCRU, sort_order: SortOrder.Desc, + rentable_or_rented_by: options.rentableOrRentedBy, }; if (options.gateway) { diff --git a/packages/playground/src/types/nodeSelector.ts b/packages/playground/src/types/nodeSelector.ts index a349e869df..a2c519a5e5 100644 --- a/packages/playground/src/types/nodeSelector.ts +++ b/packages/playground/src/types/nodeSelector.ts @@ -23,6 +23,7 @@ export interface SelectionDetailsFilters { certified?: boolean; dedicated?: boolean; exclusiveFor?: string; + rentable_or_rented_by?: number; } export interface NumericValidator { diff --git a/packages/playground/src/utils/nodeSelector.ts b/packages/playground/src/utils/nodeSelector.ts index 1a87bacf80..6d454ed951 100644 --- a/packages/playground/src/utils/nodeSelector.ts +++ b/packages/playground/src/utils/nodeSelector.ts @@ -208,6 +208,7 @@ export function normalizeNodeFilters( country: options.location.country, gateway: options.gateway, healthy: true, + rentableOrRentedBy: filters.dedicated ? options.twinId : undefined, }; }