Skip to content

Commit

Permalink
bug fix for 'all' source when using es
Browse files Browse the repository at this point in the history
  • Loading branch information
Adir111 committed Dec 22, 2024
1 parent 4f007be commit 12abb9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/api-server/api/task-logs/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ class Logs {
searchWord,
taskTime
};
if (logMode !== logModes.SIDECAR) {
logs = await logSource.getLogs(args);
}
else if (sideCars.length > 0 || sideCarNames.length > 0) {
if ((sideCars.length > 0 || sideCarNames.length > 0) && (logMode === logModes.SIDECAR || logMode === logModes.ALL)) {
const containerNames = sideCarNames.length > 0 ? sideCarNames : sideCars.map(x => x.name);
logs = await this._getSideCarLogs(containerNames, logSource, args);
}
else {
logs = await logSource.getLogs(args);
}
logs = logs.map(this._format);
logs = orderBy(logs, l => l.timestamp, sortOrder.desc);
logsData.logs = logs;
Expand Down

0 comments on commit 12abb9a

Please sign in to comment.