mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix download all logs for pod with few containers (#7413)
* Use container name as downloaded file name Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Specify container to call for logs query Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fixing tests Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> --------- Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
8dc0177cb2
commit
7d71873135
3 files changed
+5
-5
No files matched your search
@@ -25,7 +25,7 @@ const downloadAllLogsInjectable = getInjectable({
|
||||
});
|
||||
|
||||
if (logs) {
|
||||
openSaveFileDialog(`${params.name}.log`, logs, "text/plain");
|
||||
openSaveFileDialog(`${query.container}.log`, logs, "text/plain");
|
||||
} else {
|
||||
showErrorNotification("No logs to download");
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ export class LogTabViewModel {
|
||||
|
||||
if (pod && tabData) {
|
||||
const params = { name: pod.getName(), namespace: pod.getNs() };
|
||||
const query = { timestamps: tabData.showTimestamps, previous: tabData.showPrevious };
|
||||
const query = { timestamps: tabData.showTimestamps, previous: tabData.showPrevious, container: tabData.selectedContainer };
|
||||
|
||||
return this.dependencies.downloadAllLogs(params, query);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user