Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Apr 2, 2021
1 parent 7eba25f commit f0eedb4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marke
* Syntax highlighting
* Code refactoring
* Code formatting
* Kusto panel with access to Clusters, Databases, Tables, etc

# Works with Jupyter Notebooks as well (when using [kqlmagic](https://pypi.org/project/Kqlmagic/))
* This extension augments Jupyter Notbooks with Kusto language features, when using the [Jupyter](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) extension.
Expand All @@ -21,6 +22,7 @@ A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marke
* Install this extension
* Launch VS Code with the following command line `code-insiders --enable-proposed-api=donjayamanne.kusto`
* Create a file with extension `*.knb`
* Use the command `Configure Kusto Cluster/Database for Notebooks` to configure the Kusto connection.

# Difference between Kusto Notebooks & Jupyter Notebooks (with [kqlmagic](https://pypi.org/project/Kqlmagic/))
* Kusto Notebooks, there are no additional dependencies.
Expand All @@ -40,6 +42,8 @@ This extension is still in preview and a very early build with a long way to go
# Roadmap
* Support for more charts
* Ability to lock cells (preserve the results and ensure its never lost)
* Support for plain text files (*.csl/*.kql)
* & more...

# License

Expand Down
9 changes: 7 additions & 2 deletions src/extension/kernel/notebookConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ async function ensureNotebookHasClusterDbInfoInternal(document: NotebookDocument
}
await updateClusterDbInNotebook(document, info);
}
async function onChangeNotebookDatabase(uri: Uri) {
const document = notebook.notebookDocuments.find((item) => item.uri.toString() === uri.toString());
async function onChangeNotebookDatabase(uri?: Uri) {
uri = uri || window.activeNotebookEditor?.document.uri;
if (!uri) {
return;
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const document = notebook.notebookDocuments.find((item) => item.uri.toString() === uri!.toString());
if (!document) {
return;
}
Expand Down

0 comments on commit f0eedb4

Please sign in to comment.