mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
auto check for update on init
This commit is contained in:
committed by
Aiden McClelland
parent
792a5cc429
commit
0c7eae7333
@@ -18,6 +18,7 @@ export interface ApiServer {
|
||||
ssh: SSHFingerprint[]
|
||||
serverId: string
|
||||
welcomeAck: boolean
|
||||
autoCheckUpdates: boolean
|
||||
}
|
||||
|
||||
/** APPS **/
|
||||
|
||||
@@ -28,7 +28,7 @@ export abstract class ApiService {
|
||||
abstract getServerMetrics (): Promise<ReqRes.GetServerMetricsRes>
|
||||
abstract getNotifications (page: number, perPage: number): Promise<S9Notification[]>
|
||||
abstract deleteNotification (id: string): Promise<Unit>
|
||||
abstract updateAgent (thing: any): Promise<Unit>
|
||||
abstract updateAgent (version: any): Promise<Unit>
|
||||
abstract acknowledgeOSWelcome (version: string): Promise<Unit>
|
||||
abstract getAvailableApps (): Promise<AppAvailablePreview[]>
|
||||
abstract getAvailableApp (appId: string): Promise<AppAvailableFull>
|
||||
|
||||
@@ -12,6 +12,7 @@ import { mockApiAppAvailableFull, mockApiAppAvailableVersionInfo, mockApiAppInst
|
||||
@Injectable()
|
||||
export class MockApiService extends ApiService {
|
||||
welcomeAck = false
|
||||
|
||||
constructor (
|
||||
private readonly appModel: AppModel,
|
||||
private readonly serverModel: ServerModel,
|
||||
@@ -34,7 +35,10 @@ export class MockApiService extends ApiService {
|
||||
|
||||
async getServer (): Promise<ApiServer> {
|
||||
const res = await mockGetServer()
|
||||
return { ...res, welcomeAck: this.welcomeAck }
|
||||
return {
|
||||
...res,
|
||||
welcomeAck: this.welcomeAck,
|
||||
}
|
||||
}
|
||||
|
||||
async ejectExternalDisk (): Promise<Unit> {
|
||||
@@ -402,9 +406,11 @@ const mockApiServer: () => ReqRes.GetServerRes = () => ({
|
||||
serverId: 'start9-mockxyzab',
|
||||
name: 'Embassy:12345678',
|
||||
versionInstalled: '0.2.8',
|
||||
versionLatest: '0.2.9',
|
||||
status: ServerStatus.RUNNING,
|
||||
alternativeRegistryUrl: 'beta-registry.start9labs.com',
|
||||
welcomeAck: true,
|
||||
autoCheckUpdates: true,
|
||||
specs: {
|
||||
'Tor Address': 'nfsnjkcnaskjnlkasnfahj7dh23fdnieqwjdnhjewbfijendiueqwbd.onion',
|
||||
'CPU': 'Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz',
|
||||
|
||||
Reference in New Issue
Block a user