Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit f5bd231

Browse files
committed
### Version 0.46.0 (Context Menu for Browser)
#### Feature - Add Copy menu item to context-menu in extra browser windows (e.g. logs, metadata, reports, etc...) - Catch more DDL errors #### Fix - Upgrade dbl_dot_local_app cleaner_cli (9/24/2019) (Merge branch 'catch-more-ddl-errors')
2 parents d4bf970 + 8e0bc3b commit f5bd231

7 files changed

+40
-14
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
### Version 0.46.0 (Context Menu for Browser)
2+
3+
#### Feature
4+
5+
- Add Copy menu item to context-menu in extra browser windows (e.g. logs, metadata, reports, etc...)
6+
- Catch more DDL errors
7+
8+
#### Fix
9+
10+
- Upgrade dbl_dot_local_app cleaner_cli (9/24/2019)
11+
112
### Version 0.45.1 (Error log)
213

314
#### Fix

app/actions/alert.actions.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import log from 'electron-log';
12
import { alertConstants } from '../constants';
23

34
export const alertActions = {
@@ -13,7 +14,12 @@ function success(message) {
1314
}
1415

1516
function error(data) {
16-
return { type: alertConstants.ERROR, error: data.error, message: data.message };
17+
log.error(data);
18+
return {
19+
type: alertConstants.ERROR,
20+
error: data.error,
21+
message: data.message
22+
};
1723
}
1824

1925
function clear() {

app/actions/bundle.actions.js

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ export function setupBundlesEventSource() {
303303
}
304304
const listeners = {
305305
error: e => dispatch(listenError(e)),
306+
'storer/tick_exception': e => dispatch(listenError(e)),
306307
'storer/execute_task': listenStorerExecuteTaskDownloadResources,
307308
'storer/change_mode': e => dispatch(listenStorerChangeMode(e)),
308309
'uploader/job': e => dispatch(listenUploaderJob(e)),

app/actions/dblDotLocalConfig.actions.js

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import log from 'electron-log';
2-
import { dblDotLocalConfig } from '../constants/dblDotLocal.constants';
2+
import dblDotLocalConstants from '../constants/dblDotLocal.constants';
33
import { dblDotLocalService } from '../services/dbl_dot_local.service';
44
import { history } from '../store/configureStore';
55
import { navigationConstants } from '../constants/navigation.constants';
@@ -30,21 +30,21 @@ export function loadHtmlBaseUrl() {
3030
}
3131
};
3232
function requestBaseUrl() {
33-
return { type: dblDotLocalConfig.HTML_BASE_URL_REQUEST };
33+
return { type: dblDotLocalConstants.HTML_BASE_URL_REQUEST };
3434
}
3535
function success(dblBaseUrl) {
36-
return { type: dblDotLocalConfig.HTML_BASE_URL_RESPONSE, dblBaseUrl };
36+
return { type: dblDotLocalConstants.HTML_BASE_URL_RESPONSE, dblBaseUrl };
3737
}
3838
function failure(error) {
39-
return { type: dblDotLocalConfig.CONFIG_REQUEST_FAILURE, error };
39+
return { type: dblDotLocalConstants.CONFIG_REQUEST_FAILURE, error };
4040
}
4141
}
4242

4343
export function getDblDotLocalExecStatus() {
4444
return async dispatch => {
4545
const { isRunning } = await dblDotLocalService.getDblDotLocalExecStatus();
4646
return dispatch({
47-
type: dblDotLocalConfig.DBL_DOT_LOCAL_PROCESS_STATUS,
47+
type: dblDotLocalConstants.DBL_DOT_LOCAL_PROCESS_STATUS,
4848
isRunning
4949
});
5050
};
@@ -64,18 +64,22 @@ export function gotoWorkspaceLoginPage(workspace) {
6464
configXmlFile
6565
);
6666
dblDotLocalExecProcess.stderr.on('data', data => {
67-
// log.error(data);
68-
const [, errorMessage] = `${data}`.split(
67+
const dataString = `${data}`;
68+
const [, errorMessage] = dataString.split(
6969
'dbl_dot_local.dbl_app.DblAppException:'
7070
);
7171
if (errorMessage) {
7272
dispatch(alertActions.error({ message: errorMessage }));
73+
} else if (dataString.includes('File "')) {
74+
log.error(dataString, {
75+
[dblDotLocalConstants.DDL_APPENDER_ID]: true
76+
});
7377
}
7478
});
7579
['error', 'close', 'exit'].forEach(event => {
7680
dblDotLocalExecProcess.on(event, dblDotLocalExecProcessCode => {
7781
dispatch({
78-
type: dblDotLocalConfig.STOP_WORKSPACE_PROCESS_DONE,
82+
type: dblDotLocalConstants.STOP_WORKSPACE_PROCESS_DONE,
7983
dblDotLocalExecProcess,
8084
dblDotLocalExecProcessCode
8185
});
@@ -104,7 +108,7 @@ export function gotoWorkspaceLoginPage(workspace) {
104108
dblDotLocalExecProcess
105109
) {
106110
return {
107-
type: dblDotLocalConfig.START_WORKSPACE_PROCESS,
111+
type: dblDotLocalConstants.START_WORKSPACE_PROCESS,
108112
fullPath,
109113
configXmlFile,
110114
dblDotLocalExecProcess
@@ -113,9 +117,9 @@ export function gotoWorkspaceLoginPage(workspace) {
113117
}
114118

115119
export function incrementErrorLogCount() {
116-
return { type: dblDotLocalConfig.DDL_ERROR_LOG_COUNT_INCREMENT };
120+
return { type: dblDotLocalConstants.DDL_ERROR_LOG_COUNT_INCREMENT };
117121
}
118122

119123
export function resetErrorLogCount() {
120-
return { type: dblDotLocalConfig.DDL_ERROR_LOG_COUNT_RESET };
124+
return { type: dblDotLocalConstants.DDL_ERROR_LOG_COUNT_RESET };
121125
}

app/components/DblDotLocalAppBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class DblDotLocalAppBar extends React.PureComponent {
122122

123123
errorHook = (msg, transport) => {
124124
if (transport !== log.transports.file || msg.level !== 'error') {
125-
return msg;
125+
return false;
126126
}
127127
// just increment error count
128128
const { incrementAppErrorCount } = this.props;

app/services/browserWindow.service.js

+4
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,9 @@ function openFileInChromeBrowser(
139139
}
140140
});
141141
}
142+
143+
browserWin.webContents.on('context-menu', () => {
144+
Menu.buildFromTemplate([{ role: 'copy' }]).popup(browserWin);
145+
});
142146
return browserWin;
143147
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nathanael",
33
"productName": "nathanael",
4-
"version": "0.45.1",
4+
"version": "0.46.0",
55
"description": "Electron frontend to DBL dot Local",
66
"scripts": {
77
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",

0 commit comments

Comments
 (0)