Skip to content

Commit

Permalink
fix(ui): datatable button display correctly (#4897)
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
  • Loading branch information
bnjjj authored and sguiheux committed Jan 20, 2020
1 parent cd10319 commit 28f7ba1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions ui/src/app/shared/table/data-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@
</ng-container>
<ng-container *ngSwitchCase="'time-ago'"> {{c.selector | amTimeAgo}} </ng-container>
<ng-container *ngSwitchCase="'date'"> {{c.selector | amCalendar}} </ng-container>
<button class="ui primary button small" *ngSwitchCase="'button'" (click)="c.selector.click()">{{c.selector.title
| translate}}</button>
<button class="ui button" [ngClass]="c.selector.class" *ngSwitchCase="'button'"
(click)="c.selector.click()">
{{c.selector.title | translate}}
<i class="icon" [ngClass]="c.selector.icon" *ngIf="c.selector.icon"></i>
</button>
<app-confirm-button *ngSwitchCase="'confirm-button'" [class]="'small'"
[color]="c.selector.color ? c.selector.color : 'primary'" (event)="c.selector.click()"
[title]="c.selector.title">
Expand Down Expand Up @@ -131,4 +134,4 @@
</td>
</tr>
</tfoot>
</table>
</table>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core';
import { Failure, TestCase, Tests } from '../../../../../../model/pipeline.model';

import { ThemeStore } from 'app/service/services.module';
import { Column, ColumnType, Filter } from 'app/shared/table/data-table.component';
import { Subscription } from 'rxjs';
import { finalize } from 'rxjs/operators';
import { Failure, TestCase, Tests } from '../../../../../../model/pipeline.model';


@Component({
selector: 'app-workflow-test-table',
Expand Down Expand Up @@ -46,7 +46,7 @@ export class WorkflowRunTestTableComponent implements OnInit {
tc.fullname = ts.name + ' / ' + tc.name;
if (!tc.errors && !tc.failures) {
tc.status = 'success';
} else if ( (tc.errors && tc.errors.length > 0) || (tc.failures && tc.failures.length > 0)) {
} else if ((tc.errors && tc.errors.length > 0) || (tc.failures && tc.failures.length > 0)) {
tc.status = 'failed';
} else {
tc.status = 'skipped';
Expand Down

0 comments on commit 28f7ba1

Please sign in to comment.