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

perf(ui): update loader #5029

Merged
merged 6 commits into from
Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
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.