Skip to content

Commit 8e49790

Browse files
committed
misc(ui): styling improvements and bug fix
1 parent da73dbd commit 8e49790

9 files changed

Lines changed: 47 additions & 23 deletions

File tree

observability_ui/apps/shell/src/app/projects/components/components-list/components-list.component.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,26 @@ <h1>Components</h1>
103103
[createdOn]="component.created_on"></created-by>
104104
</div>
105105

106-
<div class="card__chips__container">
107-
<div class="card__chip filled">{{ 'componentTypeTag.' + component.type | translate}}</div>
108-
109-
<div *ngIf="component.tool"
110-
class="card__chip">{{ ((component.tool | getToolClass)?._displayName || component.tool) | lowercase}}</div>
106+
<div class="card__bottom">
107+
<div class="card__chips__container">
108+
<div class="card__chip filled">{{ 'componentTypeTag.' + component.type | translate}}</div>
109+
110+
<div *ngIf="component.tool"
111+
class="card__chip">{{ ((component.tool | getToolClass)?._displayName || component.tool) | lowercase}}</div>
112+
</div>
113+
<div class="card__links__container"
114+
(click)="$event.stopPropagation()">
115+
<a [routerLink]="['..', 'events', 'all']"
116+
[queryParams]="{ 'component_id': component.id }"
117+
class="link">Events</a>
118+
<ng-container *ngIf="component.type === ComponentType.BatchPipeline">
119+
|
120+
<a [routerLink]="['..', 'events', 'runs']"
121+
[queryParams]="{ 'pipeline_key': component.key }"
122+
class="link">Runs</a>
123+
</ng-container>
124+
<mat-icon inline>arrow_forward</mat-icon>
125+
</div>
111126
</div>
112127
</div>
113128
</mat-card>
@@ -119,7 +134,7 @@ <h1>Components</h1>
119134
[class.hidden]="(total$ | async) === 0"
120135
[length]="(total$ | async)"
121136
[pageSize]="pageSize"
122-
[pageSizeOptions]="[5, 10, 25, 50, 100]"
137+
[pageSizeOptions]="[25, 50, 100, 200]"
123138
[showFirstLastButtons]="true"></mat-paginator>
124139

125140
<ng-template #loadingTemplate>

observability_ui/apps/shell/src/app/projects/components/components-list/components-list.component.scss

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,13 @@
8484
font-style: italic;
8585
}
8686

87+
.card__bottom {
88+
@include mixins.flex-row($justify: space-between);
89+
margin-top: 12px;
90+
}
91+
8792
.card__chips__container {
8893
@include mixins.flex-row($justify: flex-start);
89-
margin-top: 12px;
9094

9195
.card__chip {
9296
font-size: 12px;
@@ -102,16 +106,10 @@
102106
}
103107
}
104108

105-
.card__link {
106-
@include mixins.flex-row;
107-
108-
color: #1976d2;
109-
line-height: 32px;
110-
padding: 0 8px;
111-
112-
mat-icon {
113-
@include mixins.icon-size(18px);
114-
}
109+
.card__links__container {
110+
@include mixins.flex-row($justify: flex-end);
111+
@include mixins.font-color(secondary);
112+
gap: variables.$space-xxs;
115113
}
116114

117115
:host ::ng-deep .search-components .mat-form-field-wrapper {

observability_ui/apps/shell/src/app/projects/components/components-list/components-list.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ export class ComponentsListComponent extends CoreComponent implements OnInit, Ha
5252

5353
storageKey!: string;
5454
parentId: string;
55-
pageSize: number = 10;
55+
pageSize: number = 50;
5656
componentTypes = Object.values(ComponentType).sort((a, b) => a > b ? 1 : a < b ? -1 : 0);
57+
ComponentType = ComponentType;
5758

5859
@ViewChild(MatPaginator) paginator!: MatPaginator;
5960

observability_ui/apps/shell/src/app/projects/instances/instance-details/instance-details.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
.dates-container {
1111
@include mixins.flex-row();
1212

13-
margin-top: variables.$space-sm;
13+
margin-top: variables.$space-xs;
1414
}
1515

1616
.duration {

observability_ui/apps/shell/src/app/projects/instances/instance-tests/instance-tests.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
span {
2626
height: 100%;
27-
min-width: 10%;
27+
min-width: 5px;
2828
cursor: pointer;
2929
}
3030

observability_ui/apps/shell/src/app/projects/runs/run-details/run-details.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
width: fit-content;
1212
margin: {
1313
left: auto;
14-
bottom: variables.$space-sm;
14+
bottom: variables.$space-xs;
1515
top: variables.$space-xs;
1616
}
1717
}

observability_ui/apps/shell/src/app/projects/runs/run-tests/run-tests.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<span *ngIf="summary.TOTAL === 0"
55
class="empty"></span>
66
<ng-container *ngFor="let status of testStatuses">
7-
<span [ngClass]="status"
7+
<span *ngIf="summary[status]"
8+
[ngClass]="status"
89
[style.width]="(summary[status] / summary.TOTAL * 100) + '%'"
910
dkTooltip="Filter by {{ 'testStatus.' + status | translate | titlecase }} status"
1011
(click)="filterByStatus(status)"></span>

observability_ui/apps/shell/src/app/projects/runs/run-tests/run-tests.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
span {
2626
height: 100%;
27-
min-width: 10%;
27+
min-width: 5px;
2828
cursor: pointer;
2929
}
3030

observability_ui/libs/ui/styles/_details-page.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ details-header {
99
padding: variables.$space-sm variables.$space-lg 0 variables.$space-lg;
1010

1111
nav {
12+
min-width: calc(100vw - 64px);
1213
border-bottom: unset !important;
14+
15+
.mat-drawer-opened ~ mat-sidenav-content & {
16+
min-width: calc(100vw - 264px);
17+
}
18+
19+
.mat-tab-link {
20+
min-width: 100px;
21+
}
1322
}
1423
}

0 commit comments

Comments
 (0)