forked from grafana/grafana-image-renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds some new configuration options and remove browser timings (grafa…
…na#123) Configuration for rendering args and dumpio setting to ease investigation of problems. Removes browser timings due to possibly async issues.
- Loading branch information
Showing
12 changed files
with
111 additions
and
192 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
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { RenderingConfig } from '../config'; | ||
import { Logger } from '../logger'; | ||
import { Browser, BrowserTimings, NoOpBrowserTiming } from './browser'; | ||
import { Browser } from './browser'; | ||
import { ClusteredBrowser } from './clustered'; | ||
import { ReusableBrowser } from './reusable'; | ||
|
||
export function createBrowser(config: RenderingConfig, log: Logger, timings: BrowserTimings): Browser { | ||
export function createBrowser(config: RenderingConfig, log: Logger): Browser { | ||
if (config.mode === 'clustered') { | ||
log.info('using clustered browser', 'mode', config.clustering.mode, 'maxConcurrency', config.clustering.maxConcurrency); | ||
return new ClusteredBrowser(config, log, timings); | ||
return new ClusteredBrowser(config, log); | ||
} | ||
|
||
if (config.mode === 'reusable') { | ||
log.info('using reusable browser'); | ||
return new ReusableBrowser(config, log, timings); | ||
return new ReusableBrowser(config, log); | ||
} | ||
|
||
return new Browser(config, log, timings); | ||
return new Browser(config, log); | ||
} | ||
|
||
export { Browser, NoOpBrowserTiming }; | ||
export { Browser }; |
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.