Commit Graph

964 Commits

Author SHA1 Message Date
Raj
6873353cd4 #4618: Notebook JSON has extra } after save (#4627) 2019-03-20 11:12:02 -07:00
Anthony Dresser
c814b92557 VSCode merge (#4610)
* Merge from vscode e388c734f30757875976c7e326d6cfeee77710de

* fix yarn lcoks

* remove small issue
2019-03-20 10:39:09 -07:00
Anthony Dresser
87765e8673 Vscode merge (#4582)
* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
2019-03-19 17:44:35 -07:00
Raj
833d197412 #3973: Persist scroll position when tab notebooks (#4531)
* #3973: Persist scroll position when tab notebooks

* Remove getter and setter
2019-03-19 14:01:24 -07:00
Charles Gagnon
330fb6dff5 Remove tooltip from editable dropdown (#4542)
* Fix our custom dropdown control to update the tooltip text correctly when a new value is selected. Previous behavior was to always keep the initial text (<Default> for example). Now we'll update it as appropriate (and default back to Placeholder text when we're clearing the value)

* Spaces -> tabs

* Remove extra ;

* Remove tooltips from the text box part of the dropdown

* Remove tooltips from dropdown arrows

* Revert "Remove tooltips from dropdown arrows"

This reverts commit 31a0748aaea42d5009eb9752bd075ce49a6716f5.
2019-03-19 13:46:36 -07:00
Raj
6d7d485a38 #4331: Set notebook dirty when change 'trusted' (#4569) 2019-03-18 10:56:04 -07:00
Chris LaFreniere
9313140c59 Fix install packages not always showing on startup (#4566) 2019-03-18 10:18:03 -07:00
Raj
25b1d4b673 #4565: Open notebook from Dashboard - can't close dirty notebook (#4568)
* #4565:"Don't save" doesn't close editor -Dashboard

* Misc change
2019-03-17 08:03:43 -07:00
Chris LaFreniere
b9d0602f55 Only show filename for notebook titlebar when opening from Open Notebook (#4556) 2019-03-15 17:45:06 -07:00
Charles Gagnon
ec0a3bbc95 Fix recent connections list to use <default> DB if no DB is specified by the user when a connection is made (#4564) 2019-03-15 17:28:56 -07:00
Raj
cb47cb7dbf #4365: Make notebook dirty when changing kernel (#4547) 2019-03-15 17:02:00 -07:00
Karl Burtram
ba6b8b1f69 Fix Azure account picker row height 2019-03-15 15:29:25 -07:00
Alan Ren
5caf0b02f0 make connectiondialog react to provider event (#4544)
* make connectiondialog react to provider event

* fix unit test error

* code review comments
2019-03-15 14:47:23 -07:00
Matt Irvine
86bac90001 Merge VS Code 1.31.1 (#4283) 2019-03-15 13:09:45 -07:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Chris LaFreniere
1e989060f9 Rewrite Spark UI link when using unified connection (#4362)
* Rewrite Spark UI link when using unified connection

* Add more robust error checking
2019-03-08 17:34:47 -08:00