mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-23 19:01:28 +00:00
Compare commits
1 Commits
fixed-ts-s
...
fixed-pric
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
868317360b |
@@ -21,8 +21,16 @@ src/Common/MongoUtility.ts
|
|||||||
src/Common/NotificationsClientBase.ts
|
src/Common/NotificationsClientBase.ts
|
||||||
src/Common/QueriesClient.ts
|
src/Common/QueriesClient.ts
|
||||||
src/Common/Splitter.ts
|
src/Common/Splitter.ts
|
||||||
|
src/Config.ts
|
||||||
|
src/Contracts/ActionContracts.ts
|
||||||
|
src/Contracts/DataModels.ts
|
||||||
|
src/Contracts/Diagnostics.ts
|
||||||
|
src/Contracts/ExplorerContracts.ts
|
||||||
|
src/Contracts/Versions.ts
|
||||||
|
src/Contracts/ViewModels.ts
|
||||||
src/Controls/Heatmap/Heatmap.test.ts
|
src/Controls/Heatmap/Heatmap.test.ts
|
||||||
src/Controls/Heatmap/Heatmap.ts
|
src/Controls/Heatmap/Heatmap.ts
|
||||||
|
src/Controls/Heatmap/HeatmapDatatypes.ts
|
||||||
src/Definitions/datatables.d.ts
|
src/Definitions/datatables.d.ts
|
||||||
src/Definitions/gif.d.ts
|
src/Definitions/gif.d.ts
|
||||||
src/Definitions/globals.d.ts
|
src/Definitions/globals.d.ts
|
||||||
@@ -36,10 +44,29 @@ src/Definitions/png.d.ts
|
|||||||
src/Definitions/svg.d.ts
|
src/Definitions/svg.d.ts
|
||||||
src/Explorer/ComponentRegisterer.test.ts
|
src/Explorer/ComponentRegisterer.test.ts
|
||||||
src/Explorer/ComponentRegisterer.ts
|
src/Explorer/ComponentRegisterer.ts
|
||||||
|
src/Explorer/Controls/CollapsiblePanel/CollapsiblePanelComponent.ts
|
||||||
src/Explorer/Controls/DiffEditor/DiffEditorComponent.ts
|
src/Explorer/Controls/DiffEditor/DiffEditorComponent.ts
|
||||||
|
src/Explorer/Controls/DynamicList/DynamicList.test.ts
|
||||||
|
src/Explorer/Controls/DynamicList/DynamicListComponent.ts
|
||||||
src/Explorer/Controls/Editor/EditorComponent.ts
|
src/Explorer/Controls/Editor/EditorComponent.ts
|
||||||
|
src/Explorer/Controls/ErrorDisplayComponent/ErrorDisplayComponent.ts
|
||||||
|
src/Explorer/Controls/InputTypeahead/InputTypeahead.ts
|
||||||
src/Explorer/Controls/JsonEditor/JsonEditorComponent.ts
|
src/Explorer/Controls/JsonEditor/JsonEditorComponent.ts
|
||||||
|
src/Explorer/Controls/Notebook/NotebookAppMessageHandler.ts
|
||||||
|
src/Explorer/Controls/ThroughputInput/ThroughputInputComponent.ts
|
||||||
|
src/Explorer/Controls/ThroughputInput/ThroughputInputComponentAutoPilotV3.ts
|
||||||
|
src/Explorer/Controls/Toolbar/IToolbarAction.ts
|
||||||
|
src/Explorer/Controls/Toolbar/IToolbarDisplayable.ts
|
||||||
|
src/Explorer/Controls/Toolbar/IToolbarDropDown.ts
|
||||||
|
src/Explorer/Controls/Toolbar/IToolbarItem.ts
|
||||||
|
src/Explorer/Controls/Toolbar/IToolbarSeperator.ts
|
||||||
|
src/Explorer/Controls/Toolbar/IToolbarToggle.ts
|
||||||
|
src/Explorer/Controls/Toolbar/KeyCodes.ts
|
||||||
|
src/Explorer/Controls/Toolbar/Toolbar.ts
|
||||||
|
src/Explorer/Controls/Toolbar/ToolbarAction.ts
|
||||||
|
src/Explorer/Controls/Toolbar/ToolbarDropDown.ts
|
||||||
|
src/Explorer/Controls/Toolbar/ToolbarToggle.ts
|
||||||
|
src/Explorer/Controls/Toolbar/Utilities.ts
|
||||||
src/Explorer/DataSamples/ContainerSampleGenerator.test.ts
|
src/Explorer/DataSamples/ContainerSampleGenerator.test.ts
|
||||||
src/Explorer/DataSamples/ContainerSampleGenerator.ts
|
src/Explorer/DataSamples/ContainerSampleGenerator.ts
|
||||||
src/Explorer/DataSamples/DataSamplesUtil.test.ts
|
src/Explorer/DataSamples/DataSamplesUtil.test.ts
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
jest.mock("./MessageHandler");
|
jest.mock("./MessageHandler");
|
||||||
|
import { LogEntryLevel } from "../Contracts/Diagnostics";
|
||||||
import * as Logger from "./Logger";
|
import * as Logger from "./Logger";
|
||||||
|
import { MessageTypes } from "../Contracts/ExplorerContracts";
|
||||||
import { sendMessage } from "./MessageHandler";
|
import { sendMessage } from "./MessageHandler";
|
||||||
|
|
||||||
describe("Logger", () => {
|
describe("Logger", () => {
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ describe("The Heatmap Control", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let heatmap: Heatmap;
|
let heatmap: Heatmap;
|
||||||
const theme: PortalTheme = 1;
|
let theme: PortalTheme = 1;
|
||||||
const divElement = `<div id="${Heatmap.elementId}"></div>`;
|
const divElement: string = `<div id="${Heatmap.elementId}"></div>`;
|
||||||
|
|
||||||
describe("drawHeatmap rendering", () => {
|
describe("drawHeatmap rendering", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -100,7 +100,7 @@ describe("iframe rendering when there is no data", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should show a no data message with a dark theme", () => {
|
it("should show a no data message with a dark theme", () => {
|
||||||
const data = {
|
let data = {
|
||||||
data: {
|
data: {
|
||||||
signature: "pcIframe",
|
signature: "pcIframe",
|
||||||
data: {
|
data: {
|
||||||
@@ -111,7 +111,7 @@ describe("iframe rendering when there is no data", () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const divElement = `<div id="${Heatmap.elementId}"></div>`;
|
const divElement: string = `<div id="${Heatmap.elementId}"></div>`;
|
||||||
document.body.innerHTML = divElement;
|
document.body.innerHTML = divElement;
|
||||||
|
|
||||||
handleMessage(data as MessageEvent);
|
handleMessage(data as MessageEvent);
|
||||||
@@ -120,7 +120,7 @@ describe("iframe rendering when there is no data", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should show a no data message with a white theme", () => {
|
it("should show a no data message with a white theme", () => {
|
||||||
const data = {
|
let data = {
|
||||||
data: {
|
data: {
|
||||||
signature: "pcIframe",
|
signature: "pcIframe",
|
||||||
data: {
|
data: {
|
||||||
@@ -131,7 +131,7 @@ describe("iframe rendering when there is no data", () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const divElement = `<div id="${Heatmap.elementId}"></div>`;
|
const divElement: string = `<div id="${Heatmap.elementId}"></div>`;
|
||||||
document.body.innerHTML = divElement;
|
document.body.innerHTML = divElement;
|
||||||
|
|
||||||
handleMessage(data as MessageEvent);
|
handleMessage(data as MessageEvent);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export class Heatmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private _getFontStyles(size: number = StyleConstants.MediumFontSize, color = "#838383"): FontSettings {
|
private _getFontStyles(size: number = StyleConstants.MediumFontSize, color: string = "#838383"): FontSettings {
|
||||||
return {
|
return {
|
||||||
family: StyleConstants.DataExplorerFont,
|
family: StyleConstants.DataExplorerFont,
|
||||||
size,
|
size,
|
||||||
@@ -78,9 +78,9 @@ export class Heatmap {
|
|||||||
// go thru all rows and create 2d matrix for heatmap...
|
// go thru all rows and create 2d matrix for heatmap...
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
output.yAxisPoints.push(rows[i]);
|
output.yAxisPoints.push(rows[i]);
|
||||||
const dataPoints: number[] = [];
|
let dataPoints: number[] = [];
|
||||||
for (let a = 0; a < output.xAxisPoints.length; a++) {
|
for (let a = 0; a < output.xAxisPoints.length; a++) {
|
||||||
const row: PartitionTimeStampToData = data[rows[i]];
|
let row: PartitionTimeStampToData = data[rows[i]];
|
||||||
dataPoints.push(row[output.xAxisPoints[a]]["Normalized Throughput"]);
|
dataPoints.push(row[output.xAxisPoints[a]]["Normalized Throughput"]);
|
||||||
}
|
}
|
||||||
output.dataPoints.push(dataPoints);
|
output.dataPoints.push(dataPoints);
|
||||||
@@ -193,7 +193,7 @@ export class Heatmap {
|
|||||||
this._getLayoutSettings(),
|
this._getLayoutSettings(),
|
||||||
this._getChartDisplaySettings()
|
this._getChartDisplaySettings()
|
||||||
);
|
);
|
||||||
const plotDiv: any = document.getElementById(Heatmap.elementId);
|
let plotDiv: any = document.getElementById(Heatmap.elementId);
|
||||||
plotDiv.on("plotly_click", (data: any) => {
|
plotDiv.on("plotly_click", (data: any) => {
|
||||||
let timeSelected: string = data.points[0].x;
|
let timeSelected: string = data.points[0].x;
|
||||||
timeSelected = timeSelected.replace(" ", "T");
|
timeSelected = timeSelected.replace(" ", "T");
|
||||||
@@ -205,7 +205,7 @@ export class Heatmap {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const output = [];
|
let output = [];
|
||||||
for (let i = 0; i < this._chartData.dataPoints.length; i++) {
|
for (let i = 0; i < this._chartData.dataPoints.length; i++) {
|
||||||
output.push(this._chartData.dataPoints[i][xAxisIndex]);
|
output.push(this._chartData.dataPoints[i][xAxisIndex]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { GraphData, GremlinEdge, GremlinVertex } from "./GraphData";
|
import { GraphData, GremlinVertex, GremlinEdge } from "./GraphData";
|
||||||
|
|
||||||
describe("Graph Data", () => {
|
describe("Graph Data", () => {
|
||||||
it("should set only one node as root", () => {
|
it("should set only one node as root", () => {
|
||||||
const graphData = new GraphData<GremlinVertex, GremlinEdge>();
|
const graphData = new GraphData<GremlinVertex, GremlinEdge>();
|
||||||
const v1: GremlinVertex = { id: "1", label: undefined };
|
const v1: GremlinVertex = { id: "1", label: null };
|
||||||
const v2: GremlinVertex = { id: "2", label: undefined };
|
const v2: GremlinVertex = { id: "2", label: null };
|
||||||
const v3: GremlinVertex = { id: "3", label: undefined };
|
const v3: GremlinVertex = { id: "3", label: null };
|
||||||
v3._isRoot = true;
|
v3._isRoot = true;
|
||||||
|
|
||||||
graphData.addVertex(v1);
|
graphData.addVertex(v1);
|
||||||
@@ -28,9 +28,9 @@ describe("Graph Data", () => {
|
|||||||
|
|
||||||
it("should properly find root id", () => {
|
it("should properly find root id", () => {
|
||||||
const graphData = new GraphData();
|
const graphData = new GraphData();
|
||||||
const v1: GremlinVertex = { id: "1", label: undefined };
|
const v1: GremlinVertex = { id: "1", label: null };
|
||||||
const v2: GremlinVertex = { id: "2", label: undefined };
|
const v2: GremlinVertex = { id: "2", label: null };
|
||||||
const v3: GremlinVertex = { id: "3", label: undefined };
|
const v3: GremlinVertex = { id: "3", label: null };
|
||||||
|
|
||||||
graphData.addVertex(v1);
|
graphData.addVertex(v1);
|
||||||
graphData.addVertex(v2);
|
graphData.addVertex(v2);
|
||||||
@@ -44,12 +44,12 @@ describe("Graph Data", () => {
|
|||||||
it("should remove edge from graph", () => {
|
it("should remove edge from graph", () => {
|
||||||
const graphData = new GraphData();
|
const graphData = new GraphData();
|
||||||
|
|
||||||
graphData.addVertex({ id: "v1", label: undefined });
|
graphData.addVertex({ id: "v1", label: null });
|
||||||
graphData.addVertex({ id: "v2", label: undefined });
|
graphData.addVertex({ id: "v2", label: null });
|
||||||
graphData.addVertex({ id: "v3", label: undefined });
|
graphData.addVertex({ id: "v3", label: null });
|
||||||
|
|
||||||
graphData.addEdge({ id: "e1", inV: "v1", outV: "v2", label: "" });
|
graphData.addEdge({ id: "e1", inV: "v1", outV: "v2", label: null });
|
||||||
graphData.addEdge({ id: "e2", inV: "v1", outV: "v3", label: "" });
|
graphData.addEdge({ id: "e2", inV: "v1", outV: "v3", label: null });
|
||||||
|
|
||||||
// in edge
|
// in edge
|
||||||
graphData.removeEdge("e1", false);
|
graphData.removeEdge("e1", false);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { SimulationLinkDatum, SimulationNodeDatum } from "d3";
|
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
|
import { SimulationNodeDatum, SimulationLinkDatum } from "d3";
|
||||||
|
|
||||||
export interface PaginationInfo {
|
export interface PaginationInfo {
|
||||||
total: number;
|
total: number;
|
||||||
@@ -10,7 +10,7 @@ export interface PaginationInfo {
|
|||||||
|
|
||||||
export interface GremlinVertex {
|
export interface GremlinVertex {
|
||||||
id: string;
|
id: string;
|
||||||
label?: string;
|
label: string;
|
||||||
inE?: { [label: string]: GremlinShortInEdge[] };
|
inE?: { [label: string]: GremlinShortInEdge[] };
|
||||||
outE?: { [label: string]: GremlinShortOutEdge[] };
|
outE?: { [label: string]: GremlinShortOutEdge[] };
|
||||||
properties?: { [propName: string]: GremlinProperty[] };
|
properties?: { [propName: string]: GremlinProperty[] };
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ interface InitialProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redux
|
// Redux
|
||||||
const makeMapStateToProps = (_state: AppState, initialProps: InitialProps) => {
|
const makeMapStateToProps = (state: AppState, initialProps: InitialProps) => {
|
||||||
const mapStateToProps = (state: AppState): StateProps => ({
|
const mapStateToProps = (state: AppState): StateProps => ({
|
||||||
isNotebookUntrusted: NotebookUtil.isNotebookUntrusted(state, initialProps.contentRef),
|
isNotebookUntrusted: NotebookUtil.isNotebookUntrusted(state, initialProps.contentRef),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -550,6 +550,61 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
|||||||
</Stack>
|
</Stack>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{userContext.apiType !== "Tables" && (
|
||||||
|
<CollapsibleSectionComponent
|
||||||
|
title="Advanced"
|
||||||
|
isExpandedByDefault={false}
|
||||||
|
onExpand={() => {
|
||||||
|
TelemetryProcessor.traceOpen(Action.ExpandAddCollectionPaneAdvancedSection);
|
||||||
|
this.scrollToAdvancedSection();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Stack className="panelGroupSpacing" id="collapsibleSectionContent">
|
||||||
|
{isCapabilityEnabled("EnableMongo") && (
|
||||||
|
<Stack className="panelGroupSpacing">
|
||||||
|
<Stack horizontal>
|
||||||
|
<span className="mandatoryStar">* </span>
|
||||||
|
<Text className="panelTextBold" variant="small">
|
||||||
|
Indexing
|
||||||
|
</Text>
|
||||||
|
<TooltipHost
|
||||||
|
directionalHint={DirectionalHint.bottomLeftEdge}
|
||||||
|
content="The _id field is indexed by default. Creating a wildcard index for all fields will optimize queries and is recommended for development."
|
||||||
|
>
|
||||||
|
<Icon iconName="Info" className="panelInfoIcon" />
|
||||||
|
</TooltipHost>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
<Checkbox
|
||||||
|
label="Create a Wildcard Index on all fields"
|
||||||
|
checked={this.state.createMongoWildCardIndex}
|
||||||
|
styles={{
|
||||||
|
text: { fontSize: 12 },
|
||||||
|
checkbox: { width: 12, height: 12 },
|
||||||
|
label: { padding: 0, alignItems: "center" },
|
||||||
|
}}
|
||||||
|
onChange={(ev: React.FormEvent<HTMLElement>, isChecked: boolean) =>
|
||||||
|
this.setState({ createMongoWildCardIndex: isChecked })
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{userContext.apiType === "SQL" && (
|
||||||
|
<Checkbox
|
||||||
|
label="My partition key is larger than 100 bytes"
|
||||||
|
checked={this.state.useHashV2}
|
||||||
|
styles={{
|
||||||
|
text: { fontSize: 12 },
|
||||||
|
checkbox: { width: 12, height: 12 },
|
||||||
|
label: { padding: 0, alignItems: "center" },
|
||||||
|
}}
|
||||||
|
onChange={(ev: React.FormEvent<HTMLElement>, isChecked: boolean) =>
|
||||||
|
this.setState({ useHashV2: isChecked })
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{this.shouldShowAnalyticalStoreOptions() && (
|
{this.shouldShowAnalyticalStoreOptions() && (
|
||||||
<Stack className="panelGroupSpacing">
|
<Stack className="panelGroupSpacing">
|
||||||
<Stack horizontal>
|
<Stack horizontal>
|
||||||
@@ -615,61 +670,6 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
|||||||
)}
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{userContext.apiType !== "Tables" && (
|
|
||||||
<CollapsibleSectionComponent
|
|
||||||
title="Advanced"
|
|
||||||
isExpandedByDefault={false}
|
|
||||||
onExpand={() => {
|
|
||||||
TelemetryProcessor.traceOpen(Action.ExpandAddCollectionPaneAdvancedSection);
|
|
||||||
this.scrollToAdvancedSection();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Stack className="panelGroupSpacing" id="collapsibleSectionContent">
|
|
||||||
{isCapabilityEnabled("EnableMongo") && (
|
|
||||||
<Stack className="panelGroupSpacing">
|
|
||||||
<Stack horizontal>
|
|
||||||
<span className="mandatoryStar">* </span>
|
|
||||||
<Text className="panelTextBold" variant="small">
|
|
||||||
Indexing
|
|
||||||
</Text>
|
|
||||||
<TooltipHost
|
|
||||||
directionalHint={DirectionalHint.bottomLeftEdge}
|
|
||||||
content="The _id field is indexed by default. Creating a wildcard index for all fields will optimize queries and is recommended for development."
|
|
||||||
>
|
|
||||||
<Icon iconName="Info" className="panelInfoIcon" />
|
|
||||||
</TooltipHost>
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Checkbox
|
|
||||||
label="Create a Wildcard Index on all fields"
|
|
||||||
checked={this.state.createMongoWildCardIndex}
|
|
||||||
styles={{
|
|
||||||
text: { fontSize: 12 },
|
|
||||||
checkbox: { width: 12, height: 12 },
|
|
||||||
label: { padding: 0, alignItems: "center" },
|
|
||||||
}}
|
|
||||||
onChange={(ev: React.FormEvent<HTMLElement>, isChecked: boolean) =>
|
|
||||||
this.setState({ createMongoWildCardIndex: isChecked })
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{userContext.apiType === "SQL" && (
|
|
||||||
<Checkbox
|
|
||||||
label="My partition key is larger than 100 bytes"
|
|
||||||
checked={this.state.useHashV2}
|
|
||||||
styles={{
|
|
||||||
text: { fontSize: 12 },
|
|
||||||
checkbox: { width: 12, height: 12 },
|
|
||||||
label: { padding: 0, alignItems: "center" },
|
|
||||||
}}
|
|
||||||
onChange={(ev: React.FormEvent<HTMLElement>, isChecked: boolean) =>
|
|
||||||
this.setState({ useHashV2: isChecked })
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</CollapsibleSectionComponent>
|
</CollapsibleSectionComponent>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -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, multimasterEnabled: boolean): number {
|
export function getRegionMultiplier(numberOfRegions: number | undefined, multimasterEnabled: boolean): number {
|
||||||
const normalizedNumberOfRegions: number = normalizeNumber(numberOfRegions);
|
const normalizedNumberOfRegions: number = normalizeNumber(numberOfRegions);
|
||||||
|
|
||||||
if (normalizedNumberOfRegions <= 0) {
|
if (normalizedNumberOfRegions <= 0) {
|
||||||
@@ -45,6 +45,10 @@ export function getRegionMultiplier(numberOfRegions: number, multimasterEnabled:
|
|||||||
return numberOfRegions;
|
return numberOfRegions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!numberOfRegions) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (multimasterEnabled) {
|
if (multimasterEnabled) {
|
||||||
return numberOfRegions + 1;
|
return numberOfRegions + 1;
|
||||||
}
|
}
|
||||||
@@ -52,7 +56,7 @@ export function getRegionMultiplier(numberOfRegions: number, multimasterEnabled:
|
|||||||
return numberOfRegions;
|
return numberOfRegions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMultimasterMultiplier(numberOfRegions: number, multimasterEnabled: boolean): number {
|
export function getMultimasterMultiplier(numberOfRegions: number | undefined, 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;
|
||||||
|
|
||||||
@@ -118,7 +122,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): boolean {
|
export function isLargerThanDefaultMinRU(ru: number | undefined): boolean {
|
||||||
if (typeof ru === "number" && ru > Constants.CollectionCreation.DefaultCollectionRUs400) {
|
if (typeof ru === "number" && ru > Constants.CollectionCreation.DefaultCollectionRUs400) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
"noUnusedParameters": true
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"./src/Explorer/Graph/GraphExplorerComponent/GraphData.test.ts",
|
"./src/Utils/PricingUtils.test.ts",
|
||||||
"./src/Common/Logger.test.ts",
|
|
||||||
"./src/AuthType.ts",
|
"./src/AuthType.ts",
|
||||||
"./src/Bindings/ReactBindingHandler.ts",
|
"./src/Bindings/ReactBindingHandler.ts",
|
||||||
"./src/Common/ArrayHashMap.ts",
|
"./src/Common/ArrayHashMap.ts",
|
||||||
@@ -57,7 +56,6 @@
|
|||||||
"./src/Explorer/Notebook/NotebookContentItem.ts",
|
"./src/Explorer/Notebook/NotebookContentItem.ts",
|
||||||
"./src/Explorer/Notebook/NotebookRenderer/AzureTheme.tsx",
|
"./src/Explorer/Notebook/NotebookRenderer/AzureTheme.tsx",
|
||||||
"./src/Explorer/Notebook/NotebookRenderer/Prompt.tsx",
|
"./src/Explorer/Notebook/NotebookRenderer/Prompt.tsx",
|
||||||
"./src/Explorer/Notebook/NotebookRenderer/PromptContent.test.tsx",
|
|
||||||
"./src/Explorer/Notebook/NotebookRenderer/PromptContent.tsx",
|
"./src/Explorer/Notebook/NotebookRenderer/PromptContent.tsx",
|
||||||
"./src/Explorer/Notebook/NotebookRenderer/StatusBar.tsx",
|
"./src/Explorer/Notebook/NotebookRenderer/StatusBar.tsx",
|
||||||
"./src/Explorer/Notebook/NotebookRenderer/decorators/CellCreator.tsx",
|
"./src/Explorer/Notebook/NotebookRenderer/decorators/CellCreator.tsx",
|
||||||
@@ -65,7 +63,6 @@
|
|||||||
"./src/Explorer/Notebook/NotebookUtil.ts",
|
"./src/Explorer/Notebook/NotebookUtil.ts",
|
||||||
"./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerSplashScreen.tsx",
|
"./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerSplashScreen.tsx",
|
||||||
"./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerUtils.ts",
|
"./src/Explorer/Notebook/SchemaAnalyzer/SchemaAnalyzerUtils.ts",
|
||||||
"./src/Explorer/Notebook/SecurityWarningBar/SecurityWarningBar.tsx",
|
|
||||||
"./src/Explorer/OpenFullScreen.test.tsx",
|
"./src/Explorer/OpenFullScreen.test.tsx",
|
||||||
"./src/Explorer/OpenFullScreen.tsx",
|
"./src/Explorer/OpenFullScreen.tsx",
|
||||||
"./src/Explorer/Panes/PanelContainerComponent.test.tsx",
|
"./src/Explorer/Panes/PanelContainerComponent.test.tsx",
|
||||||
@@ -86,13 +83,10 @@
|
|||||||
"./src/Explorer/Tree/AccessibleVerticalList.ts",
|
"./src/Explorer/Tree/AccessibleVerticalList.ts",
|
||||||
"./src/GitHub/GitHubConnector.ts",
|
"./src/GitHub/GitHubConnector.ts",
|
||||||
"./src/HostedExplorerChildFrame.ts",
|
"./src/HostedExplorerChildFrame.ts",
|
||||||
"./src/Index.tsx",
|
|
||||||
"./src/Platform/Hosted/Authorization.ts",
|
"./src/Platform/Hosted/Authorization.ts",
|
||||||
"./src/Platform/Hosted/Components/MeControl.test.tsx",
|
"./src/Platform/Hosted/Components/MeControl.test.tsx",
|
||||||
"./src/Platform/Hosted/Components/MeControl.tsx",
|
"./src/Platform/Hosted/Components/MeControl.tsx",
|
||||||
"./src/Platform/Hosted/Components/SignInButton.tsx",
|
"./src/Platform/Hosted/Components/SignInButton.tsx",
|
||||||
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
|
|
||||||
"./src/Platform/Hosted/Components/SwitchSubscription.tsx",
|
|
||||||
"./src/Platform/Hosted/HostedUtils.test.ts",
|
"./src/Platform/Hosted/HostedUtils.test.ts",
|
||||||
"./src/Platform/Hosted/HostedUtils.ts",
|
"./src/Platform/Hosted/HostedUtils.ts",
|
||||||
"./src/Platform/Hosted/extractFeatures.test.ts",
|
"./src/Platform/Hosted/extractFeatures.test.ts",
|
||||||
@@ -136,15 +130,17 @@
|
|||||||
"./src/hooks/useFullScreenURLs.tsx",
|
"./src/hooks/useFullScreenURLs.tsx",
|
||||||
"./src/hooks/useGraphPhoto.tsx",
|
"./src/hooks/useGraphPhoto.tsx",
|
||||||
"./src/hooks/useNotebookSnapshotStore.ts",
|
"./src/hooks/useNotebookSnapshotStore.ts",
|
||||||
|
"./src/hooks/usePortalAccessToken.tsx",
|
||||||
"./src/hooks/useNotificationConsole.ts",
|
"./src/hooks/useNotificationConsole.ts",
|
||||||
"./src/hooks/useObservable.ts",
|
"./src/hooks/useObservable.ts",
|
||||||
"./src/hooks/usePortalAccessToken.tsx",
|
|
||||||
"./src/hooks/useSidePanel.ts",
|
"./src/hooks/useSidePanel.ts",
|
||||||
"./src/i18n.ts",
|
"./src/i18n.ts",
|
||||||
"./src/quickstart.ts",
|
"./src/quickstart.ts",
|
||||||
"./src/setupTests.ts",
|
"./src/setupTests.ts",
|
||||||
"./src/userContext.test.ts",
|
"./src/userContext.test.ts",
|
||||||
"src/Common/EntityValue.tsx"
|
"src/Common/EntityValue.tsx",
|
||||||
|
"./src/Platform/Hosted/Components/SwitchAccount.tsx",
|
||||||
|
"./src/Platform/Hosted/Components/SwitchSubscription.tsx"
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
"src/CellOutputViewer/transforms/**/*",
|
"src/CellOutputViewer/transforms/**/*",
|
||||||
|
|||||||
Reference in New Issue
Block a user