mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
refactor: move restart field from ServerInfo to ServerStatus
The restart reason belongs with other server state (shutting_down, restarting, update_progress) rather than on the top-level ServerInfo. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -149,7 +149,9 @@ export class PortalComponent {
|
||||
|
||||
readonly name = toSignal(this.patch.watch$('serverInfo', 'name'))
|
||||
readonly update = toSignal(inject(OSService).updating$)
|
||||
readonly restartReason = toSignal(this.patch.watch$('serverInfo', 'restart'))
|
||||
readonly restartReason = toSignal(
|
||||
this.patch.watch$('serverInfo', 'statusInfo', 'restart'),
|
||||
)
|
||||
readonly bar = signal(true)
|
||||
|
||||
getProgress(size: number, downloaded: number): number {
|
||||
|
||||
@@ -26,6 +26,7 @@ export namespace Mock {
|
||||
updateProgress: null,
|
||||
restarting: false,
|
||||
shuttingDown: false,
|
||||
restart: null,
|
||||
}
|
||||
|
||||
export const RegistryOSUpdate: T.OsVersionInfoMap = {
|
||||
|
||||
@@ -445,7 +445,7 @@ export class MockApiService extends ApiService {
|
||||
this.mockRevision([
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: '/serverInfo/restart',
|
||||
path: '/serverInfo/statusInfo/restart',
|
||||
value: 'kiosk',
|
||||
},
|
||||
])
|
||||
@@ -471,7 +471,7 @@ export class MockApiService extends ApiService {
|
||||
this.mockRevision([
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: '/serverInfo/restart',
|
||||
path: '/serverInfo/statusInfo/restart',
|
||||
value: 'mdns',
|
||||
},
|
||||
])
|
||||
@@ -507,7 +507,7 @@ export class MockApiService extends ApiService {
|
||||
this.mockRevision([
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: '/serverInfo/restart',
|
||||
path: '/serverInfo/statusInfo/restart',
|
||||
value: 'language',
|
||||
},
|
||||
])
|
||||
@@ -1852,7 +1852,7 @@ export class MockApiService extends ApiService {
|
||||
const patch3: Operation<string>[] = [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: '/serverInfo/restart',
|
||||
path: '/serverInfo/statusInfo/restart',
|
||||
value: 'update',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -231,8 +231,8 @@ export const mockPatchData: DataModel = {
|
||||
restarting: false,
|
||||
shuttingDown: false,
|
||||
backupProgress: null,
|
||||
restart: null,
|
||||
},
|
||||
restart: null,
|
||||
name: 'Random Words',
|
||||
hostname: 'random-words',
|
||||
pubkey: 'npub1sg6plzptd64u62a878hep2kev88swjh3tw00gjsfl8f237lmu63q0uf63m',
|
||||
|
||||
Reference in New Issue
Block a user