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

Refreshed display of check results after all checks are complete #18131

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export class UmbHealthCheckDashboardContext {
this.host = host;
}

checkAll() {
async checkAll() {
for (const [label, api] of this.apis.entries()) {
api?.checkGroup?.(label);
await api?.checkGroup?.(label);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class UmbDashboardHealthCheckGroupElement extends UmbLitElement {

private async _buttonHandler() {
this._buttonState = 'waiting';
this._api?.checkGroup(this.groupName);
await this._api?.checkGroup(this.groupName);
this._buttonState = 'success';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export class UmbDashboardHealthCheckOverviewElement extends UmbLitElement {
}

private async _onHealthCheckHandler() {
this._healthCheckDashboardContext?.checkAll();
this._buttonState = 'waiting';
await this._healthCheckDashboardContext?.checkAll();
this._buttonState = 'success';
}

override render() {
Expand All @@ -41,7 +43,13 @@ export class UmbDashboardHealthCheckOverviewElement extends UmbLitElement {
</uui-button>
</div>
<div class="grid">
<umb-extension-slot type="healthCheck" default-element="umb-health-check-group-box-overview">

${
// As well as the visual presentation, this amend to the rendering based on button state is necessary
// in order to trigger an update after the checks are complete (this.requestUpdate() doesn't suffice).
this._buttonState !== 'waiting'
? html`<umb-extension-slot type="healthCheck" default-element="umb-health-check-group-box-overview">`
: html`<uui-loader></uui-loader>`}
</umb-extension-slot>
</div>
</uui-box>
Expand Down
Loading