[ML] Fix JVM heap size position on the ML memory overview chart (#132888)

This commit is contained in:
Dima Arnautov 2022-05-25 13:44:49 +02:00 committed by GitHub
parent 003474c5b4
commit 1d0e3e72b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -14,6 +14,7 @@ import {
startWith,
tap,
debounceTime,
filter,
} from 'rxjs/operators';
import { isEqual, sortBy, uniq } from 'lodash';
import type { TimefilterContract } from '@kbn/data-plugin/public';
@ -731,8 +732,7 @@ export class AnomalyTimelineStateService extends StateService {
public getSwimLaneBucketInterval$(): Observable<TimeBucketsInterval> {
return this._swimLaneBucketInterval$.pipe(
// @ts-ignore
skipWhile((v) => !v),
filter((v): v is TimeBucketsInterval => !v),
distinctUntilChanged((prev, curr) => {
return prev.asSeconds() === curr.asSeconds();
})

View file

@ -70,11 +70,6 @@ export const MemoryPreviewChart: FC<MemoryPreviewChartProps> = ({ memoryOverview
);
const chartData = [
{
x: 0,
y: memoryOverview.machine_memory.jvm,
g: groups.jvm.name,
},
{
x: 0,
y: memoryOverview.trained_models.total,
@ -100,6 +95,11 @@ export const MemoryPreviewChart: FC<MemoryPreviewChartProps> = ({ memoryOverview
memoryOverview.anomaly_detection.total,
g: groups.available.name,
},
{
x: 0,
y: memoryOverview.machine_memory.jvm,
g: groups.jvm.name,
},
];
const barSeriesColorAccessor: SeriesColorAccessor = ({ specId, yAccessor, splitAccessors }) => {