mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
compiles
This commit is contained in:
@@ -7,7 +7,6 @@ export const mockPatchData: DataModel = {
|
||||
ui: {
|
||||
name: `Matt's Server`,
|
||||
theme: 'Dark',
|
||||
desktop: ['lnd'],
|
||||
marketplace: {
|
||||
selectedUrl: 'https://registry.start9.com/',
|
||||
knownHosts: {
|
||||
@@ -32,6 +31,23 @@ export const mockPatchData: DataModel = {
|
||||
id: 'abcdefgh',
|
||||
version,
|
||||
lastBackup: new Date(new Date().valueOf() - 604800001).toISOString(),
|
||||
network: {
|
||||
wifi: {
|
||||
enabled: false,
|
||||
interface: 'wlan0',
|
||||
ssids: [],
|
||||
selected: null,
|
||||
lastRegion: null,
|
||||
},
|
||||
start9ToSubdomain: null,
|
||||
domains: [],
|
||||
wanConfig: {
|
||||
upnp: true,
|
||||
forwards: [],
|
||||
},
|
||||
proxies: [],
|
||||
outboundProxy: null,
|
||||
},
|
||||
networkInterfaces: {
|
||||
eth0: {
|
||||
public: false,
|
||||
@@ -72,11 +88,12 @@ export const mockPatchData: DataModel = {
|
||||
packageVersionCompat: '>=0.3.0 <=0.3.6',
|
||||
postInitMigrationTodos: [],
|
||||
statusInfo: {
|
||||
currentBackup: null,
|
||||
// currentBackup: null,
|
||||
updated: false,
|
||||
updateProgress: null,
|
||||
restarting: false,
|
||||
shuttingDown: false,
|
||||
backupProgress: {},
|
||||
},
|
||||
hostname: 'random-words',
|
||||
host: {
|
||||
@@ -194,9 +211,8 @@ export const mockPatchData: DataModel = {
|
||||
platform: 'x86_64-nonfree',
|
||||
zram: true,
|
||||
governor: 'performance',
|
||||
passwordHash:
|
||||
'$argon2d$v=19$m=1024,t=1,p=1$YXNkZmFzZGZhc2RmYXNkZg$Ceev1I901G6UwU+hY0sHrFZ56D+o+LNJ',
|
||||
arch: 'x86_64',
|
||||
ram: 8 * 1024 * 1024 * 1024,
|
||||
devices: [],
|
||||
},
|
||||
packageData: {
|
||||
bitcoind: {
|
||||
|
||||
@@ -101,19 +101,7 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
/** ${scheme}://${username}@${host}:${externalPort}${suffix} */
|
||||
launchableAddress(
|
||||
interfaces: PackageDataEntry['serviceInterfaces'],
|
||||
hosts: T.Hosts,
|
||||
): string {
|
||||
const ui = Object.values(interfaces).find(
|
||||
i =>
|
||||
i.type === 'ui' &&
|
||||
(i.addressInfo.scheme === 'http' ||
|
||||
i.addressInfo.sslScheme === 'https'),
|
||||
)
|
||||
|
||||
if (!ui) return ''
|
||||
|
||||
launchableAddress(ui: T.ServiceInterface, hosts: T.Hosts): string {
|
||||
const host = hosts[ui.addressInfo.hostId]
|
||||
|
||||
if (!host) return ''
|
||||
|
||||
@@ -20,7 +20,7 @@ export class EOSService {
|
||||
)
|
||||
|
||||
readonly backingUp$ = this.patch
|
||||
.watch$('serverInfo', 'statusInfo', 'currentBackup')
|
||||
.watch$('serverInfo', 'statusInfo', 'backupProgress')
|
||||
.pipe(
|
||||
map(obj => !!obj),
|
||||
distinctUntilChanged(),
|
||||
|
||||
@@ -19,7 +19,6 @@ import {
|
||||
switchMap,
|
||||
distinctUntilChanged,
|
||||
ReplaySubject,
|
||||
tap,
|
||||
} from 'rxjs'
|
||||
import { RR } from 'src/app/services/api/api.types'
|
||||
import { ApiService } from 'src/app/services/api/embassy-api.service'
|
||||
|
||||
@@ -3,7 +3,16 @@ import { T } from '@start9labs/start-sdk'
|
||||
|
||||
export type DataModel = {
|
||||
ui: UIData
|
||||
serverInfo: ServerInfo
|
||||
serverInfo: Omit<
|
||||
T.Public['serverInfo'],
|
||||
'wifi' | 'unreadNotificationCount'
|
||||
> & {
|
||||
network: NetworkInfo
|
||||
unreadNotifications: {
|
||||
count: number
|
||||
recent: ServerNotifications
|
||||
}
|
||||
}
|
||||
packageData: Record<string, PackageDataEntry>
|
||||
}
|
||||
|
||||
@@ -17,7 +26,6 @@ export type UIData = {
|
||||
}
|
||||
ackInstructions: Record<string, boolean>
|
||||
theme: string
|
||||
desktop: readonly string[]
|
||||
}
|
||||
|
||||
export type UIMarketplaceData = {
|
||||
@@ -33,30 +41,6 @@ export type UIStore = {
|
||||
name?: string
|
||||
}
|
||||
|
||||
export type ServerInfo = {
|
||||
id: string
|
||||
version: string
|
||||
country: string
|
||||
ui: T.HostnameInfo[]
|
||||
network: NetworkInfo
|
||||
lastBackup: string | null
|
||||
unreadNotifications: {
|
||||
count: number
|
||||
recent: ServerNotifications
|
||||
}
|
||||
statusInfo: ServerStatusInfo
|
||||
eosVersionCompat: string
|
||||
pubkey: string
|
||||
caFingerprint: string
|
||||
ntpSynced: boolean
|
||||
smtp: T.SmtpValue | null
|
||||
passwordHash: string
|
||||
platform: string
|
||||
arch: string
|
||||
governor: string | null
|
||||
zram: boolean
|
||||
}
|
||||
|
||||
export type NetworkInfo = {
|
||||
wifi: WiFiInfo
|
||||
start9ToSubdomain: Omit<Domain, 'provider'> | null
|
||||
|
||||
Reference in New Issue
Block a user