mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-10-13 15:28:05 +01:00
Min/Max UX changes for Scale & Settings tab (#2192)
* master pull * changed min max text boxes for autoscale * test update * Update .npmrc * Update settings.json * Prettier run
This commit is contained in:
parent
5ea78f9abf
commit
e3815734db
@ -559,16 +559,69 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
|||||||
private getThroughputTextField = (): JSX.Element => (
|
private getThroughputTextField = (): JSX.Element => (
|
||||||
<>
|
<>
|
||||||
{this.props.isAutoPilotSelected ? (
|
{this.props.isAutoPilotSelected ? (
|
||||||
|
<Stack horizontal verticalAlign="end" tokens={{ childrenGap: 8 }}>
|
||||||
|
{/* Column 1: Minimum RU/s */}
|
||||||
|
<Stack tokens={{ childrenGap: 4 }}>
|
||||||
|
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 4 }}>
|
||||||
|
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||||
|
Minimum RU/s
|
||||||
|
</Text>
|
||||||
|
<FontIcon iconName="Info" style={{ fontSize: 12, color: "#666" }} />
|
||||||
|
</Stack>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontFamily: "Segoe UI",
|
||||||
|
width: 70,
|
||||||
|
height: 28,
|
||||||
|
border: "none",
|
||||||
|
fontSize: 14,
|
||||||
|
backgroundColor: "transparent",
|
||||||
|
fontWeight: 400,
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
boxSizing: "border-box",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{AutoPilotUtils.getMinRUsBasedOnUserInput(this.props.maxAutoPilotThroughput)}
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
{/* Column 2: "x 10 =" Text */}
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontFamily: "Segoe UI",
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: 400,
|
||||||
|
paddingBottom: 6,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
x 10 =
|
||||||
|
</Text>
|
||||||
|
|
||||||
|
{/* Column 3: Maximum RU/s */}
|
||||||
|
<Stack tokens={{ childrenGap: 4 }}>
|
||||||
|
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 4 }}>
|
||||||
|
<Text variant="small" style={{ lineHeight: "20px", fontWeight: 600 }}>
|
||||||
|
Maximum RU/s
|
||||||
|
</Text>
|
||||||
|
<FontIcon iconName="Info" style={{ fontSize: 12, color: "#666" }} />
|
||||||
|
</Stack>
|
||||||
<TextField
|
<TextField
|
||||||
label="Maximum RU/s required by this resource"
|
|
||||||
required
|
required
|
||||||
type="number"
|
type="number"
|
||||||
id="autopilotInput"
|
id="autopilotInput"
|
||||||
key="auto pilot throughput input"
|
key="auto pilot throughput input"
|
||||||
styles={getTextFieldStyles(this.props.maxAutoPilotThroughput, this.props.maxAutoPilotThroughputBaseline)}
|
styles={{
|
||||||
|
...getTextFieldStyles(this.props.maxAutoPilotThroughput, this.props.maxAutoPilotThroughputBaseline),
|
||||||
|
fieldGroup: { width: 100, height: 28 },
|
||||||
|
field: { fontSize: 14, fontWeight: 400 },
|
||||||
|
}}
|
||||||
disabled={this.overrideWithProvisionedThroughputSettings()}
|
disabled={this.overrideWithProvisionedThroughputSettings()}
|
||||||
step={AutoPilotUtils.autoPilotIncrementStep}
|
step={AutoPilotUtils.autoPilotIncrementStep}
|
||||||
value={this.overrideWithProvisionedThroughputSettings() ? "" : this.props.maxAutoPilotThroughput?.toString()}
|
value={
|
||||||
|
this.overrideWithProvisionedThroughputSettings() ? "" : this.props.maxAutoPilotThroughput?.toString()
|
||||||
|
}
|
||||||
onChange={this.onAutoPilotThroughputChange}
|
onChange={this.onAutoPilotThroughputChange}
|
||||||
min={autoPilotThroughput1K}
|
min={autoPilotThroughput1K}
|
||||||
onGetErrorMessage={(value: string) => {
|
onGetErrorMessage={(value: string) => {
|
||||||
@ -579,6 +632,8 @@ export class ThroughputInputAutoPilotV3Component extends React.Component<
|
|||||||
}}
|
}}
|
||||||
validateOnLoad={false}
|
validateOnLoad={false}
|
||||||
/>
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
) : (
|
) : (
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
|
@ -157,11 +157,125 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<Stack
|
||||||
|
horizontal={true}
|
||||||
|
tokens={
|
||||||
|
{
|
||||||
|
"childrenGap": 8,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
verticalAlign="end"
|
||||||
|
>
|
||||||
|
<Stack
|
||||||
|
tokens={
|
||||||
|
{
|
||||||
|
"childrenGap": 4,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Stack
|
||||||
|
horizontal={true}
|
||||||
|
tokens={
|
||||||
|
{
|
||||||
|
"childrenGap": 4,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
verticalAlign="center"
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"fontWeight": 600,
|
||||||
|
"lineHeight": "20px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
variant="small"
|
||||||
|
>
|
||||||
|
Minimum RU/s
|
||||||
|
</Text>
|
||||||
|
<FontIcon
|
||||||
|
iconName="Info"
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"color": "#666",
|
||||||
|
"fontSize": 12,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"alignItems": "center",
|
||||||
|
"backgroundColor": "transparent",
|
||||||
|
"border": "none",
|
||||||
|
"boxSizing": "border-box",
|
||||||
|
"display": "flex",
|
||||||
|
"fontFamily": "Segoe UI",
|
||||||
|
"fontSize": 14,
|
||||||
|
"fontWeight": 400,
|
||||||
|
"height": 28,
|
||||||
|
"justifyContent": "center",
|
||||||
|
"width": 70,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
400
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"fontFamily": "Segoe UI",
|
||||||
|
"fontSize": 12,
|
||||||
|
"fontWeight": 400,
|
||||||
|
"paddingBottom": 6,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
x 10 =
|
||||||
|
</Text>
|
||||||
|
<Stack
|
||||||
|
tokens={
|
||||||
|
{
|
||||||
|
"childrenGap": 4,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Stack
|
||||||
|
horizontal={true}
|
||||||
|
tokens={
|
||||||
|
{
|
||||||
|
"childrenGap": 4,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
verticalAlign="center"
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"fontWeight": 600,
|
||||||
|
"lineHeight": "20px",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
variant="small"
|
||||||
|
>
|
||||||
|
Maximum RU/s
|
||||||
|
</Text>
|
||||||
|
<FontIcon
|
||||||
|
iconName="Info"
|
||||||
|
style={
|
||||||
|
{
|
||||||
|
"color": "#666",
|
||||||
|
"fontSize": 12,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
<StyledTextFieldBase
|
<StyledTextFieldBase
|
||||||
disabled={true}
|
disabled={true}
|
||||||
id="autopilotInput"
|
id="autopilotInput"
|
||||||
key="auto pilot throughput input"
|
key="auto pilot throughput input"
|
||||||
label="Maximum RU/s required by this resource"
|
|
||||||
min={1000}
|
min={1000}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
onGetErrorMessage={[Function]}
|
onGetErrorMessage={[Function]}
|
||||||
@ -169,16 +283,13 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
step={1000}
|
step={1000}
|
||||||
styles={
|
styles={
|
||||||
{
|
{
|
||||||
|
"field": {
|
||||||
|
"fontSize": 14,
|
||||||
|
"fontWeight": 400,
|
||||||
|
},
|
||||||
"fieldGroup": {
|
"fieldGroup": {
|
||||||
"borderColor": "",
|
"height": 28,
|
||||||
"height": 25,
|
"width": 100,
|
||||||
"selectors": {
|
|
||||||
":disabled": {
|
|
||||||
"backgroundColor": undefined,
|
|
||||||
"borderColor": undefined,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"width": 300,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,6 +297,8 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
validateOnLoad={false}
|
validateOnLoad={false}
|
||||||
value=""
|
value=""
|
||||||
/>
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Stack
|
<Stack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user