Merge branch 'feature/proxies' of github.com:Start9Labs/start-os into feature/proxies

This commit is contained in:
Aiden McClelland
2025-08-25 19:29:52 -06:00
13 changed files with 62 additions and 56 deletions

View File

@@ -575,4 +575,5 @@ export default {
608: 'Zweck',
609: 'Subdomains von',
610: 'Dynamisches DNS',
611: 'Keine Service-Schnittstellen',
} satisfies i18n

View File

@@ -574,4 +574,5 @@ export const ENGLISH = {
'Purpose': 608, // as in, the reason for a thing to exist
'subdomains of': 609, // this is a partial sentence. A domain name will be added after "of" to complete the sentence.
'Dynamic DNS': 610,
'No service interfaces': 611, // as in, there are no available interfaces (API, UI, etc) for this software application
} as const

View File

@@ -575,4 +575,5 @@ export default {
608: 'Propósito',
609: 'Subdominios de',
610: 'DNS dinámico',
611: 'Sin interfaces de servicio',
} satisfies i18n

View File

@@ -575,4 +575,5 @@ export default {
608: 'But',
609: 'Sous-domaines de',
610: 'DNS dynamique',
611: 'Aucune interface de service',
} satisfies i18n

View File

@@ -575,4 +575,5 @@ export default {
608: 'Cel',
609: 'Subdomeny',
610: 'Dynamiczny DNS',
611: 'Brak interfejsów usług',
} satisfies i18n

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

@@ -9,6 +9,7 @@ import { tuiDefaultSort } from '@taiga-ui/cdk'
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
import { ServiceInterfaceItemComponent } from './interface-item.component'
import { i18nPipe } from '@start9labs/shared'
import { PlaceholderComponent } from '../../../components/placeholder.component'
@Component({
selector: 'service-interfaces',
@@ -31,6 +32,10 @@ import { i18nPipe } from '@start9labs/shared'
[pkg]="pkg()"
[disabled]="disabled()"
></tr>
} @empty {
<app-placeholder icon="@tui.monitor-x">
{{ 'No service interfaces' | i18n }}
</app-placeholder>
}
</tbody>
</table>
@@ -42,7 +47,12 @@ import { i18nPipe } from '@start9labs/shared'
`,
host: { class: 'g-card' },
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [ServiceInterfaceItemComponent, TuiTable, i18nPipe],
imports: [
ServiceInterfaceItemComponent,
TuiTable,
i18nPipe,
PlaceholderComponent,
],
})
export class ServiceInterfacesComponent {
readonly pkg = input.required<PackageDataEntry>()

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

@@ -84,7 +84,6 @@ export class FormService {
currentValue?: any,
): UntypedFormGroup | UntypedFormArray | UntypedFormControl {
let value: any
console.log(spec)
switch (spec.type) {
case 'text':
if (currentValue !== undefined) {
@@ -140,6 +139,8 @@ export class FormService {
case 'multiselect':
value = currentValue === undefined ? spec.default : currentValue
return this.formBuilder.control(value, multiselectValidators(spec))
case 'hidden':
return this.formBuilder.control(currentValue || null)
case 'file':
return this.formBuilder.control(null, fileValidators(spec))
default:

View File

@@ -115,7 +115,6 @@ export class MarketplaceService {
flavor: string | null,
registryUrl?: string,
): Observable<MarketplacePkg> {
console.log('HERE')
return this.currentRegistry$.pipe(
switchMap(registry => {
const url = registryUrl || registry.url

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,