Change RU Threshold to 5000 (#1735)

* ru threshold beta

* use new ru threshold package

* fix typo

* fix merge issue

* fix package-lock.json

* fix test

* fixed settings pane test

* fixed merge issue

* sync with main

* fixed settings pane check

* fix checks

* fixed aria-label error

* fixed aria-label error

* fixed aria-label error

* fixed aria-label error

* remove learn more

* change default RU threshold to 5000

* change default RU threshold to 5000

* change default RU threshold to 5000

---------

Co-authored-by: Asier Isayas <aisayas@microsoft.com>
This commit is contained in:
Asier Isayas 2024-02-02 11:52:37 -05:00 committed by GitHub
parent c0b54f6e84
commit 31f7178669
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 9 deletions

View File

@ -386,10 +386,10 @@ export const SettingsPane: FunctionComponent<{ explorer: Explorer }> = ({
labelPosition={Position.top}
defaultValue={(ruThreshold || DefaultRUThreshold).toString()}
min={1}
step={10}
step={1000}
onChange={handleOnRUThresholdSpinButtonChange}
incrementButtonAriaLabel="Increase value by 10"
decrementButtonAriaLabel="Decrease value by 10"
incrementButtonAriaLabel="Increase value by 1000"
decrementButtonAriaLabel="Decrease value by 1000"
styles={spinButtonStyles}
/>
</div>

View File

@ -137,14 +137,14 @@ exports[`Settings Pane should render Default properly 1`] = `
</div>
<div>
<StyledSpinButton
decrementButtonAriaLabel="Decrease value by 10"
defaultValue="100"
incrementButtonAriaLabel="Increase value by 10"
decrementButtonAriaLabel="Decrease value by 1000"
defaultValue="5000"
incrementButtonAriaLabel="Increase value by 1000"
label="RU Threshold (RU)"
labelPosition={0}
min={1}
onChange={[Function]}
step={10}
step={1000}
styles={
Object {
"arrowButtonsContainer": Object {},

View File

@ -63,9 +63,14 @@ export const Tabs = ({ explorer }: TabsProps): JSX.Element => {
onDismiss={() => {
setShowRUThresholdMessageBar(false);
}}
styles={{
innerText: {
fontWeight: "bold",
},
}}
>
{
"Avoid high cost queries! We automatically abort them if they exceed the set RU limit. To adjust your limit go to Settings > RU threshold."
"To prevent queries from using excessive RUs, Data Explorer has a 5,000 RU default limit. To modify or remove the limit, go to the Settings cog on the right and find 'RU Threshold'."
}
</MessageBar>
)}

View File

@ -51,4 +51,4 @@ export const getRUThreshold = (): number => {
return DefaultRUThreshold;
};
export const DefaultRUThreshold = 100;
export const DefaultRUThreshold = 5000;