inf scroll up

This commit is contained in:
Drew Ansbacher
2021-08-21 16:45:40 -06:00
committed by Aiden McClelland
parent c35ef1bed0
commit 0adead0298
5 changed files with 126 additions and 11 deletions

View File

@@ -808,6 +808,90 @@ export module Mock {
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
{
timestamp: '2019-12-26T14:20:30.872Z',
log: '****** START *****',
},
{
timestamp: '2019-12-26T14:21:30.872Z',
log: 'PackageLogs PackageLogs PackageLogs PackageLogs PackageLogs',
},
{
timestamp: '2019-12-26T14:22:30.872Z',
log: '****** FINISH *****',
},
]
export const Sessions: RR.GetSessionsRes = {

View File

@@ -137,7 +137,7 @@ export module RR {
export type GetPackagePropertiesReq = { id: string } // package.properties
export type GetPackagePropertiesRes<T extends number> = PackagePropertiesVersioned<T>
export type GetPackageLogsReq = { id: string, before?: string } // package.logs
export type GetPackageLogsReq = { page: number, pageLength: number, id: string, before?: string } // package.logs
export type GetPackageLogsRes = Log[]
export type GetPackageMetricsReq = { id: string } // package.metrics

View File

@@ -310,7 +310,10 @@ export class MockApiService extends ApiService {
async getPackageLogs (params: RR.GetPackageLogsReq): Promise<RR.GetPackageLogsRes> {
await pauseFor(2000)
return Mock.PackageLogs
if (params.page === 4) {
return (Mock.PackageLogs as []).slice(0, 2)
}
return Mock.PackageLogs.slice(0, params.pageLength)
}
async installPackageRaw (params: RR.InstallPackageReq): Promise<RR.InstallPackageRes> {