mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-03 15:04:04 +01:00
enable/disable per autoscale selection
This commit is contained in:
parent
80781f7c8f
commit
07c4ca9c50
@ -66,7 +66,6 @@ export class ScaleComponent extends React.Component<ScaleComponentProps, ScaleCo
|
|||||||
isThroughputDiscardable: false,
|
isThroughputDiscardable: false,
|
||||||
isBucketsDiscardable: false,
|
isBucketsDiscardable: false,
|
||||||
};
|
};
|
||||||
console.log(this.offer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public isAutoScaleEnabled = (): boolean => {
|
public isAutoScaleEnabled = (): boolean => {
|
||||||
@ -80,7 +79,6 @@ export class ScaleComponent extends React.Component<ScaleComponentProps, ScaleCo
|
|||||||
capability.name.toLowerCase() === Constants.CapabilityNames.EnableAutoScale.toLowerCase()
|
capability.name.toLowerCase() === Constants.CapabilityNames.EnableAutoScale.toLowerCase()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
return !!enableAutoScaleCapability;
|
return !!enableAutoScaleCapability;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -234,7 +232,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps, ScaleCo
|
|||||||
<MessageBar messageBarType={MessageBarType.warning}>{this.getInitialNotificationElement()}</MessageBar>
|
<MessageBar messageBarType={MessageBarType.warning}>{this.getInitialNotificationElement()}</MessageBar>
|
||||||
)}
|
)}
|
||||||
{!this.isAutoScaleEnabled() && <Stack {...subComponentStackProps}>{this.getThroughputInputComponent()}</Stack>}
|
{!this.isAutoScaleEnabled() && <Stack {...subComponentStackProps}>{this.getThroughputInputComponent()}</Stack>}
|
||||||
{this.props.enableThroughputBuckets && (
|
{this.props.enableThroughputBuckets && !this.props.isAutoPilotSelected && (
|
||||||
<ThroughputBucketsComponent
|
<ThroughputBucketsComponent
|
||||||
currentBuckets={this.props.throughputBuckets}
|
currentBuckets={this.props.throughputBuckets}
|
||||||
throughputBucketsBaseline={this.props.throughputBucketsBaseline}
|
throughputBucketsBaseline={this.props.throughputBucketsBaseline}
|
||||||
|
@ -27,7 +27,7 @@ export const ThroughputBucketsComponent: FC<ThroughputBucketsComponentProps> = (
|
|||||||
}) => {
|
}) => {
|
||||||
const getThroughputBuckets = (buckets: ThroughputBucket[]): ThroughputBucket[] => {
|
const getThroughputBuckets = (buckets: ThroughputBucket[]): ThroughputBucket[] => {
|
||||||
return DEFAULT_BUCKETS.map(
|
return DEFAULT_BUCKETS.map(
|
||||||
(defaultBucket) => buckets.find((bucket) => bucket.id === defaultBucket.id) || defaultBucket,
|
(defaultBucket) => buckets?.find((bucket) => bucket.id === defaultBucket.id) || defaultBucket,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user