log backend integration fixes

This commit is contained in:
Drew Ansbacher
2021-09-05 22:08:56 +03:00
committed by Matt Hill
parent b0a64e3f6b
commit c257faf432
6 changed files with 36 additions and 30 deletions

View File

@@ -72,6 +72,7 @@ export class AppListPage {
}
// subscribe to pkg
this.pkgs[id].sub = this.patch.watch$('package-data', id).subscribe(pkg => {
console.log('package', pkg)
let bulbClass = 'bulb-on'
let img = ''
const statusRendering = renderPkgStatus(pkg.state, pkg.installed?.status)

View File

@@ -1,4 +1,5 @@
import { Component } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { ApiService } from 'src/app/services/api/embassy-api.service'
@Component({
@@ -13,14 +14,17 @@ export class AppLogsPage {
before: string
constructor (
private readonly route: ActivatedRoute,
private readonly embassyApi: ApiService,
) { }
) {
this.pkgId = this.route.snapshot.paramMap.get('pkgId')
}
fetchFetchLogs () {
return async (params: { before_flag?: boolean, limit?: number, cursor?: string }) => {
const pkgId = this.pkgId
return this.embassyApi.getPackageLogs({
id: pkgId,
id: this.pkgId,
before_flag: params.before_flag,
cursor: params.cursor,
limit: params.limit,