Skip to content

Commit e0bd413

Browse files
committed
Merge branch 'master' into docker-release
2 parents f5ce6f9 + b66cf6a commit e0bd413

File tree

19 files changed

+140
-47
lines changed

19 files changed

+140
-47
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://plot.ly/products/consulting-and-oem/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ which in turn is callback heavy. To help us stay out of _callback hell_, we use
203203
the following terms to designates callbacks:
204204

205205
- At the end of the data-parse callback, we call the component module `parse`
206-
method as `parse(body, componentOpts, sendToRenderer)` where `sendToRenderer`
206+
method as `parse(body, request, componentOpts, sendToRenderer)` where `sendToRenderer`
207207
is a callback.
208208
- `sendToRenderer` transfers info from the main to the
209209
renderer process as `sendToRenderer(errorCode, parseInfo)`.

bin/orca.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const path = require('path')
44
const { spawn } = require('child_process')
5-
const electronPath = require('electron')
5+
const electronPath = process.env['ELECTRON_PATH'] ? process.env['ELECTRON_PATH'] : require('electron')
66

77
const args = process.argv.slice(2)
88
const pathToMain = path.join(__dirname, 'orca_electron.js')

deployment/run_server

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ BUILD_DIR=/var/www/image-exporter/build
1414
if [[ -n "${PLOTLY_JS_SRC}" ]]; then
1515
# Fetch plotly js bundle and save it locally:
1616
mkdir -p $BUILD_DIR
17-
wget --retry-connrefused --no-check-certificate -O $BUILD_DIR/plotly-bundle.js "$PLOTLY_JS_SRC"
17+
while true; do
18+
wget --tries=1 --no-check-certificate -O $BUILD_DIR/plotly-bundle.js "$PLOTLY_JS_SRC" && break
19+
sleep 1
20+
done
1821
PLOTLYJS_ARG="--plotlyJS $BUILD_DIR/plotly-bundle.js"
1922
fi
2023

src/app/runner/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function run (app, win, ipcMain, opts) {
121121
body = _body
122122
}
123123

124-
comp._module.parse(body, compOpts, sendToRenderer)
124+
comp._module.parse(body, {}, compOpts, sendToRenderer)
125125
})
126126
})
127127

src/app/server/create-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function createServer (app, BrowserWindow, ipcMain, opts) {
157157
}
158158

159159
pending++
160-
comp._module.parse(body, compOpts, sendToRenderer)
160+
comp._module.parse(body, req, compOpts, sendToRenderer)
161161
})
162162
})
163163

src/component/plotly-dash-preview/parse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ const isNonEmptyString = require('../../util/is-non-empty-string')
77
* @param {object} body : JSON-parsed request body
88
* - url
99
* - pdfOptions
10+
* @param {object} req: HTTP request
1011
* @param {object} opts : component options
1112
* @param {function} sendToRenderer
1213
* - errorCode
1314
* - result
1415
*/
15-
function parse (body, opts, sendToRenderer) {
16+
function parse (body, req, opts, sendToRenderer) {
1617
const result = {}
1718

1819
const errorOut = (code, msg) => {

src/component/plotly-dashboard-preview/parse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ const isNonEmptyString = require('../../util/is-non-empty-string')
1111
* - figure
1212
* - settings:
1313
* - backgroundColor
14+
* @param {object} req: HTTP request
1415
* @param {object} opts : component options
1516
* @param {function} sendToRenderer
1617
* - errorCode
1718
* - result
1819
*/
19-
function parse (body, opts, sendToRenderer) {
20+
function parse (body, req, opts, sendToRenderer) {
2021
const result = {}
2122

2223
const errorOut = code => {

src/component/plotly-dashboard-thumbnail/parse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ const overrideFigure = require('../plotly-thumbnail/parse').overrideFigure
1212
* - figure
1313
* - settings:
1414
* - backgroundColor
15+
* @param {object} req: HTTP request
1516
* @param {object} opts : component options
1617
* @param {function} sendToRenderer
1718
* - errorCode
1819
* - result
1920
*/
20-
function parse (body, opts, sendToRenderer) {
21+
function parse (body, req, opts, sendToRenderer) {
2122
const result = {}
2223

2324
const errorOut = (code) => {

src/component/plotly-dashboard/parse.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ const isNonEmptyString = require('../../util/is-non-empty-string')
66
* - width
77
* - height
88
* - fid
9+
* @param {object} req: HTTP request
910
* @param {object} opts : component options
1011
* @param {function} sendToRenderer
1112
* - errorCode
1213
* - result
1314
*/
14-
function parse (body, opts, sendToRenderer) {
15+
function parse (body, req, opts, sendToRenderer) {
1516
const result = {}
1617

1718
const errorOut = (code) => {

0 commit comments

Comments
 (0)