health check model
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import type { ManifestElement } from '@umbraco-cms/backoffice/extension-api';
|
||||
import type { UmbHealthCheckContext } from '../../../health-check/health-check.context.js';
|
||||
import type { ApiLoaderProperty, ManifestElementAndApi } from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
export interface ManifestHealthCheck extends ManifestElement {
|
||||
export interface ManifestHealthCheck extends ManifestElementAndApi {
|
||||
type: 'healthCheck';
|
||||
meta: MetaHealthCheck;
|
||||
api: ApiLoaderProperty<UmbHealthCheckContext>;
|
||||
}
|
||||
|
||||
export interface MetaHealthCheck {
|
||||
label: string;
|
||||
api: any;
|
||||
}
|
||||
|
||||
export interface HealthCheck {
|
||||
|
||||
@@ -56,10 +56,10 @@ export class UmbDashboardHealthCheckElement extends UmbLitElement {
|
||||
type: 'healthCheck',
|
||||
alias: `Umb.HealthCheck.${group.name?.replace(/\s+/g, '') || ''}`,
|
||||
name: `${group.name} Health Check`,
|
||||
api: () => import('./health-check.context.js'),
|
||||
weight: 500,
|
||||
meta: {
|
||||
label: group.name || '',
|
||||
api: UmbHealthCheckContext,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ export class UmbHealthCheckDashboardContext {
|
||||
#registerApis() {
|
||||
this.apis.clear();
|
||||
this.#manifests.forEach(async (manifest) => {
|
||||
const api = await loadManifestApi<UmbHealthCheckContext>(manifest.meta.api);
|
||||
const api = await loadManifestApi<UmbHealthCheckContext>(manifest.api);
|
||||
if (api) this.apis.set(manifest.meta.label, new api(this.host));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
||||
import type { UUIButtonState } from '@umbraco-cms/backoffice/external/uui';
|
||||
import { css, html, nothing, customElement, property, state, ifDefined } from '@umbraco-cms/backoffice/external/lit';
|
||||
|
||||
import type { HealthCheckActionRequestModel } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { HealthCheckResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
||||
|
||||
Reference in New Issue
Block a user