Commit Graph

171 Commits

Author SHA1 Message Date
Lucy Zhang
67829af0c5 Notebooks: add multi_connection field to notebook metadata (#14097)
* add multi_connection to nb metadata

* address PR comments

* pr comments

* adsd notebookmetadatakeys object

* pr comments

* use isUUID util method
2021-02-05 13:46:31 -08:00
Chris LaFreniere
0e84dd240b Notebook Cell Conversion Language Fixes (#14120)
* Cell language override fixes

* PR feedback
2021-02-01 14:21:24 -08:00
Lucy Zhang
667c12abdc Notebooks: Fix Notebook validation Error when opened in Jupyter (#14110)
* delete transient node for display data

* add comment
2021-01-29 14:40:02 -08:00
Maddy
5be2e01632 Notebook Telemetry initial changes (#13929)
* initial changes

* add ads-telemetry to nb extension

* add aiKey to notebook extension

* add run cell telemetry in cellmodel

* add NbTelemetryAction

* remove source

* remove telemtery for run notebook for now

* fix optional variable call

* addr comments

* changing the dependency package

* revert

* removed webpack config for telemetry compat

* add opentelemetry to externals

Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com>
2021-01-25 09:42:37 -08:00
Vasu Bhog
df51f35be0 Enable Parameterization via Notebook URI (#13869)
* Enable Parameterization via Notebook URI

* Add Parameterization and Move notebookModel tests

* minor typos

* parameter typo

* Multiple parameters through uri fix

* Address PR comments and tests fix

* add new injected parameters after original injected parameters

* Add new test to verify notebookURi parameter is injected after both parameter and injected cell

* fix tests
2021-01-08 00:38:33 -08:00
Daniel Grajeda
16943c68c6 Notebook Views Models (#13884)
* Add notebook editor

Introduce notebook editor component to allow for separate notebook displays in order to accomodate notebook views

* Localize notebook views configuration title

* Refactor view mode and remove the views configuration while it is unused

* Only fire view mode changed event when the value has been changed

* Remove notebook views contribution

* Add metadata capabilities

* Notebook views definitions

* Add notebook views models

* Views test

* Rename type arguments

* Additional tests

* Fix unused import

* Update resize cell test
2021-01-05 15:28:30 -08:00
Daniel Grajeda
11f236ade1 Notebook Views (#13465)
* Add notebook editor

Introduce notebook editor component to allow for separate notebook displays in order to accomodate notebook views

* Localize notebook views configuration title

* Refactor view mode and remove the views configuration while it is unused

* Only fire view mode changed event when the value has been changed

* Remove notebook views contribution
2020-12-27 13:08:27 -08:00
Lucy Zhang
f96fd911c1 Notebooks: Remove result set summary from saved metadata (#13616)
* remove result set summary from metadata

* remove batchId and id from celloutputmetadata

* remove extra line
2020-12-07 12:28:07 -08:00
Lucy Zhang
aa30b52d03 Notebooks: Fix query results not displaying table rows (#13488)
* fix PQSQL queries not displaying rows

* comment

* change comment and fix unit test
2020-11-20 15:31:01 -08:00
Chris LaFreniere
8d42182db8 Attempt to Colorize Code Cells from Notebook Contents (#13473)
* Attempt to colorize from saved language info

* Simplify colorization change

* Fixup
2020-11-19 19:54:09 -08:00
Lucy Zhang
32a6385fef Notebooks: Save cell connection name in cell metadata (#13208)
* save connection info in notebook metadata

* update attachTo dropdown based on saved alias

* add setting for saving connection (default=false)

* save/read cell connection name to/from metadata

* get started on toggling multi connection mode

* add activeConnection property to cell model

* add changeContext method for cell

* add comments

* add unit test for reading connection name

* save connection mode in metadata

* clean up code

* address PR comments
2020-11-12 10:44:34 -08:00
Vasu Bhog
351516f08d Change the way we insert Injected Parameter (#13171) 2020-11-02 09:14:37 -08:00
Charles Gagnon
d7767c7d91 Resource viewer cleanup (#13168)
* Resource viewer cleanup

* uneeded

* Only show in insiders
2020-10-30 16:48:50 -07:00
Lucy Zhang
69527f91b0 Notebooks: Save connection information in metadata (#13060)
* save connection info in notebook metadata

* update attachTo dropdown based on saved alias

* add setting for saving connection (default=false)

* dont show saved conn if seting off + added test

* show conn dialog if save conn name setting off

* address PR comments and fix unit test

* change connectionName to connection_name
2020-10-30 13:56:33 -07:00
Lucy Zhang
86357b45b0 Notebooks: re-factor grid streaming (#12937)
* refactor grid streaming (convert to data first)

* change convertRowsToHtml method to return value

* remove griddataconversioncomplete checks

* send row data from STS to gridoutput component

* clean up code

* send data updates to cell model

* serialize cell output at the end of cell execution

* remove unused parameters

* update output contents instead of output reference

* remove unnecessary promise

* move azdata changes to proposed

* update comment
2020-10-28 09:08:15 -07:00
Vasu Bhog
cb30dd1893 Notebook Parameterization - Papermill Compatibility (#13034)
* Parameterization papermill fix

* Utilize isParameter instead

* Address PR comments, and fix tests

* Address comment
2020-10-23 20:32:55 -05:00
Vasu Bhog
fcec690546 Backend work for Notebook Parameterization and Tests (#12914)
* Backend work for  Parameterization + Tests

* minor comments

* fix test

* address comments
2020-10-20 13:26:59 -05:00
Vasu Bhog
53f00bee12 Fix connection when changing kernel from Kusto to SQL (#12881)
* Fix Kusto to SQL kernel connection change

* Updated Fix - removes kernel alias mapping while ensuring multi kusto notebooks work properly

* Fix tests
2020-10-10 00:10:33 -05:00
Lucy Zhang
b910bf2f33 Notebooks: Fix strict compile errors (#12591)
* strict compile for sqlSessionManager.ts

* start clientSession.ts fixes

* strict compile for clientSession.ts

* strict compile for notebookModel.ts

* add display name

* clean up code

* clean up code

* initialize string to empty string

* address PR comments

* address PR comments

* address PR comments

* remove errorMessage check
2020-10-08 15:39:57 -07:00
Christopher Suh
6ff1e3866b Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)
* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3

* Fix test build break

* Update distro

* Fix build errors

* Update distro

* Update REH build file

* Update build task names for REL

* Fix product build yaml

* Fix product REH task name

* Fix type in task name

* Update linux build step

* Update windows build tasks

* Turn off server publish

* Disable REH

* Fix typo

* Bump distro

* Update vscode tests

* Bump distro

* Fix type in disto

* Bump distro

* Turn off docker build

* Remove docker step from release

Co-authored-by: ADS Merger <andresse@microsoft.com>
Co-authored-by: Karl Burtram <karlb@microsoft.com>
2020-10-03 11:42:05 -07:00
Monica Gupta
b574f2aa32 Fix notebook issue when creating Kusto notebooks 2nd time after launching ADS (#12700)
* Fix notebook issue

* Removed not required code

Co-authored-by: Monica Gupta <mogupt@microsoft.com>
2020-10-01 16:27:41 -07:00
Lucy Zhang
cf9754f627 revert grid streaming changes (#12650) 2020-09-28 18:34:58 -07:00
Vasu Bhog
eea35d4920 Fix Spark kernel connections and switch from Kusto to Spark kernels (#12436)
* Fix connection dialog for Spark and issue when switching from Kusto to Spark

* Address comments
2020-09-17 22:16:42 -05:00
Lucy Zhang
945e04ed92 Fix notebook table rendering with multiple code cells (#12363)
* create unique query runner for each cell

* use cellUri instead of cellId to identify runner

* disconnect each query runner connection

* remove queryrunners size check
2020-09-17 09:44:10 -07:00
Chris LaFreniere
ffb81d88fd Watch for on load event (#12309) 2020-09-15 23:27:05 -07:00
Lucy Zhang
0be5f67621 Fix notebook cancel query bug (#12300)
* fix undefined query runner error

* store connection id

* revert sqlSessionManager change
2020-09-15 11:31:31 -07:00
Vasu Bhog
7a524d7a35 Fix Notebook Kusto Kernel Consistency (#12256)
* fix kusto notebook consistency

* Address undefined
2020-09-14 14:18:53 -05:00
Chris LaFreniere
4fee0210f6 Notebooks: Add setting for default text cell edit behavior (#12245)
* Add setting for default text cell edit behavior

* string updates
2020-09-11 16:29:09 -07:00
Hale Rankin
6670289057 Hackathon - Better Markdown Editor (#11540)
* Hackathon - better markdown editor - modified Bold to wrap selection in HTML. Split Image button into two new options: embed and link. Made preview container contentEditable.

* Removed the new dropdown from Image button -- it is not necessary since we are adding a context panel instead.

* Modified preview icons

* Set code-component dimensions so it is not visible. It is still being used to pass markdown changes to however.

* add turndown and save markdown

* update model on UI when source changes

* Added conditional that sets element attribute contentEditable when it is in edit mode.

* Added textView component that can be used for editing.

* update source on MD view not on every keystroke

* Added markdown editor buttons that allow user to swap editor, preview views.

* Cleaning up implementation

* Setting base value of _showPreview to false.

* don't allow html edit on split view

* Update editor automagically

* Add an image picking dialog to notebook toolbar.

* Await transformText()

* revert pushEditOperations to fix cursor issue

* Implemented radio buttons for three view toggles.

* Added new, optional properties to radioButton: name, icon class and tooltip. This allows for display as toggleable icon. Updated styles and theme accordingly.

* Style tweaks.

* Added new ViewAction file where the RadioButton action will reside.

* Removed radio button implementation in exchange for native button instantiation. Adjusted CSS and theme accordingly.

* Styles, component and template changes to handle view toggle between text, markdownn an splitview. Includes reverting of radioButton as this is no longer used.

* WYSIWYG 3 Modes

* Ensure one action active at a time

* Setting Text View button active by default. Cleaned up styles. Moved toolbar element to prevent code cell layout overflow.

* Ensure we respect editMode, add showMarkdown

* hiding overflow on code-cell

* Empty text container needs 100% width. Eliminates weird selection border too.

* Initialize _previewMode

* Actions Compatibility

* Further toolbar enhancements

* Update yarn lock after merge

* Slim down changes

* Remove commented out code

* Added margins around notebook-preview container for more visual space for text

* Add turndown to workbench html

* Tweak import

* Add types/turndown

* Remove workbench.html fix

* Import cjs modules directly for turndown

* Leverage solution from github

* browser umd

* non browser umd

* welp dependency

* Modified updatePreview to insert a p tag only when text cell is empty.

* add listener for undo

* add turndown to remote and web

* Fix workbench, check in plugin

* PR comment

Co-authored-by: maddydev <makoripa@microsoft.com>
Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Cory Rivera <corivera@microsoft.com>
Co-authored-by: Lucy Zhang <luczhan@microsoft.com>
2020-09-11 00:22:07 -07:00
Lucy Zhang
e3ec6bf9c5 Add grid streaming support for notebooks (#12175)
* add onResultUpdate handler in gridoutput

* convert rows to mimetype and html

* wait for data conversion to finish before saving

* detach changeRef after output is created

* fix save grid action

* move data conversion check to each cell

* move conversion logic to dataprovider

* notify data converting when user saves

* add comments and remove unused methods

* fix method return type

* fix tests

* fix convertData method header

* move azdata changes to azdata proposed

* address PR comments

* display top rows message

* fix messages/table ordering and query 100 rows

* add missing escape import

* set default max rows to 5000

* add undefined check to updateResultSet

* change gridDataConversionComplete return type
2020-09-10 13:31:40 -07:00
Vasu Bhog
ff61eae164 Fixed Kusto change connections for previous notebooks (#12207)
* fix connection dialog for change connection on notebook

* Better way to show all connections for providers

* minor change
2020-09-10 13:20:35 -05:00
Vasu Bhog
3a0be70783 Kusto Kernel New Notebook Changes (#12085)
* Kusto New Notebook Action Changes

* Kusto Cluster properly switches context when kernel changes

* SQL Connections kernel change to Kusto works properly

* Multiple New Kusto Notebooks open properly and change kernels properly

* Fix SQL Notebook - Change to Kusto Kernel

* Fix unit tests

* Address comments

* Add test, and finalize changes
2020-09-09 09:19:36 -05:00
Anthony Dresser
704222b8d7 remove some vscode differences (#12146) 2020-09-04 18:04:30 -07:00
Shafiq Ur Rahman
97b6d71a06 Kusto - ADS Core changes (#11750)
* ADS Core changes

* Generic fix to get language mode based on providerId

* Addressed comments

* Fix failing tests

* Fix for "New Notebook" from file menu option

* Remove line

* Fix for merge conflict

* Add removed comment back

* Addressed comments

Co-authored-by: Monica Gupta <mogupt@microsoft.com>
2020-08-19 12:27:16 -07:00
Vasu Bhog
2bfba53e21 Kusto Notebook Kernel Changes (#11760)
* Able to get Kernel Alias using extension registery

* Get Kernel Alias through Capability Services

* Notebook Action feature to add kusto to dropdown based on extension - complete

* Fixed indexing issue when Kusto is in kernels Dropdown

* Kusto Kernel listed properly and selected when kernel changes

* Added kernel change when user Attaches To Kusto connection

* Deleted unnecessary code/refactored

* Fix Merge Issues

* Resolving Compile issues - test file error

* Capabilities Provider Changes

* Fixed Notebook Tests

* Rearchitect kernel changes to Notebook Model

* Address minor changes
2020-08-18 14:52:25 -05:00
Hale Rankin
68e7a293ad Notebook cell toolbar additions - move cell, convert cell (#11457)
* Notebook cell toolbar additions - move up and move down added. Stubbed out related actions. Cleaned up component code.

* Added new more actions menu item: Convert cell.

* add move cell support in model

* Schema Compare cleanup (#11418)

* cleanup async and await stuff

* remove awaits

* remove more awaits

* fix (#11437)

* Add some unit tests for PyPiClient. (#11442)

* handle invalid character in kubectl version output (#11460)

* Add tests for azdata extension (#11423)

* Add tests for azdata extension

* Fail on stderr

* Skip test for not implemented logic

* Move executeCommand stub

* Add missing packages

* let semver to parse the version (#11463)

* let semver to parse the version

* check

* Stop hardcoding python3 (#11464)

* Add ConnectControllerDialog tests (#11443)

* Automatically fix up arc controller URL

* wip

* Force tests to pass

* Refactor

* comment

* adds role of button to all links that are buttons (#11465)

* Merge from vscode 0a7364f00514c46c9caceece15e1f82f82e3712f

* bump smoke extensions

* bump node version in builds

* bump smoke extensions

* Add query-history and sql-assessment to recommended extensions (#11477)

* First draft of outputProcessor tests (#11368)

* First draft of outputProcessor tests

* add return type for a function

* pr feedback

* comments and Spellings, getRandom ==> getRandomElement

* pr feedback

* pr feedback

* Adds support for installing azdata on Linux (#11469)

* Large cleanup of AzureCore - Introduction of getAccountSecurityToken and deprecation of getSecurityToken (#11446)

* do a large cleanup of azurecore

* Fix tests

* Rework Device Code

* Fix tests

* Fix AE scenario

* Fix firewall rule - clenaup logging

* Shorthand syntax

* Fix firewall tests

* Start on tests for azureAuth

* Add more tests

* Address comments

* Add a few more important tests

* Don't throw error on old code

* Fill in todo

* Adding button plugin to table component  (#10918)

* Added delete plugin to table component

* Arc - Remove Azure params from Postgres deployment (#11478)

Co-authored-by: Brian Bergeron <brberger@microsoft.com>

* tests for KernelsDropdown class (#11476)

* add return type for a function

* tests for KernelsDropdown class

* remove inadvertent change

* remove inadvertent change

* formatting changes

* pr feedback

* pr feedback

* implement review feedback (#11470)

* fix sql proj sqlcmd table showing after loading profile when it shouldn't (#11479)

* Feature/outer paths for project (#11445)

* allow relative paths in project file outside of project folder

* Adding some tests

* Adding error string to loc strings

* Fixed test

* fix error message

* PR comments and some more fixes

* change userName to match what the azure account display name is (#11484)

* change userName to match what the azure account display name is

* Handle undefined value

* Merge from vscode 8c426f9f3b6b18935cc6c2ec8aa6d45ccd88021e

* recomment out integration tests

* Fix/open book error (#11379)

* add isNotebook param and showPreview option

* showPreview changes

* update OpenNotebookFolder to open a specific path

* added test for showPreviewFile

* test name typo

* remove isNotebook from openBook

* Add test coverage for dacpac wizard import flow (#11483)

* Adding importConfig onPageEnter() test

* Removing redundancy from dacpac wizard pages

* promisifying file selection so it can be awaited in the test

* removing debug prints

* PR feedback

* Remove all accounts regardless of failure in one account (#11431)

* distro (#11487)

* distro

* distro

* distro

* distro

* Adding icons to Database Projects' tree view (#11488)

* Add images

* Splitting to light and dark mode icons

* Hooks up icons to treeItems

* updating package.json with new icon and vbump

* move icon loader before tree view created

* Update Arc extension version and fix Controller connectivity status names (#11498)

* Update connectivity mode names

(cherry picked from commit f0aabcfa86d178cdf74470f9fdeded19718bcea2)

* Bump package version

(cherry picked from commit e08370539006c638d6e25c2f4f23fa2754a3377d)

* deploy to single existing device (#11494)

* deploy to single existing device

* comments

* Add versioning for accounts (#11497)

* Add versioning for accounts

* deletion value

* Changes to getAccountSecurityToken (#11502)

* Hook up convert cell

* Fix tests

* Add convert cell tests

Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Kim Santiago <31145923+kisantia@users.noreply.github.com>
Co-authored-by: Maddy <12754347+MaddyDev@users.noreply.github.com>
Co-authored-by: Cory Rivera <corivera@microsoft.com>
Co-authored-by: Alan Ren <alanren@microsoft.com>
Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>
Co-authored-by: v-bbrady <60623315+v-bbrady@users.noreply.github.com>
Co-authored-by: ADS Merger <andresse@microsoft.com>
Co-authored-by: Arvind Ranasaria <ranasaria@outlook.com>
Co-authored-by: Amir Omidi <amomidi@microsoft.com>
Co-authored-by: Leila Lali <llali@microsoft.com>
Co-authored-by: Brian Bergeron <brian.e.bergeron@gmail.com>
Co-authored-by: Brian Bergeron <brberger@microsoft.com>
Co-authored-by: Udeesha Gautam <46980425+udeeshagautam@users.noreply.github.com>
Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com>
2020-07-31 17:57:46 -07:00
Cory Rivera
047c51921b Exclude Spark notebook kernels when running on SAW devices. (#11416) 2020-07-20 12:36:40 -07:00
ADS Merger
9d3f12d0b7 Merge from vscode 1b314ab317fbff7d799b21754326b7d849889ceb 2020-07-15 23:51:18 +00:00
Arvind Ranasaria
f8f64340f6 New tests for NotebookServiceImpl module (#11250)
* Working tests Upto 97.5% coverage

* pr feedback

* pr feedback

* pr feedback and test bug fixes + 1 new test

* revert debug change
2020-07-14 23:08:58 -07:00
Chris LaFreniere
061d3510b9 Run ADS Commands from Notebooks (#11069)
* Run commands

* cleanup

* Plumbed through error and message output

* undo unnecessary changes

* Remove change to fix tests

* pr feedback
2020-06-28 21:17:50 -07:00
Hale Rankin
7ef8acf04e Markdown toolbar > Preview toggle feature (#10963)
* Added toggle preview button to Markdown toolbar. Revised components, theme and styles to present the preview as a second column beside the markdown.

* Added showPreview to model and began working on togglePreview.

* Uncommented use of cellModel.showPreview

* add cell model event for onPreviewChange

* Renamed my showPreview boolean to prevent confusion with local boolean used in toogglePreview.

* Added CSS class when preview is enabled. Adjusted styles accordingly.

* Swapped icon show/hide references for correct sequence. Modified updatePreview to include state of doShowPreview.

* Added check for isEditMode so we can run togglePreview and show it once editor closes.

* Added listener to code.component that triggers layoutEmitter on changes to peview.

* Renamed local boolean doShowPreview. Removed unneeded code. Fixed ambiguity in my use of booleans, adding a getter and setter to textCell.

* Cleaned up implementation of new get/set for toggling preview.

Co-authored-by: chlafreniere <hichise@gmail.com>
2020-06-26 13:47:17 -07:00
Maddy
26a00696d4 Fix/prev next links issue (#10523)
* intital test code

* added tests

* remove commented code

* fix for failing tests

* reuse exported enum

* changes to address comments

* add back onVisibility highlight

* port highlight fix from Chris

* fix tests
2020-06-12 18:42:17 -07:00
Cory Rivera
59575aa305 Wait for clientSession to become available before running a cell. (#10796) 2020-06-09 05:30:13 -07:00
Anthony Dresser
7d53e744f3 fix imports 2020-05-31 13:08:12 -07:00
Hale Rankin
b2e0291a95 10551 - Notebook UI: Added cell toolbar component (#10558)
* 10551 - Notebook UI: Added cell toolbar component, actions scaffolding, styles and theme colors. Removed markup for legacy, hidden hover buttons. Updated instaces of icon class: mask to masked-icon.

* Uncommented lines for CellToggleMoreActions so we can see how the ellipses currently work.

* Added EditCellAction which toggles between two icons.

* Cleaned up comments and removed some unused code.

* Copied DeleteCellAction into celltoolbarActions

* Connecting model and cell model to toolbar component for necessary context.

* Pass in cell + nb model from notebook component

* Adding context for EditCellAction so we can activate a cell via icon.

* Removed my copy of AddCellAction and simply referred to the existing one.

* Fixes to propogate cell model edit mode changes

* Added onCellModeChanged event registration to code.component.

* Moved cellToggleMoreActions into cellToolbarActions. Suppressing ellipses in code and textCell components.

* Fix adding cells

* Copied and modified ToggleMoreWidgetAction for use in cellToolbarActions. Instantiating cellToggleMoreActions and adding to toolbar.

* Removed unused markup, code and styles. Moved cell toolbar template into compoent.

* Removed double-click from textCell. Changed message to indicate where content goes - without it the cell does not have dimension and cannot be found by the user.

* Removed unused code file.

* Fixing my boo boo

* Updated AddCellAction with null coalescer. Set Promise to type: void.

Co-authored-by: chlafreniere <hichise@gmail.com>
2020-05-29 18:27:36 -07:00
Chris LaFreniere
6d710c7144 Add plumbing and simple notebookService tests (#10349) 2020-05-19 21:36:59 -07:00
Cory Rivera
f94a9d0d58 Update Configure Python dialog to allow packages to be installed for specific kernels. (#10286) 2020-05-08 16:02:59 -07:00
Chris LaFreniere
e4614582cd Cleanup nbformat, more common tests (#10311) 2020-05-08 14:50:24 -07:00
Chris LaFreniere
dac1970c43 Notebooks: Refactor Empty Session Classes (#10265)
* Cleanup empty sessionmanager

* Cleanup

* PR Feedback import noKernel from notebookActions
2020-05-07 16:20:14 -07:00
Anthony Dresser
df5df38a55 Query Runner Tests (#10252)
* rework some code and write an inital test

* fix strict

* add more to standard test

* add to existing workflow test

* fix tests

* simplify the code

* add more tests

* remove bad import

* fix compile

* fix timestampiong
2020-05-06 13:38:12 -07:00