mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
page limit added
This commit is contained in:
committed by
Matt Hill
parent
1172ef3934
commit
18ff528ceb
@@ -77,9 +77,10 @@ export class MockApiService extends ApiService {
|
||||
await pauseFor(2000)
|
||||
if (Math.random() < .2) {
|
||||
console.log('last page')
|
||||
return []
|
||||
return Mock.ServerLogs
|
||||
}
|
||||
return new Array(10).map(_ => Mock.ServerLogs).reduce((acc, val) => acc.concat(val), [])
|
||||
const arrLength = params.limit ? Math.ceil(params.limit / Mock.ServerLogs.length) : 10
|
||||
return new Array(arrLength).map(_ => Mock.ServerLogs).reduce((acc, val) => acc.concat(val), [])
|
||||
}
|
||||
|
||||
async getServerMetrics (params: RR.GetServerMetricsReq): Promise<RR.GetServerMetricsRes> {
|
||||
@@ -316,10 +317,10 @@ export class MockApiService extends ApiService {
|
||||
await pauseFor(2000)
|
||||
if (Math.random() < .2) {
|
||||
console.log('last page')
|
||||
return []
|
||||
return Mock.PackageLogs
|
||||
}
|
||||
|
||||
return new Array(10).map(_ => Mock.PackageLogs).reduce((acc, val) => acc.concat(val), [])
|
||||
const arrLength = params.limit ? Math.ceil(params.limit / Mock.PackageLogs.length) : 10
|
||||
return new Array(arrLength).map(_ => Mock.PackageLogs).reduce((acc, val) => acc.concat(val), [])
|
||||
}
|
||||
|
||||
async installPackageRaw (params: RR.InstallPackageReq): Promise<RR.InstallPackageRes> {
|
||||
|
||||
Reference in New Issue
Block a user