mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
async fixed
This commit is contained in:
committed by
Aiden McClelland
parent
fd62de7a91
commit
cfc937f17a
@@ -177,7 +177,7 @@
|
|||||||
<ion-toolbar style="border-top: 1px solid var(--ion-color-dark);" color="light">
|
<ion-toolbar style="border-top: 1px solid var(--ion-color-dark);" color="light">
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-list-header>
|
<ion-list-header>
|
||||||
<ion-label>Install Progress</ion-label>
|
<ion-label>Install Progress: {{ (100 * (osUpdateProgress?.downloaded || 1) / (osUpdateProgress?.size || 1)).toFixed(0) }}%</ion-label>
|
||||||
</ion-list-header>
|
</ion-list-header>
|
||||||
<div style="padding: 0 15px;">
|
<div style="padding: 0 15px;">
|
||||||
<ion-progress-bar
|
<ion-progress-bar
|
||||||
|
|||||||
@@ -105,10 +105,7 @@ export class WizardBaker {
|
|||||||
action,
|
action,
|
||||||
verb: 'beginning update for',
|
verb: 'beginning update for',
|
||||||
title,
|
title,
|
||||||
executeAction: async () => {
|
executeAction: () => this.embassyApi.updateServer({ }),
|
||||||
this.embassyApi.updateServer({ })
|
|
||||||
return
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
bottomBar: {
|
bottomBar: {
|
||||||
|
|||||||
@@ -119,40 +119,8 @@ export class MockApiService extends ApiService {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
const res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
const res = await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||||
console.log('update progress created')
|
|
||||||
await this.updateOSProgress(initialProgress.size)
|
|
||||||
|
|
||||||
console.log('about to update')
|
|
||||||
setTimeout(async () => {
|
|
||||||
const patch = [
|
|
||||||
{
|
|
||||||
op: PatchOp.REPLACE,
|
|
||||||
path: '/server-info/status',
|
|
||||||
value: ServerStatus.Running,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
op: PatchOp.REPLACE,
|
|
||||||
path: '/server-info/version',
|
|
||||||
value: '3.1.0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
op: PatchOp.REMOVE,
|
|
||||||
path: '/server-info/update-progress',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
|
||||||
// quickly revert patch to proper version to prevent infinite refresh loop
|
|
||||||
const patch2 = [
|
|
||||||
{
|
|
||||||
op: PatchOp.REPLACE,
|
|
||||||
path: '/server-info/version',
|
|
||||||
value: require('../../../../package.json').version,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch: patch2 } })
|
|
||||||
}, 10000)
|
|
||||||
|
|
||||||
|
this.updateOSProgress(initialProgress.size)
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -607,5 +575,36 @@ export class MockApiService extends ApiService {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||||
|
|
||||||
|
setTimeout(async () => {
|
||||||
|
const patch = [
|
||||||
|
{
|
||||||
|
op: PatchOp.REPLACE,
|
||||||
|
path: '/server-info/status',
|
||||||
|
value: ServerStatus.Running,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
op: PatchOp.REPLACE,
|
||||||
|
path: '/server-info/version',
|
||||||
|
value: '3.1.0',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
op: PatchOp.REMOVE,
|
||||||
|
path: '/server-info/update-progress',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
await this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch } })
|
||||||
|
// quickly revert patch to proper version to prevent infinite refresh loop
|
||||||
|
const patch2 = [
|
||||||
|
{
|
||||||
|
op: PatchOp.REPLACE,
|
||||||
|
path: '/server-info/version',
|
||||||
|
value: require('../../../../package.json').version,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
this.http.rpcRequest<WithRevision<null>>({ method: 'db.patch', params: { patch: patch2 } })
|
||||||
|
}, 10000)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user