Commit Graph

1475 Commits

Author SHA1 Message Date
Charles Gagnon
7d31575149 Fix dropdowns flickering every other time they're opened. The hide message code was being invoked which called hideContextView (the actual dropdown part) even if no message was ever displayed. Now we'll delay setting the message to null and only call hideContextView if we actually had a message to display. (#4528)
Also fixed small issue where messages that didn't have a container would throw an error when trying to call removeClass (since this.element is pulled from the container and thus was undefined.

Tested that the flicker is gone and that messages still show up correctly
2019-03-15 11:19:14 -07:00
Charles Gagnon
7223b28829 Add config for running extension tests (#4495)
* Add .bat for running extension tests (currently only Notebook) and set up launch.json with 2 new launch configs for running & debugging extension tests.

* Rename files to make it clear these aren't the integration tests

* Update launch.config too

* Fix spacing and missed file name update
2019-03-15 09:12:04 -07:00
Anthony Dresser
4014c1d0ab Small strict null checking pass on a few files (#4293)
* fix some null checking

* fix various null strict checks

* move location fo sql files in json

* fix compile and more unused properties

* formatting

* small formatting changes

* readd types

* add comments for angular components

* formatting

* remove any decl
2019-03-14 18:18:32 -07:00
Anthony Dresser
0bf0e795ca More data explorer actions (#4307)
* adding context

* apply extension changes

* shimming disconnect

* add data explorer context menu and add disconnect to it

* clean up shim code; better handle errors

* remove tpromise

* simplify code

* add node context on data explorer

* formatting

* add new Query action

* fix various errors with how the context menus work

* add manage and new query

* add refresh command

* formatting
2019-03-14 17:19:37 -07:00
Kevin Cunnane
0bc3716f74 FIX #4513 Notebook stuck at changing kernel (#4518)
* FIX #4513 Notebook stuck at changing kernel
- Intra-provider kernel change didn't happen because we only tried changing kernel on new session creation.
- Inverted the logic (e.g. did the right thing) and renamed the method so it's clearer what we're doing & what the boolean value should be
- Manually tested all the known scenarios
2019-03-14 15:49:14 -07:00
Alan Ren
ca23ea0f69 use the new dataprotocol client (#4515) 2019-03-14 15:48:49 -07:00
Kevin Cunnane
efaa2c0e3f Fix #4505 Notebooks: New Notebook will not work if existing untitled notebooks are rehydrated (#4506)
* Fix #4505 Notebooks: New Notebook will not work if existing untitled notebooks are rehydrated
* Also fixes #4508
* Unify behavior across New Notebook entry points
- Use Notebook-{n} as the standard in both entry points
- Use SQL as default provider in both
- Ensure both check for other names and only use free number
2019-03-14 14:27:08 -07:00
udeeshagautam
d91f4d5748 Fix for : 4471 Backup/Restore shows in Context Menu for Azure DB (#4498)
* Remove Back Restore from Cloud db's Context menu

* checking for null

* Cleaning up the check
2019-03-14 14:06:11 -07:00
Kevin Cunnane
6f1a03587a Fix #4029 Ensure changeKernels always resolves, even in error states (#4488)
* Fix #4029 Ensure changeKernels always resolves, even in error states
This is necessary to unblock reverting the kernel on canceling  Python install
- startSession now correctly sets up kernel information, since a kernel is loaded there.
- Remove call to change kernel on session initialize. This isn't needed due to refactor
- Handle kernel change failure by attempting to fall back to old kernel
- ExtensionHost $startNewSession now ensures errors are sent across the wire.
- Update AttachTo and Kernel dropdowns so they handle kernel being available. This is needed since other changes mean the session is likely ready before these get going

* Fix to handle python cancel and load existing scenarios
- Made changes to handle failure flow when Python dialog is canceled
- Made changes to handle initial load fail. Kernel and Attach To dropdowns show No Kernel / None and you can choose a kernel
- Added error wrapping in ext host so that string errors make it across and aren't lost.
2019-03-14 13:07:08 -07:00
Matt Irvine
7973f0f178 Disable custom title bar popup on Linux (#4478) 2019-03-14 09:28:19 -07:00
Chris LaFreniere
11f0ca371b Show running state in cell toolbar immediately when cell is run (#4484) 2019-03-13 20:04:46 -07:00
Kevin Cunnane
0131746919 Fix #4452 Notebook is reloaded with wrong kernel (#4480)
* Fix #4452 Notebook is reloaded with wrong kernel
- Await all extension registration before getting providers and providerId
To do this, we need to await way up in the NotebookInput, and promise the model that we'll have values eventually
2019-03-13 20:03:01 -07:00
Chris LaFreniere
5774b1f69a remove ugly border around text cells (#4481) 2019-03-13 19:24:39 -07:00
Cory Rivera
34d36c1de1 Prompt for Python installation after choosing a Jupyter kernel in notebook (#4453) 2019-03-13 18:44:54 -07:00
Chris LaFreniere
cca84e6455 Fix disappearing notebook table (#4466) 2019-03-13 18:32:31 -07:00
Matt Irvine
82ce1ace28 Put back code to refresh tree when capabilities provider gets new capabilities (#4475) 2019-03-13 17:41:29 -07:00
Anthony Dresser
e59d5a766f Enable similarity and locker (#4435)
* turn on similarity

* turn on locker
2019-03-13 16:51:01 -07:00
Anthony Dresser
98a8103f5a fix spacing in yml (#4436) 2019-03-13 16:49:26 -07:00
Alan Ren
81a8593eb6 bump up the extension version for new release (#4456)
* bump up the extension version for new release

* change url for dacpac ext
2019-03-13 15:46:03 -07:00
Anthony Dresser
b6584c9ddf Change shutdown listeners (#4282)
* change shutdown to use proper notification

* change to use storage service

* remove unused imports

* fix test

* change shutdown methods to private

* remove unusde imports

* fix tests

* formatting
2019-03-13 15:15:51 -07:00
Raj
08d4cc9690 #4441:Remove notebook editor - don't save selected (#4449) 2019-03-13 14:25:45 -07:00
kisantia
0565162fde remove broken link from dacpac extension readme (#4448) 2019-03-13 14:03:32 -07:00
Charles Gagnon
31614247cf #3127 #478 Fix 2 Edit Data grid issues (#4429)
* 2 fixes :

1. Fix it so that edits made to a table with a single column will correctly create a new row when done editing. This is done by caching whether the cell is dirty in on the onCellEditEnd callback and then when onCellSelect is called to switch cells we only return early if the cell isn't dirty. Before we were returning early and thus not going into any of the code that creates the new row (submitCurrentCellChange)

2. Fix it so we don't throw an error when deleting the NULL (new) row. As noted in the code this should really be handled by not displaying the context menu to begin with for that row but that's a bit more involved of a fix so for now I'm at least making it not display an error to the user - it'll just do nothing.

Manual testing for now - I tried to add tests but the core logic and the UI layer are too intertwined so this will likely need to be a full end-to-end UI test. I'll continue working on adding some for this dialog but for now I'd like to at least submit these fixes since they're pretty painful to deal with.

* Undo changes to addRow

* Clean up resetCurrentCell and add comment to setCurrentCell

* Use reset method instead of directly initializing currentCell

* Add issue # to comment
2019-03-13 13:52:35 -07:00
Karl Burtram
e9390dcd48 Update "Preview features" notification text (#4444) 2019-03-13 13:50:42 -07:00
Gene Lee
c9b3e2b156 Added 'serverMajorVersion' key to context which is missed currently and caused failure for loading 'Create External Table' menu (#4423) 2019-03-13 13:32:04 -07:00
Anthony Dresser
ace6012c1c Grid scrolling bugs (#4396)
* better maintense of heights in scrollable splitview

* formatting

* fix issue around views resizing messing with render logic

* remove commented code
2019-03-13 11:51:47 -07:00
Chris LaFreniere
17901fbf3d Fix Issue when OE connection Disconnects on Notebook Close (#4425)
* Fix OE connection closing when notebook closes

* handle connections created through Add new connection
2019-03-13 11:32:12 -07:00
udeeshagautam
2c7b5578e7 Bug/3731 results scroll (#4408)
* Bug 3731: Minor issues saving scroll position in results

Fixing the second part i.e. scroll position of results view while switching tabs. The resize call was not respecting the old scrolbar state. Making an explit call to set scroll position  to ensure this sets at the end.
2019-03-13 11:03:41 -07:00
Chris LaFreniere
b2b7d18802 Change Kernels Dropdown to show Switching instead of Loading On Kernel Change (#4426)
Change Kernels Dropdown to show Changing instead of Loading On Kernel Change
2019-03-13 09:59:19 -07:00
Geoff Young
965da0535a Fix sqlDropColumn description (#4422) 2019-03-13 01:06:16 -07:00
Raj
ebd187ec06 #4363: Reopen notebook editors when ADS launched (#4424)
* #4363: Reopen notebook editors when ADS launched

* Code review changes
2019-03-12 23:02:37 -07:00
Kevin Cunnane
b495fb7a37 Add notebook file icon support (#4419)
- Added to both built-in themes. Long term would be good to contribute this back to Seti so it works without a carbon edit tag.
- Issue #4418 tracks remaining problem where for new notebooks it's not set initially. This is blocked by Raj's work so will update once that lands.
2019-03-12 21:23:43 -07:00
David Shiflet
58e5125cde Add scripted object name to query editor tab display (#4403)
* Add scripted object name to query editor tab display

* Update src/sql/parts/query/common/queryInput.ts

Co-Authored-By: shueybubbles <shueybubbles@hotmail.com>
2019-03-12 22:07:11 -04:00
Anthony Dresser
dadfbd2ddb add check to remove errors (#4412) 2019-03-12 15:32:41 -07:00
Charles Gagnon
9fdeec6128 #3224 Fix extra connections populating MRU List (#4368)
* Modify where we add active connections so that we can use the saveTheConnection option to decide whether to add a connection to the MRU. This was necessary because the old location was called from onConnectionComplete which is sent by the SqlToolsService - and that doesn't get any UI related information like the options. The new location is still only called after the connection completes and will be added only if the connection succeeds.

Added new test and updated existing tests to handle new logic (plus a bit of async-refactoring).

* Fix couple spacing issues

* Add logic back in to short-circuit if we already have the connection in the active connections list.

* Fix spaces -> tabs
2019-03-12 14:05:50 -07:00
Matt Irvine
e783aeab66 Use max column width when auto-sizing columns (#4394) 2019-03-12 14:03:37 -07:00
Karl Burtram
53a94cc7bb Revert SQL Tools Service to 1.5.0-alpha.71 (#4413) 2019-03-12 13:38:44 -07:00
Anthony Dresser
839a9b6cb8 move event to better understand when things are happening (#4393) 2019-03-12 13:19:08 -07:00
Anthony Dresser
2557d77ae3 readd row height; add font styles to message panel as well (#4388) 2019-03-12 13:18:25 -07:00
Raj
6a7df2f1ae Adding back save api (#4407)
* #4339: Kernel change event occurs after model load

* #4347: Code cleanup - Notebooks Save

* Remove save method from sqlops

* Adding save method to api's

* Adding save method to ext host

* Misc change
2019-03-12 13:07:10 -07:00
Maddy
2db83b3892 Added localizie for the warning string (#4411) 2019-03-12 13:06:16 -07:00
Yurong He
08c7cc0918 Fixed #4384 add await on disconnect (#4389)
* Fixed #4384 add await on disconnect

* Resolve PR comment
2019-03-12 13:06:02 -07:00
Kevin Cunnane
d555dcb6d7 Fix minor error in snippet (#4398)
- Found a snippet missing a `,`
2019-03-12 12:14:24 -07:00
Kevin Cunnane
7226f25c67 Fix #4356 New Notebook from connection doesn't connect (#4364)
* Fix #4356 New Notebook from connection doesn't connect
Fix new notebook error by passing profile instead of ID.
- I could've just sent the ID over, but this fix sets the stage for disconnected connections to work (since we have enough info to properly connect).
- There's a bug in NotebookModel blocking the disconnected connection part working, but Yurong's in progress fixes will unblock this. Hence checking in as-is and working to properly unblock once that's in.

* Support connection profile in commandline service
- Added new context API for things that want to work on commandline and object explorer
- Refactored commandlineservice slightly to be async & have a simpler execution flow (far fewer if/else statements)

* Fix unit tests
- Fixed 2 issues raised by tests (sholdn't do new query if no profile passed, shouldn't error on new query failing)
- Updated unit tests to pass as expected given changes to the APIs.
2019-03-12 12:14:08 -07:00
Maddy
77a3be6fd7 pulling max bytes of data through the webhdfs api (#4314)
* pulling max bytes of data through the webhdfs api

* Added warning message for the Users to inform the data truncation.

* Updated the warning message on the notification flyer.
2019-03-12 10:38:34 -07:00
Raj
2397df7f22 #4339: Kernel change event occurs after model load (#4366) 2019-03-12 08:21:00 -07:00
Yurong He
118d2c7273 Fix #4047 Redesign notebook model to handle single client session (#4371)
* 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
2019-03-11 17:59:13 -07:00
David Shiflet
b44d2b1bb3 Re-enabled command line service tests (#4387) 2019-03-11 19:31:11 -04:00
Chris LaFreniere
9867d88067 check for changeRef not destroyed before detecting changes (#4385) 2019-03-11 14:23:37 -07:00
Chris LaFreniere
037c49e2c6 Warning for table max rows displayed (#4357)
* Warning for top rows

* change single to double quotes when calling localize method
2019-03-08 19:01:21 -08:00