Skip to content

Commit 1cb9fbe

Browse files
authored
Merge pull request #84 from oracle/release-2.4.16
Release 2.4.16
2 parents 4b9cbb5 + 529f83f commit 1cb9fbe

File tree

8,650 files changed

+77145
-199259
lines changed

Some content is hidden

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

8,650 files changed

+77145
-199259
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ frontend/electron-test/newWDTModelTokenFile.yml
4949
client.log.*
5050
bin/*
5151
weblogic-bean-info-harvester/build-*
52+
sample-security-providers/buildout
5253
run/work
5354
fortify-output/**
5455
owasp-output/**

assembly/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Copyright 2020, 2024, Oracle and/or its affiliates.
2+
<!-- Copyright 2020, 2025, Oracle and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. -->
44
<project xmlns="http://maven.apache.org/POM/4.0.0"
55
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -9,7 +9,7 @@
99
<parent>
1010
<artifactId>console-backend</artifactId>
1111
<groupId>com.oracle.weblogic</groupId>
12-
<version>2.4.15</version>
12+
<version>2.4.16</version>
1313
</parent>
1414

1515
<packaging>pom</packaging>

build-console-with-docker.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright 2021, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
3+
# Copyright 2021, 2025, Oracle Corporation and/or its affiliates. All rights reserved.
44
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
55

66
set -e
@@ -24,6 +24,7 @@ then
2424
fi
2525
docker cp $DOCKER_ID:/build/installer/target/. installer/target
2626
docker cp $DOCKER_ID:/build/frontend/web/. frontend/web
27+
docker cp $DOCKER_ID:/build/sample-security-providers/target sample-security-providers || true
2728
docker cp $DOCKER_ID:/build/on-weblogic/target on-weblogic || true
2829
docker cp $DOCKER_ID:/build/console-rest-ext/target console-rest-ext || true
2930
docker cp $DOCKER_ID:/build/wls-remote-console-helper-war/war/target wls-remote-console-helper-war/war || true

build-tools/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- Copyright 2020, 2024, Oracle Corporation and/or its affiliates. All rights reserved.
2+
<!-- Copyright 2020, 2025, Oracle Corporation and/or its affiliates. All rights reserved.
33
Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. -->
44
<project>
55
<modelVersion>4.0.0</modelVersion>
66

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

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

1818
<properties>

electron/app/js/auto-update-utils.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2023, 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
*/
@@ -18,6 +18,7 @@ let failed;
1818
let _updateInfo;
1919
let _window;
2020
let downloadingDialogAbortController;
21+
let pastStartup = false;
2122

