Skip to content

Commit

Permalink
feat(amazon/loadBalancers): Disable create button until security grou…
Browse files Browse the repository at this point in the history
…ps are refreshed
  • Loading branch information
Justin Reynolds committed Feb 28, 2018
1 parent abfc180 commit 6809acd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class SecurityGroupsImpl extends React.Component<IWizardPageProps & FormikProps<

private refreshSecurityGroups(): void {
this.setState({ refreshing: true });
this.props.setWaiting(SecurityGroups.label, true);

Observable.fromPromise(ReactInjector.cacheInitializer.refreshCache('securityGroups'))
.takeUntil(this.destroy$)
Expand All @@ -135,6 +136,7 @@ class SecurityGroupsImpl extends React.Component<IWizardPageProps & FormikProps<
refreshing: false,
refreshTime: ReactInjector.infrastructureCaches.get('securityGroups').getStats().ageMax,
});
this.props.setWaiting(SecurityGroups.label, false);

Observable.fromPromise(this.preloadSecurityGroups())
.takeUntil(this.destroy$)
Expand Down

0 comments on commit 6809acd

Please sign in to comment.