Skip to content

Streamlined remote console integration #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions electron/app/js/wlRemoteConsoleUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { wlRemoteConsoleFrontendVersion } = require('../webui.json');

let _wlRemoteConsoleChildProcess;


/* global process */
async function startWebLogicRemoteConsoleBackend(currentWindow, skipVersionCheck = false) {
if (_wlRemoteConsoleChildProcess) {
return Promise.resolve();
Expand Down Expand Up @@ -236,7 +236,8 @@ async function _getWebLogicRemoteConsoleExecutableData(rcHome) {
_getDevExecutablePath(rcHome, pathToDirectoryWithExecutable).then(exeResult => {
if (exeResult.exists) {
results['executable'] = exeResult.executable;
results['arguments'] = ['.', 'dev', '--showPort', '--stdin', '--quiet', '--headless'];
results['arguments'] =
['.', 'dev', '--showPort', `--check-pid=${process.pid}`, '--quiet', '--headless', '--useTokenNotCookie'];
results['options'] = { cwd: rcHome };
} else {
const message = i18n.t('wrc-dev-executable-existence-check-failed',
Expand All @@ -254,7 +255,8 @@ async function _getWebLogicRemoteConsoleExecutableData(rcHome) {
_getInstalledExecutablePath(rcHome).then(exeResult => {
if (exeResult['exists']) {
results['executable'] = exeResult['executable'];
results['arguments'] = ['--showPort', '--stdin', '--quiet', '--headless'];
results['arguments'] =
['--showPort', `--check-pid=${process.pid}`, '--quiet', '--headless', '--useTokenNotCookie'];
resolve(results);
} else {
const message = i18n.t('wrc-executable-not-exists', { rcHome: rcHome, executable: results['executable'] });
Expand Down Expand Up @@ -415,7 +417,16 @@ async function _getLocationFromPreferencesFile() {
fsPromises.readFile(autoPrefsLocation, { encoding: 'utf8' }).then(contents => {
try {
const props = JSON.parse(contents);
resolve(props.location);

let location;
if (props.location) {
if (osUtils.isMac()) {
location = path.normalize(path.join(path.dirname(props.location), '..', '..'));
} else {
location = path.dirname(props.location);
}
}
resolve(location);
} catch (err) {
getLogger().debug('Failed to parse file %s: %s', autoPrefsLocation, getErrorMessage(err));
resolve();
Expand Down
14 changes: 14 additions & 0 deletions webui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"@oracle/oraclejet": "^11.1.5",
"@oracle/wrc-jet-pack": "~2.3.0-develop",
"i18next": "^21.6.3",
"jquery": "^3.6.0",
"js-yaml": "^4.1.0"
Expand Down
14 changes: 8 additions & 6 deletions webui/src/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,20 @@
/*padding-top: 10px;*/
}

/* container for model design view, currently text */
.wkt-model-edit-design {
margin: 10px;
}

/* container for model design view, currently text */
/* container for model design view */
.wkt-model-edit-design,
.wkt-model-code-view {
display: flex;
height: 100%;
width: 100%;
}

.wkt-model-edit-design > a > img {
margin: 0 3px 0 0;
height: 24px;
width: 18px;
}

/* the ace editor pane */
#model-editor {
width: 100%;
Expand Down
16 changes: 15 additions & 1 deletion webui/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,23 @@
'corejs' : 'libs/corejs/shim',
'chai': 'libs/chai/chai-4.2.0',
'regenerator-runtime' : 'libs/regenerator-runtime/runtime',
'ace': 'libs/ace/ace'
'ace': 'libs/ace/ace',
'wrc-translations': 'resources',
'wrc-frontend': 'jet-composites/wrc-frontend/1.0.0',
'wdt-model-designer': 'jet-composites/wdt-model-designer/1.0.0',
'cfe-navtree': 'jet-composites/cfe-navtree/1.0.0',
'cfe-multi-select': 'jet-composites/cfe-multi-select/1.0.0',
'cfe-property-list-editor': 'jet-composites/cfe-property-list-editor/1.0.0'
}
// endinjector

, config: {
ojL10n: {
merge: {
'ojtranslations/nls/ojtranslations': 'resources/nls/frontend'
}
}
}
}
);
}());
Expand Down
90 changes: 90 additions & 0 deletions webui/src/js/path_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,96 @@
"path": "libs/ace/ace.js",
"cdnPath": ""
}
},

"wrc-translations": {
"cdn": "3rdparty",
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/resources",
"debug": {
"src": ["**"],
"path": "resources",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "resources",
"cdnPath": ""
}
},

"wrc-frontend": {
"cdn": "3rdparty",
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/wrc-frontend",
"debug": {
"src": ["**"],
"path": "jet-composites/wrc-frontend/1.0.0",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "jet-composites/wrc-frontend/1.0.0",
"cdnPath": ""
}
},

"wdt-model-designer": {
"cdn": "3rdparty",
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/wdt-model-designer",
"debug": {
"src": ["**"],
"path": "jet-composites/wdt-model-designer/1.0.0",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "jet-composites/wdt-model-designer/1.0.0",
"cdnPath": ""
}
},

"cfe-navtree": {
"cdn": "3rdparty",
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/cfe-navtree",
"debug": {
"src": ["**"],
"path": "jet-composites/cfe-navtree/1.0.0",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "jet-composites/cfe-navtree/1.0.0",
"cdnPath": ""
}
},

"cfe-multi-select": {
"cdn": "3rdparty",
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/cfe-multi-select",
"debug": {
"src": ["**"],
"path": "jet-composites/cfe-multi-select/1.0.0",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "jet-composites/cfe-multi-select/1.0.0",
"cdnPath": ""
}
},

"cfe-property-list-editor": {
"cdn": "3rdparty",
"cwd": "node_modules/@oracle/wrc-jet-pack/dist/jet-composites/cfe-property-list-editor",
"debug": {
"src": ["**"],
"path": "jet-composites/cfe-property-list-editor/1.0.0",
"cdnPath": ""
},
"release": {
"src": ["**"],
"path": "jet-composites/cfe-property-list-editor/1.0.0",
"cdnPath": ""
}
}
}
}
Loading