tsc fixes
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { UmbHealthCheckContext } from './health-check.context.js';
|
||||
import type { UmbDashboardHealthCheckGroupElement } from './views/health-check-group.element.js';
|
||||
import { UmbHealthCheckDashboardContext, UMB_HEALTHCHECK_DASHBOARD_CONTEXT } from './health-check-dashboard.context.js';
|
||||
import { html, customElement, state } from '@umbraco-cms/backoffice/external/lit';
|
||||
|
||||
@@ -5,25 +5,19 @@ import type {
|
||||
} from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { HealthCheckResource } from '@umbraco-cms/backoffice/external/backend-api';
|
||||
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
||||
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
|
||||
import type { UmbApi } from '@umbraco-cms/backoffice/extension-api';
|
||||
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
||||
|
||||
export class UmbHealthCheckContext implements UmbApi {
|
||||
export class UmbHealthCheckContext extends UmbControllerBase implements UmbApi {
|
||||
private _checks = new BehaviorSubject<HealthCheckGroupPresentationModel | undefined>(undefined);
|
||||
public readonly checks = this._checks.asObservable();
|
||||
|
||||
private _results = new BehaviorSubject<HealthCheckGroupWithResultResponseModel | undefined>(undefined);
|
||||
public readonly results = this._results.asObservable();
|
||||
|
||||
public host: UmbControllerHost;
|
||||
|
||||
constructor(host: UmbControllerHost) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
async getGroupChecks(name: string) {
|
||||
const { data } = await tryExecuteAndNotify(this.host, HealthCheckResource.getHealthCheckGroupByName({ name }));
|
||||
const { data } = await tryExecuteAndNotify(this, HealthCheckResource.getHealthCheckGroupByName({ name }));
|
||||
|
||||
if (data) {
|
||||
this._checks.next(data);
|
||||
@@ -33,10 +27,7 @@ export class UmbHealthCheckContext implements UmbApi {
|
||||
}
|
||||
|
||||
async checkGroup(name: string) {
|
||||
const { data } = await tryExecuteAndNotify(
|
||||
this.host,
|
||||
HealthCheckResource.postHealthCheckGroupByNameCheck({ name }),
|
||||
);
|
||||
const { data } = await tryExecuteAndNotify(this, HealthCheckResource.postHealthCheckGroupByNameCheck({ name }));
|
||||
|
||||
if (data) {
|
||||
this._results.next(data);
|
||||
@@ -48,8 +39,6 @@ export class UmbHealthCheckContext implements UmbApi {
|
||||
static isInstanceLike(instance: unknown): instance is UmbHealthCheckContext {
|
||||
return typeof instance === 'object' && (instance as UmbHealthCheckContext).results !== undefined;
|
||||
}
|
||||
|
||||
public;
|
||||
}
|
||||
|
||||
export default UmbHealthCheckContext;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { UMB_MEDIA_WORKSPACE_CONTEXT } from '../workspace/media-workspace.context-token.js';
|
||||
import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import type {
|
||||
ManifestCondition,
|
||||
UmbConditionConfigBase,
|
||||
|
||||
Reference in New Issue
Block a user