mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
improve config and mock infra
This commit is contained in:
committed by
Aiden McClelland
parent
53a16775fe
commit
decc17fce5
@@ -36,15 +36,40 @@ export class MockApiService extends ApiService {
|
||||
// db
|
||||
|
||||
async getRevisions (since: number): Promise<RR.GetRevisionsRes> {
|
||||
return this.http.rpcRequest({ method: 'db.revisions', params: { since } })
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
...Mock.DbDump,
|
||||
id: this.nextSequence(),
|
||||
}
|
||||
// return this.http.rpcRequest({ method: 'db.revisions', params: { since } })
|
||||
}
|
||||
|
||||
async getDump (): Promise<RR.GetDumpRes> {
|
||||
return this.http.rpcRequest({ method: 'db.dump' })
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
...Mock.DbDump,
|
||||
id: this.nextSequence(),
|
||||
}
|
||||
// return this.http.rpcRequest({ method: 'db.dump' })
|
||||
}
|
||||
|
||||
async setDbValueRaw (params: RR.SetDBValueReq): Promise<RR.SetDBValueRes> {
|
||||
return this.http.rpcRequest({ method: 'db.put.ui', params })
|
||||
await pauseFor(2000)
|
||||
return {
|
||||
response: null,
|
||||
revision: {
|
||||
id: this.nextSequence(),
|
||||
patch: [
|
||||
{
|
||||
op: PatchOp.REPLACE,
|
||||
path: params.pointer,
|
||||
value: params.value,
|
||||
},
|
||||
],
|
||||
expireId: null,
|
||||
},
|
||||
}
|
||||
// return this.http.rpcRequest({ method: 'db.put.ui', params })
|
||||
}
|
||||
|
||||
// auth
|
||||
|
||||
@@ -58,8 +58,7 @@ const serverConfig: ConfigSpec = {
|
||||
name: 'Device Name',
|
||||
description: 'A unique label for this device.',
|
||||
nullable: false,
|
||||
// @TODO determine regex
|
||||
// pattern: '',
|
||||
pattern: '^.{1,40}$',
|
||||
patternDescription: 'Must be less than 40 characters',
|
||||
masked: false,
|
||||
copyable: false,
|
||||
@@ -67,7 +66,7 @@ const serverConfig: ConfigSpec = {
|
||||
autoCheckUpdates: {
|
||||
type: 'boolean',
|
||||
name: 'Auto Check for Updates',
|
||||
description: 'On launch, EmabssyOS will automatically check for updates of itself and your installed services. Updating still requires user approval and action. No updates will ever be performed automatically.',
|
||||
description: 'On launch, EmbassyOS will automatically check for updates of itself and your installed services. Updating still requires user approval and action. No updates will ever be performed automatically.',
|
||||
default: true,
|
||||
},
|
||||
ssh: {
|
||||
|
||||
Reference in New Issue
Block a user