Skip to content

Commit

Permalink
NAS-130213: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
denysbutenko committed Aug 8, 2024
1 parent 88e1fa4 commit d418518
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions src/app/pages/dashboard/services/widget-resources.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { subHours, subMinutes } from 'date-fns';
import {
EMPTY,
Observable, Subject, combineLatestWith, debounceTime,
forkJoin, map, repeat, shareReplay, switchMap, take, timer,
forkJoin, map, of, repeat, shareReplay, switchMap, take, timer,
} from 'rxjs';
import { SystemUpdateStatus } from 'app/enums/system-update.enum';
import { toLoadingState } from 'app/helpers/operators/to-loading-state.helper';
Expand Down Expand Up @@ -145,28 +144,16 @@ export class WidgetResourcesService {
);
}

// TODO: Fix when stats API is ready
getAppStats(appName: string): Observable<ChartReleaseStats> {
console.error(`getAppStats(${appName}) not implemented yet`);
// TODO: Fix when stats API is ready
return EMPTY;
// return this.appStatsUpdates$.pipe(
// filter((stats) => Boolean(appName && stats[appName])),
// map((stats) => stats[appName]),
// shareReplay({ bufferSize: 1, refCount: true }),
// );
return of();
}

// TODO: Fix when stats API is ready
getAppStatusUpdates(appName: string): Observable<Job<void, AppStartQueryParams>> {
console.error(`getAppStatusUpdates(${appName}) not implemented yet`);
// TODO: Fix when stats API is ready
return EMPTY;
// return this.ws.subscribe('core.get_jobs').pipe(
// filter((event: ApiEvent<Job<ChartScaleResult, ChartScaleQueryParams>>) => {
// return event.fields.method === 'chart.release.scale';
// }),
// filter((event) => event?.fields?.arguments[0] === appName),
// map((event) => event.fields),
// );
return of();
}

constructor(
Expand Down

0 comments on commit d418518

Please sign in to comment.