mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
Refactor/status info (#3066)
* refactor status info * wip fe * frontend changes and version bump * fix tests and motd * add registry workflow * better starttunnel instructions * placeholders for starttunnel tables --------- Co-authored-by: Aiden McClelland <me@drbonez.dev>
This commit is contained in:
@@ -13,8 +13,8 @@ import {
|
||||
ExportServiceInterfaceParams,
|
||||
ServiceInterface,
|
||||
CreateTaskParams,
|
||||
MainStatus,
|
||||
MountParams,
|
||||
StatusInfo,
|
||||
} from "./osBindings"
|
||||
import {
|
||||
PackageId,
|
||||
@@ -66,7 +66,7 @@ export type Effects = {
|
||||
getStatus(options: {
|
||||
packageId?: PackageId
|
||||
callback?: () => void
|
||||
}): Promise<MainStatus>
|
||||
}): Promise<StatusInfo>
|
||||
/** indicate to the host os what runstate the service is in */
|
||||
setMainStatus(options: SetMainStatus): Promise<null>
|
||||
|
||||
|
||||
8
sdk/base/lib/osBindings/DesiredStatus.ts
Normal file
8
sdk/base/lib/osBindings/DesiredStatus.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { StartStop } from "./StartStop"
|
||||
|
||||
export type DesiredStatus =
|
||||
| { main: "stopped" }
|
||||
| { main: "restarting" }
|
||||
| { main: "running" }
|
||||
| { main: "backing-up"; onComplete: StartStop }
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DependencyKind = "exists" | "running"
|
||||
export type ErrorData = { details: string; debug: string }
|
||||
@@ -1,25 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { HealthCheckId } from "./HealthCheckId"
|
||||
import type { NamedHealthCheckResult } from "./NamedHealthCheckResult"
|
||||
import type { StartStop } from "./StartStop"
|
||||
|
||||
export type MainStatus =
|
||||
| {
|
||||
main: "error"
|
||||
onRebuild: StartStop
|
||||
message: string
|
||||
debug: string | null
|
||||
}
|
||||
| { main: "stopped" }
|
||||
| { main: "restarting" }
|
||||
| { main: "stopping" }
|
||||
| {
|
||||
main: "starting"
|
||||
health: { [key: HealthCheckId]: NamedHealthCheckResult }
|
||||
}
|
||||
| {
|
||||
main: "running"
|
||||
started: string
|
||||
health: { [key: HealthCheckId]: NamedHealthCheckResult }
|
||||
}
|
||||
| { main: "backingUp"; onComplete: StartStop }
|
||||
@@ -4,17 +4,17 @@ import type { ActionMetadata } from "./ActionMetadata"
|
||||
import type { CurrentDependencies } from "./CurrentDependencies"
|
||||
import type { DataUrl } from "./DataUrl"
|
||||
import type { Hosts } from "./Hosts"
|
||||
import type { MainStatus } from "./MainStatus"
|
||||
import type { PackageState } from "./PackageState"
|
||||
import type { ReplayId } from "./ReplayId"
|
||||
import type { ServiceInterface } from "./ServiceInterface"
|
||||
import type { ServiceInterfaceId } from "./ServiceInterfaceId"
|
||||
import type { StatusInfo } from "./StatusInfo"
|
||||
import type { TaskEntry } from "./TaskEntry"
|
||||
|
||||
export type PackageDataEntry = {
|
||||
stateInfo: PackageState
|
||||
s9pk: string
|
||||
status: MainStatus
|
||||
statusInfo: StatusInfo
|
||||
registry: string | null
|
||||
developerKey: string
|
||||
icon: DataUrl
|
||||
|
||||
12
sdk/base/lib/osBindings/StatusInfo.ts
Normal file
12
sdk/base/lib/osBindings/StatusInfo.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DesiredStatus } from "./DesiredStatus"
|
||||
import type { ErrorData } from "./ErrorData"
|
||||
import type { HealthCheckId } from "./HealthCheckId"
|
||||
import type { NamedHealthCheckResult } from "./NamedHealthCheckResult"
|
||||
|
||||
export type StatusInfo = {
|
||||
health: { [key: HealthCheckId]: NamedHealthCheckResult }
|
||||
error: ErrorData | null
|
||||
started: string | null
|
||||
desired: DesiredStatus
|
||||
}
|
||||
@@ -59,11 +59,11 @@ export { CurrentDependencies } from "./CurrentDependencies"
|
||||
export { CurrentDependencyInfo } from "./CurrentDependencyInfo"
|
||||
export { DataUrl } from "./DataUrl"
|
||||
export { Dependencies } from "./Dependencies"
|
||||
export { DependencyKind } from "./DependencyKind"
|
||||
export { DependencyMetadata } from "./DependencyMetadata"
|
||||
export { DependencyRequirement } from "./DependencyRequirement"
|
||||
export { DepInfo } from "./DepInfo"
|
||||
export { Description } from "./Description"
|
||||
export { DesiredStatus } from "./DesiredStatus"
|
||||
export { DestroySubcontainerFsParams } from "./DestroySubcontainerFsParams"
|
||||
export { DeviceFilter } from "./DeviceFilter"
|
||||
export { DnsSettings } from "./DnsSettings"
|
||||
@@ -72,6 +72,7 @@ export { Duration } from "./Duration"
|
||||
export { EchoParams } from "./EchoParams"
|
||||
export { EditSignerParams } from "./EditSignerParams"
|
||||
export { EncryptedWire } from "./EncryptedWire"
|
||||
export { ErrorData } from "./ErrorData"
|
||||
export { EventId } from "./EventId"
|
||||
export { ExportActionParams } from "./ExportActionParams"
|
||||
export { ExportServiceInterfaceParams } from "./ExportServiceInterfaceParams"
|
||||
@@ -123,7 +124,6 @@ export { LoginParams } from "./LoginParams"
|
||||
export { LshwDevice } from "./LshwDevice"
|
||||
export { LshwDisplay } from "./LshwDisplay"
|
||||
export { LshwProcessor } from "./LshwProcessor"
|
||||
export { MainStatus } from "./MainStatus"
|
||||
export { Manifest } from "./Manifest"
|
||||
export { MaybeUtf8String } from "./MaybeUtf8String"
|
||||
export { MebiBytes } from "./MebiBytes"
|
||||
@@ -201,6 +201,7 @@ export { SignAssetParams } from "./SignAssetParams"
|
||||
export { SignerInfo } from "./SignerInfo"
|
||||
export { SmtpValue } from "./SmtpValue"
|
||||
export { StartStop } from "./StartStop"
|
||||
export { StatusInfo } from "./StatusInfo"
|
||||
export { TaskCondition } from "./TaskCondition"
|
||||
export { TaskEntry } from "./TaskEntry"
|
||||
export { TaskInput } from "./TaskInput"
|
||||
|
||||
Reference in New Issue
Block a user