mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-01-19 07:20:21 +00: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,
|
||||
isBucketsDiscardable: false,
|
||||
};
|
||||
console.log(this.offer);
|
||||
}
|
||||
|
||||
public isAutoScaleEnabled = (): boolean => {
|
||||
@ -80,7 +79,6 @@ export class ScaleComponent extends React.Component<ScaleComponentProps, ScaleCo
|
||||
capability.name.toLowerCase() === Constants.CapabilityNames.EnableAutoScale.toLowerCase()
|
||||
);
|
||||
});
|
||||
|
||||
return !!enableAutoScaleCapability;
|
||||
};
|
||||
|
||||
@ -234,7 +232,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps, ScaleCo
|
||||
<MessageBar messageBarType={MessageBarType.warning}>{this.getInitialNotificationElement()}</MessageBar>
|
||||
)}
|
||||
{!this.isAutoScaleEnabled() && <Stack {...subComponentStackProps}>{this.getThroughputInputComponent()}</Stack>}
|
||||
{this.props.enableThroughputBuckets && (
|
||||
{this.props.enableThroughputBuckets && !this.props.isAutoPilotSelected && (
|
||||
<ThroughputBucketsComponent
|
||||
currentBuckets={this.props.throughputBuckets}
|
||||
throughputBucketsBaseline={this.props.throughputBucketsBaseline}
|
||||
|
@ -27,7 +27,7 @@ export const ThroughputBucketsComponent: FC<ThroughputBucketsComponentProps> = (
|
||||
}) => {
|
||||
const getThroughputBuckets = (buckets: ThroughputBucket[]): ThroughputBucket[] => {
|
||||
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