Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscaler updates following UX review #3817

Merged
merged 4 commits into from
Sep 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix lint
  • Loading branch information
richard-cox committed Sep 2, 2019
commit e71c0d2c426a8604e3be86970fa944339e42d4a9
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ import { APIResource, EntityInfo } from '../../../../store/src/types/api.types';
import { GetAppAutoscalerInfoAction } from '../../store/app-autoscaler.actions';
import { AutoscalerInfo } from '../../store/app-autoscaler.types';

export const isAutoscalerEnabled = (endpointGuid: string, esf: EntityServiceFactory): Observable<boolean> => {
return fetchAutoscalerInfo(endpointGuid, esf).pipe(
map(entityInfo => !entityInfo.entityRequestInfo.error),
startWith(false)
);
};

export const fetchAutoscalerInfo = (
endpointGuid: string,
esf: EntityServiceFactory): Observable<EntityInfo<APIResource<AutoscalerInfo>>> => {
Expand All @@ -29,3 +22,9 @@ export const fetchAutoscalerInfo = (
);
};

export const isAutoscalerEnabled = (endpointGuid: string, esf: EntityServiceFactory): Observable<boolean> => {
return fetchAutoscalerInfo(endpointGuid, esf).pipe(
map(entityInfo => !entityInfo.entityRequestInfo.error),
startWith(false)
);
};