Skip to content

Commit

Permalink
fix ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Apr 25, 2023
1 parent b5929c0 commit 2682669
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* 2.0.
*/

import { Protocol } from 'devtools-protocol';
import apm from 'elastic-apm-node';
import type { Logger } from '@kbn/core/server';
import * as Rx from 'rxjs';
Expand All @@ -19,7 +18,7 @@ interface PngResult {
buffer: Buffer;
metrics?: PngMetrics;
warnings: string[];
versionInfo: Protocol.Browser.GetVersionResponse;
versionInfo: string;
}

export function generatePngObservable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,10 @@ export const registerDiagnoseScreenshot = (reporting: ReportingCore, logger: Log
counters.usageCounter();

const { versionInfo, warnings } = screenshot;

const logs = ([] as string[])
.concat(JSON.stringify(versionInfo))
.concat(warnings)
.join('\n');

const logs = ([] as string[]).concat(versionInfo).concat(warnings).join('\n');
const body = { success: warnings.length === 0, logs, help: [] };

// NOTE: the screenshot could be returned as a string using `data:image/png;base64,` + results.buffer.toString('base64')

return res.ok({ body });
})
.catch((error) => {
Expand Down

0 comments on commit 2682669

Please sign in to comment.