Skip to content

Commit

Permalink
Add 'Discover Cluster Providers' command
Browse files Browse the repository at this point in the history
Signed-off-by: Fred Bricon <[email protected]>
  • Loading branch information
fbricon committed Apr 22, 2021
1 parent 6862d53 commit 44df867
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to `Tools for Apache Kafka®` are documented in this file.
## [0.12.0]
### Added
- Extension API to contribute clusters. See [#123](https://github.com/jlandersen/vscode-kafka/issues/123) and [#160](https://github.com/jlandersen/vscode-kafka/pull/160).
- New `Discover Cluster Providers` command to search for extensions contributing cluster providers. See [#165](https://github.com/jlandersen/vscode-kafka/pull/165).
- Declare key/value formats for CONSUMER in kafka file. See [#112](https://github.com/jlandersen/vscode-kafka/issues/112).
- Declare key/value formats for PRODUCER in kafka file. See [#113](https://github.com/jlandersen/vscode-kafka/issues/113).
- Completion support for property names and values of CONSUMER and PRODUCER blocks. See [#146](https://github.com/jlandersen/vscode-kafka/issues/146).
Expand Down
8 changes: 8 additions & 0 deletions docs/Explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ Multiple delete is not supported for the moment. See [issue 107](https://github.

To delete a consumer group, it first must be stopped, else the `Delete` action will report an error.

## Discover new cluster providers

You can search for extensions contributing cluster providers in the extension gallery, by clicking on the `Discover Cluster Providers` button (also available via the command palette):

![Discover Cluster Providers](assets/kafka-explorer-discover-providers.png)

Those extensions must be labeled `kafka-provider`.

## Preferences

### `kafka.explorer.topics.sort`
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"onCommand:vscode-kafka.consumer.toggle",
"onCommand:vscode-kafka.consumer.clear",
"onCommand:vscode-kafa.consumer.deletegroup",
"onCommand:vscode-kafka.discover.clusterproviders",
"onView:kafkaExplorer",
"onLanguage:kafka",
"onDebug"
Expand Down Expand Up @@ -311,6 +312,12 @@
"command": "vscode-kafka.consumer.deletegroup",
"title": "Delete Consumer Group",
"category": "Kafka"
},
{
"command": "vscode-kafka.discover.clusterproviders",
"title": "Discover Cluster Providers",
"category": "Kafka",
"icon":"$(extensions)"
}
],
"menus": {
Expand All @@ -324,6 +331,11 @@
"command": "vscode-kafka.explorer.addcluster",
"when": "view == kafkaExplorer",
"group": "navigation"
},
{
"command": "vscode-kafka.discover.clusterproviders",
"when": "view == kafkaExplorer",
"group": "navigation"
}
],
"view/item/context": [
Expand Down
5 changes: 5 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ export function activate(context: vscode.ExtensionContext): KafkaExtensionPartic
handleErrors((command: DeleteConsumerGroupCommand) => deleteConsumerGroupCommandHandler.execute(command))));
context.subscriptions.push(vscode.commands.registerCommand(ProduceRecordCommandHandler.commandId,
handleErrors((command: ProduceRecordCommand, times: number) => produceRecordCommandHandler.execute(command, times))));
context.subscriptions.push(vscode.commands.registerCommand(
"vscode-kafka.discover.clusterproviders", () => {
return vscode.commands.executeCommand("workbench.extensions.search", "@tag:kafka-provider");
}
));

registerVSCodeKafkaDocumentationCommands(context);

Expand Down

0 comments on commit 44df867

Please sign in to comment.