Skip to content

Commit 935d1d5

Browse files
Streamlined remote console integration (#114)
* intermediate checkpoint * fixing remote console auto-pref.json processing to deal with semantic change in 2.3.0 * fixing the rendering of the Model Design Page * fixing a comment typo * adding wrc-jet-pack dependency
1 parent 47b8d59 commit 935d1d5

File tree

8 files changed

+298
-28
lines changed

8 files changed

+298
-28
lines changed

electron/app/js/wlRemoteConsoleUtils.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const { wlRemoteConsoleFrontendVersion } = require('../webui.json');
2222

2323
let _wlRemoteConsoleChildProcess;
2424

25-
25+
/* global process */
2626
async function startWebLogicRemoteConsoleBackend(currentWindow, skipVersionCheck = false) {
2727
if (_wlRemoteConsoleChildProcess) {
2828
return Promise.resolve();
@@ -236,7 +236,8 @@ async function _getWebLogicRemoteConsoleExecutableData(rcHome) {
236236
_getDevExecutablePath(rcHome, pathToDirectoryWithExecutable).then(exeResult => {
237237
if (exeResult.exists) {
238238
results['executable'] = exeResult.executable;
239-
results['arguments'] = ['.', 'dev', '--showPort', '--stdin', '--quiet', '--headless'];
239+
results['arguments'] =
240+
['.', 'dev', '--showPort', `--check-pid=${process.pid}`, '--quiet', '--headless', '--useTokenNotCookie'];
240241
results['options'] = { cwd: rcHome };
241242
} else {
242243
const message = i18n.t('wrc-dev-executable-existence-check-failed',
@@ -254,7 +255,8 @@ async function _getWebLogicRemoteConsoleExecutableData(rcHome) {
254255
_getInstalledExecutablePath(rcHome).then(exeResult => {
255256
if (exeResult['exists']) {
256257
results['executable'] = exeResult['executable'];
257-
results['arguments'] = ['--showPort', '--stdin', '--quiet', '--headless'];
258+
results['arguments'] =
259+
['--showPort', `--check-pid=${process.pid}`, '--quiet', '--headless', '--useTokenNotCookie'];
258260
resolve(results);
259261
} else {
260262
const message = i18n.t('wrc-executable-not-exists', { rcHome: rcHome, executable: results['executable'] });
@@ -415,7 +417,16 @@ async function _getLocationFromPreferencesFile() {
415417
fsPromises.readFile(autoPrefsLocation, { encoding: 'utf8' }).then(contents => {
416418
try {
417419
const props = JSON.parse(contents);
418-
resolve(props.location);
420+
421+
let location;
422+
if (props.location) {
423+
if (osUtils.isMac()) {
424+
location = path.normalize(path.join(path.dirname(props.location), '..', '..'));
425+
} else {
426+
location = path.dirname(props.location);
427+
}
428+
}
429+
resolve(location);
419430
} catch (err) {
420431
getLogger().debug('Failed to parse file %s: %s', autoPrefsLocation, getErrorMessage(err));
421432
resolve();

webui/package-lock.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@oracle/oraclejet": "^11.1.5",
13+
"@oracle/wrc-jet-pack": "~2.3.0-develop",
1314
"i18next": "^21.6.3",
1415
"jquery": "^3.6.0",
1516
"js-yaml": "^4.1.0"

webui/src/css/app.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,18 +193,20 @@
193193
/*padding-top: 10px;*/
194194
}
195195

196-
/* container for model design view, currently text */
197-
.wkt-model-edit-design {
198-
margin: 10px;
199-
}
200-
201-
/* container for model design view, currently text */
196+
/* container for model design view */
197+
.wkt-model-edit-design,
202198
.wkt-model-code-view {
203199
display: flex;
204200
height: 100%;
205201
width: 100%;
206202
}
207203

204+
.wkt-model-edit-design > a > img {
205+
margin: 0 3px 0 0;
206+
height: 24px;
207+
width: 18px;
208+
}
209+
208210
/* the ace editor pane */
209211
#model-editor {
210212
width: 100%;

webui/src/js/main.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,23 @@
4040
'corejs' : 'libs/corejs/shim',
4141
'chai': 'libs/chai/chai-4.2.0',
4242
'regenerator-runtime' : 'libs/regenerator-runtime/runtime',
43-
'ace': 'libs/ace/ace'
43+
'ace': 'libs/ace/ace',
44+
'wrc-translations': 'resources',
45+
'wrc-frontend': 'jet-composites/wrc-frontend/1.0.0',
46+
'wdt-model-designer': 'jet-composites/wdt-model-designer/1.0.0',
47+
'cfe-navtree': 'jet-composites/cfe-navtree/1.0.0',
48+
'cfe-multi-select': 'jet-composites/cfe-multi-select/1.0.0',
49+
'cfe-property-list-editor': 'jet-composites/cfe-property-list-editor/1.0.0'
4450
}
4551
// endinjector
52+
53+
, config: {
54+
ojL10n: {
55+
merge: {
56+
'ojtranslations/nls/ojtranslations': 'resources/nls/frontend'
57+
}
58+
}
59+
}
4660
}
4761
);
4862
}());

webui/src/js/path_mapping.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,96 @@
332332
"path": "libs/ace/ace.js",
333333
"cdnPath": ""
334334
}
335+
},
336+
337+
"wrc-translations": {
338+
"cdn": "3rdparty",
339+
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/resources",
340+
"debug": {
341+
"src": ["**"],
342+
"path": "resources",
343+
"cdnPath": ""
344+
},
345+
"release": {
346+
"src": ["**"],
347+
"path": "resources",
348+
"cdnPath": ""
349+
}
350+
},
351+
352+
"wrc-frontend": {
353+
"cdn": "3rdparty",
354+
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/wrc-frontend",
355+
"debug": {
356+
"src": ["**"],
357+
"path": "jet-composites/wrc-frontend/1.0.0",
358+
"cdnPath": ""
359+
},
360+
"release": {
361+
"src": ["**"],
362+
"path": "jet-composites/wrc-frontend/1.0.0",
363+
"cdnPath": ""
364+
}
365+
},
366+
367+
"wdt-model-designer": {
368+
"cdn": "3rdparty",
369+
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/wdt-model-designer",
370+
"debug": {
371+
"src": ["**"],
372+
"path": "jet-composites/wdt-model-designer/1.0.0",
373+
"cdnPath": ""
374+
},
375+
"release": {
376+
"src": ["**"],
377+
"path": "jet-composites/wdt-model-designer/1.0.0",
378+
"cdnPath": ""
379+
}
380+
},
381+
382+
"cfe-navtree": {
383+
"cdn": "3rdparty",
384+
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/cfe-navtree",
385+
"debug": {
386+
"src": ["**"],
387+
"path": "jet-composites/cfe-navtree/1.0.0",
388+
"cdnPath": ""
389+
},
390+
"release": {
391+
"src": ["**"],
392+
"path": "jet-composites/cfe-navtree/1.0.0",
393+
"cdnPath": ""
394+
}
395+
},
396+
397+
"cfe-multi-select": {
398+
"cdn": "3rdparty",
399+
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/cfe-multi-select",
400+
"debug": {
401+
"src": ["**"],
402+
"path": "jet-composites/cfe-multi-select/1.0.0",
403+
"cdnPath": ""
404+
},
405+
"release": {
406+
"src": ["**"],
407+
"path": "jet-composites/cfe-multi-select/1.0.0",
408+
"cdnPath": ""
409+
}
410+
},
411+
412+
"cfe-property-list-editor": {
413+
"cdn": "3rdparty",
414+
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/cfe-property-list-editor",
415+
"debug": {
416+
"src": ["**"],
417+
"path": "jet-composites/cfe-property-list-editor/1.0.0",
418+
"cdnPath": ""
419+
},
420+
"release": {
421+
"src": ["**"],
422+
"path": "jet-composites/cfe-property-list-editor/1.0.0",
423+
"cdnPath": ""
424+
}
335425
}
336426
}
337427
}

0 commit comments

Comments
 (0)