Skip to content

Commit

Permalink
Merge branch 'main' of github.com:SpareCores/sc-www
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Sep 26, 2024
2 parents cc6d7b8 + 6a98ff4 commit 2f1ce67
Show file tree
Hide file tree
Showing 13 changed files with 302 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cypress/e2e/servers_details.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Server Details', () => {
});

it('Server without price and charts', () => {
E2EEvent.visitURL('/server/gcp/c4-standard-192', 4000);
E2EEvent.visitURL('/server/gcp/x4-megamem-1440-metal', 4000);

E2EEvent.checkBreadcrumbs();

Expand Down
38 changes: 38 additions & 0 deletions sdk/ServerPricesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,20 @@ export namespace ServerPrices {
* @default 1
*/
vcpus_min?: number;
/**
* Maximum vCPUs
* Maximum number of virtual CPUs.
*/
vcpus_max?: number | null;
/**
* Processor architecture
* Processor architecture.
*/
architecture?: "arm64" | "arm64_mac" | "i386" | "x86_64" | "x86_64_mac";
/** Processor manufacturer */
cpu_manufacturer?: "AMD" | "AWS" | "Ampere" | "Apple" | "Intel";
/** Processor family */
cpu_family?: "ARMv8" | "Ampere Altra" | "EPYC" | "Xeon";
/**
* SCore
* Minimum stress-ng CPU workload score.
Expand Down Expand Up @@ -281,6 +290,34 @@ export namespace ServerPrices {
* Minimum amount of total GPU memory (GBs) in all GPUs.
*/
gpu_memory_total?: number | null;
/** GPU manufacturer */
gpu_manufacturer?: "AMD" | "Habana" | "NVIDIA";
/** GPU family */
gpu_family?:
| "Ada Lovelace"
| "Ampere"
| "Gaudi"
| "Hopper"
| "Kepler"
| "Maxwell"
| "Radeon Pro Navi"
| "Turing"
| "Volta";
/** GPU model */
gpu_model?:
| "A100"
| "A10G"
| "H100"
| "H200"
| "HL-205"
| "K80"
| "L4"
| "L40S"
| "M60"
| "T4"
| "T4G"
| "V100"
| "V520";
/**
* Limit
* Maximum number of results.
Expand All @@ -300,6 +337,7 @@ export namespace ServerPrices {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
38 changes: 38 additions & 0 deletions sdk/ServersRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,20 @@ export namespace Servers {
* @default 1
*/
vcpus_min?: number;
/**
* Maximum vCPUs
* Maximum number of virtual CPUs.
*/
vcpus_max?: number | null;
/**
* Processor architecture
* Processor architecture.
*/
architecture?: "arm64" | "arm64_mac" | "i386" | "x86_64" | "x86_64_mac";
/** Processor manufacturer */
cpu_manufacturer?: "AMD" | "AWS" | "Ampere" | "Apple" | "Intel";
/** Processor family */
cpu_family?: "ARMv8" | "Ampere Altra" | "EPYC" | "Xeon";
/**
* SCore
* Minimum stress-ng CPU workload score.
Expand Down Expand Up @@ -91,6 +100,34 @@ export namespace Servers {
* Minimum amount of total GPU memory (GBs) in all GPUs.
*/
gpu_memory_total?: number | null;
/** GPU manufacturer */
gpu_manufacturer?: "AMD" | "Habana" | "NVIDIA";
/** GPU family */
gpu_family?:
| "Ada Lovelace"
| "Ampere"
| "Gaudi"
| "Hopper"
| "Kepler"
| "Maxwell"
| "Radeon Pro Navi"
| "Turing"
| "Volta";
/** GPU model */
gpu_model?:
| "A100"
| "A10G"
| "H100"
| "H200"
| "HL-205"
| "K80"
| "L4"
| "L40S"
| "M60"
| "T4"
| "T4G"
| "V100"
| "V520";
/**
* Limit
* Maximum number of results. Set to -1 for unlimited.
Expand All @@ -109,6 +146,7 @@ export namespace Servers {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
1 change: 1 addition & 0 deletions sdk/StoragePricesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export namespace StoragePrices {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
1 change: 1 addition & 0 deletions sdk/TrafficPricesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export namespace TrafficPrices {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
132 changes: 132 additions & 0 deletions sdk/data-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,23 @@ export enum CpuArchitecture {
X8664Mac = "x86_64_mac",
}

/** CpuFamilies */
export enum CpuFamilies {
ARMv8 = "ARMv8",
AmpereAltra = "Ampere Altra",
EPYC = "EPYC",
Xeon = "Xeon",
}

/** CpuManufacturers */
export enum CpuManufacturers {
AMD = "AMD",
AWS = "AWS",
Ampere = "Ampere",
Apple = "Apple",
Intel = "Intel",
}

/**
* DdrGeneration
* Generation of the DDR SDRAM.
Expand Down Expand Up @@ -466,6 +483,43 @@ export interface Gpu {
video_clock?: number | null;
}

/** GpuFamilies */
export enum GpuFamilies {
AdaLovelace = "Ada Lovelace",
Ampere = "Ampere",
Gaudi = "Gaudi",
Hopper = "Hopper",
Kepler = "Kepler",
Maxwell = "Maxwell",
RadeonProNavi = "Radeon Pro Navi",
Turing = "Turing",
Volta = "Volta",
}

/** GpuManufacturers */
export enum GpuManufacturers {
AMD = "AMD",
Habana = "Habana",
NVIDIA = "NVIDIA",
}

/** GpuModels */
export enum GpuModels {
A100 = "A100",
A10G = "A10G",
H100 = "H100",
H200 = "H200",
HL205 = "HL-205",
K80 = "K80",
L4 = "L4",
L40S = "L40S",
M60 = "M60",
T4 = "T4",
T4G = "T4G",
V100 = "V100",
V520 = "V520",
}

/** HTTPValidationError */
export interface HTTPValidationError {
/** Detail */
Expand Down Expand Up @@ -3148,11 +3202,20 @@ export interface SearchServersServersGetParams {
* @default 1
*/
vcpus_min?: number;
/**
* Maximum vCPUs
* Maximum number of virtual CPUs.
*/
vcpus_max?: number | null;
/**
* Processor architecture
* Processor architecture.
*/
architecture?: "arm64" | "arm64_mac" | "i386" | "x86_64" | "x86_64_mac";
/** Processor manufacturer */
cpu_manufacturer?: "AMD" | "AWS" | "Ampere" | "Apple" | "Intel";
/** Processor family */
cpu_family?: "ARMv8" | "Ampere Altra" | "EPYC" | "Xeon";
/**
* SCore
* Minimum stress-ng CPU workload score.
Expand Down Expand Up @@ -3204,6 +3267,34 @@ export interface SearchServersServersGetParams {
* Minimum amount of total GPU memory (GBs) in all GPUs.
*/
gpu_memory_total?: number | null;
/** GPU manufacturer */
gpu_manufacturer?: "AMD" | "Habana" | "NVIDIA";
/** GPU family */
gpu_family?:
| "Ada Lovelace"
| "Ampere"
| "Gaudi"
| "Hopper"
| "Kepler"
| "Maxwell"
| "Radeon Pro Navi"
| "Turing"
| "Volta";
/** GPU model */
gpu_model?:
| "A100"
| "A10G"
| "H100"
| "H200"
| "HL-205"
| "K80"
| "L4"
| "L40S"
| "M60"
| "T4"
| "T4G"
| "V100"
| "V520";
/**
* Limit
* Maximum number of results. Set to -1 for unlimited.
Expand All @@ -3222,6 +3313,7 @@ export interface SearchServersServersGetParams {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down Expand Up @@ -3251,11 +3343,20 @@ export interface SearchServerPricesServerPricesGetParams {
* @default 1
*/
vcpus_min?: number;
/**
* Maximum vCPUs
* Maximum number of virtual CPUs.
*/
vcpus_max?: number | null;
/**
* Processor architecture
* Processor architecture.
*/
architecture?: "arm64" | "arm64_mac" | "i386" | "x86_64" | "x86_64_mac";
/** Processor manufacturer */
cpu_manufacturer?: "AMD" | "AWS" | "Ampere" | "Apple" | "Intel";
/** Processor family */
cpu_family?: "ARMv8" | "Ampere Altra" | "EPYC" | "Xeon";
/**
* SCore
* Minimum stress-ng CPU workload score.
Expand Down Expand Up @@ -3497,6 +3598,34 @@ export interface SearchServerPricesServerPricesGetParams {
* Minimum amount of total GPU memory (GBs) in all GPUs.
*/
gpu_memory_total?: number | null;
/** GPU manufacturer */
gpu_manufacturer?: "AMD" | "Habana" | "NVIDIA";
/** GPU family */
gpu_family?:
| "Ada Lovelace"
| "Ampere"
| "Gaudi"
| "Hopper"
| "Kepler"
| "Maxwell"
| "Radeon Pro Navi"
| "Turing"
| "Volta";
/** GPU model */
gpu_model?:
| "A100"
| "A10G"
| "H100"
| "H200"
| "HL-205"
| "K80"
| "L4"
| "L40S"
| "M60"
| "T4"
| "T4G"
| "V100"
| "V520";
/**
* Limit
* Maximum number of results.
Expand All @@ -3516,6 +3645,7 @@ export interface SearchServerPricesServerPricesGetParams {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down Expand Up @@ -3756,6 +3886,7 @@ export interface SearchStoragePricesStoragePricesGetParams {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down Expand Up @@ -3998,6 +4129,7 @@ export interface SearchTrafficPricesTrafficPricesGetParams {
*/
order_by?: string;
/**
* Order Dir
* Order direction.
* @default "asc"
*/
Expand Down
2 changes: 1 addition & 1 deletion sdk/openapi.json

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions src/app/components/search-bar/search-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@
</lucide-icon>
</div>
<div *ngIf="getParameterType(parameter) === 'range'" class="mb-4 mt-4" >
<div class="text-white text-sm" *ngIf="parameter.modelValue" id="filter_range_value_{{parameter.name}}" >{{parameter.modelValue}} {{parameter.schema.unit}}</div>
<div class="text-white text-sm"
*ngIf="parameter.modelValue && !(parameter.modelValue === parameter.schema.range_max && parameter.modelValue === parameter.schema.null_value)"
id="filter_range_value_{{parameter.name}}" >{{parameter.modelValue}} {{parameter.schema.unit}}</div>
<div class="text-white text-sm"
*ngIf="parameter.modelValue === parameter.schema.range_max && parameter.modelValue === parameter.schema.null_value"
id="filter_range_value_{{parameter.name}}" > &#8734; {{parameter.schema.unit}}</div>
<input id="filter_range_{{parameter.name}}" type="range"
min="{{parameter.schema.minimum}}" max="{{parameter.schema.maximum}}" step="{{getStep(parameter)}}"
min="{{parameter.schema.range_min}}" max="{{parameter.schema.range_max}}" step="{{getStep(parameter)}}"
data-ph-capture-attribute-sc-event="server listing filter"
data-ph-capture-attribute-server-listing-filter-type="range"
[attr.data-ph-capture-attribute-server-listing-filter-id]="parameter.name"
[attr.data-ph-capture-attribute-server-listing-filter-category]="item.category_id"
[(ngModel)]="parameter.modelValue"
(ngModelChange)="valueChanged()"
(ngModelChange)="valueChanged(parameter)"
class="w-full h-2 accent-emerald-400 bg-gray-200 rounded-lg cursor-pointer range-sm">
</div>
<div *ngIf="getParameterType(parameter) === 'number'" class="mb-4 mt-4 relative" >
Expand All @@ -53,7 +58,7 @@
[attr.data-ph-capture-attribute-server-listing-filter-category]="item.category_id"
[(ngModel)]="parameter.modelValue"
(ngModelChange)="valueChanged()"
min="{{parameter.schema.minimum || 0}}"
min="{{parameter.schema.range_min || 0}}"
class="w-full h-8 accent-emerald-400 bg-gray-200 rounded-lg cursor-pointer range-sm pr-8">
<span *ngIf="parameter.schema.unit" class="unit text-gray-600">{{parameter.schema.unit}}</span>
</div>
Expand Down
Loading

0 comments on commit 2f1ce67

Please sign in to comment.