fix type mismatch

This commit is contained in:
Matt Hill
2021-09-13 19:44:41 -06:00
parent 7dee761369
commit bf763f2131
2 changed files with 8 additions and 8 deletions

View File

@@ -99,7 +99,7 @@
<p><ion-text [color]="pkg.installed.status['dependency-errors'][dep.key] ? 'warning' : 'success'">{{ pkg.installed.status['dependency-errors'][dep.key] ? pkg.installed.status['dependency-errors'][dep.key].type : 'satisfied' }}</ion-text></p> <p><ion-text [color]="pkg.installed.status['dependency-errors'][dep.key] ? 'warning' : 'success'">{{ pkg.installed.status['dependency-errors'][dep.key] ? pkg.installed.status['dependency-errors'][dep.key].type : 'satisfied' }}</ion-text></p>
</ion-label> </ion-label>
<ion-button *ngIf="!pkg.installed.status['dependency-errors'][dep.key] || (pkg.installed.status['dependency-errors'][dep.key] && [DependencyErrorType.InterfaceHealthCheckFailed, DependencyErrorType.HealthCheckFailed] | includes : pkg.installed.status['dependency-errors'][dep.key].type)" slot="end" size="small" [routerLink]="['/services', dep.key]"> <ion-button *ngIf="!pkg.installed.status['dependency-errors'][dep.key] || (pkg.installed.status['dependency-errors'][dep.key] && [DependencyErrorType.InterfaceHealthChecksFailed, DependencyErrorType.HealthChecksFailed] | includes : pkg.installed.status['dependency-errors'][dep.key].type)" slot="end" size="small" [routerLink]="['/services', dep.key]">
View View
</ion-button> </ion-button>

View File

@@ -294,15 +294,15 @@ export interface HealthCheckResultFailure {
error: string error: string
} }
export type DependencyError = DependencyErrorNotInstalled | DependencyErrorNotRunning | DependencyErrorIncorrectVersion | DependencyErrorConfigUnsatisfied | DependencyErrorHealthCheckFailed | DependencyErrorInterfaceHealthCheckFailed export type DependencyError = DependencyErrorNotInstalled | DependencyErrorNotRunning | DependencyErrorIncorrectVersion | DependencyErrorConfigUnsatisfied | DependencyErrorHealthChecksFailed | DependencyErrorInterfaceHealthChecksFailed
export enum DependencyErrorType { export enum DependencyErrorType {
NotInstalled = 'not-installed', NotInstalled = 'not-installed',
NotRunning = 'not-running', NotRunning = 'not-running',
IncorrectVersion = 'incorrect-version', IncorrectVersion = 'incorrect-version',
ConfigUnsatisfied = 'config-unsatisfied', ConfigUnsatisfied = 'config-unsatisfied',
HealthCheckFailed = 'health-check-failed', HealthChecksFailed = 'health-checks-failed',
InterfaceHealthCheckFailed = 'interface-health-checks-failed', InterfaceHealthChecksFailed = 'interface-health-checks-failed',
} }
export interface DependencyErrorNotInstalled { export interface DependencyErrorNotInstalled {
@@ -324,13 +324,13 @@ export interface DependencyErrorConfigUnsatisfied {
errors: string[] errors: string[]
} }
export interface DependencyErrorHealthCheckFailed { export interface DependencyErrorHealthChecksFailed {
type: DependencyErrorType.HealthCheckFailed type: DependencyErrorType.HealthChecksFailed
check: HealthCheckResult check: HealthCheckResult
} }
export interface DependencyErrorInterfaceHealthCheckFailed { export interface DependencyErrorInterfaceHealthChecksFailed {
type: DependencyErrorType.InterfaceHealthCheckFailed type: DependencyErrorType.InterfaceHealthChecksFailed
failures: { [id: string]: HealthCheckResult } failures: { [id: string]: HealthCheckResult }
} }