simple renaming

This commit is contained in:
Matt Hill
2025-08-24 08:46:12 -06:00
parent d6d91822cc
commit 0e9b9fce3e
5 changed files with 44 additions and 53 deletions

View File

@@ -95,7 +95,7 @@ export class ServiceDependenciesComponent {
return 'Incorrect version'
case 'notRunning':
return 'Not running'
case 'actionRequired':
case 'taskRequired':
return 'Task Required'
case 'healthChecksFailed':
return 'Required health check not passing'

View File

@@ -52,7 +52,7 @@ export class StatusComponent {
const { primary, health } = this.getStatus(this.pkg)
return (
!this.hasDepErrors &&
primary !== 'actionRequired' &&
primary !== 'taskRequired' &&
primary !== 'error' &&
health !== 'failure'
)
@@ -77,7 +77,7 @@ export class StatusComponent {
return 'Running'
case 'stopped':
return 'Stopped'
case 'actionRequired':
case 'taskRequired':
return 'Task Required'
case 'updating':
return 'Updating'
@@ -118,7 +118,7 @@ export class StatusComponent {
switch (this.getStatus(this.pkg).primary) {
case 'running':
return 'var(--tui-status-positive)'
case 'actionRequired':
case 'taskRequired':
return 'var(--tui-status-warning)'
case 'error':
return 'var(--tui-status-negative)'

View File

@@ -450,15 +450,6 @@ export namespace RR {
export type GetRegistryPackagesRes = GetPackagesRes
}
export type Breakages = {
[id: string]: TaggedDependencyError
}
export type TaggedDependencyError = {
dependency: string
error: DependencyError
}
interface MetricData {
value: string
unit: string
@@ -622,41 +613,6 @@ export type Encrypted = {
encrypted: string
}
export type DependencyError =
| DependencyErrorNotInstalled
| DependencyErrorNotRunning
| DependencyErrorIncorrectVersion
| DependencyErrorActionRequired
| DependencyErrorHealthChecksFailed
| DependencyErrorTransitive
export type DependencyErrorNotInstalled = {
type: 'notInstalled'
}
export type DependencyErrorNotRunning = {
type: 'notRunning'
}
export type DependencyErrorIncorrectVersion = {
type: 'incorrectVersion'
expected: string // version range
received: string // version
}
export interface DependencyErrorActionRequired {
type: 'actionRequired'
}
export type DependencyErrorHealthChecksFailed = {
type: 'healthChecksFailed'
check: T.NamedHealthCheckResult
}
export type DependencyErrorTransitive = {
type: 'transitive'
}
// @TODO 041
// export namespace RR041 {

View File

@@ -10,11 +10,46 @@ import {
import deepEqual from 'fast-deep-equal'
import { Observable } from 'rxjs'
import { isInstalled } from 'src/app/utils/get-package-data'
import { DependencyError } from './api/api.types'
import { T } from '@start9labs/start-sdk'
export type AllDependencyErrors = Record<string, PkgDependencyErrors>
export type PkgDependencyErrors = Record<string, DependencyError | null>
export type DependencyError =
| DependencyErrorNotInstalled
| DependencyErrorNotRunning
| DependencyErrorIncorrectVersion
| DependencyErrorTaskRequired
| DependencyErrorHealthChecksFailed
| DependencyErrorTransitive
export type DependencyErrorNotInstalled = {
type: 'notInstalled'
}
export type DependencyErrorNotRunning = {
type: 'notRunning'
}
export type DependencyErrorIncorrectVersion = {
type: 'incorrectVersion'
expected: string // version range
received: string // version
}
export interface DependencyErrorTaskRequired {
type: 'taskRequired'
}
export type DependencyErrorHealthChecksFailed = {
type: 'healthChecksFailed'
check: T.NamedHealthCheckResult
}
export type DependencyErrorTransitive = {
type: 'transitive'
}
@Injectable({
providedIn: 'root',
})
@@ -113,7 +148,7 @@ export class DepErrorService {
)
) {
return {
type: 'actionRequired',
type: 'taskRequired',
}
}

View File

@@ -28,7 +28,7 @@ export function getInstalledPrimaryStatus({
return Object.values(tasks)
.filter(t => !!t)
.some(t => t.active && t.task.severity === 'critical')
? 'actionRequired'
? 'taskRequired'
: status.main
}
@@ -71,7 +71,7 @@ export type PrimaryStatus =
| 'restarting'
| 'stopped'
| 'backingUp'
| 'actionRequired'
| 'taskRequired'
| 'error'
export type DependencyStatus = 'warning' | 'satisfied'
@@ -127,7 +127,7 @@ export const PrimaryRendering: Record<PrimaryStatus, StatusRendering> = {
color: 'success',
showDots: false,
},
actionRequired: {
taskRequired: {
display: 'Task Required',
color: 'warning',
showDots: false,