mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
fix: final fixes
This commit is contained in:
@@ -1006,9 +1006,8 @@ export module Mock {
|
||||
startOs: {},
|
||||
},
|
||||
],
|
||||
saved: [
|
||||
{
|
||||
id: 'hsbdjhasbasda',
|
||||
saved: {
|
||||
hsbdjhasbasda: {
|
||||
type: 'cifs',
|
||||
name: 'Embassy Backups',
|
||||
hostname: 'smb://192.169.10.0',
|
||||
@@ -1026,8 +1025,7 @@ export module Mock {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'ftcvewdnkemfksdm',
|
||||
ftcvewdnkemfksdm: {
|
||||
type: 'cloud',
|
||||
name: 'Dropbox 1',
|
||||
provider: 'dropbox',
|
||||
@@ -1035,8 +1033,7 @@ export module Mock {
|
||||
mountable: false,
|
||||
startOs: {},
|
||||
},
|
||||
{
|
||||
id: 'csgashbdjkasnd',
|
||||
csgashbdjkasnd: {
|
||||
type: 'cifs',
|
||||
name: 'Network Folder 2',
|
||||
hostname: 'smb://192.169.10.0',
|
||||
@@ -1045,8 +1042,7 @@ export module Mock {
|
||||
mountable: true,
|
||||
startOs: {},
|
||||
},
|
||||
{
|
||||
id: 'powjefhjbnwhdva',
|
||||
powjefhjbnwhdva: {
|
||||
type: 'disk',
|
||||
name: 'Physical Drive 1',
|
||||
logicalname: 'sdba1',
|
||||
@@ -1068,21 +1064,21 @@ export module Mock {
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
export const BackupJobs: RR.GetBackupJobsRes = [
|
||||
{
|
||||
id: 'lalalalalala-babababababa',
|
||||
name: 'My Backup Job',
|
||||
target: BackupTargets.saved[0],
|
||||
targetId: Object.keys(BackupTargets.saved)[0],
|
||||
cron: '0 3 * * *',
|
||||
packageIds: ['bitcoind', 'lnd'],
|
||||
},
|
||||
{
|
||||
id: 'hahahahaha-mwmwmwmwmwmw',
|
||||
name: 'Another Backup Job',
|
||||
target: BackupTargets.saved[1],
|
||||
targetId: Object.keys(BackupTargets.saved)[1],
|
||||
cron: '0 * * * *',
|
||||
packageIds: ['lnd'],
|
||||
},
|
||||
|
||||
@@ -256,7 +256,7 @@ export module RR {
|
||||
export type GetBackupTargetsReq = {} // backup.target.list
|
||||
export type GetBackupTargetsRes = {
|
||||
unknownDisks: UnknownDisk[]
|
||||
saved: BackupTarget[]
|
||||
saved: Record<string, BackupTarget>
|
||||
}
|
||||
|
||||
export type AddCifsBackupTargetReq = {
|
||||
@@ -277,7 +277,7 @@ export module RR {
|
||||
name: string
|
||||
path: string
|
||||
} // backup.target.disk.add
|
||||
export type AddBackupTargetRes = BackupTarget
|
||||
export type AddBackupTargetRes = Record<string, BackupTarget>
|
||||
|
||||
export type UpdateCifsBackupTargetReq = AddCifsBackupTargetReq & {
|
||||
id: string
|
||||
@@ -539,7 +539,6 @@ export interface UnknownDisk {
|
||||
}
|
||||
|
||||
export interface BaseBackupTarget {
|
||||
id: string
|
||||
type: BackupTargetType
|
||||
name: string
|
||||
mountable: boolean
|
||||
@@ -574,7 +573,7 @@ export type BackupRun = {
|
||||
export type BackupJob = {
|
||||
id: string
|
||||
name: string
|
||||
target: BackupTarget
|
||||
targetId: string
|
||||
cron: string // '* * * * * *' https://cloud.google.com/scheduler/docs/configuring/cron-job-schedules
|
||||
packageIds: string[]
|
||||
}
|
||||
|
||||
@@ -822,14 +822,15 @@ export class MockApiService extends ApiService {
|
||||
await pauseFor(2000)
|
||||
const { path, name } = params
|
||||
return {
|
||||
id: 'latfgvwdbhjsndmk',
|
||||
name,
|
||||
type: 'cifs',
|
||||
hostname: 'mockhotname',
|
||||
path: path.replace(/\\/g, '/'),
|
||||
username: 'mockusername',
|
||||
mountable: true,
|
||||
startOs: {},
|
||||
latfgvwdbhjsndmk: {
|
||||
name,
|
||||
type: 'cifs',
|
||||
hostname: 'mockhotname',
|
||||
path: path.replace(/\\/g, '/'),
|
||||
username: 'mockusername',
|
||||
mountable: true,
|
||||
startOs: {},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -838,7 +839,7 @@ export class MockApiService extends ApiService {
|
||||
params: RR.UpdateCifsBackupTargetReq | RR.UpdateCloudBackupTargetReq,
|
||||
): Promise<RR.UpdateBackupTargetRes> {
|
||||
await pauseFor(2000)
|
||||
return Mock.BackupTargets.saved.find(b => b.id === params.id)!
|
||||
return { [params.id]: Mock.BackupTargets.saved[params.id] }
|
||||
}
|
||||
|
||||
async removeBackupTarget(
|
||||
@@ -862,7 +863,7 @@ export class MockApiService extends ApiService {
|
||||
return {
|
||||
id: 'hjdfbjsahdbn',
|
||||
name: params.name,
|
||||
target: Mock.BackupTargets.saved[0],
|
||||
targetId: Object.keys(Mock.BackupTargets.saved)[0],
|
||||
cron: params.cron,
|
||||
packageIds: params.packageIds,
|
||||
}
|
||||
|
||||
@@ -79,6 +79,9 @@ export const mockPatchData: DataModel = {
|
||||
wifi: {
|
||||
enabled: false,
|
||||
lastRegion: null,
|
||||
interface: 'test',
|
||||
ssids: [],
|
||||
selected: null,
|
||||
},
|
||||
wanConfig: {
|
||||
upnp: false,
|
||||
|
||||
@@ -86,6 +86,9 @@ export type PortForward = {
|
||||
export type WiFiInfo = {
|
||||
enabled: boolean
|
||||
lastRegion: string | null
|
||||
interface: string | null
|
||||
ssids: Array<string>
|
||||
selected: string | null
|
||||
}
|
||||
|
||||
export type Domain = {
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface PackageStatus {
|
||||
|
||||
export function renderPkgStatus(
|
||||
pkg: PackageDataEntry,
|
||||
depErrors: PkgDependencyErrors,
|
||||
depErrors: PkgDependencyErrors = {},
|
||||
): PackageStatus {
|
||||
let primary: PrimaryStatus
|
||||
let dependency: DependencyStatus | null = null
|
||||
|
||||
Reference in New Issue
Block a user