Skip to content

Commit

Permalink
perf(ui): update loader (#5029)
Browse files Browse the repository at this point in the history
* perf(ui): update loader

Signed-off-by: Yvonnick Esnault <[email protected]>
  • Loading branch information
yesnault authored Mar 3, 2020
1 parent 4077bb8 commit 1de9f1f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
2 changes: 0 additions & 2 deletions ui/src/app/shared/status/status.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import { PipelineStatus } from 'app/model/pipeline.model';
})
export class StatusIconComponent {
@Input() status: string;
@Input() value: string;
@Input() optional: boolean;
@Input() loader = true;
pipelineStatusEnum = PipelineStatus;

constructor() { }
Expand Down
5 changes: 1 addition & 4 deletions ui/src/app/shared/status/status.icon.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<div class="status-icon" [ngSwitch]="status">
<div class="wrapper">
<ng-container *ngSwitchCase="pipelineStatusEnum.BUILDING">
<div *ngIf="loader" class="ui small active inline blue loader">
<span class="">{{value}}</span>
</div>
<i *ngIf="!loader" class="blue circle outline icon"></i>
<img id="gifloader" height="24" width="24" src="/assets/images/loader.gif">
</ng-container>
<i class="check green icon" *ngSwitchCase="pipelineStatusEnum.SUCCESS"></i>
<ng-container *ngSwitchCase="pipelineStatusEnum.FAIL">
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/shared/status/status.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('CDS: Parameter Value Component', () => {
tick(50);

let compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('.blue.loader')).toBeTruthy('Building loader not displayed');
expect(compiled.querySelector('#gifloader')).toBeTruthy('Building loader not displayed');
}));

it('should display fail icon', fakeAsync(() => {
Expand Down
Binary file added ui/src/assets/images/loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1de9f1f

Please sign in to comment.