Skip to content

Commit 151e0a8

Browse files
AndyButlandiOvergaard
authored andcommitted
Refreshed display of check results after all checks are complete.
1 parent d900022 commit 151e0a8

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/Umbraco.Web.UI.Client/src/packages/health-check/health-check-dashboard.context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export class UmbHealthCheckDashboardContext {
2020
this.host = host;
2121
}
2222

23-
checkAll() {
23+
async checkAll() {
2424
for (const [label, api] of this.apis.entries()) {
25-
api?.checkGroup?.(label);
25+
await api?.checkGroup?.(label);
2626
}
2727
}
2828

src/Umbraco.Web.UI.Client/src/packages/health-check/views/health-check-group.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class UmbDashboardHealthCheckGroupElement extends UmbLitElement {
5454

5555
private async _buttonHandler() {
5656
this._buttonState = 'waiting';
57-
this._api?.checkGroup(this.groupName);
57+
await this._api?.checkGroup(this.groupName);
5858
this._buttonState = 'success';
5959
}
6060

src/Umbraco.Web.UI.Client/src/packages/health-check/views/health-check-overview.element.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export class UmbDashboardHealthCheckOverviewElement extends UmbLitElement {
2323
}
2424

2525
private async _onHealthCheckHandler() {
26-
this._healthCheckDashboardContext?.checkAll();
26+
this._buttonState = 'waiting';
27+
await this._healthCheckDashboardContext?.checkAll();
28+
this._buttonState = 'success';
2729
}
2830

2931
override render() {
@@ -41,7 +43,13 @@ export class UmbDashboardHealthCheckOverviewElement extends UmbLitElement {
4143
</uui-button>
4244
</div>
4345
<div class="grid">
44-
<umb-extension-slot type="healthCheck" default-element="umb-health-check-group-box-overview">
46+
47+
${
48+
// As well as the visual presentation, this amend to the rendering based on button state is necessary
49+
// in order to trigger an update after the checks are complete (this.requestUpdate() doesn't suffice).
50+
this._buttonState !== 'waiting'
51+
? html`<umb-extension-slot type="healthCheck" default-element="umb-health-check-group-box-overview">`
52+
: html`<uui-loader></uui-loader>`}
4553
</umb-extension-slot>
4654
</div>
4755
</uui-box>

0 commit comments

Comments
 (0)