Skip to content

Commit 52d750b

Browse files
authored
feat(cloudwatch): single-click log group to view log streams #3150
Problem: Viewing log streams requires two steps: 1. open context menu 2. choose "View Log Stream" Solution: Invoke "View Log Stream" when a log group is left-clicked.
1 parent af1167b commit 52d750b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "CloudWatch Logs: one click to list log streams for a log group"
4+
}

src/cloudWatchLogs/explorer/logGroupNode.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as os from 'os'
88
import { AWSResourceNode } from '../../shared/treeview/nodes/awsResourceNode'
99
import { AWSTreeNodeBase } from '../../shared/treeview/nodes/awsTreeNodeBase'
1010
import { getIcon } from '../../shared/icons'
11+
import { localize } from '../../shared/utilities/vsCodeUtils'
1112

1213
export const contextValueCloudwatchLog = 'awsCloudWatchLogNode'
1314

@@ -17,6 +18,11 @@ export class LogGroupNode extends AWSTreeNodeBase implements AWSResourceNode {
1718
this.update(logGroup)
1819
this.iconPath = getIcon('aws-cloudwatch-log-group')
1920
this.contextValue = contextValueCloudwatchLog
21+
this.command = {
22+
command: 'aws.cloudWatchLogs.viewLogStream',
23+
title: localize('AWS.command.cloudWatchLogs.viewLogStream', 'View Log Stream'),
24+
arguments: [this],
25+
}
2026
}
2127

2228
public update(logGroup: CloudWatchLogs.LogGroup): void {

0 commit comments

Comments
 (0)