diff --git a/embark-ui/src/actions/index.js b/embark-ui/src/actions/index.js index c35986098..720d943e7 100644 --- a/embark-ui/src/actions/index.js +++ b/embark-ui/src/actions/index.js @@ -108,7 +108,9 @@ export const commands = { export const PROCESS_LOGS = createRequestTypes('PROCESS_LOGS'); export const processLogs = { - request: (processName, limit) => action(PROCESS_LOGS[REQUEST], {processName, limit}), + request: (processName, limit) => { + return action(PROCESS_LOGS[REQUEST], {processName, limit}); + }, success: (processLogs) => action(PROCESS_LOGS[SUCCESS], {processLogs}), failure: (error) => action(PROCESS_LOGS[FAILURE], {error}) }; diff --git a/embark-ui/src/services/api.js b/embark-ui/src/services/api.js index cdcd3301e..1f99e8552 100644 --- a/embark-ui/src/services/api.js +++ b/embark-ui/src/services/api.js @@ -56,7 +56,7 @@ export function fetchProcesses() { } export function fetchProcessLogs(payload) { - return get(`/process-logs/${payload.processName}`, ...arguments); + return get(`/process-logs/${payload.processName}`, {params: payload, credentials: payload.credentials}); } export function fetchContractLogs() { diff --git a/lib/core/processes/processLauncher.js b/lib/core/processes/processLauncher.js index 034651e8d..e9ec7caf8 100644 --- a/lib/core/processes/processLauncher.js +++ b/lib/core/processes/processLauncher.js @@ -84,7 +84,7 @@ class ProcessLauncher { self.embark.registerAPICall( 'get', apiRoute, - (_req, res) => { + (req, res) => { let limit = parseInt(req.query.limit, 10); if(!Number.isInteger(limit)) limit = 0; const result = self.logs.map((log, id) => Object.assign(log, {id})).slice(limit);