Fix offer update notification for AAD users (#338)

This commit is contained in:
Steve Faulkner
2020-12-11 13:38:57 -06:00
committed by GitHub
parent c21f42159f
commit ea39c1d092
12 changed files with 33 additions and 20 deletions

View File

@@ -92,7 +92,8 @@ describe("SettingsComponent", () => {
autoscaleMaxThroughput: 10000,
manualThroughput: undefined,
minimumThroughput: 400,
id: "test"
id: "test",
offerReplacePending: false
});
const props = { ...baseProps };

View File

@@ -295,7 +295,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
!!this.collection.conflictResolutionPolicy();
public isOfferReplacePending = (): boolean => {
return !!this.collection?.offer()?.headers?.[Constants.HttpHeaders.offerReplacePending];
return this.collection?.offer()?.offerReplacePending;
};
public onSaveClick = async (): Promise<void> => {

View File

@@ -59,7 +59,7 @@ describe("ScaleComponent", () => {
autoscaleMaxThroughput: maxThroughput,
minimumThroughput: 400,
id: "offer",
headers: { "x-ms-offer-replace-pending": true }
offerReplacePending: true
});
const newProps = {
...baseProps,

View File

@@ -116,7 +116,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
}
const offer = this.props.collection?.offer();
if (offer?.headers?.[Constants.HttpHeaders.offerReplacePending]) {
if (offer?.offerReplacePending) {
const throughput = offer.manualThroughput || offer.autoscaleMaxThroughput;
return getThroughputApplyShortDelayMessage(
this.props.isAutoPilotSelected,

View File

@@ -23,7 +23,8 @@ export const collection = ({
autoscaleMaxThroughput: undefined,
manualThroughput: 10000,
minimumThroughput: 6000,
id: "offer"
id: "offer",
offerReplacePending: false
}),
conflictResolutionPolicy: ko.observable<DataModels.ConflictResolutionPolicy>(
{} as DataModels.ConflictResolutionPolicy