mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-28 06:04:25 +00:00
Compare commits
1 Commits
accessibil
...
accessibil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccdff60444 |
@@ -2576,10 +2576,6 @@ a:link {
|
|||||||
.querydropdown.placeholderVisible {
|
.querydropdown.placeholderVisible {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
.querydropdown.placeholderVisible::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
|
|
||||||
color: #403f3f;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.querydropdown:hover {
|
.querydropdown:hover {
|
||||||
background-color: @AccentLow;
|
background-color: @AccentLow;
|
||||||
@@ -3091,4 +3087,3 @@ a:link {
|
|||||||
background: white;
|
background: white;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
import * as EnvironmentUtility from "./EnvironmentUtility";
|
|
||||||
|
|
||||||
describe("Environment Utility Test", () => {
|
|
||||||
it("Test sample URI with /", () => {
|
|
||||||
const uri = "test/";
|
|
||||||
expect(EnvironmentUtility.normalizeArmEndpoint(uri)).toEqual(uri);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("Test sample URI without /", () => {
|
|
||||||
const uri = "test";
|
|
||||||
const expectedResult = "test/";
|
|
||||||
expect(EnvironmentUtility.normalizeArmEndpoint(uri)).toEqual(expectedResult);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { OfferResponse } from "@azure/cosmos";
|
|
||||||
import { Offer, SDKOfferDefinition } from "../Contracts/DataModels";
|
|
||||||
import * as OfferUtility from "./OfferUtility";
|
import * as OfferUtility from "./OfferUtility";
|
||||||
|
import { SDKOfferDefinition, Offer } from "../Contracts/DataModels";
|
||||||
|
import { OfferResponse } from "@azure/cosmos";
|
||||||
|
|
||||||
describe("parseSDKOfferResponse", () => {
|
describe("parseSDKOfferResponse", () => {
|
||||||
it("manual throughput", () => {
|
it("manual throughput", () => {
|
||||||
@@ -31,26 +31,6 @@ describe("parseSDKOfferResponse", () => {
|
|||||||
expect(OfferUtility.parseSDKOfferResponse(mockResponse)).toEqual(expectedResult);
|
expect(OfferUtility.parseSDKOfferResponse(mockResponse)).toEqual(expectedResult);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("offerContent not defined", () => {
|
|
||||||
const mockOfferDefinition = {
|
|
||||||
id: "test",
|
|
||||||
} as SDKOfferDefinition;
|
|
||||||
|
|
||||||
const mockResponse = {
|
|
||||||
resource: mockOfferDefinition,
|
|
||||||
} as OfferResponse;
|
|
||||||
|
|
||||||
expect(OfferUtility.parseSDKOfferResponse(mockResponse)).toEqual(undefined);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("offerDefinition is null", () => {
|
|
||||||
const mockResponse = {
|
|
||||||
resource: undefined,
|
|
||||||
} as OfferResponse;
|
|
||||||
|
|
||||||
expect(OfferUtility.parseSDKOfferResponse(mockResponse)).toEqual(undefined);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("autoscale throughput", () => {
|
it("autoscale throughput", () => {
|
||||||
const mockOfferDefinition = {
|
const mockOfferDefinition = {
|
||||||
content: {
|
content: {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
IStackTokens,
|
IStackTokens,
|
||||||
Stack,
|
Stack,
|
||||||
TextField,
|
TextField,
|
||||||
TooltipHost,
|
TooltipHost
|
||||||
} from "@fluentui/react";
|
} from "@fluentui/react";
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
import DeleteIcon from "../../images/delete.svg";
|
import DeleteIcon from "../../images/delete.svg";
|
||||||
@@ -136,18 +136,20 @@ export const TableEntity: FunctionComponent<TableEntityProps> = ({
|
|||||||
onEntityTimeValueChange={onEntityTimeValueChange}
|
onEntityTimeValueChange={onEntityTimeValueChange}
|
||||||
/>
|
/>
|
||||||
{!isEntityValueDisable && (
|
{!isEntityValueDisable && (
|
||||||
|
|
||||||
<TooltipHost content="Edit property" id="editTooltip">
|
<TooltipHost content="Edit property" id="editTooltip">
|
||||||
<div tabIndex={0}>
|
<div tabIndex={0}>
|
||||||
<Image
|
<Image
|
||||||
{...imageProps}
|
{...imageProps}
|
||||||
src={EditIcon}
|
src={EditIcon}
|
||||||
alt="editEntity"
|
alt="editEntity"
|
||||||
|
id="editEntity"
|
||||||
onClick={onEditEntity}
|
onClick={onEditEntity}
|
||||||
tabIndex={0}
|
|
||||||
onKeyPress={handleKeyPress}
|
onKeyPress={handleKeyPress}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</TooltipHost>
|
</TooltipHost>
|
||||||
|
|
||||||
)}
|
)}
|
||||||
{isDeleteOptionVisible && userContext.apiType !== "Cassandra" && (
|
{isDeleteOptionVisible && userContext.apiType !== "Cassandra" && (
|
||||||
<TooltipHost content="Delete property" id="deleteTooltip">
|
<TooltipHost content="Delete property" id="deleteTooltip">
|
||||||
|
|||||||
@@ -1,49 +0,0 @@
|
|||||||
import * as UrlUtility from "./UrlUtility";
|
|
||||||
|
|
||||||
describe("parseDocumentsPath", () => {
|
|
||||||
it("empty resource path", () => {
|
|
||||||
const resourcePath = "";
|
|
||||||
|
|
||||||
expect(UrlUtility.parseDocumentsPath(resourcePath)).toEqual({});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("resourcePath does not begin or end with /", () => {
|
|
||||||
const resourcePath = "localhost/portal/home";
|
|
||||||
const expectedResult = {
|
|
||||||
type: "home",
|
|
||||||
objectBody: {
|
|
||||||
id: "portal",
|
|
||||||
self: "/localhost/portal/home/",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
expect(UrlUtility.parseDocumentsPath(resourcePath)).toEqual(expectedResult);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("resourcePath length is even", () => {
|
|
||||||
const resourcePath = "/localhost/portal/src/home/";
|
|
||||||
const expectedResult = {
|
|
||||||
type: "src",
|
|
||||||
objectBody: {
|
|
||||||
id: "home",
|
|
||||||
self: resourcePath,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
expect(UrlUtility.parseDocumentsPath(resourcePath)).toEqual(expectedResult);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("createUri", () => {
|
|
||||||
const baseUri = "http://foo.com/bar/";
|
|
||||||
const relativeUri = "/index.html";
|
|
||||||
const expectedUri = "http://foo.com/bar/index.html";
|
|
||||||
|
|
||||||
expect(UrlUtility.createUri(baseUri, relativeUri)).toEqual(expectedUri);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should throw an error if baseUri is empty", () => {
|
|
||||||
expect(() => {
|
|
||||||
UrlUtility.createUri("", "/home");
|
|
||||||
}).toThrow("baseUri is null or empty");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -46,13 +46,10 @@ export class TabComponent extends React.Component<TabComponentProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let className = "toggleSwitch";
|
let className = "toggleSwitch";
|
||||||
let ariaselected;
|
|
||||||
if (index === this.props.currentTabIndex) {
|
if (index === this.props.currentTabIndex) {
|
||||||
className += " selectedToggle";
|
className += " selectedToggle";
|
||||||
ariaselected = true;
|
|
||||||
} else {
|
} else {
|
||||||
className += " unselectedToggle";
|
className += " unselectedToggle";
|
||||||
ariaselected = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -60,10 +57,9 @@ export class TabComponent extends React.Component<TabComponentProps> {
|
|||||||
<AccessibleElement
|
<AccessibleElement
|
||||||
as="span"
|
as="span"
|
||||||
className={className}
|
className={className}
|
||||||
role="tab"
|
role="presentation"
|
||||||
onActivated={() => this.setActiveTab(index)}
|
onActivated={() => this.setActiveTab(index)}
|
||||||
aria-label={`Select tab: ${tab.title}`}
|
aria-label={`Select tab: ${tab.title}`}
|
||||||
aria-selected={ariaselected}
|
|
||||||
>
|
>
|
||||||
{tab.title}
|
{tab.title}
|
||||||
</AccessibleElement>
|
</AccessibleElement>
|
||||||
@@ -81,11 +77,7 @@ export class TabComponent extends React.Component<TabComponentProps> {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="tabComponentContainer">
|
<div className="tabComponentContainer">
|
||||||
{!this.props.hideHeader && (
|
{!this.props.hideHeader && <div className="tabs tabSwitch">{this.renderTabTitles()}</div>}
|
||||||
<div className="tabs tabSwitch" role="tablist">
|
|
||||||
{this.renderTabTitles()}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className={className}>{currentTabContent.render()}</div>
|
<div className={className}>{currentTabContent.render()}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ describe("ThroughputInput Pane", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should switch mode properly", () => {
|
it("should switch mode properly", () => {
|
||||||
wrapper.find('[id="Manual-input"]').simulate("change");
|
wrapper.find('[aria-label="Manual database throughput"]').simulate("change");
|
||||||
expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe(
|
expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe(
|
||||||
"Container throughput (400 - unlimited RU/s)"
|
"Container throughput (400 - unlimited RU/s)"
|
||||||
);
|
);
|
||||||
|
|
||||||
wrapper.find('[id="Autoscale-input"]').simulate("change");
|
wrapper.find('[aria-label="Autoscale database throughput"]').simulate("change");
|
||||||
expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe("Container throughput (autoscale)");
|
expect(wrapper.find('[aria-label="Throughput header"]').at(0).text()).toBe("Container throughput (autoscale)");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
<input
|
<input
|
||||||
id="Autoscale-input"
|
id="Autoscale-input"
|
||||||
className="throughputInputRadioBtn"
|
className="throughputInputRadioBtn"
|
||||||
aria-label={`Autoscale` + " " + getThroughputLabelText()}
|
aria-label="Autoscale database throughput"
|
||||||
aria-required={true}
|
aria-required={true}
|
||||||
checked={isAutoscaleSelected}
|
checked={isAutoscaleSelected}
|
||||||
type="radio"
|
type="radio"
|
||||||
@@ -204,7 +204,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
<input
|
<input
|
||||||
id="Manual-input"
|
id="Manual-input"
|
||||||
className="throughputInputRadioBtn"
|
className="throughputInputRadioBtn"
|
||||||
aria-label={`Manual` + " " + getThroughputLabelText()}
|
aria-label="Manual database throughput"
|
||||||
checked={!isAutoscaleSelected}
|
checked={!isAutoscaleSelected}
|
||||||
type="radio"
|
type="radio"
|
||||||
aria-required={true}
|
aria-required={true}
|
||||||
@@ -222,7 +222,6 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
<Stack className="throughputInputSpacing">
|
<Stack className="throughputInputSpacing">
|
||||||
<Text variant="small" aria-label="capacity calculator of azure cosmos db">
|
<Text variant="small" aria-label="capacity calculator of azure cosmos db">
|
||||||
Estimate your required RU/s with{" "}
|
Estimate your required RU/s with{" "}
|
||||||
<u style={{ color: "#0078D4" }}>
|
|
||||||
<Link
|
<Link
|
||||||
target="_blank"
|
target="_blank"
|
||||||
href="https://cosmos.azure.com/capacitycalculator/"
|
href="https://cosmos.azure.com/capacitycalculator/"
|
||||||
@@ -230,7 +229,6 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
>
|
>
|
||||||
capacity calculator
|
capacity calculator
|
||||||
</Link>
|
</Link>
|
||||||
</u>
|
|
||||||
.
|
.
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
@@ -251,9 +249,8 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
onChange={(event, newInput?: string) => onThroughputValueChange(newInput)}
|
onChange={(event, newInput?: string) => onThroughputValueChange(newInput)}
|
||||||
step={AutoPilotUtils.autoPilotIncrementStep}
|
step={AutoPilotUtils.autoPilotIncrementStep}
|
||||||
min={AutoPilotUtils.autoPilotThroughput1K}
|
min={AutoPilotUtils.autoPilotThroughput1K}
|
||||||
max={!isSharded ? 10000 : 9000000000000}
|
|
||||||
value={throughput.toString()}
|
value={throughput.toString()}
|
||||||
ariaLabel="Max request units per second"
|
aria-label="Max request units per second"
|
||||||
required={true}
|
required={true}
|
||||||
errorMessage={throughputError}
|
errorMessage={throughputError}
|
||||||
/>
|
/>
|
||||||
@@ -273,11 +270,9 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
<Stack className="throughputInputSpacing">
|
<Stack className="throughputInputSpacing">
|
||||||
<Text variant="small" aria-label="ruDescription">
|
<Text variant="small" aria-label="ruDescription">
|
||||||
Estimate your required RU/s with
|
Estimate your required RU/s with
|
||||||
<u style={{ color: "#0078D4" }}>
|
|
||||||
<Link target="_blank" href="https://cosmos.azure.com/capacitycalculator/" aria-label="capacityLink">
|
<Link target="_blank" href="https://cosmos.azure.com/capacitycalculator/" aria-label="capacityLink">
|
||||||
capacity calculator
|
capacity calculator
|
||||||
</Link>
|
</Link>
|
||||||
</u>
|
|
||||||
.
|
.
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
@@ -300,7 +295,7 @@ export const ThroughputInput: FunctionComponent<ThroughputInputProps> = ({
|
|||||||
min={SharedConstants.CollectionCreation.DefaultCollectionRUs400}
|
min={SharedConstants.CollectionCreation.DefaultCollectionRUs400}
|
||||||
max={userContext.isTryCosmosDBSubscription ? Constants.TryCosmosExperience.maxRU : Infinity}
|
max={userContext.isTryCosmosDBSubscription ? Constants.TryCosmosExperience.maxRU : Infinity}
|
||||||
value={throughput.toString()}
|
value={throughput.toString()}
|
||||||
ariaLabel="Max request units per second"
|
aria-label="Max request units per second"
|
||||||
required={true}
|
required={true}
|
||||||
errorMessage={throughputError}
|
errorMessage={throughputError}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -347,12 +347,14 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
ariaLabel="Set the throughput — Request Units per second (RU/s) — required for the workload. A read of a 1 KB document uses 1 RU. Select manual if you plan to scale RU/s yourself. Select autoscale to allow the system to scale RU/s based on usage."
|
ariaLabel="Set the throughput — Request Units per second (RU/s) — required for the workload. A read of a 1 KB document uses 1 RU. Select manual if you plan to scale RU/s yourself. Select autoscale to allow the system to scale RU/s based on usage."
|
||||||
className="panelInfoIcon"
|
className="panelInfoIcon"
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
|
role="tooltip"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<IconBase
|
<IconBase
|
||||||
ariaLabel="Set the throughput — Request Units per second (RU/s) — required for the workload. A read of a 1 KB document uses 1 RU. Select manual if you plan to scale RU/s yourself. Select autoscale to allow the system to scale RU/s based on usage."
|
ariaLabel="Set the throughput — Request Units per second (RU/s) — required for the workload. A read of a 1 KB document uses 1 RU. Select manual if you plan to scale RU/s yourself. Select autoscale to allow the system to scale RU/s based on usage."
|
||||||
className="panelInfoIcon"
|
className="panelInfoIcon"
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
|
role="tooltip"
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
theme={
|
theme={
|
||||||
@@ -633,7 +635,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
aria-label="Set the throughput — Request Units per second (RU/s) — required for the workload. A read of a 1 KB document uses 1 RU. Select manual if you plan to scale RU/s yourself. Select autoscale to allow the system to scale RU/s based on usage."
|
aria-label="Set the throughput — Request Units per second (RU/s) — required for the workload. A read of a 1 KB document uses 1 RU. Select manual if you plan to scale RU/s yourself. Select autoscale to allow the system to scale RU/s based on usage."
|
||||||
className="panelInfoIcon root-57"
|
className="panelInfoIcon root-57"
|
||||||
data-icon-name="Info"
|
data-icon-name="Info"
|
||||||
role="img"
|
role="tooltip"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -659,11 +661,12 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
role="radiogroup"
|
role="radiogroup"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
aria-label="Autoscale Container throughput (autoscale)"
|
aria-label="Autoscale database throughput"
|
||||||
aria-required={true}
|
aria-required={true}
|
||||||
checked={true}
|
checked={true}
|
||||||
className="throughputInputRadioBtn"
|
className="throughputInputRadioBtn"
|
||||||
id="Autoscale-input"
|
id="Autoscale-input"
|
||||||
|
key=".0:$.0"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
role="radio"
|
role="radio"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
@@ -672,15 +675,17 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
<label
|
<label
|
||||||
className="throughputInputRadioBtnLabel"
|
className="throughputInputRadioBtnLabel"
|
||||||
htmlFor="Autoscale-input"
|
htmlFor="Autoscale-input"
|
||||||
|
key=".0:$.1"
|
||||||
>
|
>
|
||||||
Autoscale
|
Autoscale
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
aria-label="Manual Container throughput (autoscale)"
|
aria-label="Manual database throughput"
|
||||||
aria-required={true}
|
aria-required={true}
|
||||||
checked={false}
|
checked={false}
|
||||||
className="throughputInputRadioBtn"
|
className="throughputInputRadioBtn"
|
||||||
id="Manual-input"
|
id="Manual-input"
|
||||||
|
key=".0:$.2"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
role="radio"
|
role="radio"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
@@ -689,6 +694,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
<label
|
<label
|
||||||
className="throughputInputRadioBtnLabel"
|
className="throughputInputRadioBtnLabel"
|
||||||
htmlFor="Manual-input"
|
htmlFor="Manual-input"
|
||||||
|
key=".0:$.3"
|
||||||
>
|
>
|
||||||
Manual
|
Manual
|
||||||
</label>
|
</label>
|
||||||
@@ -712,13 +718,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
>
|
>
|
||||||
Estimate your required RU/s with
|
Estimate your required RU/s with
|
||||||
|
|
||||||
<u
|
|
||||||
style={
|
|
||||||
Object {
|
|
||||||
"color": "#0078D4",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<StyledLinkBase
|
<StyledLinkBase
|
||||||
aria-label="capacity calculator of azure cosmos db"
|
aria-label="capacity calculator of azure cosmos db"
|
||||||
href="https://cosmos.azure.com/capacitycalculator/"
|
href="https://cosmos.azure.com/capacitycalculator/"
|
||||||
@@ -1014,7 +1013,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
</a>
|
</a>
|
||||||
</LinkBase>
|
</LinkBase>
|
||||||
</StyledLinkBase>
|
</StyledLinkBase>
|
||||||
</u>
|
|
||||||
.
|
.
|
||||||
</span>
|
</span>
|
||||||
</Text>
|
</Text>
|
||||||
@@ -1347,12 +1345,14 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
ariaLabel="Set the max RU/s to the highest RU/s you want your container to scale to. The container will scale between 10% of max RU/s to the max RU/s based on usage."
|
ariaLabel="Set the max RU/s to the highest RU/s you want your container to scale to. The container will scale between 10% of max RU/s to the max RU/s based on usage."
|
||||||
className="panelInfoIcon"
|
className="panelInfoIcon"
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
|
role="tooltip"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
<IconBase
|
<IconBase
|
||||||
ariaLabel="Set the max RU/s to the highest RU/s you want your container to scale to. The container will scale between 10% of max RU/s to the max RU/s based on usage."
|
ariaLabel="Set the max RU/s to the highest RU/s you want your container to scale to. The container will scale between 10% of max RU/s to the max RU/s based on usage."
|
||||||
className="panelInfoIcon"
|
className="panelInfoIcon"
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
|
role="tooltip"
|
||||||
styles={[Function]}
|
styles={[Function]}
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
theme={
|
theme={
|
||||||
@@ -1633,7 +1633,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
aria-label="Set the max RU/s to the highest RU/s you want your container to scale to. The container will scale between 10% of max RU/s to the max RU/s based on usage."
|
aria-label="Set the max RU/s to the highest RU/s you want your container to scale to. The container will scale between 10% of max RU/s to the max RU/s based on usage."
|
||||||
className="panelInfoIcon root-57"
|
className="panelInfoIcon root-57"
|
||||||
data-icon-name="Info"
|
data-icon-name="Info"
|
||||||
role="img"
|
role="tooltip"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
|
|
||||||
@@ -1648,11 +1648,10 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledTextFieldBase
|
<StyledTextFieldBase
|
||||||
ariaLabel="Max request units per second"
|
aria-label="Max request units per second"
|
||||||
errorMessage=""
|
errorMessage=""
|
||||||
id="autoscaleRUValueField"
|
id="autoscaleRUValueField"
|
||||||
key=".0:$.2"
|
key=".0:$.2"
|
||||||
max={9000000000000}
|
|
||||||
min={1000}
|
min={1000}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
required={true}
|
required={true}
|
||||||
@@ -1672,11 +1671,10 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
value="4000"
|
value="4000"
|
||||||
>
|
>
|
||||||
<TextFieldBase
|
<TextFieldBase
|
||||||
ariaLabel="Max request units per second"
|
aria-label="Max request units per second"
|
||||||
deferredValidationTime={200}
|
deferredValidationTime={200}
|
||||||
errorMessage=""
|
errorMessage=""
|
||||||
id="autoscaleRUValueField"
|
id="autoscaleRUValueField"
|
||||||
max={9000000000000}
|
|
||||||
min={1000}
|
min={1000}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
required={true}
|
required={true}
|
||||||
@@ -1971,10 +1969,8 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
aria-invalid={false}
|
aria-invalid={false}
|
||||||
aria-label="Max request units per second"
|
|
||||||
className="ms-TextField-field field-64"
|
className="ms-TextField-field field-64"
|
||||||
id="autoscaleRUValueField"
|
id="autoscaleRUValueField"
|
||||||
max={9000000000000}
|
|
||||||
min={1000}
|
min={1000}
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
IButtonStyles,
|
IButtonStyles,
|
||||||
IconButton,
|
IconButton,
|
||||||
IContextualMenuItemProps,
|
IContextualMenuItemProps,
|
||||||
IContextualMenuProps,
|
IContextualMenuProps
|
||||||
} from "@fluentui/react";
|
} from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import AnimateHeight from "react-animate-height";
|
import AnimateHeight from "react-animate-height";
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ exports[`TreeNodeComponent does not render children by default 1`] = `
|
|||||||
onKeyPress={[Function]}
|
onKeyPress={[Function]}
|
||||||
role="treeitem"
|
role="treeitem"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className="treeNodeHeader "
|
className="treeNodeHeader "
|
||||||
data-test="label"
|
data-test="label"
|
||||||
@@ -65,6 +66,7 @@ exports[`TreeNodeComponent does not render children by default 1`] = `
|
|||||||
label
|
label
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="loadingIconContainer"
|
className="loadingIconContainer"
|
||||||
>
|
>
|
||||||
@@ -143,6 +145,7 @@ exports[`TreeNodeComponent renders a simple node (sorted children, expanded) 1`]
|
|||||||
onKeyPress={[Function]}
|
onKeyPress={[Function]}
|
||||||
role="treeitem"
|
role="treeitem"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className="treeNodeHeader "
|
className="treeNodeHeader "
|
||||||
data-test="label"
|
data-test="label"
|
||||||
@@ -217,6 +220,7 @@ exports[`TreeNodeComponent renders a simple node (sorted children, expanded) 1`]
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="loadingIconContainer"
|
className="loadingIconContainer"
|
||||||
>
|
>
|
||||||
@@ -294,6 +298,7 @@ exports[`TreeNodeComponent renders loading icon 1`] = `
|
|||||||
onKeyPress={[Function]}
|
onKeyPress={[Function]}
|
||||||
role="treeitem"
|
role="treeitem"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className="treeNodeHeader "
|
className="treeNodeHeader "
|
||||||
data-test="label"
|
data-test="label"
|
||||||
@@ -319,6 +324,7 @@ exports[`TreeNodeComponent renders loading icon 1`] = `
|
|||||||
label
|
label
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="loadingIconContainer"
|
className="loadingIconContainer"
|
||||||
>
|
>
|
||||||
@@ -368,6 +374,7 @@ exports[`TreeNodeComponent renders sorted children, expanded, leaves and parents
|
|||||||
onKeyPress={[Function]}
|
onKeyPress={[Function]}
|
||||||
role="treeitem"
|
role="treeitem"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className="treeNodeHeader "
|
className="treeNodeHeader "
|
||||||
data-test="label"
|
data-test="label"
|
||||||
@@ -433,6 +440,7 @@ exports[`TreeNodeComponent renders sorted children, expanded, leaves and parents
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="loadingIconContainer"
|
className="loadingIconContainer"
|
||||||
>
|
>
|
||||||
@@ -538,6 +546,7 @@ exports[`TreeNodeComponent renders unsorted children by default 1`] = `
|
|||||||
onKeyPress={[Function]}
|
onKeyPress={[Function]}
|
||||||
role="treeitem"
|
role="treeitem"
|
||||||
>
|
>
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className="treeNodeHeader "
|
className="treeNodeHeader "
|
||||||
data-test="label"
|
data-test="label"
|
||||||
@@ -563,6 +572,7 @@ exports[`TreeNodeComponent renders unsorted children by default 1`] = `
|
|||||||
label
|
label
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="loadingIconContainer"
|
className="loadingIconContainer"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
.treeComponent {
|
.treeComponent {
|
||||||
.nodeItem {
|
.nodeItem {
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: 2px @AccentMedium;
|
outline: 1px dashed @AccentMedium;
|
||||||
}
|
}
|
||||||
|
|
||||||
.treeNodeHeader {
|
.treeNodeHeader {
|
||||||
margin: 1px;
|
padding: @SmallSpace 2px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,13 @@ export class MiddlePaneComponent extends React.Component<MiddlePaneComponentProp
|
|||||||
<div className="graphTitle">
|
<div className="graphTitle">
|
||||||
<span className="paneTitle">Graph</span>
|
<span className="paneTitle">Graph</span>
|
||||||
<button
|
<button
|
||||||
style={{ border: "none", background: "none" }}
|
style={{border:'none',background:'none'}}
|
||||||
className="graphExpandCollapseBtn pull-right"
|
className="graphExpandCollapseBtn pull-right"
|
||||||
onClick={this.props.toggleExpandGraph}
|
onClick={this.props.toggleExpandGraph}
|
||||||
role="button"
|
role="button"
|
||||||
aria-expanded={this.props.isTabsContentExpanded}
|
aria-expanded={this.props.isTabsContentExpanded}
|
||||||
aria-label="View graph in full screen"
|
aria-name="View graph in full screen"
|
||||||
|
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={this.props.isTabsContentExpanded ? CollapseArrowIcon : ExpandIcon}
|
src={this.props.isTabsContentExpanded ? CollapseArrowIcon : ExpandIcon}
|
||||||
|
|||||||
@@ -202,7 +202,6 @@ export function createControlCommandBarButtons(container: Explorer): CommandButt
|
|||||||
if (showOpenFullScreen) {
|
if (showOpenFullScreen) {
|
||||||
const label = "Open Full Screen";
|
const label = "Open Full Screen";
|
||||||
const fullScreenButton: CommandButtonComponentProps = {
|
const fullScreenButton: CommandButtonComponentProps = {
|
||||||
id: "openFullScreenBtn",
|
|
||||||
iconSrc: OpenInTabIcon,
|
iconSrc: OpenInTabIcon,
|
||||||
iconAlt: label,
|
iconAlt: label,
|
||||||
onCommandClick: () => {
|
onCommandClick: () => {
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ export class NotificationConsoleComponent extends React.Component<
|
|||||||
selectedKey={this.state.selectedFilter}
|
selectedKey={this.state.selectedFilter}
|
||||||
options={NotificationConsoleComponent.FilterOptions}
|
options={NotificationConsoleComponent.FilterOptions}
|
||||||
onChange={this.onFilterSelected.bind(this)}
|
onChange={this.onFilterSelected.bind(this)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<span className="consoleSplitter" />
|
<span className="consoleSplitter" />
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ exports[`NotificationConsoleComponent renders the console 1`] = `
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
role="combobox"
|
||||||
selectedKey="All"
|
selectedKey="All"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
@@ -297,6 +298,7 @@ exports[`NotificationConsoleComponent renders the console 2`] = `
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
role="combobox"
|
||||||
selectedKey="All"
|
selectedKey="All"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
import * as InMemoryContentProviderUtils from "./ContentProviders/InMemoryContentProviderUtils";
|
|
||||||
|
|
||||||
describe("fromContentUri", () => {
|
|
||||||
it("fromContentUri should return valid result", () => {
|
|
||||||
const contentUri = "memory://resource/path";
|
|
||||||
const result = "resource";
|
|
||||||
|
|
||||||
expect(InMemoryContentProviderUtils.fromContentUri(contentUri)).toEqual(result);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("fromContentUri should return undefined on invalid input", () => {
|
|
||||||
const contentUri = "invalid";
|
|
||||||
|
|
||||||
expect(InMemoryContentProviderUtils.fromContentUri(contentUri)).toEqual(undefined);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("toContentUri should return valid result", () => {
|
|
||||||
const path = "resource/path";
|
|
||||||
const result = "memory://resource/path";
|
|
||||||
|
|
||||||
expect(InMemoryContentProviderUtils.toContentUri(path)).toEqual(result);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
TeachingBubble,
|
TeachingBubble,
|
||||||
Text,
|
Text,
|
||||||
TooltipHost,
|
TooltipHost
|
||||||
} from "@fluentui/react";
|
} from "@fluentui/react";
|
||||||
import * as Constants from "Common/Constants";
|
import * as Constants from "Common/Constants";
|
||||||
import { createCollection } from "Common/dataAccess/createCollection";
|
import { createCollection } from "Common/dataAccess/createCollection";
|
||||||
@@ -100,6 +100,7 @@ export interface AddCollectionPanelState {
|
|||||||
isExecuting: boolean;
|
isExecuting: boolean;
|
||||||
isThroughputCapExceeded: boolean;
|
isThroughputCapExceeded: boolean;
|
||||||
teachingBubbleStep: number;
|
teachingBubbleStep: number;
|
||||||
|
isParentTooltipVisible:boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class AddCollectionPanel extends React.Component<AddCollectionPanelProps, AddCollectionPanelState> {
|
export class AddCollectionPanel extends React.Component<AddCollectionPanelProps, AddCollectionPanelState> {
|
||||||
@@ -109,6 +110,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
|||||||
private isCollectionAutoscale: boolean;
|
private isCollectionAutoscale: boolean;
|
||||||
private isCostAcknowledged: boolean;
|
private isCostAcknowledged: boolean;
|
||||||
|
|
||||||
|
|
||||||
constructor(props: AddCollectionPanelProps) {
|
constructor(props: AddCollectionPanelProps) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -134,13 +136,16 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
|||||||
isExecuting: false,
|
isExecuting: false,
|
||||||
isThroughputCapExceeded: false,
|
isThroughputCapExceeded: false,
|
||||||
teachingBubbleStep: 0,
|
teachingBubbleStep: 0,
|
||||||
|
isParentTooltipVisible: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(): void {
|
componentDidMount(): void {
|
||||||
if (this.state.teachingBubbleStep === 0 && this.props.isQuickstart) {
|
if (this.state.teachingBubbleStep === 0 && this.props.isQuickstart) {
|
||||||
this.setState({ teachingBubbleStep: 1 });
|
this.setState({ teachingBubbleStep: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render(): JSX.Element {
|
render(): JSX.Element {
|
||||||
@@ -274,7 +279,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack horizontal verticalAlign="center">
|
<Stack horizontal verticalAlign="center">
|
||||||
<div role="radiogroup">
|
<div role='radiogroup'>
|
||||||
<input
|
<input
|
||||||
className="panelRadioBtn"
|
className="panelRadioBtn"
|
||||||
checked={this.state.createNewDatabase}
|
checked={this.state.createNewDatabase}
|
||||||
@@ -403,11 +408,11 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
|||||||
content={`Unique identifier for the ${getCollectionName().toLocaleLowerCase()} and used for id-based routing through REST and all SDKs.`}
|
content={`Unique identifier for the ${getCollectionName().toLocaleLowerCase()} and used for id-based routing through REST and all SDKs.`}
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
role="button"
|
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
className="panelInfoIcon"
|
className="panelInfoIcon"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
ariaLabel={`Unique identifier for the ${getCollectionName().toLocaleLowerCase()} and used for id-based routing through REST and all SDKs.`}
|
ariaLabel={`Unique identifier for the ${getCollectionName().toLocaleLowerCase()} and used for id-based routing through REST and all SDKs.`}
|
||||||
|
role="button"
|
||||||
/>
|
/>
|
||||||
</TooltipHost>
|
</TooltipHost>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DirectionalHint, Link, Stack, TeachingBubble, Text } from "@fluentui/react";
|
import { Link, Stack, TeachingBubble, Text } from "@fluentui/react";
|
||||||
import { ReactTabKind, useTabs } from "hooks/useTabs";
|
import { ReactTabKind, useTabs } from "hooks/useTabs";
|
||||||
import { useTeachingBubble } from "hooks/useTeachingBubble";
|
import { useTeachingBubble } from "hooks/useTeachingBubble";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -18,11 +18,6 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
|
|
||||||
let totalSteps = 9;
|
|
||||||
if (userContext.isTryCosmosDBSubscription) {
|
|
||||||
totalSteps = 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case 1:
|
case 1:
|
||||||
return isSampleDBExpanded ? (
|
return isSampleDBExpanded ? (
|
||||||
@@ -38,7 +33,7 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 1 of " + totalSteps}
|
footerContent="Step 1 of 8"
|
||||||
>
|
>
|
||||||
Start viewing and working with your data by opening Documents under Data
|
Start viewing and working with your data by opening Documents under Data
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -60,7 +55,7 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(1),
|
onClick: () => setStep(1),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 2 of " + totalSteps}
|
footerContent="Step 2 of 8"
|
||||||
>
|
>
|
||||||
View documents here using the documents window. You can also use your favorite MongoDB tools and drivers to do
|
View documents here using the documents window. You can also use your favorite MongoDB tools and drivers to do
|
||||||
so.
|
so.
|
||||||
@@ -83,7 +78,7 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(2),
|
onClick: () => setStep(2),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 3 of " + totalSteps}
|
footerContent="Step 3 of 8"
|
||||||
>
|
>
|
||||||
Add new document by copy / pasting JSON or uploading a JSON. You can also use your favorite MongoDB tools and
|
Add new document by copy / pasting JSON or uploading a JSON. You can also use your favorite MongoDB tools and
|
||||||
drivers to do so.
|
drivers to do so.
|
||||||
@@ -104,7 +99,7 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(3),
|
onClick: () => setStep(3),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 4 of " + totalSteps}
|
footerContent="Step 4 of 8"
|
||||||
>
|
>
|
||||||
Query your data using the filter function. Azure Cosmos DB for MongoDB provides comprehensive support for
|
Query your data using the filter function. Azure Cosmos DB for MongoDB provides comprehensive support for
|
||||||
MongoDB query language constructs. You can also use your favorite MongoDB tools and drivers to do so.
|
MongoDB query language constructs. You can also use your favorite MongoDB tools and drivers to do so.
|
||||||
@@ -125,7 +120,7 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(4),
|
onClick: () => setStep(4),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 5 of " + totalSteps}
|
footerContent="Step 5 of 8"
|
||||||
>
|
>
|
||||||
Change throughput provisioned to your collection according to your needs
|
Change throughput provisioned to your collection according to your needs
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -145,7 +140,7 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(5),
|
onClick: () => setStep(5),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 6 of " + totalSteps}
|
footerContent="Step 6 of 8"
|
||||||
>
|
>
|
||||||
Use the indexing policy editor to create and edit your indexes.
|
Use the indexing policy editor to create and edit your indexes.
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -165,54 +160,12 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(6),
|
onClick: () => setStep(6),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 7 of " + totalSteps}
|
footerContent="Step 7 of 8"
|
||||||
>
|
>
|
||||||
Visualize your data, store queries in an interactive document
|
Visualize your data, store queries in an interactive document
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
);
|
);
|
||||||
case 8:
|
case 8:
|
||||||
return (
|
|
||||||
<TeachingBubble
|
|
||||||
headline="Launch full screen"
|
|
||||||
target={"#openFullScreenBtn"}
|
|
||||||
hasCloseButton
|
|
||||||
primaryButtonProps={{
|
|
||||||
text: "Next",
|
|
||||||
onClick: () => (userContext.isTryCosmosDBSubscription ? setStep(9) : setStep(10)),
|
|
||||||
}}
|
|
||||||
secondaryButtonProps={{
|
|
||||||
text: "Previous",
|
|
||||||
onClick: () => setStep(7),
|
|
||||||
}}
|
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
|
||||||
footerContent={"Step 8 of " + totalSteps}
|
|
||||||
>
|
|
||||||
This will open a new tab in your browser to use Cosmos DB Explorer. Using the provided URLs you can share
|
|
||||||
read-write or read-only access with other people.
|
|
||||||
</TeachingBubble>
|
|
||||||
);
|
|
||||||
case 9:
|
|
||||||
return (
|
|
||||||
<TeachingBubble
|
|
||||||
headline="Boost your experience"
|
|
||||||
target={"#freeTierTeachingBubble"}
|
|
||||||
hasCloseButton
|
|
||||||
primaryButtonProps={{
|
|
||||||
text: "Next",
|
|
||||||
onClick: () => setStep(10),
|
|
||||||
}}
|
|
||||||
secondaryButtonProps={{
|
|
||||||
text: "Previous",
|
|
||||||
onClick: () => setStep(8),
|
|
||||||
}}
|
|
||||||
calloutProps={{ directionalHint: DirectionalHint.leftCenter }}
|
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
|
||||||
footerContent={"Step 9 of " + totalSteps}
|
|
||||||
>
|
|
||||||
Unlock everything Azure Cosmos DB has to offer When you're ready, upgrade to production.
|
|
||||||
</TeachingBubble>
|
|
||||||
);
|
|
||||||
case 10:
|
|
||||||
return (
|
return (
|
||||||
<TeachingBubble
|
<TeachingBubble
|
||||||
headline="Congratulations!"
|
headline="Congratulations!"
|
||||||
@@ -227,10 +180,10 @@ export const MongoQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
}}
|
}}
|
||||||
secondaryButtonProps={{
|
secondaryButtonProps={{
|
||||||
text: "Previous",
|
text: "Previous",
|
||||||
onClick: () => (userContext.isTryCosmosDBSubscription ? setStep(9) : setStep(8)),
|
onClick: () => setStep(7),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step " + totalSteps + " of " + totalSteps}
|
footerContent="Step 8 of 8"
|
||||||
>
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Text style={{ color: "white" }}>
|
<Text style={{ color: "white" }}>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DirectionalHint, Link, Stack, TeachingBubble, Text } from "@fluentui/react";
|
import { Link, Stack, TeachingBubble, Text } from "@fluentui/react";
|
||||||
import { ReactTabKind, useTabs } from "hooks/useTabs";
|
import { ReactTabKind, useTabs } from "hooks/useTabs";
|
||||||
import { useTeachingBubble } from "hooks/useTeachingBubble";
|
import { useTeachingBubble } from "hooks/useTeachingBubble";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -17,10 +17,6 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
if (userContext.apiType !== "SQL") {
|
if (userContext.apiType !== "SQL") {
|
||||||
return <></>;
|
return <></>;
|
||||||
}
|
}
|
||||||
let totalSteps = 8;
|
|
||||||
if (userContext.isTryCosmosDBSubscription) {
|
|
||||||
totalSteps = 9;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -37,7 +33,7 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 1 of " + totalSteps}
|
footerContent="Step 1 of 7"
|
||||||
>
|
>
|
||||||
Start viewing and working with your data by opening Items under Data
|
Start viewing and working with your data by opening Items under Data
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -59,7 +55,7 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(1),
|
onClick: () => setStep(1),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 2 of " + totalSteps}
|
footerContent="Step 2 of 7"
|
||||||
>
|
>
|
||||||
View item here using the items window. Additionally you can also filter items to be reviewed with the filter
|
View item here using the items window. Additionally you can also filter items to be reviewed with the filter
|
||||||
function
|
function
|
||||||
@@ -82,7 +78,7 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(2),
|
onClick: () => setStep(2),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 3 of " + totalSteps}
|
footerContent="Step 3 of 7"
|
||||||
>
|
>
|
||||||
Add new item by copy / pasting JSON; or uploading a JSON
|
Add new item by copy / pasting JSON; or uploading a JSON
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -102,7 +98,7 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(3),
|
onClick: () => setStep(3),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 4 of " + totalSteps}
|
footerContent="Step 4 of 7"
|
||||||
>
|
>
|
||||||
Query your data using either the filter function or new query.
|
Query your data using either the filter function or new query.
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -122,7 +118,7 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(4),
|
onClick: () => setStep(4),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 5 of " + totalSteps}
|
footerContent="Step 5 of 7"
|
||||||
>
|
>
|
||||||
Change throughput provisioned to your container according to your needs
|
Change throughput provisioned to your container according to your needs
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
@@ -142,54 +138,12 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
onClick: () => setStep(5),
|
onClick: () => setStep(5),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step 6 of " + totalSteps}
|
footerContent="Step 6 of 7"
|
||||||
>
|
>
|
||||||
Visualize your data, store queries in an interactive document
|
Visualize your data, store queries in an interactive document
|
||||||
</TeachingBubble>
|
</TeachingBubble>
|
||||||
);
|
);
|
||||||
case 7:
|
case 7:
|
||||||
return (
|
|
||||||
<TeachingBubble
|
|
||||||
headline="Launch full screen"
|
|
||||||
target={"#openFullScreenBtn"}
|
|
||||||
hasCloseButton
|
|
||||||
primaryButtonProps={{
|
|
||||||
text: "Next",
|
|
||||||
onClick: () => (userContext.isTryCosmosDBSubscription ? setStep(8) : setStep(9)),
|
|
||||||
}}
|
|
||||||
secondaryButtonProps={{
|
|
||||||
text: "Previous",
|
|
||||||
onClick: () => setStep(6),
|
|
||||||
}}
|
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
|
||||||
footerContent={"Step 7 of " + totalSteps}
|
|
||||||
>
|
|
||||||
This will open a new tab in your browser to use Cosmos DB Explorer. Using the provided URLs you can share
|
|
||||||
read-write or read-only access with other people.
|
|
||||||
</TeachingBubble>
|
|
||||||
);
|
|
||||||
case 8:
|
|
||||||
return (
|
|
||||||
<TeachingBubble
|
|
||||||
headline="Boost your experience"
|
|
||||||
target={"#freeTierTeachingBubble"}
|
|
||||||
hasCloseButton
|
|
||||||
primaryButtonProps={{
|
|
||||||
text: "Next",
|
|
||||||
onClick: () => setStep(9),
|
|
||||||
}}
|
|
||||||
secondaryButtonProps={{
|
|
||||||
text: "Previous",
|
|
||||||
onClick: () => setStep(7),
|
|
||||||
}}
|
|
||||||
calloutProps={{ directionalHint: DirectionalHint.leftCenter }}
|
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
|
||||||
footerContent={"Step 8 of " + totalSteps}
|
|
||||||
>
|
|
||||||
Unlock everything Azure Cosmos DB has to offer When you're ready, upgrade to production.
|
|
||||||
</TeachingBubble>
|
|
||||||
);
|
|
||||||
case 9:
|
|
||||||
return (
|
return (
|
||||||
<TeachingBubble
|
<TeachingBubble
|
||||||
headline="Congratulations!"
|
headline="Congratulations!"
|
||||||
@@ -204,10 +158,10 @@ export const SQLQuickstartTutorial: React.FC = (): JSX.Element => {
|
|||||||
}}
|
}}
|
||||||
secondaryButtonProps={{
|
secondaryButtonProps={{
|
||||||
text: "Previous",
|
text: "Previous",
|
||||||
onClick: () => (userContext.isTryCosmosDBSubscription ? setStep(8) : setStep(7)),
|
onClick: () => setStep(6),
|
||||||
}}
|
}}
|
||||||
onDismiss={() => onDimissTeachingBubble()}
|
onDismiss={() => onDimissTeachingBubble()}
|
||||||
footerContent={"Step " + totalSteps + " of " + totalSteps}
|
footerContent="Step 7 of 7"
|
||||||
>
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<Text style={{ color: "white" }}>
|
<Text style={{ color: "white" }}>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
TeachingBubble,
|
TeachingBubble,
|
||||||
TeachingBubbleContent,
|
TeachingBubbleContent,
|
||||||
Text,
|
Text
|
||||||
} from "@fluentui/react";
|
} from "@fluentui/react";
|
||||||
import { sendMessage } from "Common/MessageHandler";
|
import { sendMessage } from "Common/MessageHandler";
|
||||||
import { MessageTypes } from "Contracts/ExplorerContracts";
|
import { MessageTypes } from "Contracts/ExplorerContracts";
|
||||||
@@ -116,14 +116,9 @@ export class SplashScreen extends React.Component<SplashScreenProps> {
|
|||||||
<form className="connectExplorerFormContainer">
|
<form className="connectExplorerFormContainer">
|
||||||
<div className="splashScreenContainer">
|
<div className="splashScreenContainer">
|
||||||
<div className="splashScreen">
|
<div className="splashScreen">
|
||||||
<div
|
<div className="title" aria-label={userContext.apiType === "Postgres"
|
||||||
className="title"
|
|
||||||
aria-label={
|
|
||||||
userContext.apiType === "Postgres"
|
|
||||||
? "Welcome to Azure Cosmos DB for PostgreSQL"
|
? "Welcome to Azure Cosmos DB for PostgreSQL"
|
||||||
: "Welcome to Azure Cosmos DB"
|
: "Welcome to Azure Cosmos DB"}>
|
||||||
}
|
|
||||||
>
|
|
||||||
{userContext.apiType === "Postgres"
|
{userContext.apiType === "Postgres"
|
||||||
? "Welcome to Azure Cosmos DB for PostgreSQL"
|
? "Welcome to Azure Cosmos DB for PostgreSQL"
|
||||||
: "Welcome to Azure Cosmos DB"}
|
: "Welcome to Azure Cosmos DB"}
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ function TabNav({ tab, active, tabKind }: { tab?: Tab; active: boolean; tabKind?
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className={active ? "active tabList" : "tabList"}
|
className={active ? "active tabList" : "tabList"}
|
||||||
style={active ? { fontWeight: "bolder" } : {}}
|
|
||||||
title={useObservable(tab?.tabPath || ko.observable(""))}
|
title={useObservable(tab?.tabPath || ko.observable(""))}
|
||||||
aria-selected={active}
|
aria-selected={active}
|
||||||
aria-expanded={active}
|
aria-expanded={active}
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ const App: React.FunctionComponent = () => {
|
|||||||
return (
|
return (
|
||||||
<div className="flexContainer">
|
<div className="flexContainer">
|
||||||
<div id="divExplorer" className="flexContainer hideOverflows">
|
<div id="divExplorer" className="flexContainer hideOverflows">
|
||||||
<div id="freeTierTeachingBubble"> </div>
|
|
||||||
{/* Main Command Bar - Start */}
|
{/* Main Command Bar - Start */}
|
||||||
<CommandBar container={explorer} />
|
<CommandBar container={explorer} />
|
||||||
{/* Collections Tree and Tabs - Begin */}
|
{/* Collections Tree and Tabs - Begin */}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export function getMsalInstance() {
|
|||||||
cacheLocation: "localStorage",
|
cacheLocation: "localStorage",
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
authority: `${configContext.AAD_ENDPOINT}organizations`,
|
authority: `${configContext.AAD_ENDPOINT}common`,
|
||||||
clientId: "203f1145-856a-4232-83d4-a43568fba23d",
|
clientId: "203f1145-856a-4232-83d4-a43568fba23d",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user