Skip to content

Commit

Permalink
Merge branch 'main' into DEV-378
Browse files Browse the repository at this point in the history
  • Loading branch information
Palabola authored Oct 22, 2024
2 parents 49acee2 + 701a620 commit 3f9d8fc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/app/pages/landingpage/landingpage.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@
width: 210px;
height: 64px;
border-radius: 8px;
opacity: 1 !important;
}

.price_input:disabled {
opacity: 1 !important;
}

.ram_input {
position: absolute;
left: 190px;
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/server-compare/server-compare.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export class ServerCompareComponent implements OnInit, AfterViewInit {
}

getMemory(item: ExtendedServerDetails) {
return ((item.memory_amount || 0) / 1024).toFixed((item.memory_amount || 0) > 1024 ? 0 : 1) + ' GiB';
return ((item.memory_amount || 0) / 1024).toFixed((item.memory_amount || 0) >= 1024 ? 0 : 1) + ' GiB';
}

getGPUMemory(item: ExtendedServerDetails) {
Expand Down
11 changes: 6 additions & 5 deletions src/app/pages/server-details/server-details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class ServerDetailsComponent implements OnInit, OnDestroy {
similarOptions: any[] = [
{name: 'By GPU, CPU and memory specs', key: 'bySpecs'},
{name: 'By CPU performance', key: 'byScore'},
//{name: 'By CPU performance per price', key: 'byPerformancePerPrice'}
{name: 'By CPU performance per price', key: 'byPerformancePerPrice'}
];
selectedSimilarOption: any = this.similarOptions[0];

Expand Down Expand Up @@ -499,7 +499,7 @@ export class ServerDetailsComponent implements OnInit, OnDestroy {

getMemory(memory: number | undefined = undefined) {
const memoryAmount = memory || this.serverDetails.memory_amount || 0;
return ((memoryAmount) / 1024).toFixed((memoryAmount ? 0 : 1)) + ' GiB';
return ((memoryAmount) / 1024).toFixed((memoryAmount >= 1024 ? 0 : 1)) + ' GiB';
}

getStorage() {
Expand Down Expand Up @@ -1509,11 +1509,12 @@ export class ServerDetailsComponent implements OnInit, OnDestroy {

});
break;
/*
case 'byPerformancePerPrice':
this.keeperAPI.getServerSimilarServers(this.serverDetails.vendor_id, this.serverDetails.api_reference, 'score_per_price', 7)
.then((servers: any) => {
this.similarServers = servers?.body;
});
break;
*/
case 'bySpecs':
this.keeperAPI.getServerSimilarServers(this.serverDetails.vendor_id, this.serverDetails.api_reference, 'specs', 7)
.then((servers: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/server-og/server-og.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class ServerOGComponent implements OnInit {

getMemory(memory: number | undefined = undefined) {
const memoryAmount = memory || this.serverDetails.memory_amount || 0;
return ((memoryAmount) / 1024).toFixed((memoryAmount ? 0 : 1)) + ' GiB';
return ((memoryAmount) / 1024).toFixed((memoryAmount >= 1024 ? 0 : 1)) + ' GiB';
}

getStorage() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/services/keeper-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class KeeperAPIService {
}


public getServerSimilarServers(vendor: string, id: string, category: "family" | "specs" | "score", limit: number): Promise<any> {
public getServerSimilarServers(vendor: string, id: string, category: "family" | "specs" | "score" | "score_per_price", limit: number): Promise<any> {
return this.ServerController.getSimilarServersServerVendorServerSimilarServersByNumGet({vendor, server: id, by: category, num: limit});
}

Expand Down

0 comments on commit 3f9d8fc

Please sign in to comment.