mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
feat: support restoring backups from a different server
This commit is contained in:
@@ -115,13 +115,14 @@ export class BackupsRecoverModal {
|
||||
const ids = options.filter(({ checked }) => !!checked).map(({ id }) => id)
|
||||
const loader = this.loader.open('Initializing').subscribe()
|
||||
|
||||
const { targetId, password } = this.context.data
|
||||
const { targetId, serverId, password } = this.context.data
|
||||
|
||||
try {
|
||||
await this.api.restorePackages({
|
||||
ids,
|
||||
targetId,
|
||||
password,
|
||||
serverId,
|
||||
})
|
||||
|
||||
this.context.$implicit.complete()
|
||||
|
||||
@@ -149,8 +149,8 @@ export class BackupsRecoverComponent {
|
||||
|
||||
async restore(options: RecoverOption[]): Promise<void> {
|
||||
const ids = options.filter(({ checked }) => !!checked).map(({ id }) => id)
|
||||
const { targetId, password } = this.context.data
|
||||
const params = { ids, targetId, password }
|
||||
const { targetId, serverId, password } = this.context.data
|
||||
const params = { ids, targetId, password, serverId }
|
||||
const loader = this.loader.open('Initializing').subscribe()
|
||||
|
||||
try {
|
||||
|
||||
@@ -1242,6 +1242,7 @@ export namespace Mock {
|
||||
model: null,
|
||||
vendor: 'SSK',
|
||||
guid: null,
|
||||
filesystem: null,
|
||||
startOs: {
|
||||
'1234-5678-9876-5432': {
|
||||
hostname: 'adjective-noun',
|
||||
|
||||
Reference in New Issue
Block a user