mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
feat: redesign service route (#2835)
* feat: redesign service route * chore: more changes * remove automated backups and fix interface addresses * fix rpc methods and slightly better mocks --------- Co-authored-by: Matt Hill <mattnine@protonmail.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { BackupJob } from '../api/api.types'
|
||||
import { T } from '@start9labs/start-sdk'
|
||||
|
||||
export type DataModel = {
|
||||
export type DataModel = Omit<T.Public, 'serverInfo'> & {
|
||||
ui: UIData
|
||||
// @TODO 040
|
||||
serverInfo: Omit<
|
||||
T.Public['serverInfo'],
|
||||
'wifi' | 'networkInterfaces' | 'host'
|
||||
@@ -51,54 +51,24 @@ export type NetworkInfo = {
|
||||
| null
|
||||
}
|
||||
}
|
||||
start9To: {
|
||||
subdomain: string
|
||||
networkInterfaceId: string
|
||||
} | null
|
||||
domains: {
|
||||
[key: string]: Domain
|
||||
}
|
||||
wanConfig: {
|
||||
upnp: boolean
|
||||
forwards: PortForward[]
|
||||
}
|
||||
outboundProxy: string | null
|
||||
}
|
||||
|
||||
export type DomainInfo = {
|
||||
domain: string
|
||||
subdomain: string | null
|
||||
}
|
||||
|
||||
export type PortForward = {
|
||||
assigned: number
|
||||
override: number | null
|
||||
target: number
|
||||
error: string | null
|
||||
}
|
||||
|
||||
export type Domain = {
|
||||
provider: string
|
||||
networkInterfaceId: string
|
||||
}
|
||||
|
||||
export interface ServerStatusInfo {
|
||||
currentBackup: null | {
|
||||
job: BackupJob
|
||||
backupProgress: Record<string, boolean>
|
||||
}
|
||||
updated: boolean
|
||||
updateProgress: { size: number | null; downloaded: number } | null
|
||||
restarting: boolean
|
||||
shuttingDown: boolean
|
||||
// @TODO 041
|
||||
// start9To: {
|
||||
// subdomain: string
|
||||
// networkInterfaceId: string
|
||||
// } | null
|
||||
// domains: {
|
||||
// [key: string]: Domain
|
||||
// }
|
||||
// wanConfig: {
|
||||
// upnp: boolean
|
||||
// forwards: PortForward[]
|
||||
// }
|
||||
// outboundProxy: string | null
|
||||
}
|
||||
|
||||
export type PackageDataEntry<T extends StateInfo = StateInfo> =
|
||||
T.PackageDataEntry & {
|
||||
stateInfo: T
|
||||
installedAt: string
|
||||
outboundProxy: string | null
|
||||
nextBackup: string | null
|
||||
}
|
||||
|
||||
export type AllPackageData = NonNullable<
|
||||
@@ -129,3 +99,11 @@ export type InstallingInfo = {
|
||||
progress: T.FullProgress
|
||||
newManifest: T.Manifest
|
||||
}
|
||||
|
||||
// @TODO 041
|
||||
// export type ServerStatusInfo = Omit<T.ServerStatus, 'backupProgress'> & {
|
||||
// currentBackup: null | {
|
||||
// job: BackupJob
|
||||
// backupProgress: Record<string, boolean>
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user