You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2025/11/19 00:03:47 UTC
(camel-karavan) branch main updated: direct route navigation
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
The following commit(s) were added to refs/heads/main by this push:
new 5c1fac2b direct route navigation
5c1fac2b is described below
commit 5c1fac2bf158a214bdf3df8263397fd10793768d
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Tue Nov 18 19:03:42 2025 -0500
direct route navigation
---
karavan-vscode/src/designerView.ts | 10 ++++++----
karavan-vscode/webview/App.tsx | 4 ++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/karavan-vscode/src/designerView.ts b/karavan-vscode/src/designerView.ts
index 202ae37b..e04b214d 100644
--- a/karavan-vscode/src/designerView.ts
+++ b/karavan-vscode/src/designerView.ts
@@ -141,7 +141,7 @@ export class DesignerView {
this.sendData(panel, filename, relativePath, fullPath, message.reread === true, yaml, tab);
break;
case 'internalConsumerClick':
- this.internalConsumerClick(panel, fullPath, message.uri, message.name, message.routeId);
+ this.internalConsumerClick(panel, fullPath, message.uri, message.name, message.routeId, message.fileName);
break;
}
},
@@ -252,9 +252,11 @@ export class DesignerView {
}
}
- internalConsumerClick(panel: WebviewPanel, fullPath: string, uri?: string, name?: string, routeId?: string) {
- console.log(uri, name, routeId)
- if (uri && name) {
+ internalConsumerClick(panel: WebviewPanel, fullPath: string, uri?: string, name?: string, routeId?: string, fileName?: string) {
+ if (fileName) {
+ const filename = path.join(path.dirname(fullPath), fileName);
+ commands.executeCommand("karavan.open", { fsPath: filename })
+ } else if (uri && name) {
utils.getFileWithIntegnalConsumer(fullPath, uri, name).then((filename) => {
if (filename !== undefined) {
commands.executeCommand("karavan.open", { fsPath: filename })
diff --git a/karavan-vscode/webview/App.tsx b/karavan-vscode/webview/App.tsx
index 6ac17fb5..c9669104 100644
--- a/karavan-vscode/webview/App.tsx
+++ b/karavan-vscode/webview/App.tsx
@@ -250,8 +250,8 @@ class App extends React.Component<Props, State> {
propertyPlaceholders={this.state.propertyPlaceholders}
onSavePropertyPlaceholder={(key, value) => this.savePropertyPlaceholder(key, value)}
beans={this.state.beans}
- onInternalConsumerClick={(uri, name, routeId) => {
- vscode.postMessage({ command: 'internalConsumerClick', uri: uri, name: name, routeId: routeId });
+ onInternalConsumerClick={(uri, name, routeId, fileName) => {
+ vscode.postMessage({ command: 'internalConsumerClick', uri: uri, name: name, routeId: routeId, fileName: fileName });
}}
files={this.state.files.map(f => new IntegrationFile(f.name, f.code))}
onCreateNewFile={() => { }}