* Add standin region selection to settings menu.
* Retrieve read and write regions from user context and populate dropdown menu. Update local storage value.
Need to now connect with updating read region of primary cosmos client.
* Change to only selecting region for cosmos client. Not setting up separate read and write clients.
* Add read and write endpoint logging to cosmos client.
* Pass changing endpoint from settings menu to client. Encountered token issues using new endpoint in client.
* Rough implementation of region selection of endpoint for cosmos client. Still need to:
1 - Use separate context var to track selected region. Directly updating database account context throws off token generation by acquireMSALTokenForAccount
2 - Remove href overrides in acquireMSALTokenForAccount.
* Update region selection to include global endpoint and generate a unique list of read and write endpoints.
Need to continue with clearing out selected endpoint when global is selected again.
Write operations stall when read region is selected even though 403 returned when region rejects operation.
Need to limit feature availablility to nosql, table, gremlin (maybe).
* Update cosmos client to fix bug.
Clients continuously generate after changing RBAC setting.
* Swapping back to default endpoint value.
* Rebase on client refresh bug fix.
* Enable region selection for NoSql, Table, Gremlin
* Add logic to reset regional endpoint when global is selected.
* Fix state changing when selecting region or resetting to global.
* Rough implementation of configuring regional endpoint when DE is loaded in portal or hosted with AAD/Entra auth.
* Ininitial attempt at adding error handling, but still having issues with errors caught at proxy plugin.
* Added rough error handling in local requestPlugin used in local environments. Passes new error to calling code.
Might need to add specific error handling for request plugin to the handleError class.
* Change how request plugin returns error so existing error handling utility can process and present error.
* Only enable region selection for nosql accounts.
* Limit region selection to portal and hosted AAD auth. SQL accounts only. Could possibly enable on table and gremlin later.
* Update error handling to account for generic error code.
* Refactor error code extraction.
* Update test snapshots and remove unneeded logging.
* Change error handling to use only the message rather than casting to any.
* Clean up debug logging in cosmos client.
* Remove unused storage keys.
* Use endpoint instead of region name to track selected region. Prevents having to do endpoint lookups.
* Add initial button state update depending on region selection.
Need to update with the API and react to user context changes.
* Disable CRUD buttons when read region selected.
* Default to write enabled in react.
* Disable query saving when read region is selected.
* Patch clientWidth error on conflicts tab.
* Resolve merge conflicts from rebase.
* Make sure proxy endpoints return in all cases.
* Remove excess client logging and match main for ConflictsTab.
* Cleaning up logging and fixing endpoint discovery bug.
* Fix formatting.
* Reformatting if statements with preferred formatting.
* Migrate region selection to local persistence. Fixes account swapping bug.
TODO: Inspect better way to reset interface elements when deleteAllStates is called. Need to react to regional endpoint being reset.
* Relocate resetting interface context to helper function.
* Remove legacy state storage for regional endpoint selection.
* Laurent suggestion updates.
* Implement fabric native path
* Fix default values to work with current fabric clients
* Fix Fabric native mode
* Fix unit test
* export Fabric context
* Dynamically close Home tab for Mirrored databases in Fabric rather than conditional init (which doesn't work for Native)
* For Fabric native, don't show "Delete Database" in context menu and reading databases should return the database from the context.
* Update to V3 messaging
* For data plane operations, skip ARM for Fabric native. Refine the tests for fabric to make the distinction between mirrored key, mirrored AAD and native. Fix FabricUtil to strict compile.
* Add support for refreshing access tokens
* Buf fix: don't wait for refresh is async
* Fix format
* Fix strict compile issue
---------
Co-authored-by: Laurent Nguyen <languye@microsoft.com>
* Default to new backend endpoint if the endpoint in current context does not match existing set in constants.
* Remove some env references.
* Added comments with reasoning for selecting new backend by default.
* Update comment.
* Remove all references to useNewPortalBackendEndpoint now that old backend is disabled in all environments.
* Resolve lint issues.
* Removed references to old backend from Cassandra and Mongo Apis
* fix unit tests
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Removed NPS Survey from DE since it has been moved to the Overview Blade
* Added ExplorerBindings back
* Moved applyExplorerBindings back to original place
* Persist query multiple query texts
* Save multiple query tab histories
* Save and restore states for QueryTab and DocumentsTab for SQL and Mongo
* Enable Collection Scale/Settings restore
* Persist documents tab current filter
* Fix DocumentsTab conflict resolve mistake
* Remove unused variable
* Fix e2e test
* Fix e2e localStorage reference
* Try clearing local storage via playwright page
* Clear local storage after opening page
* Move restore flag behind feature flag. Whitelist restorable tabs in for Fabric. Restore e2e tests.
* Fix typo
* Fix: avoid setting undefined for preferredSize for the <Allotment.Pane>
* Add comments
* Move restore tabs after knockout configure step from Explorer constructor (which could be called multiple times)
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Remove unnecessary code
* Remove unnecessary code
* Add code to fix VCoreMongo/PG bug
* Address feedback
* Add more logs for RBAC feature
* Add more logs for RBAC features
* Add AAD endpoints for all environments
* Add AAD endpoints
* Run npm format
* Support multi-tenant switching for Data Plane RBAC
* Remove tenantID duplicates
---------
Co-authored-by: Senthamil Sindhu <sindhuba@microsoft.com>
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Remove unnecessary code
* Remove unnecessary code
* Add code to fix VCoreMongo/PG bug
* Address feedback
* Add more logs for RBAC feature
* Add more logs for RBAC features
* Add AAD endpoints for all environments
* Add AAD endpoints
* Run npm format
* Support multi-tenant switching for Data plane RBAC
* Run npm format
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* [accessibility-2262594]: [Keyboard Navigation - Azure Cosmos DB - Data Explorer]: Keyboard focus is not retaining back to 'more' button after closing 'Delete container' dialog.
* Optimize closeSidePanel: add timeout cleanup to prevent memory leaks and ensure proper focus behavior
---------
Co-authored-by: Satyapriya Bai <v-satybai@microsoft.com>
* Add a silent parameter to acquireTokenWithMsal
If true, the function won't retry to sign in using a Popup if silent token acquisition fails.
* Improve Login for Entra ID RBAC button logic
Try to reuse an existing signed-in MSAL account to get the AAD token
and fall back to full sign-in otherwise.
Also move the logic to AuthorizationUtils
* Try to acquire an Entra ID token silently on startup.
When running in Portal MSAL should be able to reuse the
MSAL account from Portal and allow us to silently get
the RBAC token. If it fails we'll show the Login for Entry ID RBAC
button as usual.
* Small code improvements
* Remove the RBAC notice from settings pane
and try to acquire RBAC token silently after enabling RBAC.
* Use msal.ssoSilent with an optional login hint
to avoid more sign-in popups.
msal.loginPopup will be used as a backup option if ssoSilent fails.
Ideally the parent environment (Portal/Fabric) should send
a loginHint with the username of the currently signed in user that
can be passed to the token acquisition flow.
* Improve RBAC error wording, clarifying where to find the Login button.
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Remove unnecessary code
* Remove unnecessary code
* Add code to fix VCoreMongo/PG bug
* Address feedback
* Add more logs for RBAC feature
* Add more logs for RBAC features
* Add AAD endpoints for all environments
* Add AAD endpoints
* Run npm format
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* start redesign work
* add left padding to all tree nodes
* fiddling with padding
* align tab bar line with first item in resource tree
* final touch ups
* fix a strange password manager autofill prompt
* add keyboard shortcuts
* revert testing change
* nudge messagebar to layout row height
* tidy up
* switch to Allotment to stop ResizeObserver issues with monaco
* refmt and fix lints
* fabric touch-ups
* update snapshots
* remove explicit react-icons dependency
* reinstall packages
* remove background from FluentProvider
* fix alignment of message bar
* undo temporary workaround
* restore refresh button
* fix e2e tests and reformat
* fix compiler error
* remove uiw/react-split
* uncomment selection change on expand
* Upgrade typescript to 4.9.5
* Fix compile issue and put back files in tsconfig.strict.json
* Update test snapshots
* Fix jest tests by upgrading jest and other related packages.
* Attempt to fix playwright test
* Revert "Attempt to fix playwright test"
This reverts commit 8293f34c9ce3901eb160a56526c59e3d3e1e343e.
* 2nd attempt to fix example test
* fix waitFor in playwright
* Remove unused describe section
* Attempt to fix e2e test
* Revert "Attempt to fix e2e test"
This reverts commit 9745bcd2efccf92e33e62e4563349cb76e6236de.
* Upgrade playwright to latest
* Revert "Upgrade playwright to latest"
This reverts commit e2ea1d01895f9db157a92a5167a7865b7cc43266.
* Error test on e2e
* Revert "Error test on e2e"
This reverts commit 124e3764f72fff70df9cc1a2e93d12faa7b507e9.
* Try to select dropdown item by xpath selector
* Revert "Try to select dropdown item by xpath selector"
This reverts commit 8eb42a64e23cee589a7c0a809c039ecc7867b7ba.
* Attempt to wait until page is fully loaded
* Revert "Attempt to wait until page is fully loaded"
This reverts commit bb43fcea6e71e593f7d1a3e374e9f1d57052ab70.
* Use playwright selectOption to select dropdown option
* Revert "Use playwright selectOption to select dropdown option"
This reverts commit daa8cd09304f68093df2d94f4bd1139cb367465a.
* Select dropdown option with playwright api instead of manual click
* c7ab4c7ecf7b05f32a85568bce1a667ad8c62703Revert "Select dropdown option with playwright api instead of manual click"
This reverts commit c7ab4c7ecf7b05f32a85568bce1a667ad8c62703.
* Wait for 5s after dropdown click
* Revert "Wait for 5s after dropdown click"
This reverts commit 847e9ad33fbfac99a947fc088e1c8c1c14c57853.
* Try forcing click
* Revert "Try forcing click"
This reverts commit 29b9fa1bda18dd3aba7853b20c6215d971bc826a.
* Force click on the dropdown and set viewport size bigger.
* Force click on the dropdown and set viewport size bigger.
* try force clicking option
* Skip container test on webkit
* Add branded browsers to e2e tests
---------
Co-authored-by: Ashley Stanton-Nurse <ashleyst@microsoft.com>
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Remove unnecessary code
* Remove unnecessary code
* Add code to fix VCoreMongo/PG bug
* Address feedback
* Add more logs for RBAC feature
* Add more logs for RBAC features
* Add readOnlyKeys call for accounts with Reader role
* Resolve conflicts
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Remove unnecessary code
* Remove unnecessary code
* Add code to fix VCoreMongo/PG bug
* Address feedback
* Add more logs for RBAC feature
* Add more logs for RBAC features
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Address errors and checks
* Cleanup DP RBAC code
* Run format
* Fix unit tests
* Remove unnecessary code
* Run npm format
* Fix enableAadDataPlane feature flag behavior
* Fix enable AAD dataplane feature flag behavior
* Address feedback comments
* Minor fix
* Add new fixes
* Fix Tables test
* Run npm format
* Address Local storage default setting issue
* Run npm format
* Address lint error
* Run format
* Address bug in fetching data for Tables Account
* Add fetchAndUpdate Keys
* Add fix for MPAC Tables account issue
* Fix issue with Cosmos Client
* Run np format
* Address bugs
* Remove unused import
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Address errors and checks
* Cleanup DP RBAC code
* Run format
* Fix unit tests
* Remove unnecessary code
* Run npm format
* Fix enableAadDataPlane feature flag behavior
* Fix enable AAD dataplane feature flag behavior
* Address feedback comments
* Minor fix
* Add new fixes
* Fix Tables test
* Run npm format
* Address Local storage default setting issue
* Run npm format
* Address lint error
* Run format
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Fix API endpoint for CassandraProxy query API
* activate Mongo Proxy and Cassandra Proxy in Prod
* Add CP Prod endpoint
* Run npm format and tests
* Revert code
* fix bug that blocked local mongo proxy and cassandra proxy development
* Add prod endpoint
* fix pr check tests
* Remove prod
* Remove prod endpoint
* Remove dev endpoint
* Support data plane RBAC
* Support data plane RBAC
* Add additional changes for Portal RBAC functionality
* Address errors and checks
* Cleanup DP RBAC code
* Run format
* Fix unit tests
* Remove unnecessary code
* Run npm format
* Fix enableAadDataPlane feature flag behavior
* Fix enable AAD dataplane feature flag behavior
* Address feedback comments
* Minor fix
* Add new fixes
* Fix Tables test
* Run npm format
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Update message de->fabric to v3
* Reinstate get authorization token path which doesn't get called every 5 minutes anymore
* Remove obsolete comment
* Add missing types
* Fix format
* Fix build issue
* Revert "Reinstate get authorization token path which doesn't get called every 5 minutes anymore"
This reverts commit a3f3511043201c8824989df04fd2ad813b88bd9e.
* Keep 3 old fabric message types enums for compatibility with the portal
* Re-add warning comment about not changing existing message type enums
---------
Co-authored-by: Laurent Nguyen <languye@microsoft.com>
* Fix initial container loading in Fabric
There is a rendering issue where the documents table doesn't resize properly if explorer is loaded in the beackground (invisible).
To workaround this, track DE visibility from Fabric RPC and open the first container only once DE becomes visible. If DE has been already shown, open the container right away.
* Preserve glitchy behavior if Fabric UX doesn't send isVisible
* Preserve Fabric visibility in global status
and fix a race condition where visibility might change during initialization.
* add feedback policies integration with copilot
* remove teaching bubble and welcome modal
* force prod phoenix endpoint in MPAC
* force prod phoenix endpoint in MPAC
* Mostly working - some cosmetic changes remaining.
* Cosmetic changes and other tidy ups.
* More clean up.
* Move msal back to dependencies. Fix typo.
* msal should be prod dependency
* Revert msal package update as it is causing issues with unit test
execution.
* Add tracing for unhandled exceptions when acquiring tokens.
* Mongo Proxy backend API
* merge main into current
* allow mongo proxy endpoints to be constants
* allow mongo proxy endpoints to be constants
* fix test
* show ip address warning for Mongo and Cassandra accounts
* show ip address warning for Mongo and Cassandra accounts
* removed string from prod
* make mongo proxy endpoint mandatory
* added MongoProxyEndpointsV2
* added MongoProxyEndpointsV2
* moved mongo and cassandra endpoints to Constants
* moved mongo and cassandra endpoints to Constants
* moved mongo and cassandra endpoints to Constants
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* initial commit
* Add change partition key logic
* Update snapshot
* Update snapshot
* Update snapshot
* Update snapshot
* Cleanup code
* Disable Change on progress job
* add the database information in the panel
* add the database information in the panel
* clear in progress message and remove large partition key row
* hide from national cloud
* hide from national cloud
* Add check for public cloud
* Mongo Proxy backend API
* merge main into current
* allow mongo proxy endpoints to be constants
* allow mongo proxy endpoints to be constants
* fix test
* check for allowed mongo proxy endpoint
* check for allowed mongo proxy endpoint
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* Use Promise for allResourceToken fabric message. Cleanup token message handling and add debounce.
* Improve rpc and update initalization flow
* Fix format
* Rev up message names for new version
* Refactor RPC with Fabric
* Build fix
* Fix build
* Fix format
* Update Message types
* Fix format
* Fix comments
* Fabric toolbar style and support to show/hide it (#1720)
* Add Fabric specific Toolbar design
* Add Fabric message to show/hide the Toolbar
* Fix CommandBarUtil formatting
* Update zustand state on setToolbarStatus to trigger a redraw of the command bar with updated visibility
---------
Co-authored-by: Laurent Nguyen <laurent.nguyen@microsoft.com>
* Fix format
---------
Co-authored-by: Vsevolod Kukol <sevoku@microsoft.com>