mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
simple renaming
This commit is contained in:
@@ -95,7 +95,7 @@ export class ServiceDependenciesComponent {
|
|||||||
return 'Incorrect version'
|
return 'Incorrect version'
|
||||||
case 'notRunning':
|
case 'notRunning':
|
||||||
return 'Not running'
|
return 'Not running'
|
||||||
case 'actionRequired':
|
case 'taskRequired':
|
||||||
return 'Task Required'
|
return 'Task Required'
|
||||||
case 'healthChecksFailed':
|
case 'healthChecksFailed':
|
||||||
return 'Required health check not passing'
|
return 'Required health check not passing'
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export class StatusComponent {
|
|||||||
const { primary, health } = this.getStatus(this.pkg)
|
const { primary, health } = this.getStatus(this.pkg)
|
||||||
return (
|
return (
|
||||||
!this.hasDepErrors &&
|
!this.hasDepErrors &&
|
||||||
primary !== 'actionRequired' &&
|
primary !== 'taskRequired' &&
|
||||||
primary !== 'error' &&
|
primary !== 'error' &&
|
||||||
health !== 'failure'
|
health !== 'failure'
|
||||||
)
|
)
|
||||||
@@ -77,7 +77,7 @@ export class StatusComponent {
|
|||||||
return 'Running'
|
return 'Running'
|
||||||
case 'stopped':
|
case 'stopped':
|
||||||
return 'Stopped'
|
return 'Stopped'
|
||||||
case 'actionRequired':
|
case 'taskRequired':
|
||||||
return 'Task Required'
|
return 'Task Required'
|
||||||
case 'updating':
|
case 'updating':
|
||||||
return 'Updating'
|
return 'Updating'
|
||||||
@@ -118,7 +118,7 @@ export class StatusComponent {
|
|||||||
switch (this.getStatus(this.pkg).primary) {
|
switch (this.getStatus(this.pkg).primary) {
|
||||||
case 'running':
|
case 'running':
|
||||||
return 'var(--tui-status-positive)'
|
return 'var(--tui-status-positive)'
|
||||||
case 'actionRequired':
|
case 'taskRequired':
|
||||||
return 'var(--tui-status-warning)'
|
return 'var(--tui-status-warning)'
|
||||||
case 'error':
|
case 'error':
|
||||||
return 'var(--tui-status-negative)'
|
return 'var(--tui-status-negative)'
|
||||||
|
|||||||
@@ -450,15 +450,6 @@ export namespace RR {
|
|||||||
export type GetRegistryPackagesRes = GetPackagesRes
|
export type GetRegistryPackagesRes = GetPackagesRes
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Breakages = {
|
|
||||||
[id: string]: TaggedDependencyError
|
|
||||||
}
|
|
||||||
|
|
||||||
export type TaggedDependencyError = {
|
|
||||||
dependency: string
|
|
||||||
error: DependencyError
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MetricData {
|
interface MetricData {
|
||||||
value: string
|
value: string
|
||||||
unit: string
|
unit: string
|
||||||
@@ -622,41 +613,6 @@ export type Encrypted = {
|
|||||||
encrypted: string
|
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
|
// @TODO 041
|
||||||
|
|
||||||
// export namespace RR041 {
|
// export namespace RR041 {
|
||||||
|
|||||||
@@ -10,11 +10,46 @@ import {
|
|||||||
import deepEqual from 'fast-deep-equal'
|
import deepEqual from 'fast-deep-equal'
|
||||||
import { Observable } from 'rxjs'
|
import { Observable } from 'rxjs'
|
||||||
import { isInstalled } from 'src/app/utils/get-package-data'
|
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 AllDependencyErrors = Record<string, PkgDependencyErrors>
|
||||||
export type PkgDependencyErrors = Record<string, DependencyError | null>
|
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({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
@@ -113,7 +148,7 @@ export class DepErrorService {
|
|||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return {
|
return {
|
||||||
type: 'actionRequired',
|
type: 'taskRequired',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export function getInstalledPrimaryStatus({
|
|||||||
return Object.values(tasks)
|
return Object.values(tasks)
|
||||||
.filter(t => !!t)
|
.filter(t => !!t)
|
||||||
.some(t => t.active && t.task.severity === 'critical')
|
.some(t => t.active && t.task.severity === 'critical')
|
||||||
? 'actionRequired'
|
? 'taskRequired'
|
||||||
: status.main
|
: status.main
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ export type PrimaryStatus =
|
|||||||
| 'restarting'
|
| 'restarting'
|
||||||
| 'stopped'
|
| 'stopped'
|
||||||
| 'backingUp'
|
| 'backingUp'
|
||||||
| 'actionRequired'
|
| 'taskRequired'
|
||||||
| 'error'
|
| 'error'
|
||||||
|
|
||||||
export type DependencyStatus = 'warning' | 'satisfied'
|
export type DependencyStatus = 'warning' | 'satisfied'
|
||||||
@@ -127,7 +127,7 @@ export const PrimaryRendering: Record<PrimaryStatus, StatusRendering> = {
|
|||||||
color: 'success',
|
color: 'success',
|
||||||
showDots: false,
|
showDots: false,
|
||||||
},
|
},
|
||||||
actionRequired: {
|
taskRequired: {
|
||||||
display: 'Task Required',
|
display: 'Task Required',
|
||||||
color: 'warning',
|
color: 'warning',
|
||||||
showDots: false,
|
showDots: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user