mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-30 22:31:56 +00:00
Compare commits
1 Commits
fixed-pric
...
resolve_Sh
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f6a89142d |
@@ -153,7 +153,6 @@ src/Juno/JunoClient.test.ts
|
|||||||
src/Juno/JunoClient.ts
|
src/Juno/JunoClient.ts
|
||||||
src/Platform/Hosted/Authorization.ts
|
src/Platform/Hosted/Authorization.ts
|
||||||
src/ReactDevTools.ts
|
src/ReactDevTools.ts
|
||||||
src/Shared/Constants.ts
|
|
||||||
src/Shared/DefaultExperienceUtility.test.ts
|
src/Shared/DefaultExperienceUtility.test.ts
|
||||||
src/Shared/DefaultExperienceUtility.ts
|
src/Shared/DefaultExperienceUtility.ts
|
||||||
src/Shared/appInsights.ts
|
src/Shared/appInsights.ts
|
||||||
|
|||||||
@@ -1,208 +0,0 @@
|
|||||||
import { SubscriptionType } from "../Contracts/SubscriptionType";
|
|
||||||
|
|
||||||
export const hoursInAMonth = 730;
|
|
||||||
export class AutoscalePricing {
|
|
||||||
public static MonthlyPricing = {
|
|
||||||
default: {
|
|
||||||
singleMaster: {
|
|
||||||
Currency: "USD",
|
|
||||||
CurrencySign: "$",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 24,
|
|
||||||
PricePerRU: 0.09,
|
|
||||||
PricePerGB: 0.25,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
multiMaster: {
|
|
||||||
Currency: "USD",
|
|
||||||
CurrencySign: "$",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 24,
|
|
||||||
PricePerRU: 0.12,
|
|
||||||
PricePerGB: 0.25,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mooncake: {
|
|
||||||
singleMaster: {
|
|
||||||
Currency: "RMB",
|
|
||||||
CurrencySign: "¥",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 152,
|
|
||||||
PricePerRU: 0.57,
|
|
||||||
PricePerGB: 2.576,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
multiMaster: {
|
|
||||||
Currency: "RMB",
|
|
||||||
CurrencySign: "¥",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 152,
|
|
||||||
PricePerRU: 0.76,
|
|
||||||
PricePerGB: 2.576,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
public static HourlyPricing = {
|
|
||||||
default: {
|
|
||||||
singleMaster: {
|
|
||||||
Currency: "USD",
|
|
||||||
CurrencySign: "$",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 24 / hoursInAMonth,
|
|
||||||
PricePerRU: 0.00012,
|
|
||||||
PricePerGB: 0.25 / hoursInAMonth,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
multiMaster: {
|
|
||||||
Currency: "USD",
|
|
||||||
CurrencySign: "$",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 24 / hoursInAMonth,
|
|
||||||
PricePerRU: 0.00016,
|
|
||||||
PricePerGB: 0.25 / hoursInAMonth,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mooncake: {
|
|
||||||
singleMaster: {
|
|
||||||
Currency: "RMB",
|
|
||||||
CurrencySign: "¥",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: AutoscalePricing.MonthlyPricing.mooncake.singleMaster.Standard.StartingPrice / hoursInAMonth, // per hour
|
|
||||||
PricePerRU: 0.000765,
|
|
||||||
PricePerGB: AutoscalePricing.MonthlyPricing.mooncake.singleMaster.Standard.PricePerGB / hoursInAMonth,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
multiMaster: {
|
|
||||||
Currency: "RMB",
|
|
||||||
CurrencySign: "¥",
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: AutoscalePricing.MonthlyPricing.mooncake.multiMaster.Standard.StartingPrice / hoursInAMonth, // per hour
|
|
||||||
PricePerRU: 0.00102,
|
|
||||||
PricePerGB: AutoscalePricing.MonthlyPricing.mooncake.multiMaster.Standard.PricePerGB / hoursInAMonth,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export class OfferPricing {
|
|
||||||
public static MonthlyPricing = {
|
|
||||||
default: {
|
|
||||||
Currency: "USD",
|
|
||||||
CurrencySign: "$",
|
|
||||||
S1Price: 25,
|
|
||||||
S2Price: 50,
|
|
||||||
S3Price: 100,
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 24,
|
|
||||||
PricePerRU: 0.06,
|
|
||||||
PricePerGB: 0.25,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mooncake: {
|
|
||||||
Currency: "RMB",
|
|
||||||
CurrencySign: "¥",
|
|
||||||
S1Price: 110.3,
|
|
||||||
S2Price: 220.6,
|
|
||||||
S3Price: 441.2,
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 152,
|
|
||||||
PricePerRU: 0.3794,
|
|
||||||
PricePerGB: 2.576,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
public static HourlyPricing = {
|
|
||||||
default: {
|
|
||||||
Currency: "USD",
|
|
||||||
CurrencySign: "$",
|
|
||||||
S1Price: 0.0336,
|
|
||||||
S2Price: 0.0672,
|
|
||||||
S3Price: 0.1344,
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: 24 / hoursInAMonth, // per hour
|
|
||||||
PricePerRU: 0.00008,
|
|
||||||
PricePerGB: 0.25 / hoursInAMonth,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mooncake: {
|
|
||||||
Currency: "RMB",
|
|
||||||
CurrencySign: "¥",
|
|
||||||
S1Price: 0.15,
|
|
||||||
S2Price: 0.3,
|
|
||||||
S3Price: 0.6,
|
|
||||||
Standard: {
|
|
||||||
StartingPrice: OfferPricing.MonthlyPricing.mooncake.Standard.StartingPrice / hoursInAMonth, // per hour
|
|
||||||
PricePerRU: 0.00051,
|
|
||||||
PricePerGB: OfferPricing.MonthlyPricing.mooncake.Standard.PricePerGB / hoursInAMonth,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export class CollectionCreation {
|
|
||||||
// TODO generate these values based on Product\Services\Documents\ImageStore\GatewayApplication\Settings.xml
|
|
||||||
public static readonly MinRUPerPartitionBelow7Partitions: number = 400;
|
|
||||||
public static readonly MinRU7PartitionsTo25Partitions: number = 2500;
|
|
||||||
public static readonly MinRUPerPartitionAbove25Partitions: number = 100;
|
|
||||||
public static readonly MaxRUPerPartition: number = 10000;
|
|
||||||
public static readonly MinPartitionedCollectionRUs: number = 2500;
|
|
||||||
|
|
||||||
public static readonly NumberOfPartitionsInFixedCollection: number = 1;
|
|
||||||
public static readonly NumberOfPartitionsInUnlimitedCollection: number = 10;
|
|
||||||
|
|
||||||
public static storage10Gb: string = "10";
|
|
||||||
public static storage100Gb: string = "100";
|
|
||||||
|
|
||||||
public static readonly DefaultCollectionRUs1000: number = 1000;
|
|
||||||
public static readonly DefaultCollectionRUs10K: number = 10000;
|
|
||||||
public static readonly DefaultCollectionRUs400: number = 400;
|
|
||||||
public static readonly DefaultCollectionRUs2000: number = 2000;
|
|
||||||
public static readonly DefaultCollectionRUs2500: number = 2500;
|
|
||||||
public static readonly DefaultCollectionRUs5000: number = 5000;
|
|
||||||
public static readonly DefaultCollectionRUs15000: number = 15000;
|
|
||||||
public static readonly DefaultCollectionRUs20000: number = 20000;
|
|
||||||
public static readonly DefaultCollectionRUs25000: number = 25000;
|
|
||||||
public static readonly DefaultCollectionRUs100K: number = 100000;
|
|
||||||
public static readonly DefaultCollectionRUs1Million: number = 1000000;
|
|
||||||
|
|
||||||
public static readonly DefaultAddCollectionDefaultFlight: string = "0";
|
|
||||||
public static readonly DefaultSubscriptionType: SubscriptionType = SubscriptionType.Free;
|
|
||||||
|
|
||||||
public static readonly TablesAPIDefaultDatabase: string = "TablesDB";
|
|
||||||
}
|
|
||||||
|
|
||||||
export const CollectionCreationDefaults = {
|
|
||||||
storage: CollectionCreation.storage100Gb,
|
|
||||||
throughput: {
|
|
||||||
fixed: CollectionCreation.DefaultCollectionRUs400,
|
|
||||||
unlimited: CollectionCreation.DefaultCollectionRUs400,
|
|
||||||
unlimitedmax: CollectionCreation.DefaultCollectionRUs1Million,
|
|
||||||
unlimitedmin: CollectionCreation.DefaultCollectionRUs400,
|
|
||||||
shared: CollectionCreation.DefaultCollectionRUs400,
|
|
||||||
},
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
export class SubscriptionUtilMappings {
|
|
||||||
public static FreeTierSubscriptionIds: string[] = [
|
|
||||||
"b8f2ff04-0a81-4cf9-95ef-5828d16981d2",
|
|
||||||
"39b1fdff-e5b2-4f83-adb4-33cb3aabf5ea",
|
|
||||||
"41f6d14d-ece1-46e4-942c-02c00d67f7d6",
|
|
||||||
"11dc62e3-77dc-4ef5-a46b-480ec6caa8fe",
|
|
||||||
"199d0919-60bd-448e-b64d-8461a0fe9747",
|
|
||||||
"a57b6849-d443-44cf-a3b7-7dd07ead9401",
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
export class AutopilotDocumentation {
|
|
||||||
public static Url: string = "https://aka.ms/cosmos-autoscale-info";
|
|
||||||
}
|
|
||||||
|
|
||||||
export class FreeTierLimits {
|
|
||||||
public static RU: number = 1000;
|
|
||||||
public static Storage: number = 25;
|
|
||||||
}
|
|
||||||
87
src/Shared/Constants/AutoscalePricing.ts
Normal file
87
src/Shared/Constants/AutoscalePricing.ts
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import { hoursInAMonth } from "./";
|
||||||
|
|
||||||
|
export const MonthlyPricing = {
|
||||||
|
default: {
|
||||||
|
singleMaster: {
|
||||||
|
Currency: "USD",
|
||||||
|
CurrencySign: "$",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 24,
|
||||||
|
PricePerRU: 0.09,
|
||||||
|
PricePerGB: 0.25,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
multiMaster: {
|
||||||
|
Currency: "USD",
|
||||||
|
CurrencySign: "$",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 24,
|
||||||
|
PricePerRU: 0.12,
|
||||||
|
PricePerGB: 0.25,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mooncake: {
|
||||||
|
singleMaster: {
|
||||||
|
Currency: "RMB",
|
||||||
|
CurrencySign: "¥",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 152,
|
||||||
|
PricePerRU: 0.57,
|
||||||
|
PricePerGB: 2.576,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
multiMaster: {
|
||||||
|
Currency: "RMB",
|
||||||
|
CurrencySign: "¥",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 152,
|
||||||
|
PricePerRU: 0.76,
|
||||||
|
PricePerGB: 2.576,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const HourlyPricing = {
|
||||||
|
default: {
|
||||||
|
singleMaster: {
|
||||||
|
Currency: "USD",
|
||||||
|
CurrencySign: "$",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 24 / hoursInAMonth,
|
||||||
|
PricePerRU: 0.00012,
|
||||||
|
PricePerGB: 0.25 / hoursInAMonth,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
multiMaster: {
|
||||||
|
Currency: "USD",
|
||||||
|
CurrencySign: "$",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 24 / hoursInAMonth,
|
||||||
|
PricePerRU: 0.00016,
|
||||||
|
PricePerGB: 0.25 / hoursInAMonth,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mooncake: {
|
||||||
|
singleMaster: {
|
||||||
|
Currency: "RMB",
|
||||||
|
CurrencySign: "¥",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: MonthlyPricing.mooncake.singleMaster.Standard.StartingPrice / hoursInAMonth, // per hour
|
||||||
|
PricePerRU: 0.000765,
|
||||||
|
PricePerGB: MonthlyPricing.mooncake.singleMaster.Standard.PricePerGB / hoursInAMonth,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
multiMaster: {
|
||||||
|
Currency: "RMB",
|
||||||
|
CurrencySign: "¥",
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: MonthlyPricing.mooncake.multiMaster.Standard.StartingPrice / hoursInAMonth, // per hour
|
||||||
|
PricePerRU: 0.00102,
|
||||||
|
PricePerGB: MonthlyPricing.mooncake.multiMaster.Standard.PricePerGB / hoursInAMonth,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
53
src/Shared/Constants/OfferPricing.ts
Normal file
53
src/Shared/Constants/OfferPricing.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import { hoursInAMonth } from "./";
|
||||||
|
export const MonthlyPricing = {
|
||||||
|
default: {
|
||||||
|
Currency: "USD",
|
||||||
|
CurrencySign: "$",
|
||||||
|
S1Price: 25,
|
||||||
|
S2Price: 50,
|
||||||
|
S3Price: 100,
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 24,
|
||||||
|
PricePerRU: 0.06,
|
||||||
|
PricePerGB: 0.25,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mooncake: {
|
||||||
|
Currency: "RMB",
|
||||||
|
CurrencySign: "¥",
|
||||||
|
S1Price: 110.3,
|
||||||
|
S2Price: 220.6,
|
||||||
|
S3Price: 441.2,
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 152,
|
||||||
|
PricePerRU: 0.3794,
|
||||||
|
PricePerGB: 2.576,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
export const HourlyPricing = {
|
||||||
|
default: {
|
||||||
|
Currency: "USD",
|
||||||
|
CurrencySign: "$",
|
||||||
|
S1Price: 0.0336,
|
||||||
|
S2Price: 0.0672,
|
||||||
|
S3Price: 0.1344,
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: 24 / hoursInAMonth, // per hour
|
||||||
|
PricePerRU: 0.00008,
|
||||||
|
PricePerGB: 0.25 / hoursInAMonth,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mooncake: {
|
||||||
|
Currency: "RMB",
|
||||||
|
CurrencySign: "¥",
|
||||||
|
S1Price: 0.15,
|
||||||
|
S2Price: 0.3,
|
||||||
|
S3Price: 0.6,
|
||||||
|
Standard: {
|
||||||
|
StartingPrice: MonthlyPricing.mooncake.Standard.StartingPrice / hoursInAMonth, // per hour
|
||||||
|
PricePerRU: 0.00051,
|
||||||
|
PricePerGB: MonthlyPricing.mooncake.Standard.PricePerGB / hoursInAMonth,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
69
src/Shared/Constants/index.ts
Normal file
69
src/Shared/Constants/index.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import { SubscriptionType } from "../../Contracts/SubscriptionType";
|
||||||
|
import * as AutoscalePricing from "./AutoscalePricing";
|
||||||
|
import * as OfferPricing from "./OfferPricing";
|
||||||
|
|
||||||
|
export const hoursInAMonth = 730;
|
||||||
|
export { AutoscalePricing, OfferPricing };
|
||||||
|
|
||||||
|
export const CollectionCreation = {
|
||||||
|
// TODO generate these values based on Product\Services\Documents\ImageStore\GatewayApplication\Settings.xml
|
||||||
|
MinRUPerPartitionBelow7Partitions: 400,
|
||||||
|
MinRU7PartitionsTo25Partitions: 2500,
|
||||||
|
MinRUPerPartitionAbove25Partitions: 100,
|
||||||
|
MaxRUPerPartition: 10000,
|
||||||
|
MinPartitionedCollectionRUs: 2500,
|
||||||
|
|
||||||
|
NumberOfPartitionsInFixedCollection: 1,
|
||||||
|
NumberOfPartitionsInUnlimitedCollection: 10,
|
||||||
|
|
||||||
|
storage10Gb: "10",
|
||||||
|
storage100Gb: "100",
|
||||||
|
|
||||||
|
DefaultCollectionRUs1000: 1000,
|
||||||
|
DefaultCollectionRUs10K: 10000,
|
||||||
|
DefaultCollectionRUs400: 400,
|
||||||
|
DefaultCollectionRUs2000: 2000,
|
||||||
|
DefaultCollectionRUs2500: 2500,
|
||||||
|
DefaultCollectionRUs5000: 5000,
|
||||||
|
DefaultCollectionRUs15000: 15000,
|
||||||
|
DefaultCollectionRUs20000: 20000,
|
||||||
|
DefaultCollectionRUs25000: 25000,
|
||||||
|
DefaultCollectionRUs100K: 100000,
|
||||||
|
DefaultCollectionRUs1Million: 1000000,
|
||||||
|
|
||||||
|
DefaultAddCollectionDefaultFlight: "0",
|
||||||
|
DefaultSubscriptionType: SubscriptionType.Free,
|
||||||
|
|
||||||
|
TablesAPIDefaultDatabase: "TablesDB",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const CollectionCreationDefaults = {
|
||||||
|
storage: CollectionCreation.storage100Gb,
|
||||||
|
throughput: {
|
||||||
|
fixed: CollectionCreation.DefaultCollectionRUs400,
|
||||||
|
unlimited: CollectionCreation.DefaultCollectionRUs400,
|
||||||
|
unlimitedmax: CollectionCreation.DefaultCollectionRUs1Million,
|
||||||
|
unlimitedmin: CollectionCreation.DefaultCollectionRUs400,
|
||||||
|
shared: CollectionCreation.DefaultCollectionRUs400,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const SubscriptionUtilMappings = {
|
||||||
|
FreeTierSubscriptionIds: [
|
||||||
|
"b8f2ff04-0a81-4cf9-95ef-5828d16981d2",
|
||||||
|
"39b1fdff-e5b2-4f83-adb4-33cb3aabf5ea",
|
||||||
|
"41f6d14d-ece1-46e4-942c-02c00d67f7d6",
|
||||||
|
"11dc62e3-77dc-4ef5-a46b-480ec6caa8fe",
|
||||||
|
"199d0919-60bd-448e-b64d-8461a0fe9747",
|
||||||
|
"a57b6849-d443-44cf-a3b7-7dd07ead9401",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const AutopilotDocumentation = {
|
||||||
|
Url: "https://aka.ms/cosmos-autoscale-info",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const FreeTierLimits = {
|
||||||
|
RU: 1000,
|
||||||
|
Storage: 25,
|
||||||
|
};
|
||||||
@@ -5,7 +5,7 @@ import * as AutoPilotUtils from "../Utils/AutoPilotUtils";
|
|||||||
interface ComputeRUUsagePriceHourlyArgs {
|
interface ComputeRUUsagePriceHourlyArgs {
|
||||||
serverId: string;
|
serverId: string;
|
||||||
requestUnits: number;
|
requestUnits: number;
|
||||||
numberOfRegions?: number;
|
numberOfRegions: number;
|
||||||
multimasterEnabled: boolean;
|
multimasterEnabled: boolean;
|
||||||
isAutoscale: boolean;
|
isAutoscale: boolean;
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ export function getRuToolTipText(): string {
|
|||||||
* Otherwise, return numberOfRegions
|
* Otherwise, return numberOfRegions
|
||||||
* @param numberOfRegions
|
* @param numberOfRegions
|
||||||
*/
|
*/
|
||||||
export function getRegionMultiplier(numberOfRegions: number | undefined, multimasterEnabled: boolean): number {
|
export function getRegionMultiplier(numberOfRegions: number, multimasterEnabled: boolean): number {
|
||||||
const normalizedNumberOfRegions: number = normalizeNumber(numberOfRegions);
|
const normalizedNumberOfRegions: number = normalizeNumber(numberOfRegions);
|
||||||
|
|
||||||
if (normalizedNumberOfRegions <= 0) {
|
if (normalizedNumberOfRegions <= 0) {
|
||||||
@@ -45,10 +45,6 @@ export function getRegionMultiplier(numberOfRegions: number | undefined, multima
|
|||||||
return numberOfRegions;
|
return numberOfRegions;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!numberOfRegions) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (multimasterEnabled) {
|
if (multimasterEnabled) {
|
||||||
return numberOfRegions + 1;
|
return numberOfRegions + 1;
|
||||||
}
|
}
|
||||||
@@ -56,7 +52,7 @@ export function getRegionMultiplier(numberOfRegions: number | undefined, multima
|
|||||||
return numberOfRegions;
|
return numberOfRegions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMultimasterMultiplier(numberOfRegions: number | undefined, multimasterEnabled: boolean): number {
|
export function getMultimasterMultiplier(numberOfRegions: number, multimasterEnabled: boolean): number {
|
||||||
const regionMultiplier: number = getRegionMultiplier(numberOfRegions, multimasterEnabled);
|
const regionMultiplier: number = getRegionMultiplier(numberOfRegions, multimasterEnabled);
|
||||||
const multimasterMultiplier: number = !multimasterEnabled ? 1 : regionMultiplier > 1 ? 2 : 1;
|
const multimasterMultiplier: number = !multimasterEnabled ? 1 : regionMultiplier > 1 ? 2 : 1;
|
||||||
|
|
||||||
@@ -122,7 +118,7 @@ export function numberWithCommasFormatter(n: number): string {
|
|||||||
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isLargerThanDefaultMinRU(ru: number | undefined): boolean {
|
export function isLargerThanDefaultMinRU(ru: number): boolean {
|
||||||
if (typeof ru === "number" && ru > Constants.CollectionCreation.DefaultCollectionRUs400) {
|
if (typeof ru === "number" && ru > Constants.CollectionCreation.DefaultCollectionRUs400) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
"noUnusedParameters": true
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"./src/Utils/PricingUtils.test.ts",
|
|
||||||
"./src/AuthType.ts",
|
"./src/AuthType.ts",
|
||||||
"./src/Bindings/ReactBindingHandler.ts",
|
"./src/Bindings/ReactBindingHandler.ts",
|
||||||
"./src/Common/ArrayHashMap.ts",
|
"./src/Common/ArrayHashMap.ts",
|
||||||
@@ -166,4 +165,4 @@
|
|||||||
"src/Terminal/**/*",
|
"src/Terminal/**/*",
|
||||||
"src/Utils/arm/**/*"
|
"src/Utils/arm/**/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ module.exports = function (_env = {}, argv = {}) {
|
|||||||
new CleanWebpackPlugin(),
|
new CleanWebpackPlugin(),
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
process: "process/browser",
|
process: "process/browser",
|
||||||
Buffer: ["buffer", "Buffer"],
|
|
||||||
}),
|
}),
|
||||||
new CreateFileWebpack({
|
new CreateFileWebpack({
|
||||||
path: "./dist",
|
path: "./dist",
|
||||||
@@ -230,7 +229,6 @@ module.exports = function (_env = {}, argv = {}) {
|
|||||||
alias: {
|
alias: {
|
||||||
process: "process/browser",
|
process: "process/browser",
|
||||||
},
|
},
|
||||||
|
|
||||||
fallback: {
|
fallback: {
|
||||||
crypto: false,
|
crypto: false,
|
||||||
fs: false,
|
fs: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user