2223
autoUpdater.on('error', error => {
2324
failed = true;
@@ -29,8 +30,11 @@ autoUpdater.on('error', error => {
2930
// dialog is started.
3031
setTimeout(() => showError(error), 100);
3132
}
32-
else
33-
showError(error);
33+
else {
34+
if (pastStartup) {
35+
showError(error);
36+
}
37+
}
3438
});
3539

3640
(() => {
@@ -101,7 +105,12 @@ autoUpdater.on('update-available', (info) => {
101105
});
102106

103107

108+
async function checkForUpdatesAtStart() {
109+
return Promise.resolve(autoUpdater.checkForUpdates());
110+
}
111+
104112
async function checkForUpdates() {
113+
pastStartup = true;
105114
return Promise.resolve(autoUpdater.checkForUpdates());
106115
}
107116

@@ -110,6 +119,7 @@ function getVersion() {
110119
}
111120

112121
async function doUpdate(window) {
122+
pastStartup = true;
113123
_window = window;
114124
downloadingDialogAbortController = new AbortController();
115125
dialog.showMessageBox(
@@ -138,5 +148,6 @@ module.exports = {
138148
doUpdate,
139149
getVersion,
140150
setFeedURL,
141-
checkForUpdates
151+
checkForUpdates,
152+
checkForUpdatesAtStart
142153
};

electron/app/js/console-logger.js

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @license
3-
* Copyright (c) 2022, 2023, 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
*/
66

@@ -20,38 +20,52 @@ const LoggingLevels = [
2020
let _logFilename;
2121
let _loggingLevel;
2222
let _isHeadlessMode;
23+
let _isStdoutErrorEpipe;
2324

2425
(function () {
2526
_loggingLevel = 'info';
2627
_isHeadlessMode = false;
28+
_isStdoutErrorEpipe = false;
2729
const _error = console.error;
2830
const _warning = console.warning;
2931
const _debug = console.debug;
3032
const _trace = console.trace;
3133

3234
console.error = function (line) {
3335
fs.appendFileSync(_logFilename, line + os.EOL);
34-
if (!_isHeadlessMode) _error.apply(console, arguments);
36+
if (_useConsoleLogging()) _error.apply(console, arguments);
3537
};
3638

3739
console.warning = function (line) {
3840
fs.appendFileSync(_logFilename, line + os.EOL);
39-
if (!_isHeadlessMode) _warning.apply(console, arguments);
41+
if (_useConsoleLogging()) _warning.apply(console, arguments);
4042
};
4143

4244
console.debug = function (line) {
4345
fs.appendFileSync(_logFilename, line + os.EOL);
44-
if (!_isHeadlessMode) _debug.apply(console, arguments);
46+
if (_useConsoleLogging()) _debug.apply(console, arguments);
4547
};
4648

4749
console.trace = function (line) {
4850
fs.appendFileSync(_logFilename, line + os.EOL);
49-
if (!_isHeadlessMode) _trace.apply(console, arguments);
51+
if (_useConsoleLogging()) _trace.apply(console, arguments);
5052
};
53+
54+
// Handle error on stdout and also prevent a dialog box when using console logging functions...
55+
process.stdout.on('error', function (error) {
56+
if (error.code == 'EPIPE') _isStdoutErrorEpipe = true;
57+
const caller = _getCaller((new Error('StackLog')));
58+
const line = `${getLogEntryDateTime()} ${getLogEntryLevel('error')} ${caller} ${error}`;
59+
fs.appendFileSync(_logFilename, line + os.EOL);
60+
});
5161
})();
5262

63+
function _useConsoleLogging() {
64+
return (!_isHeadlessMode && !_isStdoutErrorEpipe);
65+
}
66+
5367
function initializeLog(options) {
54-
_logFilename = _rotateLogfile(options.appPaths.userData, options.baseFilename);
68+
_logFilename = _getLogFileName(options.appPaths.userData, options.baseFilename);
5569
if (options.loggingLevel) _loggingLevel = options.loggingLevel;
5670
if (options.isHeadlessMode) _isHeadlessMode = options.isHeadlessMode;
5771
}
@@ -82,27 +96,28 @@ function getLogEntryLevel(level = 'info') {
8296
return levelSwitch(level);
8397
}
8498

99+
function _getCaller(stacklog) {
100+
let caller = '';
101+
const stackParts = stacklog.stack.split('\n');
102+
if (stackParts.length > 2) {
103+
const matched = stackParts[2].match(/([^/]+\.js)/);
104+
caller = (matched ? matched[0] : stackParts[2]);
105+
}
106+
return caller;
107+
}
108+
85109
/**
86110
*
87111
* @param {string} [level='info']
88112
* @param {string} message
89113
*/
90-
function log(level = 'info', message) {
114+
function log(level = 'info', message, infoUseTimeStamp = true) {
91115
function isLoggableLevel(level) {
92116
return (LoggingLevels.indexOf(level) <= LoggingLevels.indexOf(_loggingLevel));
93117
}
94118

95-
function getCaller(stacklog) {
96-
let caller = '';
97-
const stackParts = stacklog.stack.split('\n');
98-
if (stackParts.length > 2) {
99-
caller = stackParts[2].match(/([^/]+\.js)/)[0];
100-
}
101-
return caller;
102-
}
103-
104119
if (isLoggableLevel(level)) {
105-
const caller = getCaller((new Error('StackLog')));
120+
const caller = _getCaller((new Error('StackLog')));
106121
switch (level) {
107122
case 'error':
108123
((line) => {
@@ -125,10 +140,14 @@ function log(level = 'info', message) {
125140
})(`${getLogEntryDateTime()} ${getLogEntryLevel(level)} ${caller} ${message}`);
126141
break;
127142
default:
128-
if (!_isHeadlessMode) {
129-
((line) => { console.log(line); })(message);
143+
let msg = message;
144+
if (infoUseTimeStamp) {
145+
msg = `${getLogEntryDateTime()} ${getLogEntryLevel('info')} ${caller} ${message}`;
130146
}
131-
((line) => { fs.appendFileSync(_logFilename, line + os.EOL); })(message);
147+
if (_useConsoleLogging()) {
148+
((line) => { console.log(line); })(msg);
149+
}
150+
((line) => { fs.appendFileSync(_logFilename, line + os.EOL); })(msg);
132151
}
133152
}
134153
}
@@ -160,6 +179,17 @@ function setOptions(options) {
160179
}
161180
}
162181

182+
function rotateLog(options) {
183+
_logFilename = _rotateLogfile(options.appPaths.userData, options.baseFilename);
184+
if (options.loggingLevel) _loggingLevel = options.loggingLevel;
185+
if (options.isHeadlessMode) _isHeadlessMode = options.isHeadlessMode;
186+
}
187+
188+
function _getLogFileName(userDataPath, baseFilename) {
189+
const filename = `${baseFilename}.log`;
190+
return `${userDataPath}/${filename}`;
191+
}
192+
163193
function _rotateLogfile(userDataPath, baseFilename) {
164194
function appendLogEntries(file, rotateFilename) {
165195
const w = fs.createWriteStream(rotateFilename, {flags: 'a'});
@@ -174,8 +204,7 @@ function _rotateLogfile(userDataPath, baseFilename) {
174204
});
175205
}
176206

177-
const filename = `${baseFilename}.log`;
178-
const file = `${userDataPath}/${filename}`;
207+
const file = _getLogFileName(userDataPath, baseFilename);
179208

180209
const logDate = (new Date()).toISOString().slice(0, 10);
181210
const rotateFilename = `${userDataPath}/${baseFilename}-${logDate}.log`;
@@ -196,5 +225,6 @@ module.exports = {
196225
getLogLevels,
197226
setLoggingLevel,
198227
getLoggingLevel,
199-
setOptions
228+
setOptions,
229+
rotateLog
200230
};

0 commit comments

Comments
 (0)