Skip to content

Commit

Permalink
give name to logs file (#1833)
Browse files Browse the repository at this point in the history
* give name to logs file
  • Loading branch information
MattDHill authored Sep 26, 2022
1 parent 18336e4 commit 8cf84a6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class LogsComponent {
params: RR.FollowServerLogsReq,
) => Promise<RR.FollowServerLogsRes>
@Input() fetchLogs!: (params: ServerLogsReq) => Promise<LogsRes>
@Input() context!: string
@Input() defaultBack!: string
@Input() title!: string

Expand Down Expand Up @@ -151,7 +152,7 @@ export class LogsComponent {
}
const html = this.convertToAnsi(entries)

this.downloadHtml.download('logs.html', html, styles)
this.downloadHtml.download(`${this.context}-logs.html`, html, styles)
} catch (e: any) {
this.errToast.present(e)
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[fetchLogs]="fetchLogs()"
[followLogs]="followLogs()"
[defaultBack]="'/services/' + pkgId"
[context]="pkgId"
title="Service Logs"
class="ion-page"
></logs>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<logs
[fetchLogs]="fetchLogs()"
[followLogs]="followLogs()"
context="kernel"
defaultBack="embassy"
title="Kernel Logs"
class="ion-page"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<logs
[fetchLogs]="fetchLogs()"
[followLogs]="followLogs()"
context="eos"
defaultBack="embassy"
title="OS Logs"
class="ion-page"
Expand Down

0 comments on commit 8cf84a6

Please sign in to comment.