Skip to content

Commit ed77972

Browse files
committed
Release 2.4.15
1 parent 60cc7dc commit ed77972

File tree

533 files changed

+39658
-11725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

533 files changed

+39658
-11725
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ See the following list of [Known Issues](https://oracle.github.io/weblogic-remot
3333

3434
## Need more help? Have a suggestion? Come and say, "Hello!"
3535

36-
We have a **Slack channel** where you can get in touch with us to ask questions about using WebLogic Remote Console or give us feedback or suggestions about what features and improvements you'd like to see. We would love to hear from you. To join our channel, [click here to get an invitation](https://join.slack.com/t/oracle-weblogic/shared_invite/zt-1lnz4kpci-WdY2gWfeJc5jS_a_1Z06MA).
37-
The invitation email includes details on how to access our Slack workspace. After you are logged in, join us over at `#remote-console` and say, "Hello!"
36+
We have a **Slack channel** where you can get in touch with us to ask questions about using WebLogic Remote Console or give us feedback or suggestions about what features and improvements you'd like to see. We would love to hear from you. To join our channel, [click here to get an invitation](https://join.slack.com/t/oracle-weblogic/shared_invite/zt-1ni1gtjv6-PGC6CQ4uIte3KBdm_67~aQ).
37+
The invitation email includes details on how to access our Slack workspace. After you are logged in, join us over at `#remote-console` and say, "Hello!"

assembly/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<parent>
1010
<artifactId>console-backend</artifactId>
1111
<groupId>com.oracle.weblogic</groupId>
12-
<version>2.4.14</version>
12+
<version>2.4.15</version>
1313
</parent>
1414

1515
<packaging>pom</packaging>

build-tools/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
<groupId>com.oracle.weblogic.console-backend</groupId>
88
<artifactId>build-tools</artifactId>
9-
<version>2.4.14</version>
9+
<version>2.4.15</version>
1010
<name>Build Tools</name>
1111

1212
<parent>
1313
<groupId>com.oracle.weblogic</groupId>
1414
<artifactId>console-backend</artifactId>
15-
<version>2.4.14</version>
15+
<version>2.4.15</version>
1616
</parent>
1717

1818
<properties>

electron/app/js/settings-editor.js

+38-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2023,2024, Oracle and/or its affiliates.
3+
* Copyright (c) 2023,2025, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
* @ignore
66
*/
@@ -21,6 +21,7 @@ const SettingsEditor = (() => {
2121
const { app, ipcMain, dialog } = require('electron');
2222
let preferences;
2323
let beforeEditingPreferences;
24+
let configSender;
2425
const scratchPath = `${app.getPath('userData')}/scratch-settings.json`;
2526

2627
const dontNeedStoreFile = (preferences) => {
@@ -65,8 +66,8 @@ const SettingsEditor = (() => {
6566
else if (key === 'javax.net.ssl.trustStore') {
6667
preferences.value('networking.trustStore', data[key]);
6768
}
68-
else if (key === 'javax.net.ssl.trustStorePassword') {
69-
preferences.value('networking.trustStorePassword', data[key]);
69+
else if (key === 'javax.net.ssl.trustStorePasswordEncrypted') {
70+
preferences.value('networking.trustStorePasswordEncrypted', data[key]);
7071
}
7172
else if (key === 'console.connectTimeoutMillis') {
7273
preferences.value('networking.connectTimeoutMillis', data[key]);
@@ -93,14 +94,24 @@ const SettingsEditor = (() => {
9394
}
9495
}
9596

97+
function decryptData(data) {
98+
for (const key in data) {
99+
if (key.endsWith('Encrypted')) {
100+
const value = data[key];
101+
delete data[key];
102+
data[key.replace('Encrypted', '')] = preferences.decrypt(value);
103+
}
104+
}
105+
}
106+
96107
function save() {
97108
const path = ConfigJSON.getPath();
98109
let data = {};
99110
addValue(data, 'proxy', preferences.value('networking.proxy'));
100111
addValue(data, 'javax.net.ssl.trustStoreType', preferences.value('networking.trustStoreType'));
101112
if (trustStoreTypeRequiresStore()) {
102113
addValue(data, 'javax.net.ssl.trustStore', preferences.value('networking.trustStore'));
103-
addValue(data, 'javax.net.ssl.trustStorePassword', preferences.value('networking.trustStorePassword'));
114+
addValue(data, 'javax.net.ssl.trustStorePasswordEncrypted', preferences.value('networking.trustStorePasswordEncrypted'));
104115
}
105116
addValue(data, 'console.connectTimeoutMillis', preferences.value('networking.connectTimeoutMillis'));
106117
addValue(data, 'console.readTimeoutMillis', preferences.value('networking.readTimeoutMillis'));
@@ -113,6 +124,9 @@ const SettingsEditor = (() => {
113124
data[pair.substring(0, pair.indexOf('='))]= pair.substring(pair.indexOf('=') + 1);
114125
}
115126
fs.writeFileSync(path, JSON.stringify(data, null, 4));
127+
decryptData(data);
128+
if (configSender)
129+
configSender(data);
116130
}
117131

118132
function valid(showMessage) {
@@ -163,6 +177,23 @@ const SettingsEditor = (() => {
163177
ipcMain.removeAllListeners('encrypt');
164178
ipcMain.removeAllListeners('decrypt');
165179
},
180+
setConfigSender: (configSenderParam) => {
181+
// This is just a dummy for startup. It will be destroyed when we
182+
// create one for real in show()
183+
preferences = new ElectronPreferences({ dataStore: `${scratchPath}`});
184+
configSender = configSenderParam;
185+
const path = ConfigJSON.getPath();
186+
if (fs.existsSync(path)) {
187+
try {
188+
const data = JSON.parse(fs.readFileSync(path).toString());
189+
decryptData(data);
190+
configSender(data);
191+
}
192+
catch (err) {
193+
console.error(err);
194+
}
195+
}
196+
},
166197
show: (parentWindow) => {
167198
SettingsEditor.destroy(preferences);
168199
const preferencesTemplate = {
@@ -217,9 +248,9 @@ const SettingsEditor = (() => {
217248
hideFunction: dontNeedStoreFile
218249
},
219250
{
220-
label: `${I18NUtils.get('wrc-electron.menus.settings.trust-store.key.label')}`,
221-
key: 'trustStorePassword',
222-
type: 'text',
251+
label: `${I18NUtils.get('wrc-electron.menus.settings.trust-store.password.label')}`,
252+
key: 'trustStorePasswordEncrypted',
253+
type: 'secret',
223254
hideFunction: dontNeedStoreFile
224255
},
225256
{

electron/app/js/user-prefs-json.js

+55-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2025, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
* @ignore
66
*/
@@ -57,7 +57,8 @@ const UserPrefs = (() => {
5757
const preferencesTemplate = {
5858
defaults: {
5959
credentials: { storage: true },
60-
unsaved: { appExit: true, unload: true }
60+
unsaved: { appExit: true, unload: true },
61+
startup: { checkForUpdates: true }
6162
},
6263
dataStore: `${app.getPath('userData')}/user-prefs.json`,
6364
browserWindowOverrides: {
@@ -153,10 +154,61 @@ const UserPrefs = (() => {
153154
}
154155
]
155156
}
157+
},
158+
{
159+
id: 'language',
160+
label: `${I18NUtils.get('wrc-electron.menus.preferences.section.language.label')}`,
161+
form: {
162+
groups: [
163+
{
164+
fields: [
165+
{
166+
label: `${I18NUtils.get('wrc-electron.menus.preferences.language.field.label')}`,
167+
help: `${I18NUtils.get('wrc-electron.menus.preferences.language.field.help')}`,
168+
key: 'language',
169+
type: 'radio',
170+
options: [
171+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.system.label')}`, value: 'System'},
172+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.en.label')}`, value: 'en'},
173+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.de.label')}`, value: 'de'},
174+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.es.label')}`, value: 'es'},
175+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.fr.label')}`, value: 'fr'},
176+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.it.label')}`, value: 'it'},
177+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.ja.label')}`, value: 'ja'},
178+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.ko.label')}`, value: 'ko'},
179+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.pt.label')}`, value: 'pt-BR'},
180+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.zh-CN.label')}`, value: 'zh-CN'},
181+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.language.zh-TW.label')}`, value: 'zh-TW'}
182+
]
183+
}
184+
]
185+
}
186+
]
187+
}
188+
},
189+
{
190+
id: 'startup',
191+
label: `${I18NUtils.get('wrc-electron.menus.preferences.section.startup.label')}`,
192+
form: {
193+
groups: [
194+
{
195+
fields: [
196+
{
197+
label: `${I18NUtils.get('wrc-electron.menus.preferences.check-for-update.field.label')}`,
198+
key: 'checkForUpdates',
199+
type: 'radio',
200+
options: [
201+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.yes')}`, value: true},
202+
{label: `${I18NUtils.get('wrc-electron.menus.preferences.no')}`, value: false}
203+
]
204+
}
205+
]
206+
}
207+
]
208+
}
156209
}
157210
]
158211
};
159-
160212
preferences = new ElectronPreferences(preferencesTemplate);
161213
},
162214
read: (userDataPath) => {

electron/app/js/window-management.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, 2024, Oracle and/or its affiliates.
3+
* Copyright (c) 2022, 2025, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
* @ignore
66
*/
@@ -62,13 +62,12 @@ const WindowManagement = (() => {
6262
}
6363
});
6464
}
65-
65+
6666
/**
6767
*
6868
* @private
6969
*/
7070
function generateAppMenu() {
71-
7271
let appMenuTemplate = [
7372
{
7473
// Provide an id field, so we can use Array.find() to
@@ -772,7 +771,7 @@ const WindowManagement = (() => {
772771
if (params.feedURL)
773772
downloadURL = params.feedURL;
774773

775-
if (_params.supportsUpgradeCheck) {
774+
if (_params.supportsUpgradeCheck && _params.upgradeCheckAtStart) {
776775
AutoUpdateUtils.checkForUpdates()
777776
.then(result => {
778777
newVersion = (result !== null ? result.versionInfo.version : null);
@@ -785,7 +784,7 @@ const WindowManagement = (() => {
785784

786785
_window = createBrowserWindow(title, AutoPrefs.get('width'), AutoPrefs.get('height'));
787786
_window.webContents.session.clearCache();
788-
787+
789788
_window.on('resize', () => {
790789
AutoPrefs.set({width: _window.getSize()[0], height: _window.getSize()[1]});
791790
AutoPrefs.write();

electron/app/main.js

+55-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2021, 2024, Oracle and/or its affiliates.
3+
* Copyright (c) 2021, 2025, Oracle and/or its affiliates.
44
* Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
55
* @ignore
66
*/
@@ -32,8 +32,9 @@ const UserPrefs = require('./js/user-prefs-json');
3232
// persisted in the auto-prefs.json file
3333
const AutoPrefs = require('./js/auto-prefs-json');
3434
// Declare variable for IIFE class used to manage data
35-
// persisted in the config.json file
35+
// persisted in the config.json file as well as its editor
3636
const AppConfig = require('./js/config-json');
37+
const SettingsEditor = require('./js/settings-editor');
3738
// Declare variable for IIFE class used to manage projects
3839
const ProjectManagement = require('./js/project-management');
3940
// Declare variable for IIFE class used to read and write projects
@@ -86,6 +87,7 @@ let showPort = false;
8687
let useTokenNotCookie = false;
8788
let quiet = false;
8889
let lines = [];
90+
let cbe;
8991

9092
(() => {
9193
function updateUserDataPath() {
@@ -128,6 +130,30 @@ let lines = [];
128130
};
129131
AppConfig.initialize(options);
130132

133+
// This seems complicated, but really isn't.
134+
// There are three ways that the language may be set (in precedence order):
135+
// 1. The command line option --lang=<lang>
136+
// 2. The value of "language.language" in user-prefs.json
137+
// 3. On Linux, the environment variable LANGUAGE
138+
// To implement this, it would be simple enough to set the --lang option if #2
139+
// or #3 applies. However, there is a bug in electron where --lang doesn't
140+
// work on Linux. The solution is to make sure LANGUAGE is set on Linux to
141+
// the right value, as well as setting the command-line option in every
142+
// platform.
143+
const file = userDataPath + "/user-prefs.json";
144+
if (!app.commandLine.hasSwitch('lang') && fs.existsSync(file)) {
145+
const userPrefsEarly = require(file);
146+
if ((userPrefsEarly?.language?.language !== undefined) &&
147+
userPrefsEarly.language.language !== 'System' &&
148+
userPrefsEarly.language.language !== ''
149+
) {
150+
app.commandLine.appendSwitch('lang', userPrefsEarly.language.language);
151+
}
152+
}
153+
if (app.commandLine.hasSwitch('lang')) {
154+
process.env['LANGUAGE'] = app.commandLine.getSwitchValue('lang');
155+
}
156+
131157
ProjectManagement.readProjects(userDataPath);
132158
ProjectManagement.selectCurrentProject();
133159
})();
@@ -212,6 +238,22 @@ function processCmdLineOptions() {
212238
quiet = app.commandLine.hasSwitch('quiet');
213239
}
214240

241+
function sendConfig(data) {
242+
if (!cbe)
243+
return;
244+
let buffer = 'START\n';
245+
for (const key in data) {
246+
buffer += key + '=' + data[key] + '\n';
247+
}
248+
buffer += 'END\n';
249+
try {
250+
cbe.stdin.write(buffer);
251+
} catch (err) {
252+
// If the writes fail, we're about to die anyway
253+
return;
254+
}
255+
}
256+
215257
function start_cbe() {
216258
var instDir = path.dirname(app.getPath('exe'));
217259
let filename = AppConfig.getPath();
@@ -232,14 +274,12 @@ function start_cbe() {
232274
'--persistenceDirectory',
233275
`${app.getPath('userData')}`,
234276
'--showPort',
235-
'--stdin',
236-
'--properties',
237-
filename,
277+
'--stdin'
238278
];
239279
if (useTokenNotCookie) {
240280
spawnArgs.push('--useTokenNotCookie');
241281
}
242-
const cbe = spawn(AppConfig.get('javaPath'), spawnArgs);
282+
cbe = spawn(AppConfig.get('javaPath'), spawnArgs);
243283

244284
let readlineStderr = readline.createInterface({
245285
input: cbe.stderr,
@@ -280,6 +320,7 @@ function start_cbe() {
280320
}
281321
logger.log('debug', line);
282322
});
323+
SettingsEditor.setConfigSender(sendConfig);
283324
}
284325

285326
// This is only used on Mac
@@ -328,13 +369,21 @@ app.whenReady()
328369
if (supportsUpgradeCheck && OSUtils.isLinuxOS && !process.env.APPIMAGE)
329370
process.env.APPIMAGE = `/${Math.random()}/${Math.random()}`;
330371

372+
const file = app.getPath('userData') + "/user-prefs.json";
373+
const userPrefsEarly = fs.existsSync(file) ? require(file) : null;
374+
const upgradeCheckAtStart =
375+
(userPrefsEarly?.startup?.checkForUpdates === undefined)
376+
? true
377+
: userPrefsEarly.startup.checkForUpdates;
378+
331379
const params = {
332380
version: version,
333381
productName: productName,
334382
copyright: copyright,
335383
homepage: homepage,
336384
feedURL: feedURL,
337385
supportsUpgradeCheck: supportsUpgradeCheck,
386+
upgradeCheckAtStart: upgradeCheckAtStart,
338387
supportsAutoUpgrades: supportsAutoUpgrades
339388
};
340389

electron/package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)