From 61db1bd071b91547bc9ba09b446f68d91cff8e22 Mon Sep 17 00:00:00 2001 From: jsvk <850037+jsvk@users.noreply.github.com> Date: Mon, 5 Sep 2022 16:24:31 -0400 Subject: [PATCH] fix: default to 'main' container in Sensor logs. Fixes #9459 (#9438) Signed-off-by: jsvk <850037+jsvk@users.noreply.github.com> Signed-off-by: juchao --- ui/src/app/shared/services/sensor-service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/app/shared/services/sensor-service.ts b/ui/src/app/shared/services/sensor-service.ts index 9f8286cec26d..6ffdac26fefa 100644 --- a/ui/src/app/shared/services/sensor-service.ts +++ b/ui/src/app/shared/services/sensor-service.ts @@ -33,8 +33,8 @@ export class SensorService { return requests.loadEventSource(`api/v1/stream/sensors/${namespace}`).pipe(map(line => line && (JSON.parse(line).result as SensorWatchEvent))); } - public sensorsLogs(namespace: string, name = '', triggerName = '', grep = '', tailLines = -1) { - const params = ['podLogOptions.follow=true']; + public sensorsLogs(namespace: string, name = '', triggerName = '', grep = '', tailLines = -1, container = 'main') { + const params = ['podLogOptions.follow=true', `podLogOptions.container=${container}`]; if (name) { params.push('name=' + name); }