Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ipv6 to filters in Node Finder #2738

Merged
merged 11 commits into from
Jun 9, 2024
Merged
1 change: 1 addition & 0 deletions packages/grid_client/src/modules/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ class FilterOptions {
@Expose() @IsOptional() @Min(0) sru?: number; // GB
@Expose() @IsOptional() @Min(0) hru?: number; // GB
@Expose() @IsOptional() @IsBoolean() publicIPs?: boolean;
@Expose() @IsOptional() @IsBoolean() hasIPv6?: boolean;
@Expose() @IsOptional() @IsBoolean() accessNodeV4?: boolean;
@Expose() @IsOptional() @IsBoolean() accessNodeV6?: boolean;
@Expose() @IsOptional() @IsBoolean() gateway?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion packages/grid_client/src/primitives/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class Nodes {
free_hru: Math.ceil(this._g2b(options.hru)) || "",
free_ips: options.publicIPs ? 1 : "",
ipv4: options.accessNodeV4,
ipv6: options.accessNodeV6,
ipv6: options.hasIPv6,
zaelgohary marked this conversation as resolved.
Show resolved Hide resolved
certification_type: options.certified ? "Certified" : "",
farm_ids: options.farmId ? [options.farmId] : options.farmIds,
farm_name: options.farmName,
Expand Down
1 change: 1 addition & 0 deletions packages/playground/src/utils/nodeSelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export function normalizeNodeFilters(
(filters.solutionDisk ?? 0) + (filters.rootFilesystemSize ?? 0),
) || undefined,
publicIPs: filters.ipv4 || undefined,
hasIPv6: filters.ipv6 || undefined,
hasGPU: filters.hasGPU || undefined,
rentedBy: filters.dedicated ? options.twinId : undefined,
certified: filters.certified || undefined,
Expand Down
6 changes: 6 additions & 0 deletions packages/playground/src/views/nodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
/>
</TfFilter>

<TfFilter query-route="ipv6" v-model="filters.ipv6">
<v-switch color="primary" inset label="IPv6" v-model="filters.ipv6" density="compact" hide-details />
</TfFilter>

<TfFilter class="mt-4" query-route="node-status" v-model="filters.status">
<v-select
:model-value="filters.status || undefined"
Expand Down Expand Up @@ -508,6 +512,7 @@ export default {
dedicated: false,
numGpu: "",
rentable: false,
ipv6: false,
});

const loading = ref<boolean>(true);
Expand Down Expand Up @@ -554,6 +559,7 @@ export default {
numGpu: +filters.value.numGpu || undefined,
rentable: filters.value.rentable && profileManager.profile ? filters.value.rentable : undefined,
availableFor: filters.value.rentable && profileManager.profile ? profileManager.profile.twinId : undefined,
ipv6: filters.value.ipv6,
},
{ loadFarm: true },
);
Expand Down
Loading