Commit Graph

127 Commits

Author SHA1 Message Date
Lucy Zhang
43bd7268e8 hide nav buttons for non-book notebooks (#6377)
* hide nav buttons for non-book notebooks

* updated buttons for all themes

* changed foregroundColor to buttonForegroundColor
2019-07-16 16:26:03 -07:00
Anthony Dresser
0b7e7ddbf9 Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
2019-07-15 22:35:46 -07:00
Lucy Zhang
a706ff4d5b Books/navigation (#6280)
* added previous and next buttons

* previous and next notebook API

* links for prev/next notebooks

* fixed first and last pages

* made code more readable

* addressed Kevin's comments

* moved logic over to BookTreeItem

* show buttons in dev mode only

* added BookTreeItemFormat interface

* added interface and enum

* removed localize call
2019-07-12 10:18:46 -07:00
Kevin Cunnane
aef74c6d5a Fix #5238 Notebooks should support relative links (#6289)
* Fix #5238 Notebooks should support relative links
- Added detection of relative #links inside notebooks
- Added handling of these, at least for current notebook

Not handled: open other notebook & scroll to position.
2019-07-09 14:30:57 -07:00
Kevin Cunnane
10b066d300 Share Notebook grid rendering with Query editor (#6241)
This is a staged refactor to use the exact same grid logic in the Notebook and query editors, including context menu support, font settings, and sizing logic. The goal long term is:
- As the core Query grid is updated, Notebook can benefit from the changes
- As we add in support for contributions like new buttons & actions working on the grid, can share the logic
- Ideally if and when we refactor things like the action bar for grid results, we can apply in both places though this is TBD.

Fixes a number of issues:
- Fixes #5755 Grids don't respond to font settings. @anthonydresser can we remove setting from each query results editor and just use Notebook Styles since these are global (not scoped) settings?
- Fixes #5501 Copy from grid settings. 
- Fixes #4938 SQL Notebook result sets are missing the actions provide for SQL File results sets. this now has the core ability to solve this, and separate work items for specific asks (serialization, charting) are tracked.

Currently hidden:
- Save as... options in context menu
- All right toolbar actions (save as, chart).

Remaining issues to address in future commits:
- Need to implement support for serialization (#5137). 
- Need to add charting support
- Need to solve the layout of buttons on the right hand side when a small number of columns are output. It doesn't look right that buttons are so far away from the results
  - Will work with UX on this. For now, mitigating this by hiding all buttons, but will need to solve in the future
- Would like to make buttons contributable via extension, but need to refactor similar to ObjectExplorer context menu so that we can serialize context menu options across to extension host while still having internal actions with full support
2019-07-03 14:34:03 -07:00
Anthony Dresser
f19f21d547 use file service for insights (#6248) 2019-07-03 13:45:19 -07:00
Chris LaFreniere
c4bf1b4180 Notebooks: Run all after/before (#6239)
* Run all above/below

* PR comments pre tests

* Added integration test
2019-07-02 16:49:12 -07:00
Aditya Bist
678b2737bd CMS - SQL Login (#5989)
* initial SQL Login with save password working

* fix switching auth types

* remove metadata from package file

* allow editing connections for unsaved password connections

* review comments

* change thenables to async/awaits

* review comments

* changed thenables to promises

* remove authTypeChanged bool

* removed unused import

* review comments

* removed try catches

* cr comments

* review comments
2019-07-01 11:40:11 -07:00
Alan Ren
f39647f243 add save/load filter feature to profiler (#6170)
* save/load profiler filter

* add role for custom buttons
2019-06-26 23:55:03 -07:00
Chris LaFreniere
77fb060fde Notebooks: Add Command + Keyboard Shortcut to Clear Outputs of Active Cell (#6169)
* Add command to clear cell output with test

* Fix typo

* PR Comments
2019-06-26 15:19:12 -07:00
Alan Ren
ac76302d6c Filter templates by supported engine type (#6133)
* Filter templates by supported engine type

* fix the azure sql db name
2019-06-24 23:37:56 -07:00
Charles Gagnon
373c3488bb Fix Add Azure Account dialog constantly reappearing (#6048) 2019-06-18 21:48:11 +00:00
Charles Gagnon
9e7282d16a Connection dialog cleanup (#6076)
* Update names to be clearer and remove some unnecessary code

* Remove unused/inaccurate CMS display name value
2019-06-18 21:33:21 +00:00
Charles Gagnon
59b0e6737f Update provider correctly when showing the dialog (#5995) 2019-06-17 15:32:36 +00:00
Karl Burtram
5a7562a37b Revert "Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)" (#5983)
This reverts commit d15a3fcc98.
2019-06-11 12:35:58 -07:00
Chris LaFreniere
d15a3fcc98 Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d (#5949)
* Merge from vscode 81d7885dc2e9dc617e1522697a2966bc4025a45d

* Fix vs unit tests and hygiene issue

* Fix strict null check issue
2019-06-10 18:27:09 -07:00
Charles Gagnon
673ecc3870 Change hardcoded MSSQL provider name to use constant instead (#5953) 2019-06-10 18:10:39 +00:00
Kevin Cunnane
44d6bb66da Add saved and executed events to notebook changed (#5848)
- Updated the notebook API to add a change kind, and support saved, executed and other simplified status
- Plumbed this through to the main thread classes
- Support sending the events from cell / input to the notebook model so they loop over the extension host as a content changed event
- Add executed event from the cell
2019-06-05 16:34:26 -07:00
Aditya Bist
685a608518 Make sure the first Connection Dialog has correct provider. (#5884)
* force a restart for cms

* remove unneeded existing conditional

* fix for random provider when opening a connection dialog
2019-06-04 17:11:36 -07:00
Aditya Bist
6197279e83 remove SQL Login from CMS and add error messages (#5873) 2019-06-04 12:52:46 -07:00
Aditya Bist
1773dede25 CMS fit and finish (#5542)
* cms connections dont save

* added value to enum

* remove refresh and update provider name for cms

* removed ownerUri from saved connection and contributed to array

* removed owneruri

* ownerUri not needed any more

* removed AAD from cms

* initial review

* changed comments

* add back saveProfile option for connectionProfile

* review fixes and other UI improvements

* fixed auth

* added cms integration tests

* added constants

* removed utils from apiwrapper

* changed connection type name

* review comments

* clearer code and addressed reviews
2019-05-31 11:14:37 -07:00
Kevin Cunnane
ae0603c041 Improve Azure startup time and fix command palette (#5761)
* Improve Azure startup time and fix command palette
- Improvement (but not full fix) for #4732 where Azure startup is very slow.
This speeds the startup by up to 5 seconds by
  - Changing from fixed 5 second initial wait time to a promise to check for accounts
  - Using the accounts changed notification to send a message when accounts are ready. This is usually what will "win out" since Azure seems to load before the Account Providers are set up.
- Remove right-click actions from the command palette.
- Rename Azure actions so it's clear what they are in the command palette.

* Remove coveralls task while investigating how to make optional task

* Add void return type
2019-05-31 10:22:01 -07:00
Kevin Cunnane
a364af5c4c Fix #5765 Trusted state handling (#5775)
- Notebooks Can be Improperly Trusted After Save + Reopen
Fix was to only save if actually trusted.
Also fixed condition where it wasn't correctly skipping if in the queue
2019-05-31 10:21:30 -07:00
udeeshagautam
c4e59027fc Backup to open correctly from insights dialog (#5737)
* recreate modal dialog button to ensure onDidClick works properly

* fixing comment message

* Adding PR comments
2019-05-30 12:32:38 -07:00
Anthony Dresser
f8ccafd2af Add focus logic to the tabbed panel (#5649)
* add focus logic to the tabbed panel

* change enter to be on key up

* fix  tests
2019-05-28 12:44:22 -07:00
Anthony Dresser
b4cce9f147 adjust modals for title bar (#5648) 2019-05-27 14:40:16 -07:00
Anthony Dresser
aae1480e4f Allow data explorer to use connect (#5564)
* wip

* handle save password; get correct profile

* ensure resolve is being called

* fix tests

* fix more tests
2019-05-23 11:44:18 -07:00
Anthony Dresser
5e8a52bcc0 Query Editor Refactor (#5528)
* query editor changes

* query editor changes

* finish converting query editor

* fix merge issue

* remove unused code

* fix tests

* fix tests

* remove editor context key class

* edit tests to test input state
2019-05-23 11:43:59 -07:00
Anthony Dresser
81ae86ff79 Revert "Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)" (#5562)
This reverts commit c9a4f8f664.
2019-05-21 14:19:32 -07:00
Anthony Dresser
c9a4f8f664 Revert "Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529)" (#5553)
This reverts commit 5d44b6a6a7.
2019-05-20 17:07:32 -07:00
Anthony Dresser
5d44b6a6a7 Merge from vscode ada4bddb8edc69eea6ebaaa0e88c5f903cbd43d8 (#5529) 2019-05-19 18:52:19 -07:00
Kevin Cunnane
8ea831c845 Fix #3439 Trusted doesn't get saved in Notebooks (#5507)
* Fix #3439 Trusted doesn't get saved in Notebooks
The main fix is to add a memento to store trust information. This is only needed for saved files - untitled files are always trusted as the user created them.
On clicking trusted or saving a file, the trusted state is cached. In the future, we will also handle code execution here too by sending notification on snapshot state.
I found issue #5506 during testing - existing issue where we should track trusted state changing on run. In the case all cells are ran, the whole notebook should become trusted.

Finally, I did a decent amount of refactoring to move more logic to the model - removing unnecessary calls from components which duplicated model behavior, moving trust notification to the model or at least the notebook service completely.

Added tests and logging for catch handling
2019-05-17 11:56:47 -07:00
Charles Gagnon
ca2b7cc4bc Remove unnecessary 'use strict' lines and add hygiene check (#5363)
* Remove unnecessary 'use strict' lines and add hygiene check for them

* Move check to under tslint filters to reduce number of filters needed

* Only take first 10 lines of file
2019-05-07 22:57:08 -07:00
Anthony Dresser
4551ba5b7c update notebooks to use new message event (#5395) 2019-05-07 13:03:58 -07:00
Anthony Dresser
c6564c0d84 Fix css to fix new dashboard tab dialog (#5385)
* fix css to fix new dashboard tab dialog

* add readonly
2019-05-06 17:25:51 -07:00
Kevin Cunnane
022761aa4b Fix #4089 Linked account cancel (#5347)
VSCode serialization changed rejection handling to only serialize errors, which caused things to break
- Changed to return either account info or a cancel message in the resolve
- Rewrote to use promises. Tracking how to return canceled through 4+ thenables was way trickier than just using a promise
- Updated unit tests to handle new scenario
- Tested integration tests, realized they a) didn't run and b) didn't passed. 
  - Added vscode dev dependency to fix run issue
  - Fixed tests to account for behavior changes in tree state.
2019-05-06 09:13:03 -07:00
Anthony Dresser
b9d985b663 remove event emitter and use event and emitter instead (#5361) 2019-05-06 00:27:55 -07:00
Anthony Dresser
ab0cd71d10 Remove logging and clone utlities (#5309)
* remove log utility functions; remove custom mixin

* fix tests

* add log service as required by telemetry utils

* remove unused code

* replace some console.logs with logservice
2019-05-04 22:37:15 -07:00
Anthony Dresser
db387eb770 Fixing the layering in the base folder (#5308)
* removes more builder references

* remove builder from profiler

* formatting

* fix profiler dailog

* remove builder from oatuhdialog

* remove the rest of builder references

* formatting

* add more strict null checks to base

* enable strict tslint rules

* code layering of base

* wip

* working through changes to table data view

* fix tests

* update editabledropdown to not use layout service

* wip

* fix imports

* fix import

* fix compile error

* add more localization

* add comments to changes to import patterns

* add more import comments
2019-05-03 14:49:18 -07:00
Aditya Bist
a69f194d8b Fixed CMS connection auth (#5306)
* fixed auth change to reflect in UI

* added comments

* fix bug where cms shows in dropdown

* added parameter to parent call
2019-05-03 13:26:04 -07:00
Alan Ren
16ebb4322a fix insights dialog issue (#5336) 2019-05-02 18:13:33 -07:00
Charles Gagnon
b6e49f2bc0 Fix connections from editor not saving to MRU (#5328) 2019-05-02 16:08:46 -07:00
Anthony Dresser
48682bacde rework panel to not need platform (#5270) 2019-04-30 13:19:21 -07:00
Aditya Bist
f70369c2a6 Fix object explorer session fails (#5256)
* only start session if response successful

* added return type

* fixed OE tests

* format doc
2019-04-30 11:45:52 -07:00
Anthony Dresser
56342af140 Rework editableDropdown to not need platform (#5189)
* rework editableDropdown to not need platform

* rework editable dropdown to not depend on platform

* fix compile

* fix focus bluring
2019-04-30 09:25:04 -07:00
Aditya Bist
39772c2dbe CMS Extension - 2 (#4908)
* 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
2019-04-29 15:16:59 -07:00
David Shiflet
cbf3ca726f Connect opened query editors to the server (#5207)
* Connect opened query editors to the ser

* only show firewall rule error for one file

* remove unused imports

* sync to latest

* add comment

* one more comment
2019-04-29 13:10:19 -04:00
Anthony Dresser
ca98ef879d Last of the layering (#5187)
* layer query

* update imports
2019-04-26 15:30:41 -07:00
Yurong He
e822091907 Only when the connection is connected, then do disconnect. (#5170) 2019-04-23 19:03:49 -07:00
Yurong He
e8b4c03770 Fixed #4772 create unique connection for each notebook by using noteb… (#5163)
* Fixed #4772 create unique connection for each notebook by using notebook path as uri
Disconnect sqlConnection from SqlKernel to ensure no connection left after the notebook is closed.

* SqlSessionManager is ADS level manager

* Moved path to SqlKernel constructor
2019-04-23 16:42:28 -07:00