Skip to content

Commit 2a74388

Browse files
authored
HParams: Add loading spinner (#6491)
## Motivation for features / changes The previous runs table showed a spinner when the data was still loading. I am just reusing the existing logic to show a spinner in the new one as well. ## Screenshots of UI changes (or N/A) A wild spinner appears ![image](https://github.com/tensorflow/tensorboard/assets/78179109/15324605-001e-4e9a-916d-4111a75a19b3) Dark Mode ![image](https://github.com/tensorflow/tensorboard/assets/78179109/82b0090e-a68c-479c-b60b-8beb3ed2810b)
1 parent f42d324 commit 2a74388

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

tensorboard/webapp/runs/views/runs_table/runs_data_table.ng.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
placeholder="Filter runs (regex)"
2424
></tb-filter-input>
2525
</div>
26+
<div *ngIf="loading" class="loading">
27+
<mat-spinner mode="indeterminate" diameter="28"></mat-spinner>
28+
</div>
2629
<tb-data-table
30+
*ngIf="!loading"
2731
[headers]="headers"
2832
[sortingInfo]="sortingInfo"
2933
[columnCustomizationEnabled]="true"

tensorboard/webapp/runs/views/runs_table/runs_data_table.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,13 @@ tb-data-table-header-cell:last-of-type {
121121
flex-grow: 1;
122122
}
123123
}
124+
125+
.loading {
126+
align-items: center;
127+
border: 0;
128+
@include tb-theme-foreground-prop(border-bottom, border, 1px solid);
129+
display: flex;
130+
height: 48px;
131+
padding: 0 24px;
132+
justify-content: center;
133+
}

tensorboard/webapp/runs/views/runs_table/runs_data_table.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export class RunsDataTable {
4040
@Input() regexFilter!: string;
4141
@Input() isFullScreen!: boolean;
4242
@Input() selectableColumns!: ColumnHeader[];
43+
@Input() loading!: boolean;
4344

4445
ColumnHeaderType = ColumnHeaderType;
4546

tensorboard/webapp/runs/views/runs_table/runs_table_container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ import {
9999
getFilteredRenderableRunsFromRoute,
100100
getPotentialHparamColumns,
101101
} from '../../../metrics/views/main_view/common_selectors';
102-
import {RunToHParamValues} from '../../data_source/runs_data_source_types';
103102
import {runsTableFullScreenToggled} from '../../../core/actions';
104103

105104
const getRunsLoading = createSelector<
@@ -280,6 +279,7 @@ function matchFilter(
280279
[experimentIds]="experimentIds"
281280
[regexFilter]="regexFilter$ | async"
282281
[isFullScreen]="runsTableFullScreen$ | async"
282+
[loading]="loading$ | async"
283283
(sortDataBy)="sortDataBy($event)"
284284
(orderColumns)="orderColumns($event)"
285285
(onSelectionToggle)="onRunSelectionToggle($event)"

0 commit comments

Comments
 (0)