Skip to content

Commit

Permalink
[autoscaler] using app-polling-indicator to replace refresh-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
zyjiaobj committed Jul 23, 2019
1 parent f24d164 commit 87745f1
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@
</div>
</mat-card-content>
<mat-card-actions class="autoscaler-tab__actions">
<button mat-icon-button (click)="loadLatestMetricsUponPolicy()">
<refresh-icon></refresh-icon>
</button>
<app-polling-indicator [manualPoll]="true" (poll)="loadLatestMetricsUponPolicy()">
</app-polling-indicator>
<button (click)="metricChartPage()" mat-icon-button>
<mat-icon>launch</mat-icon>
</button>
Expand Down Expand Up @@ -249,10 +248,10 @@
</div>
</mat-card-content>
<mat-card-actions class="autoscaler-tab__actions">
<button mat-icon-button (click)="fetchScalingHistory()">
<refresh-icon [isRefreshing$]="appAutoscalerScalingHistoryService.isFetchingEntity$">
</refresh-icon>
</button>
<app-polling-indicator (poll)="fetchScalingHistory()"
[manualPoll]="!(appAutoscalerScalingHistoryService.isFetchingEntity$ | async)"
[isPolling]="(appAutoscalerScalingHistoryService.isFetchingEntity$ | async)">
</app-polling-indicator>
<button (click)="scaleHistoryPage()" mat-icon-button>
<mat-icon>launch</mat-icon>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<mat-card class="recent-apps-card">
<mat-card-header class="recent-apps-card__header">
<mat-card-title>Recently updated applications</mat-card-title>
<button mat-icon-button [disabled]="loading$ | async" (click)="refresh.emit()">
<refresh-icon [isRefreshing$]="loading$"></refresh-icon>
</button>
<app-polling-indicator [manualPoll]="!(loading$ | async)" [isPolling]="(loading$ | async)"
(poll)="refresh.emit()"></app-polling-indicator>
</mat-card-header>
<mat-card-content class="recent-apps-card__content" *ngIf="recentApps$ | async as apps">
<div *ngIf="apps.length === 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import { ApplicationStateIconPipe } from '../../application-state/application-st
import { StatefulIconComponent } from '../../../../core/stateful-icon/stateful-icon.component';
import { CardCfRecentAppsComponent } from './card-cf-recent-apps.component';
import { CompactAppCardComponent } from './compact-app-card/compact-app-card.component';
import { RefreshIconComponent } from '../../refresh-icon/refresh-icon.component';
import { CloudFoundryEndpointService } from '../../../../features/cloud-foundry/services/cloud-foundry-endpoint.service';
import { ActiveRouteCfOrgSpace } from '../../../../features/cloud-foundry/cf-page.types';
import { EntityMonitorFactory } from '../../../monitors/entity-monitor.factory.service';
import { CfUserService } from '../../../data-services/cf-user.service';
import { PaginationMonitorFactory } from '../../../monitors/pagination-monitor.factory';
import { PollingIndicatorComponent } from '../../polling-indicator/polling-indicator.component';

describe('CardCfRecentAppsComponent', () => {
let component: CardCfRecentAppsComponent;
Expand All @@ -26,7 +26,7 @@ describe('CardCfRecentAppsComponent', () => {
CardCfRecentAppsComponent,
ApplicationStateIconComponent,
CompactAppCardComponent,
RefreshIconComponent,
PollingIndicatorComponent,
ApplicationStateIconPipe
],
imports: [...BaseTestModulesNoShared],
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/frontend/packages/core/src/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ import { NestedTabsComponent } from './components/nested-tabs/nested-tabs.compon
import { PageHeaderModule } from './components/page-header/page-header.module';
import { PageSubNavSectionComponent } from './components/page-sub-nav-section/page-sub-nav-section.component';
import { PageSubNavComponent } from './components/page-sub-nav/page-sub-nav.component';
import { RefreshIconComponent } from './components/refresh-icon/refresh-icon.component';
import { PollingIndicatorComponent } from './components/polling-indicator/polling-indicator.component';
import { RingChartComponent } from './components/ring-chart/ring-chart.component';
import { RoutingIndicatorComponent } from './components/routing-indicator/routing-indicator.component';
Expand Down Expand Up @@ -295,7 +294,6 @@ import { UserPermissionDirective } from './user-permission.directive';
SimpleUsageChartComponent,
PageSubNavComponent,
BreadcrumbsComponent,
RefreshIconComponent,
PageSubNavSectionComponent,
EntitySummaryTitleComponent,
MarkdownPreviewComponent,
Expand Down Expand Up @@ -403,7 +401,6 @@ import { UserPermissionDirective } from './user-permission.directive';
MultilineTitleComponent,
PageSubNavComponent,
BreadcrumbsComponent,
RefreshIconComponent,
PageSubNavSectionComponent,
TileSelectorComponent,
AddServiceInstanceBaseStepComponent,
Expand Down

0 comments on commit 87745f1

Please sign in to comment.