-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* first iteration of canvas reporting using v2 PDF generator * updated jest test * made v2 report URLs compatible with spaces and simplified some code * remove non-existent import * updated import of lib Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Jean-Louis Leysens <[email protected]>
- Loading branch information
1 parent
b4444c1
commit 4eb8b6f
Showing
21 changed files
with
269 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { LocatorDefinition, LocatorPublic } from 'src/plugins/share/common'; | ||
|
||
import { CANVAS_APP } from './lib/constants'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions | ||
export type CanvasAppLocatorParams = { | ||
view: 'workpadPDF'; | ||
id: string; | ||
page: number; | ||
}; | ||
|
||
export type CanvasAppLocator = LocatorPublic<CanvasAppLocatorParams>; | ||
|
||
export const CANVAS_APP_LOCATOR = 'CANVAS_APP_LOCATOR'; | ||
|
||
export class CanvasAppLocatorDefinition implements LocatorDefinition<CanvasAppLocatorParams> { | ||
id = CANVAS_APP_LOCATOR; | ||
|
||
public async getLocation(params: CanvasAppLocatorParams) { | ||
const app = CANVAS_APP; | ||
|
||
if (params.view === 'workpadPDF') { | ||
const { id, page } = params; | ||
|
||
return { | ||
app, | ||
path: `#/export/workpad/pdf/${id}/page/${page}`, | ||
state: {}, | ||
}; | ||
} | ||
|
||
return { | ||
app, | ||
path: '#/', | ||
state: {}, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.