* added agent notebooks, notebook history view and view materialized notebook button
* Got a basic UI running for viewing notebook history
* made some changes to make UI look good
* Added new notebook dialog
* Added new notebook Dialog
* Added create notebook dialog
* Added edit and delete notebook job
* Added some notebook history features
* Added new notebook job icons, fixed a minor bug
in openmaterializednotebookAPI and added fixed the
schedule Picker API.
* Fixed Bugs in Notebook Grid expansion
* Fixed Notebook table highlighting and
grid generation is done using code.
* fixed some UI bugs
* Added changes to reflect sqltoolservice api
* Fixed some localize keys
* Made changes in the PR and added
ability to open Template Notebooks from
notebook history view.
* Added pin and renaming to notebook history
* made some library calls async
* fixed an import bug caused by merging from master
* Validation in NotebookJobDialog
* Added entry points for scheduling notebooks
on file explorer and notebook editor
* Handled no active connections and
a small bug in collapsing grid
* fix a bug in scheduling notebook from explorer
and toolbar
* setting up agent providers from connection now
* changed modals
* Reupload edited template
* Add dialog info, solved an edit bug and localized
UI strings.
* Bug fixes in UI, notebook renaming and
editing template on fly.
* fixed a bug that failed editing notebook jobs from notebook jobs table
* Fixed a cyclic dependency, made strings const and
some other changes in the PR
* Made some cyclic dependency and some fixes from PR
* made some changes mentioned in the PR
* Changed storage database health text
* Changed the sqltoolservice version to the point to the latest build.
* Change cursor over tabs to be hand (pointer)
* Change hyperlink color
* Hook up CSSStyles to be updated from extension side and make BDC dashboard tabs change style when selected
* Remove unused file
* Add back in call to updateStyles
* Fix typos
Updated existing serialization code so it actually supports serialization. Still needs work to replace the saveAs function when a QueryProvider doesn't support save as, but want to handle in separate PR.
Removed separate MainThread/ExtHostSerializationProvider code as the DataProtocol code is the right place to put this code
Plumbed support through the gridOutputComponent to use the new serialize method in the serialization provider
Refactored the resultSerializer so majority of code can be shared between both implementations (for example file save dialog -> save -> show file on completion)
* Update to latest SQLToolsService release
* first set of changes to experiment the registration of cms related apis
* Adding cms service entry to workbench
* Adding basic functionality for add remove reg servers and group
* Returning relative path as part of RegServerResult as string
* initial extension
* cleaned building with connecting to server
* get list of registered servers
* progress with registered servers tree
* cms base node with server selection
* removed unused services
* replaced azure stuff with cms
* removed cmsResourceService
* list servers progress
* Removing the cms apis from core. Having mssql extension expose them for cms extension
* create server working fine
* initial expansion and nodes
* Propogating the backend name changes to apis
* initial cms extension working
* cached connection needs change in api
* connect without dashboard in proposed
* Fixing some missing sqlops references
* add registered server bug found
* added refresh context menu option
* added payload
* server description not disabled after reject connection
* added more context actions and action icons
* added empty resource and error when same name server is added
* fixed connection issues with cms and normal connections
* added initial tests
* added cms icons
* removed azure readme
* test script revert
* fix build tests
* added more cms tests
* fixed test script
* fixed silent error when expanding servers
* added more cms tests
* removed cmsdialog from api
* cms dialog without object
* fixed theming issues
* initial connection dialog done
* can make connections
* PM asks for strings and icons
* removed search
* removed unused code and fixed 1 test
* fix connection management tests
* changed icons
* format file
* fixed hygiene
* initial cr comments
* refactored cms connection dialog
* fixed bug when switching dialogs
* localized connection provider options
* fixed cms provider name
* code review comments
* localized options in cms and mssql
* localized more options
* extension now working
* fix diff editor title disappearing and remove border from source and target name boxes
* redoing a bunch of stuff that disappeared after rebasing
* add images and add to extensions.ts
* moving a few changes to the right place after rebase
* formatting
* update toolbar svgs
* addressing comments
* add return types
* Adding PR comments
* Adding light and dark theme icons
* Fixing the diff editor title for dark theme
* intial code for diff view inside model view
* Adding basic Split View Container depending on Flex Layout
* Enabled resizing between top and bottom view
* cleaning up some of the sqlops references
* Adding height as per CR comment
* first set of changes to experiment the registration of cms related apis
* Adding cms service entry to workbench
* Adding basic functionality for add remove reg servers and group
* Returning relative path as part of RegServerResult as string
* Removing the cms apis from core. Having mssql extension expose them for cms extension
* Propogating the backend name changes to apis
* Fixing some missing sqlops references
* Adding a sqltools service version with CMS apis available
* Start single client session based on the default kernel or saved kernel in NB.
* Added kernel displayName to standardKernel.
Modified name to allign wtih Juptyer Kernel.name.
So we can show the displayName during startup and use the name to start the session.
* Change session.OnSessionReady event in KernelDropDown
* Added model.KernelChnaged for switching kernel in the same provider
* Fixed session.Ready sequence
* Fixed merge issues
* Solve merged issue
* Fixed wrong kernel name in saved NB
* Added new event in Model to notify kernel change.
Toolbar depends on ModelReady to load
* Change attachTo to wait for ModelReady like KenelDropDown
* sanitizeSavedKernelInfo to fix invalid kernel and display_name. For example: PySpark1111 and PySpark 1111
* Added _contextsChangingEmitter to change loadContext msg when changing kernel
* Resolve PR comments
- Added `runCell` API. Updated runCell button to listen to events on the model so it'll reflect run cell when called from other sources
- Plumbed through kernelspec info to the extension side so when changed, it's updated
- Fixed bug in ConnectionProfile where it didn't copy from options but instead overrode with empty wrapper functions
Here's the rough test code (it's in the sql-vnext extension and will be out in a separate PR)
```ts
it('Should connect to local notebook server with result 2', async function() {
this.timeout(60000);
let pythonNotebook = Object.assign({}, expectedNotebookContent, { metadata: { kernelspec: { name: "python3", display_name: "Python 3" }}});
let uri = writeNotebookToFile(pythonNotebook);
await ensureJupyterInstalled();
let notebook = await sqlops.nb.showNotebookDocument(uri);
should(notebook.document.cells).have.length(1);
let ran = await notebook.runCell(notebook.document.cells[0]);
should(ran).be.true('Notebook runCell failed');
let cellOutputs = notebook.document.cells[0].contents.outputs;
should(cellOutputs).have.length(1);
let result = (<sqlops.nb.IExecuteResult>cellOutputs[0]).data['text/plain'];
should(result).equal('2');
try {
// TODO support closing the editor. Right now this prompts and there's no override for this. Need to fix in core
// Close the editor using the recommended vscode API
//await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
}
catch (e) {}
});
it('Should connect to remote spark server with result 2', async function() {
this.timeout(240000);
let uri = writeNotebookToFile(expectedNotebookContent);
await ensureJupyterInstalled();
// Given a connection to a server exists
let connectionId = await connectToSparkIntegrationServer();
// When I open a Spark notebook and run the cell
let notebook = await sqlops.nb.showNotebookDocument(uri, {
connectionId: connectionId
});
should(notebook.document.cells).have.length(1);
let ran = await notebook.runCell(notebook.document.cells[0]);
should(ran).be.true('Notebook runCell failed');
// Then I expect to get the output result of 1+1, executed remotely against the Spark endpoint
let cellOutputs = notebook.document.cells[0].contents.outputs;
should(cellOutputs).have.length(4);
let sparkResult = (<sqlops.nb.IStreamResult>cellOutputs[3]).text;
should(sparkResult).equal('2');
try {
// TODO support closing the editor. Right now this prompts and there's no override for this. Need to fix in core
// Close the editor using the recommended vscode API
//await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
}
catch (e) {}
});
});
```
* Added Unified connection support
* Use generic way to do expandNode.
Cleanup the ported code and removed unreference code. Added as needed later.
Resolved PR comments.
* Minor fixes and removed timer for all expanders for now. If any providers can't response, the tree node will spin and wait. We may improve later.
* Change handSessionClose to not thenable.
Added a node to OE to show error message instead of reject. So we could show partial expanded result if get any.
Resolve PR comments
* Minor fixes of PR comments
* Scenarios work besides loading saved kernel
* Fix compilation issue
* Save and load functional
* Fix loading kernesl issue when sql kernel is not enabled
* Fix language mapping to not be hardcoded any longer
* Remove unnecessary comment
* PR Comments vol. 1
* Code cleanup, use ConnectionProfile instead of IConnectionProfile when accessing serverName
* PR changes vol. 2
* One final comment for PR
* Fix linting issue
* working on formatting
* fixed basic lint errors; starting moving things to their appropriate location
* formatting
* update tslint to match the version of vscode we have
* remove unused code
* work in progress fixing layering
* formatting
* moved connection management service to platform
* formatting
* add missing file
* moving more servies
* formatting
* moving more services
* formatting
* wip
* moving more services
* formatting
* revert back tslint rules
* move css file
* add missing svgs
* add an extension for integration tests
* setup ads before running test
* test setup
* test cases
* bash script
* shorter temp folder name
* code cleanup
* add commented out original code
* fix test error
* test result path
* rename results file
* change file path
* report smoke test results
* test stablize
* test stablization and configurable test servers
* fix smoke test error
* connection provider
* simplify the integration test script
* add comment
* fix tslint error
* address PR comments
* add temp log to check whether the environment variable is already set
* remove temp log
* move api definition to testapi typing file
* exclude integration tests extension
* address comments
* First crack tsql notebook (no output rendered yet)
* getting messages back
* intellisense working first cell, no connection errors
* sql notebook cell output functioning
* Latest SQL noteobook changes
* Undo change to launch.json
* Plumbing providers through
* Kernels shown from multiple providers, can switch between them. No mementos yet
* Ensure we have a feature flag for SQL notebooks, ensure existing functionality still works
* Fix tslint duplicate imports issue
* Addressing PR comments
* second round of PR feedback to cleanup notebook service manager code
* merge latest from master
* Refactor JSON and format files to model and fix tabs -> spaces issues
This is in prep for some work to reuse these code files inside the model,
so pushing as its own PR to keep the next piece of work clean.
* Fix#3680 Notebooks: outputs with string arrays rendered incorrectly
- Add support for processing v4 format files loaded from disk
- Prep support for v3 notebooks by adding placeholder code for that
* Fix failing tests and add specific one for this bug
* Remove references to v5
- Add edit API that can be used in the extension
- Separated document and editor classes out since this is the point those get big. I can refactor back in if needed to ease code review
- Based this off text editing APIs but tweaked for the fact this is a cell/array based set of edits
* agent feature usage metrics
* generalized feature telemetry via dialogs
* renamed eventName property to dialogName
* made dialogName an optional field
initial support for Notebook extensibility. Fixes#3148 , Fixes#3382.
## Design notes
The extensibility patterns are modeled after the VSCode Document and Editor APIs but need to be different since core editor concepts are different - for example Notebooks have cells, and cells have contents rather than editors which have text lines.
Most importantly, a lot of the code is based on the MainThreadDocumentsAndEditors class, with some related classes (the MainThreadDocuments, and MainThreadEditors) brought in too. Given our current limitations I felt moving to add 3 full sets of extension host API classes was overkill so am currently using one. Will see if we need to change this in the future based on what we add in the additional APIs
## Limitations
The current implementation is limited to visible editors, rather than all documents in the workspace. We are not following the `openDocument` -> `showDocument` pattern, but instead just supporting `showDocument` directly.
## Changes in this PR
- Renamed existing APIs to make clear that they were about notebook contents, not about notebook behavior
- Added new APIs for querying notebook documents and editors
- Added new API for opening a notebook
- Moved `New Notebook` command to an extension, and added an `Open Notebook` command too
- Moved notebook feature flag to the extension
## Not covered in this PR
- Need to actually implement support for defining the provider and connection IDs for a notebook. this will be important to support New Notebook from a big data connection in Object Explorer
- Need to add APIs for adding cells, to support
- Need to implement the metadata for getting full notebook contents. I've only implemented to key APIs needed to make this all work.
Full plumb through of Session support. Also fixed some test issues
- Load session and get necessary information in kernels list
- Run Cell button now works as expected
- Added a ToggleAction base class which can be used for anything that switches icons. I'd still prefer to have this be dynamic and as clean as the extension classes
- Fixed account test unhandled promise rejections (caused by incorrect / invalid tests) that made it hard to see all the test run output.
Implements provider contribution in the MainThreadNotebook, with matching function calls in the ExtHostNotebook class. This will allow us to proxy through notebook providers (specifically, creation of a notebook manager with required content, server managers) from an extension up through to the main process.
Implemented in this PR:
- Callthroughs for content and server manager APIs
- Very basic unit tests covering provider & manager registration
Not implemented:
- Fuller unit tests on the specific callthrough methods for content & server manager.
- Contribution point needed to test this (so we can actually pass through the extension's existing Notebook implementation)
- Defines a new NotebookService in Azure Data Studio which will be used to interact with notebooks. Since notebooks can require per-file instantiation the provider is just used to create & track managers for a given URI.
- Inject this into notebook.component.ts and pass required parameters that'll be used to properly initialize a manger into the method. Actual initialization not done yet.
- Port over & recompile notebook model code
- Define most required APIs in sqlops.proposed.d.ts. In the future, these will be used by extensions to contribute their own providers.
Editor component didn't have a minimum height set, so fixing this by passing through a minimum height to EditorComponent. Now, if the scrollable height of the editor is less than the minimum height, we use the minimum height as the height of the component.
Also fixed an issue where the markdown code editor's height was far too high. Now we're calculating the height on the layout() call, which gets called every time we display the markdown editor.
* add dom component for model view
* formatting
* make css style hardcoded in dom.component
* comment out the unused CSS
* address comments
* address comment
* Enable the support for post-connection behaviors for openConnectionDialog.
* Fixed bugs.
* Make everything in IConnectionCompletionOptions optional except saveConnection.
* showConnectionDialogOnError & showFirewallRuleOnError default to true.
* Use types.isUndefinedOrNull to do value checking.
* Minor changes.