* Hide entire Accordion of options in Settings Pane
* In PartitionKeyComponent hide "Change partition key" label when read-only.
* Create sample data container with correct pkey
* Add unit tests to PartitionKeyComponent
* Fix format
* fix unit test snapshot
* Add Fabric message to open Settings to given tab id
* Improve syntax on message contract
* Remove "(preview)" in partition key tab title in Settings Tab
* 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.
* [accessibility-3556824] : [Programmatic Access - Azure Cosmos DB- Data Explorer]: Keyboard focus indicator is not visible on controls inside the settings.
* Snapshots updated.
---------
Co-authored-by: Satyapriya Bai <v-satybai@microsoft.com>
* Reset hasDataPlaneRbacSettingChanged back to false after cosmos client is refreshed with new settings.
Dispose of old client before new one is created.
* Update client refresh variable after settings change.
* Only refresh client when related settings are changed.
* Update comparisons in settings menu.
* Remove unnecessary comments.
* Update refresh variable naming.
* Attempting to sync package.json and package-lock.json in CI.
* Remove npm install from CI after successful CI run.
* Only show retry settings with those APIs using the cosmos client -> NoSQL, Table, Gremlin
* 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.
* allow DE to provide clearer error messages for certain conditions
* allow rendeering a "help" link for an error
* use TableCellLayout where possible
* remove RU Threshold banner, now that we have a clearer error
* refmt
* fix QueryError test
* change "RU Threshold" to "RU Limit"
* Use accordion in settingsPane
* Fix format
* Fix format for retry interval
* Fix unit tests
* Cosmetic changes
* Move info tips into accordion section
* Update snapshot
* Infrastructure to save app state
* Save filters
* Replace read/save methods with more generic ones
* Make datalist for filter unique per database/container combination
* Disable saving middle split position for now
* Fix unit tests
* Turn off confusing auto-complete from input box
* Disable tabStateData for now
* Save and restore split position
* Fix replace autocomplete="off" by removing id on Input tag
* Properly set allotment width
* Fix saved percentage
* Save splitter per collection
* Add error handling and telemetry
* Fix compiling issue
* Add ability to delete filter history. Bug fix when hitting Enter on filter input box.
* Replace delete filter modal with dropdown menu
* Add code to remove oldest record if max limit is reached in app state persistence
* Only save new splitter position on drag end (not onchange)
* Add unit tests
* Add Clear all in settings. Update snapshots
* Fix format
* Remove filter delete and keep filter history to a max. Reword clear button and message in settings pane.
* Fix setting button label
* Update test snapshots
* Reword Clear history button text
* Update unit test snapshot
* Enable Settings pane for Fabric, but turn off Rbac dial for Fabric.
* Change union type to enum
* Update src/Shared/AppStatePersistenceUtility.ts
Assert that path does not include slash char.
Co-authored-by: Ashley Stanton-Nurse <ashleyst@microsoft.com>
* Update src/Shared/AppStatePersistenceUtility.ts
Assert that path does not contain slash.
Co-authored-by: Ashley Stanton-Nurse <ashleyst@microsoft.com>
* Fix format
---------
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
* Fix login for Entra ID text
* Address comments
---------
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 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
* 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
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* allow query result view to be toggled from command bar
also provides a default results view option that's stored in the
browser's local storage
* update SettingsPane test snapshot
* Added query retry settings
* prettier run
* Fixed tests and queryDocuments
* Fixed tests
* corrected logic
* Updated tests and logic
* Removed optional flag
* Added default value text
* Reworded text
* moved retry options to CosmosClient
* removed unused references to retryOptions
* Reverting formatting
* reverting
* revert
* prettier run
* Correct default and added options directly to the client
* Prettier run and unit test update
* Corrected tooltip and constant name
* Added inSeconds to WaitTime
* cancel query option
* query timeout
* run prettier
* removed comments
* fixed npm run compile errors
* fixed tests
* fixed unit test errors
* fixed unit test errors
* fixed unit test errors
* fixed unit test errors
* fixed unit test errors
* increased min timeout
* added automatican cancel query option
* added react string format
* npm run format
* added unless automatic cancellation has been enabled
---------
Co-authored-by: Asier Isayas <aisayas@microsoft.com>
* For connection-string based authentication, the request would be made with low priority request header and for AAD based authentication, users can select the priority-request option from the settings panel
* removed unused imports
* prettier checks
---------
Co-authored-by: Faiz Chachiya <faizchachiya@microsoft.com>
* changed the variable enablePriorityBasedThrottling to enablePriorityBasedExecution
* Update the arm client version to '2023-09-15-preview' to fetch the status for the 'enablePriorityBasedExecution' property and performed the respective changes for priority based execution to grab the changes from the DatabaseAccount data model
* formatting changes to all the committed files
* review comments - removed the variable and added the check in the if loop itself
* check style changes
---------
Co-authored-by: Faiz Chachiya <faizchachiya@microsoft.com>
* Execute the queries with high/low priority
* improvement made to the Cosmos client and created separate plugin class for setting priority header
* added test cases for the priority execution utility
* removed unwanted code
* fix compile time issues
* fix compile time issues
* fixed lint and stylinkg issues
* fixed lint and styling issues
* skip the lint check for src/Utils/PriorityBasedExecutionUtils.ts
* incorporating review comments, added the default priority level changes
* changed the priority to default instead of low
* removed the unwanted if condition
---------
Co-authored-by: Faiz Chachiya <faizchachiya@microsoft.com>
While working on #549 I realized there were a few places where 'explorer' was only needed to expand the notifications console, so I stripped those out where it was easy.