From b97a8dc1f9b287032adc15154be519e0c6e928f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Wed, 27 Sep 2023 15:06:32 +0300 Subject: [PATCH] RED-7641: Align axis grid lines --- .../license/components/chart/chart.component.ts | 10 ++++++++-- apps/red-ui/src/app/services/license.service.ts | 7 +------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/red-ui/src/app/modules/admin/screens/license/components/chart/chart.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/components/chart/chart.component.ts index d6669e947..397692423 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/components/chart/chart.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/components/chart/chart.component.ts @@ -35,7 +35,10 @@ export class ChartComponent implements OnChanges { scales: { y: { stacked: true, - ticks: { callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined }, + ticks: { + callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined, + count: 9, + }, title: { display: !!this.yAxisLabel, text: this.yAxisLabel, @@ -46,7 +49,10 @@ export class ChartComponent implements OnChanges { y1: { display: this.secondaryAxis, position: 'right', - ticks: { callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined }, + ticks: { + callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined, + count: 9, + }, title: { display: !!this.yAxisLabelRight, text: this.yAxisLabelRight, diff --git a/apps/red-ui/src/app/services/license.service.ts b/apps/red-ui/src/app/services/license.service.ts index 4f439f32e..270f5724f 100644 --- a/apps/red-ui/src/app/services/license.service.ts +++ b/apps/red-ui/src/app/services/license.service.ts @@ -86,7 +86,7 @@ export class LicenseService extends GenericService { get analysisCapacityBytes(): number { const capacityFeature = this.getFeature(LicenseFeatures.ANALYSIS_CAPACITY_BYTES); - return Number(capacityFeature?.value ?? '-1'); + return (Number(capacityFeature?.value ?? '-1') / 10) * 10; } get retentionCapacityBytes(): number { @@ -122,11 +122,6 @@ export class LicenseService extends GenericService { this.licenseData$ = this.#licenseData$.pipe(filter(licenses => !!licenses)); } - hasNumberFeature(key: LicenseFeatures): boolean { - const feature = this.getFeature(key); - return !!feature && Number(feature.value) >= 0; - } - getFeature(name: string): ILicenseFeature | undefined { return this.selectedLicense.features?.find(f => f.name === name); }