mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-27 21:01:57 +00:00
merge master and resolve code conflict
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { DefaultButton, IButtonStyles, IContextualMenuItem, IContextualMenuProps } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { ArcadiaWorkspace, SparkPool } from "../../../Contracts/DataModels";
|
||||
import { DefaultButton, IButtonStyles } from "office-ui-fabric-react/lib/Button";
|
||||
import { IContextualMenuItem, IContextualMenuProps } from "office-ui-fabric-react/lib/ContextualMenu";
|
||||
import * as Logger from "../../../Common/Logger";
|
||||
import { getErrorMessage } from "../../../Common/ErrorHandlingUtils";
|
||||
import * as Logger from "../../../Common/Logger";
|
||||
import { ArcadiaWorkspace, SparkPool } from "../../../Contracts/DataModels";
|
||||
|
||||
export interface ArcadiaMenuPickerProps {
|
||||
selectText?: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Icon, Label, Stack } from "office-ui-fabric-react";
|
||||
import { Icon, Label, Stack } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { accordionStackTokens } from "../Settings/SettingsRenderUtils";
|
||||
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
import {
|
||||
ChoiceGroup,
|
||||
DefaultButton,
|
||||
Dialog as FluentDialog,
|
||||
DialogFooter,
|
||||
DialogType,
|
||||
FontIcon,
|
||||
IButtonProps,
|
||||
IChoiceGroupProps,
|
||||
IDialogProps,
|
||||
IProgressIndicatorProps,
|
||||
ITextFieldProps,
|
||||
Link,
|
||||
PrimaryButton,
|
||||
ProgressIndicator,
|
||||
} from "office-ui-fabric-react";
|
||||
import { DefaultButton, IButtonProps, PrimaryButton } from "office-ui-fabric-react/lib/Button";
|
||||
import { Dialog as FluentDialog, DialogFooter, DialogType, IDialogProps } from "office-ui-fabric-react/lib/Dialog";
|
||||
import { Link } from "office-ui-fabric-react/lib/Link";
|
||||
import { ITextFieldProps, TextField } from "office-ui-fabric-react/lib/TextField";
|
||||
TextField,
|
||||
} from "@fluentui/react";
|
||||
import React, { FunctionComponent } from "react";
|
||||
|
||||
export interface TextFieldProps extends ITextFieldProps {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
* React component for Switch Directory
|
||||
*/
|
||||
|
||||
import _ from "underscore";
|
||||
import { Dropdown, IDropdownOption, IDropdownProps } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { Dropdown, IDropdownOption, IDropdownProps } from "office-ui-fabric-react/lib/Dropdown";
|
||||
import _ from "underscore";
|
||||
import { Tenant } from "../../../Contracts/DataModels";
|
||||
|
||||
export interface DefaultDirectoryDropdownProps {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
import _ from "underscore";
|
||||
import {
|
||||
DefaultButton,
|
||||
IButtonProps,
|
||||
ITextFieldProps,
|
||||
List,
|
||||
ScrollablePane,
|
||||
Sticky,
|
||||
StickyPositionType,
|
||||
TextField,
|
||||
} from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
|
||||
import { DefaultButton, IButtonProps } from "office-ui-fabric-react/lib/Button";
|
||||
import { List } from "office-ui-fabric-react/lib/List";
|
||||
import { ScrollablePane } from "office-ui-fabric-react/lib/ScrollablePane";
|
||||
import { Sticky, StickyPositionType } from "office-ui-fabric-react/lib/Sticky";
|
||||
import { TextField, ITextFieldProps } from "office-ui-fabric-react/lib/TextField";
|
||||
import _ from "underscore";
|
||||
import { Tenant } from "../../../Contracts/DataModels";
|
||||
|
||||
export interface DirectoryListProps {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`test render renders with directories and default 1`] = `
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
className="defaultDirectoryDropdown"
|
||||
defaultSelectedKey="asdfghjklzxcvbnm9876543210"
|
||||
label="Set your default directory"
|
||||
@@ -26,7 +26,7 @@ exports[`test render renders with directories and default 1`] = `
|
||||
`;
|
||||
|
||||
exports[`test render renders with directories and last visit default 1`] = `
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
className="defaultDirectoryDropdown"
|
||||
defaultSelectedKey="lastVisited"
|
||||
label="Set your default directory"
|
||||
@@ -51,7 +51,7 @@ exports[`test render renders with directories and last visit default 1`] = `
|
||||
`;
|
||||
|
||||
exports[`test render renders with directories but no default 1`] = `
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
className="defaultDirectoryDropdown"
|
||||
defaultSelectedKey="lastVisited"
|
||||
label="Set your default directory"
|
||||
@@ -76,7 +76,7 @@ exports[`test render renders with directories but no default 1`] = `
|
||||
`;
|
||||
|
||||
exports[`test render renders with no directories 1`] = `
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
className="defaultDirectoryDropdown"
|
||||
defaultSelectedKey="lastVisited"
|
||||
label="Set your default directory"
|
||||
|
||||
@@ -350,11 +350,11 @@ exports[`test render renders with filters 1`] = `
|
||||
}
|
||||
>
|
||||
<div
|
||||
className="ms-ScrollablePane root-40"
|
||||
className="ms-ScrollablePane root-53"
|
||||
data-is-scrollable="true"
|
||||
>
|
||||
<div
|
||||
className="stickyAbove-42"
|
||||
className="stickyAbove-55"
|
||||
style={
|
||||
Object {
|
||||
"height": 0,
|
||||
@@ -365,7 +365,7 @@ exports[`test render renders with filters 1`] = `
|
||||
}
|
||||
/>
|
||||
<div
|
||||
className="ms-ScrollablePane--contentContainer contentContainer-41"
|
||||
className="ms-ScrollablePane--contentContainer contentContainer-54"
|
||||
data-is-scrollable={true}
|
||||
>
|
||||
<Sticky
|
||||
@@ -408,7 +408,6 @@ exports[`test render renders with filters 1`] = `
|
||||
>
|
||||
<TextFieldBase
|
||||
ariaLabel="Directory filter text box"
|
||||
canRevealPassword={false}
|
||||
className="directoryListFilterTextBox"
|
||||
deferredValidationTime={200}
|
||||
onChange={[Function]}
|
||||
@@ -691,18 +690,18 @@ exports[`test render renders with filters 1`] = `
|
||||
validateOnLoad={true}
|
||||
>
|
||||
<div
|
||||
className="ms-TextField directoryListFilterTextBox root-46"
|
||||
className="ms-TextField directoryListFilterTextBox root-59"
|
||||
>
|
||||
<div
|
||||
className="ms-TextField-wrapper"
|
||||
>
|
||||
<div
|
||||
className="ms-TextField-fieldGroup fieldGroup-47"
|
||||
className="ms-TextField-fieldGroup fieldGroup-60"
|
||||
>
|
||||
<input
|
||||
aria-invalid={false}
|
||||
aria-label="Directory filter text box"
|
||||
className="ms-TextField-field field-48"
|
||||
className="ms-TextField-field field-61"
|
||||
id="TextField0"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
@@ -1266,7 +1265,6 @@ exports[`test render renders with filters 1`] = `
|
||||
"borderColor": "#f3f2f1",
|
||||
"color": "#a19f9d",
|
||||
"cursor": "default",
|
||||
"pointerEvents": "none",
|
||||
"selectors": Object {
|
||||
":focus": Object {
|
||||
"outline": 0,
|
||||
@@ -1929,7 +1927,7 @@ exports[`test render renders with filters 1`] = `
|
||||
>
|
||||
<button
|
||||
aria-disabled={true}
|
||||
className="ms-Button ms-Button--default is-disabled directoryListButton root-57"
|
||||
className="ms-Button ms-Button--default is-disabled directoryListButton root-70"
|
||||
data-is-focusable={false}
|
||||
disabled={true}
|
||||
onClick={[Function]}
|
||||
@@ -1941,7 +1939,7 @@ exports[`test render renders with filters 1`] = `
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
className="ms-Button-flexContainer flexContainer-58"
|
||||
className="ms-Button-flexContainer flexContainer-71"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<div
|
||||
@@ -1972,7 +1970,7 @@ exports[`test render renders with filters 1`] = `
|
||||
</List>
|
||||
</div>
|
||||
<div
|
||||
className="stickyBelow-43"
|
||||
className="stickyBelow-56"
|
||||
style={
|
||||
Object {
|
||||
"bottom": "0px",
|
||||
@@ -1983,7 +1981,7 @@ exports[`test render renders with filters 1`] = `
|
||||
}
|
||||
>
|
||||
<div
|
||||
className="stickyBelowItems-44"
|
||||
className="stickyBelowItems-57"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import {
|
||||
Checkbox,
|
||||
DefaultButton,
|
||||
Dropdown,
|
||||
IDropdownOption,
|
||||
IDropdownStyles,
|
||||
ITextFieldStyles,
|
||||
Stack,
|
||||
TextField,
|
||||
} from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { Stack } from "office-ui-fabric-react/lib/Stack";
|
||||
import { Dropdown, IDropdownOption, IDropdownStyles } from "office-ui-fabric-react/lib/Dropdown";
|
||||
import { Checkbox } from "office-ui-fabric-react/lib/Checkbox";
|
||||
import { TextField, ITextFieldStyles } from "office-ui-fabric-react/lib/TextField";
|
||||
import { DefaultButton } from "office-ui-fabric-react";
|
||||
import "./FeaturePanelComponent.less";
|
||||
|
||||
export const FeaturePanelComponent: React.FunctionComponent = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { FeaturePanelComponent } from "./FeaturePanelComponent";
|
||||
import { getTheme, mergeStyleSets, FontWeights, Modal, IconButton, IIconProps } from "office-ui-fabric-react";
|
||||
import { getTheme, mergeStyleSets, FontWeights, Modal, IconButton, IIconProps } from "@fluentui/react";
|
||||
import "./FeaturePanelLauncher.less";
|
||||
|
||||
// Modal wrapper
|
||||
|
||||
@@ -57,7 +57,7 @@ exports[`Feature panel renders all flags 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
label="Base Url"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
@@ -85,7 +85,7 @@ exports[`Feature panel renders all flags 1`] = `
|
||||
}
|
||||
}
|
||||
/>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
label="Platform"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DefaultButton, IButtonProps, ITextFieldProps, TextField } from "office-ui-fabric-react";
|
||||
import { DefaultButton, IButtonProps, ITextFieldProps, TextField } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import * as Constants from "../../../Common/Constants";
|
||||
import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
ChoiceGroup,
|
||||
IButtonProps,
|
||||
IChoiceGroupProps,
|
||||
PrimaryButton,
|
||||
IChoiceGroupOption,
|
||||
} from "office-ui-fabric-react";
|
||||
import { ChoiceGroup, IButtonProps, IChoiceGroupProps, PrimaryButton, IChoiceGroupOption } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { ChildrenMargin } from "./GitHubStyleConstants";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DefaultButton, IButtonProps, Link, PrimaryButton } from "office-ui-fabric-react";
|
||||
import { DefaultButton, IButtonProps, Link, PrimaryButton } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { IGitHubBranch, IGitHubRepo } from "../../../GitHub/GitHubClient";
|
||||
import { AddRepoComponent, AddRepoComponentProps } from "./AddRepoComponent";
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
IDropdownStyleProps,
|
||||
IDropdownStyles,
|
||||
IStyleFunctionOrObject,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
|
||||
export const ButtonsFooterStyle: React.CSSProperties = {
|
||||
paddingTop: 14,
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
ResponsiveMode,
|
||||
SelectionMode,
|
||||
Text,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { IGitHubBranch, IGitHubPageInfo } from "../../../GitHub/GitHubClient";
|
||||
import * as GitHubUtils from "../../../Utils/GitHubUtils";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { Stack, Text, Separator, FontIcon, CommandButton, FontWeights, ITextProps } from "office-ui-fabric-react";
|
||||
import { Stack, Text, Separator, FontIcon, CommandButton, FontWeights, ITextProps } from "@fluentui/react";
|
||||
|
||||
export class GalleryHeaderComponent extends React.Component {
|
||||
private static readonly azureText = "Microsoft Azure";
|
||||
|
||||
@@ -13,7 +13,6 @@ const createTestDatabaseAccount = (): DataModels.DatabaseAccount => {
|
||||
gremlinEndpoint: null,
|
||||
tableEndpoint: null,
|
||||
},
|
||||
tags: "testTags",
|
||||
type: "testType",
|
||||
};
|
||||
};
|
||||
@@ -30,7 +29,6 @@ const createTestMongo32DatabaseAccount = (): DataModels.DatabaseAccount => {
|
||||
gremlinEndpoint: null,
|
||||
tableEndpoint: null,
|
||||
},
|
||||
tags: "testTags",
|
||||
type: "testType",
|
||||
};
|
||||
};
|
||||
@@ -48,7 +46,6 @@ const createTestMongo36DatabaseAccount = (): DataModels.DatabaseAccount => {
|
||||
tableEndpoint: null,
|
||||
mongoEndpoint: "https://testMongoEndpoint.azure.com/",
|
||||
},
|
||||
tags: "testTags",
|
||||
type: "testType",
|
||||
};
|
||||
};
|
||||
@@ -65,7 +62,6 @@ const createTestCassandraDatabaseAccount = (): DataModels.DatabaseAccount => {
|
||||
gremlinEndpoint: null,
|
||||
tableEndpoint: null,
|
||||
},
|
||||
tags: "testTags",
|
||||
type: "testType",
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { Card } from "@uifabric/react-cards";
|
||||
import CosmosDBLogo from "images/CosmosDB-logo.svg";
|
||||
import {
|
||||
BaseButton,
|
||||
Button,
|
||||
@@ -9,14 +7,15 @@ import {
|
||||
Image,
|
||||
ImageFit,
|
||||
Link,
|
||||
LinkBase,
|
||||
Persona,
|
||||
Separator,
|
||||
Spinner,
|
||||
SpinnerSize,
|
||||
Text,
|
||||
TooltipHost,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import { Card } from "@uifabric/react-cards";
|
||||
import CosmosDBLogo from "images/CosmosDB-logo.svg";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import { IGalleryItem } from "../../../../Juno/JunoClient";
|
||||
import * as FileSystemUtil from "../../../Notebook/FileSystemUtil";
|
||||
@@ -110,7 +109,7 @@ export const GalleryCardComponent: FunctionComponent<GalleryCardComponentProps>
|
||||
|
||||
const handlerOnClick = (
|
||||
event:
|
||||
| React.MouseEvent<HTMLElement | HTMLAnchorElement | HTMLButtonElement | LinkBase, MouseEvent>
|
||||
| React.MouseEvent<HTMLElement | HTMLAnchorElement | HTMLButtonElement | MouseEvent>
|
||||
| React.MouseEvent<
|
||||
HTMLAnchorElement | HTMLButtonElement | HTMLDivElement | BaseButton | Button | HTMLSpanElement,
|
||||
MouseEvent
|
||||
|
||||
@@ -31,7 +31,7 @@ exports[`GalleryCardComponent renders 1`] = `
|
||||
/>
|
||||
</CardItem>
|
||||
<CardItem>
|
||||
<StyledImageBase
|
||||
<Image
|
||||
alt="name cover image"
|
||||
height={144}
|
||||
imageFit={2}
|
||||
|
||||
123
src/Explorer/Controls/NotebookGallery/CodeOfConductComponent.tsx
Normal file
123
src/Explorer/Controls/NotebookGallery/CodeOfConductComponent.tsx
Normal file
@@ -0,0 +1,123 @@
|
||||
import * as React from "react";
|
||||
import { JunoClient } from "../../../Juno/JunoClient";
|
||||
import { HttpStatusCodes, CodeOfConductEndpoints } from "../../../Common/Constants";
|
||||
import { Stack, Text, Checkbox, PrimaryButton, Link } from "@fluentui/react";
|
||||
import { getErrorMessage, getErrorStack, handleError } from "../../../Common/ErrorHandlingUtils";
|
||||
import { trace, traceFailure, traceStart, traceSuccess } from "../../../Shared/Telemetry/TelemetryProcessor";
|
||||
import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||
|
||||
export interface CodeOfConductComponentProps {
|
||||
junoClient: JunoClient;
|
||||
onAcceptCodeOfConduct: (result: boolean) => void;
|
||||
}
|
||||
|
||||
interface CodeOfConductComponentState {
|
||||
readCodeOfConduct: boolean;
|
||||
}
|
||||
|
||||
export class CodeOfConductComponent extends React.Component<CodeOfConductComponentProps, CodeOfConductComponentState> {
|
||||
private viewCodeOfConductTraced: boolean;
|
||||
private descriptionPara1: string;
|
||||
private descriptionPara2: string;
|
||||
private descriptionPara3: string;
|
||||
private link1: { label: string; url: string };
|
||||
|
||||
constructor(props: CodeOfConductComponentProps) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
readCodeOfConduct: false,
|
||||
};
|
||||
|
||||
this.descriptionPara1 = "Azure Cosmos DB Notebook Gallery - Code of Conduct";
|
||||
this.descriptionPara2 = "The notebook public gallery contains notebook samples shared by users of Azure Cosmos DB.";
|
||||
this.descriptionPara3 = "In order to view and publish your samples to the gallery, you must accept the ";
|
||||
this.link1 = { label: "code of conduct.", url: CodeOfConductEndpoints.codeOfConduct };
|
||||
}
|
||||
|
||||
private async acceptCodeOfConduct(): Promise<void> {
|
||||
const startKey = traceStart(Action.NotebooksGalleryAcceptCodeOfConduct);
|
||||
|
||||
try {
|
||||
const response = await this.props.junoClient.acceptCodeOfConduct();
|
||||
if (response.status !== HttpStatusCodes.OK && response.status !== HttpStatusCodes.NoContent) {
|
||||
throw new Error(`Received HTTP ${response.status} when accepting code of conduct`);
|
||||
}
|
||||
|
||||
traceSuccess(Action.NotebooksGalleryAcceptCodeOfConduct, {}, startKey);
|
||||
|
||||
this.props.onAcceptCodeOfConduct(response.data);
|
||||
} catch (error) {
|
||||
traceFailure(
|
||||
Action.NotebooksGalleryAcceptCodeOfConduct,
|
||||
{
|
||||
error: getErrorMessage(error),
|
||||
errorStack: getErrorStack(error),
|
||||
},
|
||||
startKey
|
||||
);
|
||||
|
||||
handleError(error, "CodeOfConductComponent/acceptCodeOfConduct", "Failed to accept code of conduct");
|
||||
}
|
||||
}
|
||||
|
||||
private onChangeCheckbox = (): void => {
|
||||
this.setState({ readCodeOfConduct: !this.state.readCodeOfConduct });
|
||||
};
|
||||
|
||||
public render(): JSX.Element {
|
||||
if (!this.viewCodeOfConductTraced) {
|
||||
this.viewCodeOfConductTraced = true;
|
||||
trace(Action.NotebooksGalleryViewCodeOfConduct);
|
||||
}
|
||||
|
||||
return (
|
||||
<Stack tokens={{ childrenGap: 20 }}>
|
||||
<Stack.Item>
|
||||
<Text style={{ fontWeight: 500, fontSize: "20px" }}>{this.descriptionPara1}</Text>
|
||||
</Stack.Item>
|
||||
|
||||
<Stack.Item>
|
||||
<Text>{this.descriptionPara2}</Text>
|
||||
</Stack.Item>
|
||||
|
||||
<Stack.Item>
|
||||
<Text>
|
||||
{this.descriptionPara3}
|
||||
<Link href={this.link1.url} target="_blank">
|
||||
{this.link1.label}
|
||||
</Link>
|
||||
</Text>
|
||||
</Stack.Item>
|
||||
|
||||
<Stack.Item>
|
||||
<Checkbox
|
||||
styles={{
|
||||
label: {
|
||||
margin: 0,
|
||||
padding: "2 0 2 0",
|
||||
},
|
||||
text: {
|
||||
fontSize: 12,
|
||||
},
|
||||
}}
|
||||
label="I have read and accept the code of conduct."
|
||||
onChange={this.onChangeCheckbox}
|
||||
/>
|
||||
</Stack.Item>
|
||||
|
||||
<Stack.Item>
|
||||
<PrimaryButton
|
||||
ariaLabel="Continue"
|
||||
title="Continue"
|
||||
onClick={async () => await this.acceptCodeOfConduct()}
|
||||
tabIndex={0}
|
||||
className="genericPaneSubmitBtn"
|
||||
text="Continue"
|
||||
disabled={!this.state.readCodeOfConduct}
|
||||
/>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ describe("CodeOfConductComponent", () => {
|
||||
let codeOfConductProps: CodeOfConductComponentProps;
|
||||
|
||||
beforeEach(() => {
|
||||
const junoClient = new JunoClient(undefined);
|
||||
const junoClient = new JunoClient();
|
||||
junoClient.acceptCodeOfConduct = jest.fn().mockReturnValue({
|
||||
status: HttpStatusCodes.OK,
|
||||
data: true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Checkbox, Link, PrimaryButton, Stack, Text } from "office-ui-fabric-react";
|
||||
import { Checkbox, Link, PrimaryButton, Stack, Text } from "@fluentui/react";
|
||||
import React, { FunctionComponent, useEffect, useState } from "react";
|
||||
import { CodeOfConductEndpoints, HttpStatusCodes } from "../../../../Common/Constants";
|
||||
import { getErrorMessage, getErrorStack, handleError } from "../../../../Common/ErrorHandlingUtils";
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
SpinnerSize,
|
||||
Stack,
|
||||
Text,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { HttpStatusCodes } from "../../../Common/Constants";
|
||||
import { handleError } from "../../../Common/ErrorHandlingUtils";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { Icon, Label, Stack, HoverCard, HoverCardType, Link } from "office-ui-fabric-react";
|
||||
import { Icon, Label, Stack, HoverCard, HoverCardType, Link } from "@fluentui/react";
|
||||
import { CodeOfConductEndpoints } from "../../../../Common/Constants";
|
||||
import "./InfoComponent.less";
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
||||
<div
|
||||
className="galleryContainer"
|
||||
>
|
||||
<StyledPivotBase
|
||||
<StyledPivot
|
||||
onLinkClick={[Function]}
|
||||
selectedKey="OfficialSamples"
|
||||
>
|
||||
@@ -41,7 +41,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
||||
<StackItem
|
||||
grow={true}
|
||||
>
|
||||
<StyledSearchBoxBase
|
||||
<StyledSearchBox
|
||||
onChange={[Function]}
|
||||
placeholder="Search"
|
||||
/>
|
||||
@@ -60,7 +60,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
onChange={[Function]}
|
||||
options={
|
||||
Array [
|
||||
@@ -127,7 +127,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
||||
<StackItem
|
||||
grow={true}
|
||||
>
|
||||
<StyledSearchBoxBase
|
||||
<StyledSearchBox
|
||||
onChange={[Function]}
|
||||
placeholder="Search"
|
||||
/>
|
||||
@@ -146,7 +146,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
onChange={[Function]}
|
||||
options={
|
||||
Array [
|
||||
@@ -182,6 +182,6 @@ exports[`GalleryViewerComponent renders 1`] = `
|
||||
</StackItem>
|
||||
</Stack>
|
||||
</PivotItem>
|
||||
</StyledPivotBase>
|
||||
</StyledPivot>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -1,18 +1,8 @@
|
||||
/**
|
||||
* Wrapper around Notebook metadata
|
||||
*/
|
||||
import { FontWeights, Icon, IconButton, Link, Persona, PersonaSize, PrimaryButton, Stack, Text } from "@fluentui/react";
|
||||
import CosmosDBLogo from "images/CosmosDB-logo.svg";
|
||||
import {
|
||||
FontWeights,
|
||||
Icon,
|
||||
IconButton,
|
||||
Link,
|
||||
Persona,
|
||||
PersonaSize,
|
||||
PrimaryButton,
|
||||
Stack,
|
||||
Text,
|
||||
} from "office-ui-fabric-react";
|
||||
import * as React from "react";
|
||||
import { IGalleryItem } from "../../../Juno/JunoClient";
|
||||
import * as FileSystemUtil from "../../Notebook/FileSystemUtil";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
import { Notebook } from "@nteract/commutable";
|
||||
import { createContentRef } from "@nteract/core";
|
||||
import { IChoiceGroupProps, Icon, IProgressIndicatorProps, Link, ProgressIndicator } from "office-ui-fabric-react";
|
||||
import { IChoiceGroupProps, Icon, IProgressIndicatorProps, Link, ProgressIndicator } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { contents } from "rx-jupyter";
|
||||
import { IGalleryItem, JunoClient } from "../../../Juno/JunoClient";
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
import SaveQueryBannerIcon from "images/save_query_banner.png";
|
||||
import { IButtonProps, IconButton } from "office-ui-fabric-react/lib/Button";
|
||||
import { ContextualMenu, IContextualMenuProps } from "office-ui-fabric-react/lib/ContextualMenu";
|
||||
import {
|
||||
ContextualMenu,
|
||||
DetailsList,
|
||||
DetailsListLayoutMode,
|
||||
DetailsRow,
|
||||
FocusZone,
|
||||
IButtonProps,
|
||||
IColumn,
|
||||
IconButton,
|
||||
IContextualMenuProps,
|
||||
IDetailsListProps,
|
||||
IDetailsRowProps,
|
||||
} from "office-ui-fabric-react/lib/DetailsList";
|
||||
import { FocusZone } from "office-ui-fabric-react/lib/FocusZone";
|
||||
import { ITextField, ITextFieldProps, TextField } from "office-ui-fabric-react/lib/TextField";
|
||||
import {
|
||||
IObjectWithKey,
|
||||
ISelectionZoneProps,
|
||||
ITextField,
|
||||
ITextFieldProps,
|
||||
Selection,
|
||||
SelectionMode,
|
||||
SelectionZone,
|
||||
} from "office-ui-fabric-react/lib/utilities/selection/index";
|
||||
TextField,
|
||||
} from "@fluentui/react";
|
||||
import SaveQueryBannerIcon from "images/save_query_banner.png";
|
||||
import * as React from "react";
|
||||
import * as _ from "underscore";
|
||||
import * as Constants from "../../../Common/Constants";
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* Horizontal switch component
|
||||
*/
|
||||
|
||||
import { Icon } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import "./RadioSwitchComponent.less";
|
||||
import { Icon } from "office-ui-fabric-react/lib/Icon";
|
||||
import { NormalizedEventKey } from "../../../Common/Constants";
|
||||
import "./RadioSwitchComponent.less";
|
||||
|
||||
export interface Choice {
|
||||
key: string;
|
||||
|
||||
@@ -154,19 +154,20 @@ describe("SettingsComponent", () => {
|
||||
expect(settingsComponentInstance.hasConflictResolution()).toEqual(undefined);
|
||||
|
||||
const newContainer = new Explorer();
|
||||
newContainer.databaseAccount = ko.observable({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
location: undefined,
|
||||
type: undefined,
|
||||
kind: undefined,
|
||||
tags: undefined,
|
||||
properties: {
|
||||
documentEndpoint: undefined,
|
||||
tableEndpoint: undefined,
|
||||
gremlinEndpoint: undefined,
|
||||
cassandraEndpoint: undefined,
|
||||
enableMultipleWriteLocations: true,
|
||||
updateUserContext({
|
||||
databaseAccount: {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
location: undefined,
|
||||
type: undefined,
|
||||
kind: undefined,
|
||||
properties: {
|
||||
documentEndpoint: undefined,
|
||||
tableEndpoint: undefined,
|
||||
gremlinEndpoint: undefined,
|
||||
cassandraEndpoint: undefined,
|
||||
enableMultipleWriteLocations: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
const newCollection = { ...collection };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IPivotItemProps, IPivotProps, Pivot, PivotItem } from "@fluentui/react";
|
||||
import DiscardIcon from "images/discard.svg";
|
||||
import SaveIcon from "images/save-cosmos.svg";
|
||||
import { IPivotItemProps, IPivotProps, Pivot, PivotItem } from "office-ui-fabric-react";
|
||||
import * as React from "react";
|
||||
import { AuthType } from "../../../AuthType";
|
||||
import * as Constants from "../../../Common/Constants";
|
||||
@@ -233,11 +233,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
}
|
||||
|
||||
public loadMongoIndexes = async (): Promise<void> => {
|
||||
if (
|
||||
userContext.apiType === "Mongo" &&
|
||||
this.container.isEnableMongoCapabilityPresent() &&
|
||||
this.container.databaseAccount()
|
||||
) {
|
||||
if (userContext.apiType === "Mongo" && userContext?.databaseAccount) {
|
||||
this.mongoDBCollectionResource = await readMongoDBCollectionThroughRP(
|
||||
this.collection.databaseId,
|
||||
this.collection.id()
|
||||
@@ -300,8 +296,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
this.container && userContext.apiType === "Cassandra" && hasDatabaseSharedThroughput(this.collection);
|
||||
|
||||
public hasConflictResolution = (): boolean =>
|
||||
this.container?.databaseAccount &&
|
||||
this.container.databaseAccount()?.properties?.enableMultipleWriteLocations &&
|
||||
userContext?.databaseAccount?.properties?.enableMultipleWriteLocations &&
|
||||
this.collection.conflictResolutionPolicy &&
|
||||
!!this.collection.conflictResolutionPolicy();
|
||||
|
||||
@@ -876,7 +871,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
||||
mongoIndexingPolicyComponentProps: MongoIndexingPolicyComponentProps
|
||||
): JSX.Element => {
|
||||
if (userContext.authType === AuthType.AAD) {
|
||||
if (this.container.isEnableMongoCapabilityPresent()) {
|
||||
if (userContext.apiType === "Mongo") {
|
||||
return <MongoIndexingPolicyComponent {...mongoIndexingPolicyComponentProps} />;
|
||||
}
|
||||
return undefined;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
import { IColumn, Text } from "office-ui-fabric-react";
|
||||
import { IColumn, Text } from "@fluentui/react";
|
||||
import {
|
||||
getAutoPilotV3SpendElement,
|
||||
getEstimatedSpendingElement,
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
IDetailsRowProps,
|
||||
DetailsRow,
|
||||
IDetailsColumnStyles,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import { isDirtyTypes, isDirty } from "./SettingsUtils";
|
||||
|
||||
export interface EstimatedSpendingDisplayProps {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
subComponentStackProps,
|
||||
getChoiceGroupStyles,
|
||||
} from "../SettingsRenderUtils";
|
||||
import { TextField, ITextFieldProps, Stack, IChoiceGroupOption, ChoiceGroup } from "office-ui-fabric-react";
|
||||
import { TextField, ITextFieldProps, Stack, IChoiceGroupOption, ChoiceGroup } from "@fluentui/react";
|
||||
import { ToolTipLabelComponent } from "./ToolTipLabelComponent";
|
||||
import { isDirty } from "../SettingsUtils";
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { MessageBar, MessageBarType, Stack } from "office-ui-fabric-react";
|
||||
import { MessageBar, MessageBarType, Stack } from "@fluentui/react";
|
||||
import * as monaco from "monaco-editor";
|
||||
import * as React from "react";
|
||||
import * as DataModels from "../../../../Contracts/DataModels";
|
||||
import { loadMonaco, monaco } from "../../../LazyMonaco";
|
||||
import { loadMonaco } from "../../../LazyMonaco";
|
||||
import { indexingPolicynUnsavedWarningMessage, titleAndInputStackProps } from "../SettingsRenderUtils";
|
||||
import { isDirty, isIndexTransforming } from "../SettingsUtils";
|
||||
import { IndexingPolicyRefreshComponent } from "./IndexingPolicyRefresh/IndexingPolicyRefreshComponent";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { MessageBar, MessageBarType } from "office-ui-fabric-react";
|
||||
import { MessageBar, MessageBarType } from "@fluentui/react";
|
||||
import {
|
||||
mongoIndexTransformationRefreshingMessage,
|
||||
renderMongoIndexTransformationRefreshMessage,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`IndexingPolicyRefreshComponent renders 1`] = `
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarType={5}
|
||||
>
|
||||
<Text
|
||||
@@ -20,5 +20,5 @@ exports[`IndexingPolicyRefreshComponent renders 1`] = `
|
||||
Refresh to check the progress.
|
||||
</StyledLinkBase>
|
||||
</Text>
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
`;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Dropdown,
|
||||
IDropdownOption,
|
||||
ITextField,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import {
|
||||
addMongoIndexSubElementsTokens,
|
||||
mongoErrorMessageStyles,
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Spinner,
|
||||
SpinnerSize,
|
||||
Separator,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import {
|
||||
addMongoIndexStackProps,
|
||||
customDetailsListStyles,
|
||||
|
||||
@@ -30,7 +30,7 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
||||
}
|
||||
value="sample_key"
|
||||
/>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
ariaLabel="Index Type 1"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
@@ -67,7 +67,7 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
||||
onClick={[Function]}
|
||||
/>
|
||||
</Stack>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarType={1}
|
||||
styles={
|
||||
Object {
|
||||
@@ -78,6 +78,6 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
||||
}
|
||||
>
|
||||
sample error
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
</Stack>
|
||||
`;
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import { shallow } from "enzyme";
|
||||
import ko from "knockout";
|
||||
import React from "react";
|
||||
import { ScaleComponent, ScaleComponentProps } from "./ScaleComponent";
|
||||
import { container, collection } from "../TestUtils";
|
||||
import { ThroughputInputAutoPilotV3Component } from "./ThroughputInputComponents/ThroughputInputAutoPilotV3Component";
|
||||
import Explorer from "../../../Explorer";
|
||||
import * as Constants from "../../../../Common/Constants";
|
||||
import * as DataModels from "../../../../Contracts/DataModels";
|
||||
import { throughputUnit } from "../SettingsRenderUtils";
|
||||
import * as SharedConstants from "../../../../Shared/Constants";
|
||||
import ko from "knockout";
|
||||
import { updateUserContext } from "../../../../UserContext";
|
||||
import Explorer from "../../../Explorer";
|
||||
import { throughputUnit } from "../SettingsRenderUtils";
|
||||
import { collection, container } from "../TestUtils";
|
||||
import { ScaleComponent, ScaleComponentProps } from "./ScaleComponent";
|
||||
import { ThroughputInputAutoPilotV3Component } from "./ThroughputInputComponents/ThroughputInputAutoPilotV3Component";
|
||||
|
||||
describe("ScaleComponent", () => {
|
||||
const nonNationalCloudContainer = new Explorer();
|
||||
@@ -80,25 +81,25 @@ describe("ScaleComponent", () => {
|
||||
|
||||
it("autoScale enabled", () => {
|
||||
const newContainer = new Explorer();
|
||||
|
||||
newContainer.databaseAccount({
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
location: undefined,
|
||||
type: undefined,
|
||||
kind: "documentdb",
|
||||
tags: undefined,
|
||||
properties: {
|
||||
documentEndpoint: undefined,
|
||||
tableEndpoint: undefined,
|
||||
gremlinEndpoint: undefined,
|
||||
cassandraEndpoint: undefined,
|
||||
capabilities: [
|
||||
{
|
||||
name: Constants.CapabilityNames.EnableAutoScale.toLowerCase(),
|
||||
description: undefined,
|
||||
},
|
||||
],
|
||||
updateUserContext({
|
||||
databaseAccount: {
|
||||
id: undefined,
|
||||
name: undefined,
|
||||
location: undefined,
|
||||
type: undefined,
|
||||
kind: "documentdb",
|
||||
properties: {
|
||||
documentEndpoint: undefined,
|
||||
tableEndpoint: undefined,
|
||||
gremlinEndpoint: undefined,
|
||||
cassandraEndpoint: undefined,
|
||||
capabilities: [
|
||||
{
|
||||
name: Constants.CapabilityNames.EnableAutoScale.toLowerCase(),
|
||||
description: undefined,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
const props = { ...baseProps, container: newContainer };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Label, Link, MessageBar, MessageBarType, Stack, Text, TextField } from "office-ui-fabric-react";
|
||||
import { Label, Link, MessageBar, MessageBarType, Stack, Text, TextField } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import * as Constants from "../../../../Common/Constants";
|
||||
import { configContext, Platform } from "../../../../ConfigContext";
|
||||
@@ -54,8 +54,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
||||
}
|
||||
|
||||
public isAutoScaleEnabled = (): boolean => {
|
||||
const accountCapabilities: DataModels.Capability[] = this.props.container?.databaseAccount()?.properties
|
||||
?.capabilities;
|
||||
const accountCapabilities: DataModels.Capability[] = userContext?.databaseAccount?.properties?.capabilities;
|
||||
const enableAutoScaleCapability =
|
||||
accountCapabilities &&
|
||||
accountCapabilities.find((capability: DataModels.Capability) => {
|
||||
@@ -170,7 +169,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
||||
|
||||
private getThroughputInputComponent = (): JSX.Element => (
|
||||
<ThroughputInputAutoPilotV3Component
|
||||
databaseAccount={this.props.container.databaseAccount()}
|
||||
databaseAccount={userContext?.databaseAccount}
|
||||
databaseName={this.databaseId}
|
||||
collectionName={this.collectionId}
|
||||
throughput={this.props.throughput}
|
||||
@@ -199,8 +198,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
||||
);
|
||||
|
||||
private isFreeTierAccount(): boolean {
|
||||
const databaseAccount = this.props.container?.databaseAccount();
|
||||
return databaseAccount?.properties?.enableFreeTier;
|
||||
return userContext?.databaseAccount?.properties?.enableFreeTier;
|
||||
}
|
||||
|
||||
private getFreeTierInfoMessage(): JSX.Element {
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
import {
|
||||
ChoiceGroup,
|
||||
IChoiceGroupOption,
|
||||
Label,
|
||||
Link,
|
||||
MessageBar,
|
||||
Stack,
|
||||
Text,
|
||||
TextField,
|
||||
} from "office-ui-fabric-react";
|
||||
import { ChoiceGroup, IChoiceGroupOption, Label, Link, MessageBar, Stack, Text, TextField } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import * as ViewModels from "../../../../Contracts/ViewModels";
|
||||
import { userContext } from "../../../../UserContext";
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Stack,
|
||||
Text,
|
||||
TextField,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import React from "react";
|
||||
import * as DataModels from "../../../../../Contracts/DataModels";
|
||||
import { SubscriptionType } from "../../../../../Contracts/SubscriptionType";
|
||||
|
||||
@@ -8,7 +8,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarIconProps={
|
||||
Object {
|
||||
"className": "messageBarWarningIcon",
|
||||
@@ -27,7 +27,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
>
|
||||
Your bill will be affected as you update your throughput settings. Please review the updated cost estimate below before saving your changes
|
||||
</Text>
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
<Stack>
|
||||
<StyledLabelBase
|
||||
id="settingsV2RadioButtonLabelId"
|
||||
@@ -49,7 +49,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarIconProps={
|
||||
Object {
|
||||
"className": "messageBarInfoIcon",
|
||||
@@ -86,8 +86,8 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
||||
Learn more
|
||||
</a>
|
||||
</Text>
|
||||
</StyledMessageBarBase>
|
||||
<StyledChoiceGroupBase
|
||||
</StyledMessageBar>
|
||||
<StyledChoiceGroup
|
||||
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
@@ -196,7 +196,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
@@ -470,7 +470,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { Stack, Text, IIconStyles, Icon, TooltipHost, DirectionalHint } from "office-ui-fabric-react";
|
||||
import { Stack, Text, IIconStyles, Icon, TooltipHost, DirectionalHint } from "@fluentui/react";
|
||||
import { toolTipLabelStackTokens } from "../SettingsRenderUtils";
|
||||
|
||||
export interface ToolTipLabelComponentProps {
|
||||
|
||||
@@ -8,7 +8,7 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
label="Mode"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
@@ -80,7 +80,7 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
label="Mode"
|
||||
onChange={[Function]}
|
||||
options={
|
||||
|
||||
@@ -8,7 +8,7 @@ exports[`ScaleComponent renders with correct initial notification 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarType={5}
|
||||
>
|
||||
<Text
|
||||
@@ -26,7 +26,7 @@ exports[`ScaleComponent renders with correct initial notification 1`] = `
|
||||
Database: test, Container: test
|
||||
, Current autoscale throughput: 100 - 1000 RU/s, Target autoscale throughput: 600 - 6000 RU/s
|
||||
</Text>
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
<Stack
|
||||
tokens={
|
||||
Object {
|
||||
|
||||
@@ -15,7 +15,7 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="timeToLive"
|
||||
label="Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -85,7 +85,7 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
||||
value="1000"
|
||||
/>
|
||||
</Stack>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="geoSpatialConfig"
|
||||
label="Geospatial Configuration"
|
||||
onChange={[Function]}
|
||||
@@ -146,7 +146,7 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||
id="changeFeedPolicy"
|
||||
onChange={[Function]}
|
||||
@@ -238,7 +238,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="timeToLive"
|
||||
label="Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -308,7 +308,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
||||
value="1000"
|
||||
/>
|
||||
</Stack>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="geoSpatialConfig"
|
||||
label="Geospatial Configuration"
|
||||
onChange={[Function]}
|
||||
@@ -355,7 +355,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="analyticalStorageTimeToLive"
|
||||
label="Analytical Storage Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -422,7 +422,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||
id="changeFeedPolicy"
|
||||
onChange={[Function]}
|
||||
@@ -514,7 +514,7 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="timeToLive"
|
||||
label="Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -584,7 +584,7 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
||||
value="1000"
|
||||
/>
|
||||
</Stack>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="geoSpatialConfig"
|
||||
label="Geospatial Configuration"
|
||||
onChange={[Function]}
|
||||
@@ -631,7 +631,7 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="analyticalStorageTimeToLive"
|
||||
label="Analytical Storage Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -753,7 +753,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="timeToLive"
|
||||
label="Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -823,7 +823,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
||||
value="1000"
|
||||
/>
|
||||
</Stack>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="geoSpatialConfig"
|
||||
label="Geospatial Configuration"
|
||||
onChange={[Function]}
|
||||
@@ -870,7 +870,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="analyticalStorageTimeToLive"
|
||||
label="Analytical Storage Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -962,7 +962,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||
id="changeFeedPolicy"
|
||||
onChange={[Function]}
|
||||
@@ -1054,7 +1054,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="timeToLive"
|
||||
label="Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -1099,7 +1099,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
/>
|
||||
</Stack>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="geoSpatialConfig"
|
||||
label="Geospatial Configuration"
|
||||
onChange={[Function]}
|
||||
@@ -1146,7 +1146,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
id="analyticalStorageTimeToLive"
|
||||
label="Analytical Storage Time to Live"
|
||||
onChange={[Function]}
|
||||
@@ -1238,7 +1238,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
||||
}
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledChoiceGroupBase
|
||||
<StyledChoiceGroup
|
||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||
id="changeFeedPolicy"
|
||||
onChange={[Function]}
|
||||
|
||||
@@ -7,7 +7,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||
<div
|
||||
className="settingsV2TabsContainer"
|
||||
>
|
||||
<StyledPivotBase
|
||||
<StyledPivot
|
||||
onLinkClick={[Function]}
|
||||
selectedKey="ScaleTab"
|
||||
>
|
||||
@@ -399,8 +399,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"userTableQuery": [Function],
|
||||
"visible": [Function],
|
||||
},
|
||||
"clickHostedAccountSwitch": [Function],
|
||||
"clickHostedDirectorySwitch": [Function],
|
||||
"closeDialog": undefined,
|
||||
"closeSidePanel": undefined,
|
||||
"collapsedResourceTreeWidth": 36,
|
||||
@@ -422,9 +420,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"parameters": [Function],
|
||||
"tabsButtons": Array [],
|
||||
},
|
||||
"databaseAccount": [Function],
|
||||
"databases": [Function],
|
||||
"defaultExperience": [Function],
|
||||
"deleteCollectionText": [Function],
|
||||
"deleteDatabaseText": [Function],
|
||||
"gitHubClient": GitHubClient {
|
||||
@@ -1217,7 +1213,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"hasStorageAnalyticsAfecFeature": [Function],
|
||||
"isAccountReady": [Function],
|
||||
"isAutoscaleDefaultEnabled": [Function],
|
||||
"isEnableMongoCapabilityPresent": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
@@ -1226,7 +1221,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isPublishNotebookPaneEnabled": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isRightPanelV2Enabled": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isSparkEnabled": [Function],
|
||||
@@ -1235,7 +1229,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isTabsContentExpanded": [Function],
|
||||
"junoClient": JunoClient {
|
||||
"cachedPinnedRepos": [Function],
|
||||
"databaseAccount": undefined,
|
||||
},
|
||||
"memoryUsageInfo": [Function],
|
||||
"notebookBasePath": [Function],
|
||||
@@ -1243,14 +1236,12 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"onGitHubClientError": [Function],
|
||||
"onRefreshDatabasesKeyPress": [Function],
|
||||
"onRefreshResourcesClick": [Function],
|
||||
"onSwitchToConnectionString": [Function],
|
||||
"openDialog": undefined,
|
||||
"openSidePanel": undefined,
|
||||
"provideFeedbackEmail": [Function],
|
||||
"queriesClient": QueriesClient {
|
||||
"container": [Circular],
|
||||
},
|
||||
"refreshDatabaseAccount": [Function],
|
||||
"refreshNotebookList": [Function],
|
||||
"refreshTreeTitle": [Function],
|
||||
"resourceTokenCollection": [Function],
|
||||
@@ -1274,7 +1265,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||
"setIsNotificationConsoleExpanded": undefined,
|
||||
"setNotificationConsoleData": undefined,
|
||||
"signInAad": [Function],
|
||||
"sparkClusterConnectionInfo": [Function],
|
||||
"splitter": Splitter {
|
||||
"bounds": Object {
|
||||
@@ -1685,8 +1675,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"userTableQuery": [Function],
|
||||
"visible": [Function],
|
||||
},
|
||||
"clickHostedAccountSwitch": [Function],
|
||||
"clickHostedDirectorySwitch": [Function],
|
||||
"closeDialog": undefined,
|
||||
"closeSidePanel": undefined,
|
||||
"collapsedResourceTreeWidth": 36,
|
||||
@@ -1708,9 +1696,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"parameters": [Function],
|
||||
"tabsButtons": Array [],
|
||||
},
|
||||
"databaseAccount": [Function],
|
||||
"databases": [Function],
|
||||
"defaultExperience": [Function],
|
||||
"deleteCollectionText": [Function],
|
||||
"deleteDatabaseText": [Function],
|
||||
"gitHubClient": GitHubClient {
|
||||
@@ -2503,7 +2489,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"hasStorageAnalyticsAfecFeature": [Function],
|
||||
"isAccountReady": [Function],
|
||||
"isAutoscaleDefaultEnabled": [Function],
|
||||
"isEnableMongoCapabilityPresent": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
@@ -2512,7 +2497,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isPublishNotebookPaneEnabled": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isRightPanelV2Enabled": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isSparkEnabled": [Function],
|
||||
@@ -2521,7 +2505,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isTabsContentExpanded": [Function],
|
||||
"junoClient": JunoClient {
|
||||
"cachedPinnedRepos": [Function],
|
||||
"databaseAccount": undefined,
|
||||
},
|
||||
"memoryUsageInfo": [Function],
|
||||
"notebookBasePath": [Function],
|
||||
@@ -2529,14 +2512,12 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"onGitHubClientError": [Function],
|
||||
"onRefreshDatabasesKeyPress": [Function],
|
||||
"onRefreshResourcesClick": [Function],
|
||||
"onSwitchToConnectionString": [Function],
|
||||
"openDialog": undefined,
|
||||
"openSidePanel": undefined,
|
||||
"provideFeedbackEmail": [Function],
|
||||
"queriesClient": QueriesClient {
|
||||
"container": [Circular],
|
||||
},
|
||||
"refreshDatabaseAccount": [Function],
|
||||
"refreshNotebookList": [Function],
|
||||
"refreshTreeTitle": [Function],
|
||||
"resourceTokenCollection": [Function],
|
||||
@@ -2560,7 +2541,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||
"setIsNotificationConsoleExpanded": undefined,
|
||||
"setNotificationConsoleData": undefined,
|
||||
"signInAad": [Function],
|
||||
"sparkClusterConnectionInfo": [Function],
|
||||
"splitter": Splitter {
|
||||
"bounds": Object {
|
||||
@@ -2984,8 +2964,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"userTableQuery": [Function],
|
||||
"visible": [Function],
|
||||
},
|
||||
"clickHostedAccountSwitch": [Function],
|
||||
"clickHostedDirectorySwitch": [Function],
|
||||
"closeDialog": undefined,
|
||||
"closeSidePanel": undefined,
|
||||
"collapsedResourceTreeWidth": 36,
|
||||
@@ -3007,9 +2985,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"parameters": [Function],
|
||||
"tabsButtons": Array [],
|
||||
},
|
||||
"databaseAccount": [Function],
|
||||
"databases": [Function],
|
||||
"defaultExperience": [Function],
|
||||
"deleteCollectionText": [Function],
|
||||
"deleteDatabaseText": [Function],
|
||||
"gitHubClient": GitHubClient {
|
||||
@@ -3802,7 +3778,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"hasStorageAnalyticsAfecFeature": [Function],
|
||||
"isAccountReady": [Function],
|
||||
"isAutoscaleDefaultEnabled": [Function],
|
||||
"isEnableMongoCapabilityPresent": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
@@ -3811,7 +3786,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isPublishNotebookPaneEnabled": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isRightPanelV2Enabled": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isSparkEnabled": [Function],
|
||||
@@ -3820,7 +3794,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isTabsContentExpanded": [Function],
|
||||
"junoClient": JunoClient {
|
||||
"cachedPinnedRepos": [Function],
|
||||
"databaseAccount": undefined,
|
||||
},
|
||||
"memoryUsageInfo": [Function],
|
||||
"notebookBasePath": [Function],
|
||||
@@ -3828,14 +3801,12 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"onGitHubClientError": [Function],
|
||||
"onRefreshDatabasesKeyPress": [Function],
|
||||
"onRefreshResourcesClick": [Function],
|
||||
"onSwitchToConnectionString": [Function],
|
||||
"openDialog": undefined,
|
||||
"openSidePanel": undefined,
|
||||
"provideFeedbackEmail": [Function],
|
||||
"queriesClient": QueriesClient {
|
||||
"container": [Circular],
|
||||
},
|
||||
"refreshDatabaseAccount": [Function],
|
||||
"refreshNotebookList": [Function],
|
||||
"refreshTreeTitle": [Function],
|
||||
"resourceTokenCollection": [Function],
|
||||
@@ -3859,7 +3830,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||
"setIsNotificationConsoleExpanded": undefined,
|
||||
"setNotificationConsoleData": undefined,
|
||||
"signInAad": [Function],
|
||||
"sparkClusterConnectionInfo": [Function],
|
||||
"splitter": Splitter {
|
||||
"bounds": Object {
|
||||
@@ -4270,8 +4240,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"userTableQuery": [Function],
|
||||
"visible": [Function],
|
||||
},
|
||||
"clickHostedAccountSwitch": [Function],
|
||||
"clickHostedDirectorySwitch": [Function],
|
||||
"closeDialog": undefined,
|
||||
"closeSidePanel": undefined,
|
||||
"collapsedResourceTreeWidth": 36,
|
||||
@@ -4293,9 +4261,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"parameters": [Function],
|
||||
"tabsButtons": Array [],
|
||||
},
|
||||
"databaseAccount": [Function],
|
||||
"databases": [Function],
|
||||
"defaultExperience": [Function],
|
||||
"deleteCollectionText": [Function],
|
||||
"deleteDatabaseText": [Function],
|
||||
"gitHubClient": GitHubClient {
|
||||
@@ -5088,7 +5054,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"hasStorageAnalyticsAfecFeature": [Function],
|
||||
"isAccountReady": [Function],
|
||||
"isAutoscaleDefaultEnabled": [Function],
|
||||
"isEnableMongoCapabilityPresent": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
@@ -5097,7 +5062,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isPublishNotebookPaneEnabled": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isRightPanelV2Enabled": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isSparkEnabled": [Function],
|
||||
@@ -5106,7 +5070,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isTabsContentExpanded": [Function],
|
||||
"junoClient": JunoClient {
|
||||
"cachedPinnedRepos": [Function],
|
||||
"databaseAccount": undefined,
|
||||
},
|
||||
"memoryUsageInfo": [Function],
|
||||
"notebookBasePath": [Function],
|
||||
@@ -5114,14 +5077,12 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"onGitHubClientError": [Function],
|
||||
"onRefreshDatabasesKeyPress": [Function],
|
||||
"onRefreshResourcesClick": [Function],
|
||||
"onSwitchToConnectionString": [Function],
|
||||
"openDialog": undefined,
|
||||
"openSidePanel": undefined,
|
||||
"provideFeedbackEmail": [Function],
|
||||
"queriesClient": QueriesClient {
|
||||
"container": [Circular],
|
||||
},
|
||||
"refreshDatabaseAccount": [Function],
|
||||
"refreshNotebookList": [Function],
|
||||
"refreshTreeTitle": [Function],
|
||||
"resourceTokenCollection": [Function],
|
||||
@@ -5145,7 +5106,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||
"setIsNotificationConsoleExpanded": undefined,
|
||||
"setNotificationConsoleData": undefined,
|
||||
"signInAad": [Function],
|
||||
"sparkClusterConnectionInfo": [Function],
|
||||
"splitter": Splitter {
|
||||
"bounds": Object {
|
||||
@@ -5218,7 +5178,7 @@ exports[`SettingsComponent renders 1`] = `
|
||||
shouldDiscardIndexingPolicy={false}
|
||||
/>
|
||||
</PivotItem>
|
||||
</StyledPivotBase>
|
||||
</StyledPivot>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -338,7 +338,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
</StyledLinkBase>
|
||||
are only used for sorting query results. If you need to add a compound index, you can create one using the Mongo shell.
|
||||
</Text>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarType={1}
|
||||
>
|
||||
<Text>
|
||||
@@ -350,7 +350,7 @@ exports[`SettingsUtils functions render 1`] = `
|
||||
azure portal.
|
||||
</StyledLinkBase>
|
||||
</Text>
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
<Stack
|
||||
horizontal={true}
|
||||
tokens={
|
||||
|
||||
@@ -1,12 +1,20 @@
|
||||
import {
|
||||
Dropdown,
|
||||
IDropdownOption,
|
||||
IStackTokens,
|
||||
Label,
|
||||
Link,
|
||||
MessageBar,
|
||||
MessageBarType,
|
||||
Position,
|
||||
Slider,
|
||||
SpinButton,
|
||||
Stack,
|
||||
Text,
|
||||
TextField,
|
||||
Toggle,
|
||||
} from "@fluentui/react";
|
||||
import { TFunction } from "i18next";
|
||||
import { Label, Link, MessageBar, MessageBarType, Toggle } from "office-ui-fabric-react";
|
||||
import { Dropdown, IDropdownOption } from "office-ui-fabric-react/lib/Dropdown";
|
||||
import { Slider } from "office-ui-fabric-react/lib/Slider";
|
||||
import { SpinButton } from "office-ui-fabric-react/lib/SpinButton";
|
||||
import { IStackTokens, Stack } from "office-ui-fabric-react/lib/Stack";
|
||||
import { Text } from "office-ui-fabric-react/lib/Text";
|
||||
import { TextField } from "office-ui-fabric-react/lib/TextField";
|
||||
import { Position } from "office-ui-fabric-react/lib/utilities/positioning";
|
||||
import * as React from "react";
|
||||
import {
|
||||
ChoiceItem,
|
||||
|
||||
@@ -77,22 +77,11 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
||||
}
|
||||
}
|
||||
>
|
||||
<CustomizedSpinButton
|
||||
<StyledSpinButton
|
||||
aria-labelledby="throughput-label"
|
||||
ariaLabel="Throughput (input)"
|
||||
decrementButtonIcon={
|
||||
Object {
|
||||
"iconName": "ChevronDownSmall",
|
||||
}
|
||||
}
|
||||
disabled={true}
|
||||
id="throughput-spinner-input"
|
||||
incrementButtonIcon={
|
||||
Object {
|
||||
"iconName": "ChevronUpSmall",
|
||||
}
|
||||
}
|
||||
label=""
|
||||
labelPosition={0}
|
||||
max={500}
|
||||
min={400}
|
||||
@@ -169,12 +158,12 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
||||
}
|
||||
>
|
||||
<StackItem>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarType={1}
|
||||
>
|
||||
Error:
|
||||
label, truelabel and falselabel are required for boolean input 'throughput3'
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
</StackItem>
|
||||
</Stack>
|
||||
</div>
|
||||
@@ -282,7 +271,7 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
||||
label="Database"
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
aria-labelledby="database-label"
|
||||
disabled={true}
|
||||
id="database-dropdown-input"
|
||||
@@ -402,22 +391,10 @@ exports[`SmartUiComponent should render and honor input's hidden, disabled state
|
||||
}
|
||||
}
|
||||
>
|
||||
<CustomizedSpinButton
|
||||
<StyledSpinButton
|
||||
aria-labelledby="throughput-label"
|
||||
ariaLabel="Throughput (input)"
|
||||
decrementButtonIcon={
|
||||
Object {
|
||||
"iconName": "ChevronDownSmall",
|
||||
}
|
||||
}
|
||||
disabled={false}
|
||||
id="throughput-spinner-input"
|
||||
incrementButtonIcon={
|
||||
Object {
|
||||
"iconName": "ChevronUpSmall",
|
||||
}
|
||||
}
|
||||
label=""
|
||||
labelPosition={0}
|
||||
max={500}
|
||||
min={400}
|
||||
@@ -493,12 +470,12 @@ exports[`SmartUiComponent should render and honor input's hidden, disabled state
|
||||
}
|
||||
>
|
||||
<StackItem>
|
||||
<StyledMessageBarBase
|
||||
<StyledMessageBar
|
||||
messageBarType={1}
|
||||
>
|
||||
Error:
|
||||
label, truelabel and falselabel are required for boolean input 'throughput3'
|
||||
</StyledMessageBarBase>
|
||||
</StyledMessageBar>
|
||||
</StackItem>
|
||||
</Stack>
|
||||
</div>
|
||||
@@ -604,7 +581,7 @@ exports[`SmartUiComponent should render and honor input's hidden, disabled state
|
||||
label="Database"
|
||||
/>
|
||||
</StyledLabelBase>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
aria-labelledby="database-label"
|
||||
id="database-dropdown-input"
|
||||
onChange={[Function]}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Checkbox, DirectionalHint, Icon, Link, Stack, Text, TextField, TooltipHost } from "office-ui-fabric-react";
|
||||
import { Checkbox, DirectionalHint, Icon, Link, Stack, Text, TextField, TooltipHost } from "@fluentui/react";
|
||||
import React from "react";
|
||||
import * as Constants from "../../../Common/Constants";
|
||||
import * as SharedConstants from "../../../Shared/Constants";
|
||||
@@ -216,7 +216,7 @@ export class ThroughputInput extends React.Component<ThroughputInputProps, Throu
|
||||
}
|
||||
|
||||
private getCostAcknowledgeText(): string {
|
||||
const databaseAccount = userContext.databaseAccount;
|
||||
const { databaseAccount } = userContext;
|
||||
if (!databaseAccount || !databaseAccount.properties) {
|
||||
return "";
|
||||
}
|
||||
@@ -259,8 +259,8 @@ interface CostEstimateTextProps {
|
||||
|
||||
const CostEstimateText: React.FunctionComponent<CostEstimateTextProps> = (props: CostEstimateTextProps) => {
|
||||
const { requestUnits, isAutoscale } = props;
|
||||
const databaseAccount = userContext.databaseAccount;
|
||||
if (!databaseAccount || !databaseAccount.properties) {
|
||||
const { databaseAccount } = userContext;
|
||||
if (!databaseAccount?.properties) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
* - context menu
|
||||
*/
|
||||
|
||||
import {
|
||||
DirectionalHint,
|
||||
IButtonStyles,
|
||||
IconButton,
|
||||
IContextualMenuItemProps,
|
||||
IContextualMenuProps,
|
||||
} from "@fluentui/react";
|
||||
import LoadingIndicator_3Squares from "images/LoadingIndicator_3Squares.gif";
|
||||
import TriangleDownIcon from "images/Triangle-down.svg";
|
||||
import TriangleRightIcon from "images/Triangle-right.svg";
|
||||
import { IButtonStyles, IconButton } from "office-ui-fabric-react/lib/Button";
|
||||
import {
|
||||
DirectionalHint,
|
||||
IContextualMenuItemProps,
|
||||
IContextualMenuProps,
|
||||
} from "office-ui-fabric-react/lib/ContextualMenu";
|
||||
import * as React from "react";
|
||||
import AnimateHeight from "react-animate-height";
|
||||
import * as Constants from "../../../Common/Constants";
|
||||
|
||||
@@ -79,7 +79,6 @@ describe("ContainerSampleGenerator", () => {
|
||||
location: "foo",
|
||||
type: "foo",
|
||||
kind: "foo",
|
||||
tags: [],
|
||||
properties: {
|
||||
documentEndpoint: "bar",
|
||||
gremlinEndpoint: "foo",
|
||||
|
||||
@@ -80,7 +80,7 @@ export class ContainerSampleGenerator {
|
||||
if (!queries || queries.length < 1) {
|
||||
return;
|
||||
}
|
||||
const account = userContext.databaseAccount;
|
||||
const { databaseAccount: account } = userContext;
|
||||
const databaseId = collection.databaseId;
|
||||
const gremlinClient = new GremlinClient();
|
||||
gremlinClient.initialize({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as ko from "knockout";
|
||||
import { IChoiceGroupProps } from "office-ui-fabric-react";
|
||||
import { IChoiceGroupProps } from "@fluentui/react";
|
||||
import * as path from "path";
|
||||
import Q from "q";
|
||||
import React from "react";
|
||||
@@ -12,7 +12,7 @@ import { readCollection } from "../Common/dataAccess/readCollection";
|
||||
import { readDatabases } from "../Common/dataAccess/readDatabases";
|
||||
import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils";
|
||||
import * as Logger from "../Common/Logger";
|
||||
import { sendCachedDataMessage, sendMessage } from "../Common/MessageHandler";
|
||||
import { sendCachedDataMessage } from "../Common/MessageHandler";
|
||||
import { QueriesClient } from "../Common/QueriesClient";
|
||||
import { Splitter, SplitterBounds, SplitterDirection } from "../Common/Splitter";
|
||||
import { configContext, Platform } from "../ConfigContext";
|
||||
@@ -31,7 +31,7 @@ import { ExplorerSettings } from "../Shared/ExplorerSettings";
|
||||
import { Action, ActionModifiers } from "../Shared/Telemetry/TelemetryConstants";
|
||||
import * as TelemetryProcessor from "../Shared/Telemetry/TelemetryProcessor";
|
||||
import { ArcadiaResourceManager } from "../SparkClusterManager/ArcadiaResourceManager";
|
||||
import { userContext } from "../UserContext";
|
||||
import { updateUserContext, userContext } from "../UserContext";
|
||||
import { getCollectionName } from "../Utils/APITypeUtils";
|
||||
import { decryptJWTToken, getAuthorizationHeader } from "../Utils/AuthorizationUtils";
|
||||
import { stringToBlob } from "../Utils/BlobUtils";
|
||||
@@ -109,23 +109,8 @@ export default class Explorer {
|
||||
public refreshTreeTitle: ko.Observable<string>;
|
||||
public collapsedResourceTreeWidth: number = ExplorerMetrics.CollapsedResourceTreeWidth;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* Use userContext.databaseAccount instead
|
||||
* */
|
||||
public databaseAccount: ko.Observable<DataModels.DatabaseAccount>;
|
||||
public collectionCreationDefaults: ViewModels.CollectionCreationDefaults = SharedConstants.CollectionCreationDefaults;
|
||||
/**
|
||||
* @deprecated
|
||||
* Use userContext.apiType instead
|
||||
* */
|
||||
public defaultExperience: ko.Observable<string>;
|
||||
public isFixedCollectionWithSharedThroughputSupported: ko.Computed<boolean>;
|
||||
/**
|
||||
* @deprecated
|
||||
* Compare a string with userContext.apiType instead: userContext.apiType === "Mongo"
|
||||
* */
|
||||
public isEnableMongoCapabilityPresent: ko.Computed<boolean>;
|
||||
public isServerlessEnabled: ko.Computed<boolean>;
|
||||
public isAccountReady: ko.Observable<boolean>;
|
||||
public canSaveQueries: ko.Computed<boolean>;
|
||||
@@ -176,7 +161,6 @@ export default class Explorer {
|
||||
// features
|
||||
public isPublishNotebookPaneEnabled: ko.Observable<boolean>;
|
||||
public isHostedDataExplorerEnabled: ko.Computed<boolean>;
|
||||
public isRightPanelV2Enabled: ko.Computed<boolean>;
|
||||
public isMongoIndexingEnabled: ko.Observable<boolean>;
|
||||
public canExceedMaximumValue: ko.Computed<boolean>;
|
||||
public isAutoscaleDefaultEnabled: ko.Observable<boolean>;
|
||||
@@ -236,7 +220,6 @@ export default class Explorer {
|
||||
this.deleteDatabaseText = ko.observable<string>("Delete Database");
|
||||
this.refreshTreeTitle = ko.observable<string>("Refresh collections");
|
||||
|
||||
this.databaseAccount = ko.observable<DataModels.DatabaseAccount>();
|
||||
this.isAccountReady = ko.observable<boolean>(false);
|
||||
this._isInitializingNotebooks = false;
|
||||
this.arcadiaToken = ko.observable<string>();
|
||||
@@ -271,7 +254,7 @@ export default class Explorer {
|
||||
async () => {
|
||||
this.isNotebookEnabled(
|
||||
userContext.authType !== AuthType.ResourceToken &&
|
||||
((await this._containsDefaultNotebookWorkspace(this.databaseAccount())) ||
|
||||
((await this._containsDefaultNotebookWorkspace(userContext.databaseAccount)) ||
|
||||
userContext.features.enableNotebooks)
|
||||
);
|
||||
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
||||
@@ -280,7 +263,7 @@ export default class Explorer {
|
||||
});
|
||||
|
||||
if (this.isNotebookEnabled()) {
|
||||
await this.initNotebooks(this.databaseAccount());
|
||||
await this.initNotebooks(userContext.databaseAccount);
|
||||
const workspaces = await this._getArcadiaWorkspaces();
|
||||
this.arcadiaWorkspaces(workspaces);
|
||||
} else if (this.notebookToImport) {
|
||||
@@ -376,60 +359,32 @@ export default class Explorer {
|
||||
bounds: splitterBounds,
|
||||
direction: SplitterDirection.Vertical,
|
||||
});
|
||||
this.defaultExperience = ko.observable<string>();
|
||||
// this.databaseAccount.subscribe((databaseAccount) => {
|
||||
// const defaultExperience: string = DefaultExperienceUtility.getDefaultExperienceFromDatabaseAccount(
|
||||
// databaseAccount
|
||||
// );
|
||||
// this.defaultExperience(defaultExperience);
|
||||
// // TODO. Remove this entirely
|
||||
// updateUserContext({
|
||||
// apiType: DefaultExperienceUtility.mapDefaultExperienceStringToEnum(defaultExperience),
|
||||
// });
|
||||
// });
|
||||
|
||||
this.isFixedCollectionWithSharedThroughputSupported = ko.computed(() => {
|
||||
if (userContext.features.enableFixedCollectionWithSharedThroughput) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.databaseAccount && !this.databaseAccount()) {
|
||||
if (!userContext.databaseAccount) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.isEnableMongoCapabilityPresent();
|
||||
return userContext.apiType === "Mongo";
|
||||
});
|
||||
|
||||
this.isServerlessEnabled = ko.computed(
|
||||
() =>
|
||||
this.databaseAccount &&
|
||||
this.databaseAccount()?.properties?.capabilities?.find(
|
||||
userContext.databaseAccount?.properties?.capabilities?.find(
|
||||
(item) => item.name === Constants.CapabilityNames.EnableServerless
|
||||
) !== undefined
|
||||
);
|
||||
|
||||
this.isEnableMongoCapabilityPresent = ko.computed(() => {
|
||||
const capabilities = this.databaseAccount && this.databaseAccount()?.properties?.capabilities;
|
||||
if (!capabilities) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < capabilities.length; i++) {
|
||||
if (typeof capabilities[i] === "object" && capabilities[i].name === Constants.CapabilityNames.EnableMongo) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
this.isHostedDataExplorerEnabled = ko.computed<boolean>(
|
||||
() =>
|
||||
configContext.platform === Platform.Portal &&
|
||||
!this.isRunningOnNationalCloud() &&
|
||||
userContext.apiType !== "Gremlin"
|
||||
);
|
||||
this.isRightPanelV2Enabled = ko.computed<boolean>(() => userContext.features.enableRightPanelV2);
|
||||
this.selectedDatabaseId = ko.computed<string>(() => {
|
||||
const selectedNode = this.selectedNode();
|
||||
if (!selectedNode) {
|
||||
@@ -688,11 +643,11 @@ export default class Explorer {
|
||||
this.isSynapseLinkUpdating(true);
|
||||
this._closeSynapseLinkModalDialog();
|
||||
|
||||
const resourceProviderClient = new ResourceProviderClientFactory().getOrCreate(this.databaseAccount().id);
|
||||
const resourceProviderClient = new ResourceProviderClientFactory().getOrCreate(userContext.databaseAccount.id);
|
||||
|
||||
try {
|
||||
const databaseAccount: DataModels.DatabaseAccount = await resourceProviderClient.patchAsync(
|
||||
this.databaseAccount().id,
|
||||
userContext.databaseAccount.id,
|
||||
"2019-12-12",
|
||||
{
|
||||
properties: {
|
||||
@@ -703,7 +658,7 @@ export default class Explorer {
|
||||
clearInProgressMessage();
|
||||
logConsoleInfo("Enabled Azure Synapse Link for this account");
|
||||
TelemetryProcessor.traceSuccess(Action.EnableAzureSynapseLink, {}, startTime);
|
||||
this.databaseAccount(databaseAccount);
|
||||
updateUserContext({ databaseAccount });
|
||||
} catch (error) {
|
||||
clearInProgressMessage();
|
||||
logConsoleError(`Enabling Azure Synapse Link for this account failed. ${getErrorMessage(error)}`);
|
||||
@@ -752,10 +707,6 @@ export default class Explorer {
|
||||
this.setIsNotificationConsoleExpanded(true);
|
||||
}
|
||||
|
||||
public collapseConsole(): void {
|
||||
this.setIsNotificationConsoleExpanded(false);
|
||||
}
|
||||
|
||||
public toggleLeftPaneExpanded() {
|
||||
this.isLeftPaneExpanded(!this.isLeftPaneExpanded());
|
||||
|
||||
@@ -1026,14 +977,14 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
private async ensureNotebookWorkspaceRunning() {
|
||||
if (!this.databaseAccount()) {
|
||||
if (!userContext.databaseAccount) {
|
||||
return;
|
||||
}
|
||||
|
||||
let clearMessage;
|
||||
try {
|
||||
const notebookWorkspace = await this.notebookWorkspaceManager.getNotebookWorkspaceAsync(
|
||||
this.databaseAccount().id,
|
||||
userContext.databaseAccount.id,
|
||||
"default"
|
||||
);
|
||||
if (
|
||||
@@ -1043,7 +994,7 @@ export default class Explorer {
|
||||
notebookWorkspace.properties.status.toLowerCase() === "stopped"
|
||||
) {
|
||||
clearMessage = NotificationConsoleUtils.logConsoleProgress("Initializing notebook workspace");
|
||||
await this.notebookWorkspaceManager.startNotebookWorkspaceAsync(this.databaseAccount().id, "default");
|
||||
await this.notebookWorkspaceManager.startNotebookWorkspaceAsync(userContext.databaseAccount.id, "default");
|
||||
}
|
||||
} catch (error) {
|
||||
handleError(error, "Explorer/ensureNotebookWorkspaceRunning", "Failed to initialize notebook workspace");
|
||||
@@ -1128,21 +1079,10 @@ export default class Explorer {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
sessionStorage.setItem("portalDataExplorerInitMessage", JSON.stringify(inputs));
|
||||
}
|
||||
|
||||
const databaseAccount = inputs.databaseAccount || null;
|
||||
if (inputs.defaultCollectionThroughput) {
|
||||
this.collectionCreationDefaults = inputs.defaultCollectionThroughput;
|
||||
}
|
||||
this.databaseAccount(databaseAccount);
|
||||
this.setFeatureFlagsFromFlights(inputs.flights);
|
||||
TelemetryProcessor.traceSuccess(
|
||||
Action.LoadDatabaseAccount,
|
||||
{
|
||||
dataExplorerArea: Constants.Areas.ResourceTree,
|
||||
},
|
||||
inputs.loadDatabaseAccountTimestamp
|
||||
);
|
||||
|
||||
this.isAccountReady(true);
|
||||
}
|
||||
}
|
||||
@@ -1181,38 +1121,6 @@ export default class Explorer {
|
||||
this.commandBarComponentAdapter.onUpdateTabsButtons(buttons);
|
||||
}
|
||||
|
||||
public signInAad = () => {
|
||||
TelemetryProcessor.trace(Action.SignInAad, undefined, { area: "Explorer" });
|
||||
sendMessage({
|
||||
type: MessageTypes.AadSignIn,
|
||||
});
|
||||
};
|
||||
|
||||
public onSwitchToConnectionString = () => {
|
||||
$("#connectWithAad").hide();
|
||||
$("#connectWithConnectionString").show();
|
||||
};
|
||||
|
||||
public clickHostedAccountSwitch = () => {
|
||||
sendMessage({
|
||||
type: MessageTypes.UpdateAccountSwitch,
|
||||
click: true,
|
||||
});
|
||||
};
|
||||
|
||||
public clickHostedDirectorySwitch = () => {
|
||||
sendMessage({
|
||||
type: MessageTypes.UpdateDirectoryControl,
|
||||
click: true,
|
||||
});
|
||||
};
|
||||
|
||||
public refreshDatabaseAccount = () => {
|
||||
sendMessage({
|
||||
type: MessageTypes.RefreshDatabaseAccount,
|
||||
});
|
||||
};
|
||||
|
||||
private refreshAndExpandNewDatabases(newDatabases: ViewModels.Database[]): Q.Promise<void> {
|
||||
// we reload collections for all databases so the resource tree reflects any collection-level changes
|
||||
// i.e addition of stored procedures, etc.
|
||||
@@ -1632,7 +1540,7 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
||||
const authType = userContext.authType;
|
||||
const { databaseAccount, authType } = userContext;
|
||||
if (
|
||||
authType === AuthType.EncryptedToken ||
|
||||
authType === AuthType.ResourceToken ||
|
||||
@@ -1642,7 +1550,6 @@ export default class Explorer {
|
||||
return;
|
||||
}
|
||||
|
||||
const databaseAccount = this.databaseAccount();
|
||||
const firstWriteLocation =
|
||||
databaseAccount?.properties?.writeLocations &&
|
||||
databaseAccount?.properties?.writeLocations[0]?.locationName.toLowerCase();
|
||||
@@ -1681,9 +1588,8 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
public _refreshSparkEnabledStateForAccount = async (): Promise<void> => {
|
||||
const subscriptionId = userContext.subscriptionId;
|
||||
const { subscriptionId, authType } = userContext;
|
||||
const armEndpoint = configContext.ARM_ENDPOINT;
|
||||
const authType = userContext.authType;
|
||||
if (!subscriptionId || !armEndpoint || authType === AuthType.EncryptedToken) {
|
||||
// explorer is not aware of the database account yet
|
||||
this.isSparkEnabledForAccount(false);
|
||||
@@ -1710,9 +1616,8 @@ export default class Explorer {
|
||||
};
|
||||
|
||||
public _isAfecFeatureRegistered = async (featureName: string): Promise<boolean> => {
|
||||
const subscriptionId = userContext.subscriptionId;
|
||||
const { subscriptionId, authType } = userContext;
|
||||
const armEndpoint = configContext.ARM_ENDPOINT;
|
||||
const authType = userContext.authType;
|
||||
if (!featureName || !subscriptionId || !armEndpoint || authType === AuthType.EncryptedToken) {
|
||||
// explorer is not aware of the database account yet
|
||||
return false;
|
||||
@@ -2024,7 +1929,7 @@ export default class Explorer {
|
||||
}
|
||||
|
||||
public async handleOpenFileAction(path: string): Promise<void> {
|
||||
if (this.isAccountReady() && !(await this._containsDefaultNotebookWorkspace(this.databaseAccount()))) {
|
||||
if (this.isAccountReady() && !(await this._containsDefaultNotebookWorkspace(userContext.databaseAccount))) {
|
||||
this.closeAllPanes();
|
||||
this._openSetupNotebooksPaneForQuickstart();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FocusZone } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { FocusZone } from "office-ui-fabric-react/lib/FocusZone";
|
||||
import { AccessibleElement } from "../../Controls/AccessibleElement/AccessibleElement";
|
||||
|
||||
export interface CaptionId {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Dropdown, IDropdownOption, Stack, TextField } from "@fluentui/react";
|
||||
import AddIcon from "images/Add-property.svg";
|
||||
import DeleteIcon from "images/delete.svg";
|
||||
import { Dropdown, IDropdownOption, Stack, TextField } from "office-ui-fabric-react";
|
||||
import React, { FunctionComponent, useRef, useState } from "react";
|
||||
import { NormalizedEventKey } from "../../../Common/Constants";
|
||||
import { GremlinPropertyValueType, InputPropertyValueTypeString, NewVertexData } from "../../../Contracts/ViewModels";
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
* If the component signals a change through the callback passed in the properties, it must render the React component when appropriate
|
||||
* and update any knockout observables passed from the parent.
|
||||
*/
|
||||
import { CommandBar, ICommandBarItemProps } from "@fluentui/react";
|
||||
import * as ko from "knockout";
|
||||
import { CommandBar, ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
||||
import * as React from "react";
|
||||
import { ReactAdapter } from "../../../Bindings/ReactBindingHandler";
|
||||
import { StyleConstants } from "../../../Common/Constants";
|
||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||
import { userContext } from "../../../UserContext";
|
||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||
import Explorer from "../../Explorer";
|
||||
import * as CommandBarComponentButtonFactory from "./CommandBarComponentButtonFactory";
|
||||
@@ -39,7 +40,7 @@ export class CommandBarComponentAdapter implements ReactAdapter {
|
||||
container.isResourceTokenCollectionNodeSelected,
|
||||
container.isHostedDataExplorerEnabled,
|
||||
container.isSynapseLinkUpdating,
|
||||
container.databaseAccount,
|
||||
userContext?.databaseAccount,
|
||||
this.isNotebookTabActive,
|
||||
container.isServerlessEnabled,
|
||||
];
|
||||
|
||||
@@ -239,21 +239,11 @@ function createOpenSynapseLinkDialogButton(container: Explorer): CommandButtonCo
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (
|
||||
container.databaseAccount &&
|
||||
container.databaseAccount() &&
|
||||
container.databaseAccount().properties &&
|
||||
container.databaseAccount().properties.enableAnalyticalStorage
|
||||
) {
|
||||
if (userContext?.databaseAccount?.properties?.enableAnalyticalStorage) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const capabilities =
|
||||
(container.databaseAccount &&
|
||||
container.databaseAccount() &&
|
||||
container.databaseAccount().properties &&
|
||||
container.databaseAccount().properties.capabilities) ||
|
||||
[];
|
||||
const capabilities = userContext?.databaseAccount?.properties?.capabilities || [];
|
||||
if (capabilities.some((capability) => capability.name === Constants.CapabilityNames.EnableStorageAnalytics)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as CommandBarUtil from "./CommandBarUtil";
|
||||
import { ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
||||
import { ICommandBarItemProps } from "@fluentui/react";
|
||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||
import * as CommandBarUtil from "./CommandBarUtil";
|
||||
|
||||
describe("CommandBarUtil tests", () => {
|
||||
const createButton = (): CommandButtonComponentProps => {
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import {
|
||||
Dropdown,
|
||||
ICommandBarItemProps,
|
||||
IComponentAsProps,
|
||||
IconType,
|
||||
IDropdownOption,
|
||||
IDropdownStyles,
|
||||
} from "@fluentui/react";
|
||||
import ChevronDownIcon from "images/Chevron_down.svg";
|
||||
import { Observable } from "knockout";
|
||||
import { ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
||||
import { Dropdown, IDropdownOption, IDropdownStyles } from "office-ui-fabric-react/lib/Dropdown";
|
||||
import { IconType } from "office-ui-fabric-react/lib/Icon";
|
||||
import { IComponentAsProps } from "office-ui-fabric-react/lib/Utilities";
|
||||
import * as React from "react";
|
||||
import _ from "underscore";
|
||||
import { StyleConstants } from "../../../Common/Constants";
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import * as React from "react";
|
||||
import { ProgressIndicator, Spinner, SpinnerSize, Stack } from "@fluentui/react";
|
||||
import { Observable, Subscription } from "knockout";
|
||||
import * as React from "react";
|
||||
import { MemoryUsageInfo } from "../../../Contracts/DataModels";
|
||||
import { ProgressIndicator } from "office-ui-fabric-react/lib/ProgressIndicator";
|
||||
import { Spinner, SpinnerSize } from "office-ui-fabric-react/lib/Spinner";
|
||||
import { Stack } from "office-ui-fabric-react/lib/Stack";
|
||||
|
||||
interface MemoryTrackerProps {
|
||||
memoryUsageInfo: Observable<MemoryUsageInfo>;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* React component for control bar
|
||||
*/
|
||||
|
||||
import { Dropdown, IDropdownOption } from "@fluentui/react";
|
||||
import LoaderIcon from "images/circular_loader_black_16x16.gif";
|
||||
import { ReactComponent as ClearIcon } from "images/Clear1.svg";
|
||||
import ErrorBlackIcon from "images/error_black.svg";
|
||||
@@ -11,7 +12,6 @@ import InfoIcon from "images/info_color.svg";
|
||||
import LoadingIcon from "images/loading.svg";
|
||||
import ChevronDownIcon from "images/QueryBuilder/CollapseChevronDown_16x.png";
|
||||
import ChevronUpIcon from "images/QueryBuilder/CollapseChevronUp_16x.png";
|
||||
import { Dropdown, IDropdownOption } from "office-ui-fabric-react";
|
||||
import * as React from "react";
|
||||
import AnimateHeight from "react-animate-height";
|
||||
import { ClientDefaults, KeyCodes } from "../../../Common/Constants";
|
||||
|
||||
@@ -111,7 +111,7 @@ exports[`NotificationConsoleComponent renders the console 1`] = `
|
||||
<div
|
||||
className="notificationConsoleControls"
|
||||
>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
aria-label="All"
|
||||
aria-labelledby="consoleFilterLabel"
|
||||
label="Filter:"
|
||||
@@ -274,7 +274,7 @@ exports[`NotificationConsoleComponent renders the console 2`] = `
|
||||
<div
|
||||
className="notificationConsoleControls"
|
||||
>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
aria-label="All"
|
||||
aria-labelledby="consoleFilterLabel"
|
||||
label="Filter:"
|
||||
|
||||
@@ -5,6 +5,7 @@ import * as Constants from "../../Common/Constants";
|
||||
import { getErrorMessage } from "../../Common/ErrorHandlingUtils";
|
||||
import * as Logger from "../../Common/Logger";
|
||||
import * as DataModels from "../../Contracts/DataModels";
|
||||
import { userContext } from "../../UserContext";
|
||||
import { logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
||||
|
||||
export class NotebookContainerClient {
|
||||
@@ -130,14 +131,15 @@ export class NotebookContainerClient {
|
||||
|
||||
private async recreateNotebookWorkspaceAsync(): Promise<void> {
|
||||
const explorer = window.dataExplorer;
|
||||
if (!explorer || !explorer.databaseAccount() || !explorer.databaseAccount().id) {
|
||||
const { databaseAccount } = userContext;
|
||||
if (!databaseAccount?.id) {
|
||||
throw new Error("DataExplorer not initialized");
|
||||
}
|
||||
|
||||
const notebookWorkspaceManager = explorer.notebookWorkspaceManager;
|
||||
try {
|
||||
await notebookWorkspaceManager.deleteNotebookWorkspaceAsync(explorer.databaseAccount().id, "default");
|
||||
await notebookWorkspaceManager.createNotebookWorkspaceAsync(explorer.databaseAccount().id, "default");
|
||||
await notebookWorkspaceManager.deleteNotebookWorkspaceAsync(databaseAccount?.id, "default");
|
||||
await notebookWorkspaceManager.createNotebookWorkspaceAsync(databaseAccount?.id, "default");
|
||||
} catch (error) {
|
||||
Logger.logError(getErrorMessage(error), "NotebookContainerClient/recreateNotebookWorkspaceAsync");
|
||||
return Promise.reject(error);
|
||||
|
||||
@@ -17,6 +17,7 @@ import { GitHubOAuthService } from "../../GitHub/GitHubOAuthService";
|
||||
import { JunoClient } from "../../Juno/JunoClient";
|
||||
import { Action, ActionModifiers } from "../../Shared/Telemetry/TelemetryConstants";
|
||||
import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor";
|
||||
import { userContext } from "../../UserContext";
|
||||
import { getFullName } from "../../Utils/UserUtils";
|
||||
import Explorer from "../Explorer";
|
||||
import { ContextualPaneBase } from "../Panes/ContextualPaneBase";
|
||||
@@ -56,7 +57,7 @@ export default class NotebookManager {
|
||||
|
||||
public initialize(params: NotebookManagerOptions): void {
|
||||
this.params = params;
|
||||
this.junoClient = new JunoClient(this.params.container.databaseAccount);
|
||||
this.junoClient = new JunoClient();
|
||||
|
||||
this.gitHubOAuthService = new GitHubOAuthService(this.junoClient);
|
||||
this.gitHubClient = new GitHubClient(this.onGitHubClientError);
|
||||
@@ -73,7 +74,7 @@ export default class NotebookManager {
|
||||
|
||||
this.notebookClient = new NotebookContainerClient(
|
||||
this.params.container.notebookServerInfo,
|
||||
() => this.params.container.initNotebooks(this.params.container.databaseAccount()),
|
||||
() => this.params.container.initNotebooks(userContext?.databaseAccount),
|
||||
(update: MemoryUsageInfo) => this.params.container.memoryUsageInfo(update)
|
||||
);
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { IconButton, Spinner, SpinnerSize } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
import { IconButton } from "office-ui-fabric-react/lib/Button";
|
||||
import { Spinner, SpinnerSize } from "office-ui-fabric-react/lib/Spinner";
|
||||
import "./Prompt.less";
|
||||
import { PassedPromptProps } from "./Prompt";
|
||||
import "./Prompt.less";
|
||||
|
||||
export const promptContent = (props: PassedPromptProps): JSX.Element => {
|
||||
if (props.status === "busy") {
|
||||
|
||||
@@ -1,21 +1,15 @@
|
||||
import { ContextualMenuItemType, DirectionalHint, IconButton, IContextualMenuItem } from "@fluentui/react";
|
||||
import { CellId, CellType } from "@nteract/commutable";
|
||||
import { actions, AppState, DocumentRecordProps } from "@nteract/core";
|
||||
import * as selectors from "@nteract/selectors";
|
||||
import { CellToolbarContext } from "@nteract/stateful-components";
|
||||
import { ContentRef } from "@nteract/types";
|
||||
import { RecordOf } from "immutable";
|
||||
import * as React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Dispatch } from "redux";
|
||||
|
||||
import { IconButton } from "office-ui-fabric-react/lib/Button";
|
||||
import {
|
||||
DirectionalHint,
|
||||
IContextualMenuItem,
|
||||
ContextualMenuItemType,
|
||||
} from "office-ui-fabric-react/lib/ContextualMenu";
|
||||
import { actions, AppState, DocumentRecordProps } from "@nteract/core";
|
||||
import { CellToolbarContext } from "@nteract/stateful-components";
|
||||
import { CellType, CellId } from "@nteract/commutable";
|
||||
import * as selectors from "@nteract/selectors";
|
||||
import { RecordOf } from "immutable";
|
||||
import * as cdbActions from "../NotebookComponent/actions";
|
||||
import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||
import * as cdbActions from "../NotebookComponent/actions";
|
||||
|
||||
export interface ComponentProps {
|
||||
contentRef: ContentRef;
|
||||
|
||||
@@ -15,6 +15,8 @@ import { CellOutputViewerProps } from "../../../../CellOutputViewer/CellOutputVi
|
||||
interface ComponentProps {
|
||||
id: string;
|
||||
contentRef: ContentRef;
|
||||
outputsContainerClassName?: string;
|
||||
outputClassName?: string;
|
||||
}
|
||||
|
||||
interface StateProps {
|
||||
@@ -59,8 +61,10 @@ export class SandboxOutputs extends React.PureComponent<ComponentProps & StatePr
|
||||
const props: CellOutputViewerProps = {
|
||||
id: this.props.id,
|
||||
contentRef: this.props.contentRef,
|
||||
hidden: this.props.hidden,
|
||||
expanded: this.props.expanded,
|
||||
outputsContainerClassName: `nteract-cell-outputs ${this.props.hidden ? "hidden" : ""} ${
|
||||
this.props.expanded ? "expanded" : ""
|
||||
} ${this.props.outputsContainerClassName}`,
|
||||
outputClassName: this.props.outputClassName,
|
||||
outputs: this.props.outputs.toArray().map((output) => outputToJS(output)),
|
||||
onMetadataChange: this.props.onMetadataChange,
|
||||
};
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
.shemaAnalyzerComponent {
|
||||
.schemaAnalyzerComponent {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.schemaAnalyzerCard {
|
||||
max-width: 4096px;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
import { FontIcon, PrimaryButton, Spinner, SpinnerSize, Stack, Text, TextField } from "@fluentui/react";
|
||||
import { ImmutableOutput } from "@nteract/commutable";
|
||||
import { actions, AppState, ContentRef, KernelRef, selectors } from "@nteract/core";
|
||||
import { KernelOutputError, Output, StreamText } from "@nteract/outputs";
|
||||
import TransformMedia from "@nteract/stateful-components/lib/outputs/transform-media";
|
||||
import { Card } from "@uifabric/react-cards";
|
||||
import Immutable from "immutable";
|
||||
import { FontIcon, PrimaryButton, Spinner, SpinnerSize, Stack, Text, TextField } from "office-ui-fabric-react";
|
||||
import * as React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { Dispatch } from "redux";
|
||||
import loadTransform from "../NotebookComponent/loadTransform";
|
||||
import SandboxOutputs from "../NotebookRenderer/outputs/SandboxOutputs";
|
||||
import "./SchemaAnalyzerComponent.less";
|
||||
|
||||
interface SchemaAnalyzerComponentPureProps {
|
||||
@@ -91,70 +89,66 @@ export class SchemaAnalyzerComponent extends React.Component<
|
||||
const showSchemaOutput = isKernelIdle && outputs.size > 0;
|
||||
|
||||
return (
|
||||
<Stack className="schemaAnalyzerComponent" horizontalAlign="center" tokens={{ childrenGap: 20, padding: 20 }}>
|
||||
<Stack.Item grow styles={{ root: { display: "contents" } }}>
|
||||
<Stack horizontal tokens={{ childrenGap: 20 }} styles={{ root: { width: "100%" } }}>
|
||||
<Stack.Item grow align="end">
|
||||
<TextField
|
||||
value={this.state.filter}
|
||||
onChange={this.onFilterTextFieldChange}
|
||||
label="Filter"
|
||||
placeholder="{ field: 'value' }"
|
||||
disabled={!isKernelIdle}
|
||||
/>
|
||||
</Stack.Item>
|
||||
<Stack.Item align="end">
|
||||
<PrimaryButton
|
||||
text={isKernelBusy ? "Analyzing..." : "Analyze"}
|
||||
onClick={this.onAnalyzeButtonClick}
|
||||
disabled={!isKernelIdle}
|
||||
/>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
|
||||
{showSchemaOutput ? (
|
||||
outputs.map((output, index) => (
|
||||
<Card className="schemaAnalyzerCard" key={index}>
|
||||
<Card.Item tokens={{ padding: 10 }}>
|
||||
<Output output={output}>
|
||||
<TransformMedia output_type={"display_data"} id={id} contentRef={contentRef} />
|
||||
<TransformMedia output_type={"execute_result"} id={id} contentRef={contentRef} />
|
||||
<KernelOutputError />
|
||||
<StreamText />
|
||||
</Output>
|
||||
</Card.Item>
|
||||
</Card>
|
||||
))
|
||||
) : this.state.isFiltering ? (
|
||||
<Stack.Item>
|
||||
{isKernelBusy && <Spinner styles={{ root: { marginTop: 40 } }} size={SpinnerSize.large} />}
|
||||
<div className="schemaAnalyzerComponent">
|
||||
<Stack horizontalAlign="center" tokens={{ childrenGap: 20, padding: 20 }}>
|
||||
<Stack.Item grow styles={{ root: { display: "contents" } }}>
|
||||
<Stack horizontal tokens={{ childrenGap: 20 }} styles={{ root: { width: "100%" } }}>
|
||||
<Stack.Item grow align="end">
|
||||
<TextField
|
||||
value={this.state.filter}
|
||||
onChange={this.onFilterTextFieldChange}
|
||||
label="Filter"
|
||||
placeholder="{ field: 'value' }"
|
||||
disabled={!isKernelIdle}
|
||||
/>
|
||||
</Stack.Item>
|
||||
<Stack.Item align="end">
|
||||
<PrimaryButton
|
||||
text={isKernelBusy ? "Analyzing..." : "Analyze"}
|
||||
onClick={this.onAnalyzeButtonClick}
|
||||
disabled={!isKernelIdle}
|
||||
/>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
) : (
|
||||
<>
|
||||
|
||||
{showSchemaOutput ? (
|
||||
<SandboxOutputs
|
||||
id={id}
|
||||
contentRef={contentRef}
|
||||
outputsContainerClassName="schema-analyzer-cell-outputs"
|
||||
outputClassName="schema-analyzer-cell-output"
|
||||
/>
|
||||
) : this.state.isFiltering ? (
|
||||
<Stack.Item>
|
||||
<FontIcon iconName="Chart" style={{ fontSize: 100, color: "#43B1E5", marginTop: 40 }} />
|
||||
{isKernelBusy && <Spinner styles={{ root: { marginTop: 40 } }} size={SpinnerSize.large} />}
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Text variant="xxLarge">Explore your schema</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Text variant="large">
|
||||
Quickly visualize your schema to infer the frequency, types and ranges of fields in your data set.
|
||||
</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<PrimaryButton
|
||||
styles={{ root: { fontSize: 18, padding: 30 } }}
|
||||
text={isKernelBusy ? "Analyzing..." : "Analyze Schema"}
|
||||
onClick={this.onAnalyzeButtonClick}
|
||||
disabled={kernelStatus !== "idle"}
|
||||
/>
|
||||
</Stack.Item>
|
||||
<Stack.Item>{isKernelBusy && <Spinner size={SpinnerSize.large} />}</Stack.Item>
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
) : (
|
||||
<>
|
||||
<Stack.Item>
|
||||
<FontIcon iconName="Chart" style={{ fontSize: 100, color: "#43B1E5", marginTop: 40 }} />
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Text variant="xxLarge">Explore your schema</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Text variant="large">
|
||||
Quickly visualize your schema to infer the frequency, types and ranges of fields in your data set.
|
||||
</Text>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<PrimaryButton
|
||||
styles={{ root: { fontSize: 18, padding: 30 } }}
|
||||
text={isKernelBusy ? "Analyzing..." : "Analyze Schema"}
|
||||
onClick={this.onAnalyzeButtonClick}
|
||||
disabled={kernelStatus !== "idle"}
|
||||
/>
|
||||
</Stack.Item>
|
||||
<Stack.Item>{isKernelBusy && <Spinner size={SpinnerSize.large} />}</Stack.Item>
|
||||
</>
|
||||
)}
|
||||
</Stack>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Spinner, Stack, Text, TextField } from "office-ui-fabric-react";
|
||||
import { DefaultButton, PrimaryButton } from "office-ui-fabric-react/lib/Button";
|
||||
import { DefaultButton, PrimaryButton, Spinner, Stack, Text, TextField } from "@fluentui/react";
|
||||
import copyToClipboard from "clipboard-copy";
|
||||
import * as React from "react";
|
||||
import { useFullScreenURLs } from "../hooks/useFullScreenURLs";
|
||||
import copyToClipboard from "clipboard-copy";
|
||||
|
||||
export const OpenFullScreen: React.FunctionComponent = () => {
|
||||
const result = useFullScreenURLs();
|
||||
|
||||
@@ -4,47 +4,47 @@ import { updateUserContext } from "../../UserContext";
|
||||
import Explorer from "../Explorer";
|
||||
import AddCollectionPane from "./AddCollectionPane";
|
||||
|
||||
const mockDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: false,
|
||||
},
|
||||
type: undefined,
|
||||
};
|
||||
|
||||
const mockFreeTierDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: true,
|
||||
},
|
||||
type: undefined,
|
||||
};
|
||||
|
||||
describe("Add Collection Pane", () => {
|
||||
describe("isValid()", () => {
|
||||
let explorer: Explorer;
|
||||
const mockDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: false,
|
||||
},
|
||||
type: undefined,
|
||||
tags: [],
|
||||
};
|
||||
|
||||
const mockFreeTierDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: true,
|
||||
},
|
||||
type: undefined,
|
||||
tags: [],
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
explorer = new Explorer();
|
||||
});
|
||||
|
||||
it("should be true if graph API and partition key is not /id nor /label", () => {
|
||||
explorer.defaultExperience(Constants.DefaultAccountExperience.Graph.toLowerCase());
|
||||
updateUserContext({
|
||||
databaseAccount: {
|
||||
properties: {
|
||||
capabilities: [{ name: "EnableGremlin" }],
|
||||
},
|
||||
} as DatabaseAccount,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addCollectionPane = explorer.addCollectionPane as AddCollectionPane;
|
||||
addCollectionPane.partitionKey("/blah");
|
||||
expect(addCollectionPane.isValid()).toBe(true);
|
||||
@@ -58,7 +58,7 @@ describe("Add Collection Pane", () => {
|
||||
},
|
||||
} as DatabaseAccount,
|
||||
});
|
||||
|
||||
const explorer = new Explorer();
|
||||
const addCollectionPane = explorer.addCollectionPane as AddCollectionPane;
|
||||
addCollectionPane.partitionKey("/id");
|
||||
expect(addCollectionPane.isValid()).toBe(false);
|
||||
@@ -75,6 +75,7 @@ describe("Add Collection Pane", () => {
|
||||
},
|
||||
} as DatabaseAccount,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addCollectionPane = explorer.addCollectionPane as AddCollectionPane;
|
||||
|
||||
addCollectionPane.partitionKey("/id");
|
||||
@@ -85,7 +86,8 @@ describe("Add Collection Pane", () => {
|
||||
});
|
||||
|
||||
it("should display free tier text in upsell messaging", () => {
|
||||
explorer.databaseAccount(mockFreeTierDatabaseAccount);
|
||||
updateUserContext({ databaseAccount: mockFreeTierDatabaseAccount });
|
||||
const explorer = new Explorer();
|
||||
const addCollectionPane = explorer.addCollectionPane as AddCollectionPane;
|
||||
expect(addCollectionPane.isFreeTierAccount()).toBe(true);
|
||||
expect(addCollectionPane.upsellMessage()).toContain("With free tier");
|
||||
@@ -94,7 +96,8 @@ describe("Add Collection Pane", () => {
|
||||
});
|
||||
|
||||
it("should display standard texr in upsell messaging", () => {
|
||||
explorer.databaseAccount(mockDatabaseAccount);
|
||||
updateUserContext({ databaseAccount: mockDatabaseAccount });
|
||||
const explorer = new Explorer();
|
||||
const addCollectionPane = explorer.addCollectionPane as AddCollectionPane;
|
||||
expect(addCollectionPane.isFreeTierAccount()).toBe(false);
|
||||
expect(addCollectionPane.upsellMessage()).toContain("Start at");
|
||||
|
||||
@@ -108,6 +108,8 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
this.collectionWithThroughputInShared = ko.observable<boolean>(false);
|
||||
this.databaseIds = ko.observableArray<string>();
|
||||
this.uniqueKeys = ko.observableArray<DynamicListItem>();
|
||||
this.isSharedAutoPilotSelected = ko.observable<boolean>();
|
||||
this.isAutoPilotSelected = ko.observable<boolean>();
|
||||
|
||||
if (this.container) {
|
||||
this.container.databases.subscribe((newDatabases: ViewModels.Database[]) => {
|
||||
@@ -177,7 +179,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
return "";
|
||||
}
|
||||
|
||||
const account = this.container.databaseAccount();
|
||||
const { databaseAccount: account } = userContext;
|
||||
if (!account) {
|
||||
return "";
|
||||
}
|
||||
@@ -235,7 +237,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
return "";
|
||||
}
|
||||
|
||||
const account = this.container.databaseAccount();
|
||||
const { databaseAccount: account } = userContext;
|
||||
if (!account) {
|
||||
return "";
|
||||
}
|
||||
@@ -523,10 +525,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
});
|
||||
|
||||
this.isFreeTierAccount = ko.computed<boolean>(() => {
|
||||
const databaseAccount = this.container && this.container.databaseAccount && this.container.databaseAccount();
|
||||
const isFreeTierAccount =
|
||||
databaseAccount && databaseAccount.properties && databaseAccount.properties.enableFreeTier;
|
||||
return isFreeTierAccount;
|
||||
return userContext?.databaseAccount?.properties?.enableFreeTier;
|
||||
});
|
||||
|
||||
this.showUpsellMessage = ko.pureComputed(() => {
|
||||
@@ -596,9 +595,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
});
|
||||
|
||||
this._isSynapseLinkEnabled = ko.computed(() => {
|
||||
const databaseAccount =
|
||||
(this.container && this.container.databaseAccount && this.container.databaseAccount()) ||
|
||||
({} as DataModels.DatabaseAccount);
|
||||
const databaseAccount = userContext?.databaseAccount || ({} as DataModels.DatabaseAccount);
|
||||
const properties = databaseAccount.properties || ({} as DataModels.DatabaseAccountExtendedProperties);
|
||||
|
||||
// TODO: remove check for capability once all accounts have been migrated
|
||||
@@ -641,7 +638,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
}
|
||||
|
||||
public getSharedThroughputDefault(): boolean {
|
||||
const subscriptionType = userContext.subscriptionType;
|
||||
const { subscriptionType } = userContext;
|
||||
if (subscriptionType === SubscriptionType.EA || this.container.isServerlessEnabled()) {
|
||||
return false;
|
||||
}
|
||||
@@ -809,7 +806,7 @@ export default class AddCollectionPane extends ContextualPaneBase {
|
||||
let indexingPolicy: DataModels.IndexingPolicy;
|
||||
let createMongoWildcardIndex: boolean;
|
||||
// todo - remove mongo indexing policy ticket # 616274
|
||||
if (userContext.apiType === "Mongo" && this.container.isEnableMongoCapabilityPresent()) {
|
||||
if (userContext.apiType === "Mongo") {
|
||||
createMongoWildcardIndex = this.shouldCreateMongoWildcardIndex();
|
||||
} else if (this.showIndexingOptionsForSharedThroughput()) {
|
||||
if (this.useIndexingForSharedThroughput()) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Stack,
|
||||
Text,
|
||||
TooltipHost,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import React from "react";
|
||||
import * as Constants from "../../Common/Constants";
|
||||
import { createCollection } from "../../Common/dataAccess/createCollection";
|
||||
@@ -525,7 +525,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
||||
}}
|
||||
>
|
||||
<Stack className="panelGroupSpacing" id="collapsibleSectionContent">
|
||||
{this.props.explorer.isEnableMongoCapabilityPresent() && (
|
||||
{userContext.databaseAccount.properties.capabilities.find((c) => c.name === "EnableMongo") && (
|
||||
<Stack className="panelGroupSpacing">
|
||||
<Stack horizontal>
|
||||
<span className="mandatoryStar">* </span>
|
||||
@@ -841,7 +841,7 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
|
||||
}
|
||||
|
||||
private isSynapseLinkEnabled(): boolean {
|
||||
const properties = userContext.databaseAccount?.properties;
|
||||
const { properties } = userContext.databaseAccount;
|
||||
|
||||
if (!properties) {
|
||||
return false;
|
||||
|
||||
@@ -5,49 +5,43 @@ import { updateUserContext } from "../../UserContext";
|
||||
import Explorer from "../Explorer";
|
||||
import AddDatabasePane from "./AddDatabasePane";
|
||||
|
||||
const mockDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: false,
|
||||
},
|
||||
type: undefined,
|
||||
};
|
||||
|
||||
const mockFreeTierDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: true,
|
||||
},
|
||||
type: undefined,
|
||||
};
|
||||
|
||||
describe("Add Database Pane", () => {
|
||||
describe("getSharedThroughputDefault()", () => {
|
||||
let explorer: Explorer;
|
||||
const mockDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: false,
|
||||
},
|
||||
type: undefined,
|
||||
tags: [],
|
||||
};
|
||||
|
||||
const mockFreeTierDatabaseAccount: DatabaseAccount = {
|
||||
id: "mock",
|
||||
kind: "DocumentDB",
|
||||
location: "",
|
||||
name: "mock",
|
||||
properties: {
|
||||
documentEndpoint: "",
|
||||
cassandraEndpoint: "",
|
||||
gremlinEndpoint: "",
|
||||
tableEndpoint: "",
|
||||
enableFreeTier: true,
|
||||
},
|
||||
type: undefined,
|
||||
tags: [],
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
explorer = new Explorer();
|
||||
});
|
||||
|
||||
it("should be true if subscription type is Benefits", () => {
|
||||
updateUserContext({
|
||||
subscriptionType: SubscriptionType.Benefits,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.getSharedThroughputDefault()).toBe(true);
|
||||
});
|
||||
@@ -56,6 +50,7 @@ describe("Add Database Pane", () => {
|
||||
updateUserContext({
|
||||
subscriptionType: SubscriptionType.EA,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.getSharedThroughputDefault()).toBe(false);
|
||||
});
|
||||
@@ -64,6 +59,7 @@ describe("Add Database Pane", () => {
|
||||
updateUserContext({
|
||||
subscriptionType: SubscriptionType.Free,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.getSharedThroughputDefault()).toBe(true);
|
||||
});
|
||||
@@ -72,6 +68,7 @@ describe("Add Database Pane", () => {
|
||||
updateUserContext({
|
||||
subscriptionType: SubscriptionType.Internal,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.getSharedThroughputDefault()).toBe(true);
|
||||
});
|
||||
@@ -80,12 +77,14 @@ describe("Add Database Pane", () => {
|
||||
updateUserContext({
|
||||
subscriptionType: SubscriptionType.PAYG,
|
||||
});
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.getSharedThroughputDefault()).toBe(true);
|
||||
});
|
||||
|
||||
it("should display free tier text in upsell messaging", () => {
|
||||
explorer.databaseAccount(mockFreeTierDatabaseAccount);
|
||||
updateUserContext({ databaseAccount: mockFreeTierDatabaseAccount });
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.isFreeTierAccount()).toBe(true);
|
||||
expect(addDatabasePane.upsellMessage()).toContain("With free tier");
|
||||
@@ -94,7 +93,8 @@ describe("Add Database Pane", () => {
|
||||
});
|
||||
|
||||
it("should display standard texr in upsell messaging", () => {
|
||||
explorer.databaseAccount(mockDatabaseAccount);
|
||||
updateUserContext({ databaseAccount: mockDatabaseAccount });
|
||||
const explorer = new Explorer();
|
||||
const addDatabasePane = explorer.addDatabasePane as AddDatabasePane;
|
||||
expect(addDatabasePane.isFreeTierAccount()).toBe(false);
|
||||
expect(addDatabasePane.upsellMessage()).toContain("Start at");
|
||||
|
||||
@@ -112,18 +112,13 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
return "";
|
||||
}
|
||||
|
||||
const account = this.container.databaseAccount();
|
||||
const { databaseAccount: account } = userContext;
|
||||
if (!account) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const regions =
|
||||
(account &&
|
||||
account.properties &&
|
||||
account.properties.readLocations &&
|
||||
account.properties.readLocations.length) ||
|
||||
1;
|
||||
const multimaster = (account && account.properties && account.properties.enableMultipleWriteLocations) || false;
|
||||
const regions = account?.properties?.readLocations?.length || 1;
|
||||
const multimaster = account?.properties?.enableMultipleWriteLocations || false;
|
||||
|
||||
let estimatedSpendAcknowledge: string;
|
||||
let estimatedSpend: string;
|
||||
@@ -175,10 +170,7 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
});
|
||||
|
||||
this.isFreeTierAccount = ko.computed<boolean>(() => {
|
||||
const databaseAccount = this.container && this.container.databaseAccount && this.container.databaseAccount();
|
||||
const isFreeTierAccount =
|
||||
databaseAccount && databaseAccount.properties && databaseAccount.properties.enableFreeTier;
|
||||
return isFreeTierAccount;
|
||||
return userContext?.databaseAccount?.properties?.enableFreeTier;
|
||||
});
|
||||
|
||||
this.showUpsellMessage = ko.pureComputed(() => {
|
||||
@@ -336,7 +328,7 @@ export default class AddDatabasePane extends ContextualPaneBase {
|
||||
}
|
||||
|
||||
public getSharedThroughputDefault(): boolean {
|
||||
const subscriptionType = userContext.subscriptionType;
|
||||
const { subscriptionType } = userContext;
|
||||
|
||||
if (subscriptionType === SubscriptionType.EA || this.container.isServerlessEnabled()) {
|
||||
return false;
|
||||
|
||||
@@ -78,10 +78,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
this.canExceedMaximumValue = ko.pureComputed(() => this.container.canExceedMaximumValue());
|
||||
|
||||
this.isFreeTierAccount = ko.computed<boolean>(() => {
|
||||
const databaseAccount = this.container && this.container.databaseAccount && this.container.databaseAccount();
|
||||
const isFreeTierAccount =
|
||||
databaseAccount && databaseAccount.properties && databaseAccount.properties.enableFreeTier;
|
||||
return isFreeTierAccount;
|
||||
return userContext?.databaseAccount?.properties?.enableFreeTier;
|
||||
});
|
||||
|
||||
this.tableId = ko.observable<string>("");
|
||||
@@ -116,7 +113,7 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
this.resetData();
|
||||
|
||||
this.requestUnitsUsageCostDedicated = ko.computed(() => {
|
||||
const account = this.container.databaseAccount();
|
||||
const { databaseAccount: account } = userContext;
|
||||
if (!account) {
|
||||
return "";
|
||||
}
|
||||
@@ -165,18 +162,13 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
});
|
||||
|
||||
this.requestUnitsUsageCostShared = ko.computed(() => {
|
||||
const account = this.container.databaseAccount();
|
||||
const { databaseAccount: account } = userContext;
|
||||
if (!account) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const regions =
|
||||
(account &&
|
||||
account.properties &&
|
||||
account.properties.readLocations &&
|
||||
account.properties.readLocations.length) ||
|
||||
1;
|
||||
const multimaster = (account && account.properties && account.properties.enableMultipleWriteLocations) || false;
|
||||
const regions = account?.properties?.readLocations?.length || 1;
|
||||
const multimaster = account?.properties?.enableMultipleWriteLocations || false;
|
||||
let estimatedSpend: string;
|
||||
let estimatedSharedSpendAcknowledge: string;
|
||||
if (!this.isSharedAutoPilotSelected()) {
|
||||
@@ -365,18 +357,19 @@ export default class CassandraAddCollectionPane extends ContextualPaneBase {
|
||||
createTableQuery: createTableQuery,
|
||||
};
|
||||
const startKey: number = TelemetryProcessor.traceStart(Action.CreateCollection, addCollectionPaneStartMessage);
|
||||
const { databaseAccount } = userContext;
|
||||
if (toCreateKeyspace) {
|
||||
createTableAndKeyspacePromise = (<CassandraAPIDataClient>this.container.tableDataClient).createTableAndKeyspace(
|
||||
this.container.databaseAccount().properties.cassandraEndpoint,
|
||||
this.container.databaseAccount().id,
|
||||
databaseAccount?.properties.cassandraEndpoint,
|
||||
databaseAccount?.id,
|
||||
this.container,
|
||||
createTableQuery,
|
||||
createKeyspaceQuery
|
||||
);
|
||||
} else {
|
||||
createTableAndKeyspacePromise = (<CassandraAPIDataClient>this.container.tableDataClient).createTableAndKeyspace(
|
||||
this.container.databaseAccount().properties.cassandraEndpoint,
|
||||
this.container.databaseAccount().id,
|
||||
databaseAccount?.properties.cassandraEndpoint,
|
||||
databaseAccount?.id,
|
||||
this.container,
|
||||
createTableQuery
|
||||
);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IDropdownOption } from "office-ui-fabric-react";
|
||||
import { IDropdownOption } from "@fluentui/react";
|
||||
import React, { FormEvent, FunctionComponent, useEffect, useState } from "react";
|
||||
import { HttpStatusCodes } from "../../../Common/Constants";
|
||||
import { getErrorMessage, handleError } from "../../../Common/ErrorHandlingUtils";
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
SelectableOptionMenuItemType,
|
||||
Stack,
|
||||
Text,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import React, { FormEvent, FunctionComponent } from "react";
|
||||
import { IPinnedRepo } from "../../../Juno/JunoClient";
|
||||
import * as GitHubUtils from "../../../Utils/GitHubUtils";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Text, TextField } from "office-ui-fabric-react";
|
||||
import { Text, TextField } from "@fluentui/react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import { Areas } from "../../../Common/Constants";
|
||||
import { deleteCollection } from "../../../Common/dataAccess/deleteCollection";
|
||||
|
||||
@@ -523,7 +523,6 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
"borderColor": "#f3f2f1",
|
||||
"color": "#a19f9d",
|
||||
"cursor": "default",
|
||||
"pointerEvents": "none",
|
||||
"selectors": Object {
|
||||
":focus": Object {
|
||||
"outline": 0,
|
||||
@@ -786,6 +785,35 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
},
|
||||
},
|
||||
},
|
||||
"splitButtonMenuFocused": Object {
|
||||
"outline": "transparent",
|
||||
"position": "relative",
|
||||
"selectors": Object {
|
||||
".ms-Fabric--isFocusVisible &:focus:after": Object {
|
||||
"border": "1px solid #ffffff",
|
||||
"bottom": 3,
|
||||
"content": "\\"\\"",
|
||||
"left": 3,
|
||||
"outline": "1px solid #605e5c",
|
||||
"position": "absolute",
|
||||
"right": 3,
|
||||
"selectors": Object {
|
||||
"@media screen and (-ms-high-contrast: active), (forced-colors: active)": Object {
|
||||
"border": "none",
|
||||
"bottom": -2,
|
||||
"left": -2,
|
||||
"right": -2,
|
||||
"top": -2,
|
||||
},
|
||||
},
|
||||
"top": 3,
|
||||
"zIndex": 1,
|
||||
},
|
||||
"::-moz-focus-inner": Object {
|
||||
"border": "0",
|
||||
},
|
||||
},
|
||||
},
|
||||
"textContainer": Object {
|
||||
"display": "block",
|
||||
"flexGrow": 1,
|
||||
@@ -1071,7 +1099,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
>
|
||||
<button
|
||||
aria-label="Close pane"
|
||||
className="ms-Button ms-Button--icon closePaneBtn root-140"
|
||||
className="ms-Button ms-Button--icon closePaneBtn root-202"
|
||||
data-is-focusable={true}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
@@ -1084,18 +1112,17 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
className="ms-Button-flexContainer flexContainer-141"
|
||||
className="ms-Button-flexContainer flexContainer-203"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<Component
|
||||
className="ms-Button-icon icon-143"
|
||||
className="ms-Button-icon icon-205"
|
||||
iconName="Cancel"
|
||||
>
|
||||
<i
|
||||
aria-hidden={true}
|
||||
className="ms-Icon root-37 css-148 ms-Button-icon icon-143"
|
||||
className="ms-Icon root-37 css-210 ms-Button-icon icon-205"
|
||||
data-icon-name="Cancel"
|
||||
role="presentation"
|
||||
style={
|
||||
Object {
|
||||
"fontFamily": "\\"FabricMDL2Icons\\"",
|
||||
@@ -1163,7 +1190,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
variant="small"
|
||||
>
|
||||
<span
|
||||
className="css-149"
|
||||
className="css-211"
|
||||
>
|
||||
Confirm by typing the
|
||||
container
|
||||
@@ -1185,7 +1212,6 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
>
|
||||
<TextFieldBase
|
||||
autoFocus={true}
|
||||
canRevealPassword={false}
|
||||
deferredValidationTime={200}
|
||||
id="confirmCollectionId"
|
||||
onChange={[Function]}
|
||||
@@ -1468,18 +1494,18 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
value=""
|
||||
>
|
||||
<div
|
||||
className="ms-TextField root-151"
|
||||
className="ms-TextField root-213"
|
||||
>
|
||||
<div
|
||||
className="ms-TextField-wrapper"
|
||||
>
|
||||
<div
|
||||
className="ms-TextField-fieldGroup fieldGroup-152"
|
||||
className="ms-TextField-fieldGroup fieldGroup-214"
|
||||
>
|
||||
<input
|
||||
aria-invalid={false}
|
||||
autoFocus={true}
|
||||
className="ms-TextField-field field-153"
|
||||
className="ms-TextField-field field-215"
|
||||
id="confirmCollectionId"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
@@ -1502,7 +1528,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
variant="small"
|
||||
>
|
||||
<span
|
||||
className="css-162"
|
||||
className="css-224"
|
||||
>
|
||||
Help us improve Azure Cosmos DB!
|
||||
</span>
|
||||
@@ -1512,7 +1538,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
variant="small"
|
||||
>
|
||||
<span
|
||||
className="css-162"
|
||||
className="css-224"
|
||||
>
|
||||
What is the reason why you are deleting this
|
||||
container
|
||||
@@ -1534,7 +1560,6 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
value=""
|
||||
>
|
||||
<TextFieldBase
|
||||
canRevealPassword={false}
|
||||
deferredValidationTime={200}
|
||||
id="deleteCollectionFeedbackInput"
|
||||
multiline={true}
|
||||
@@ -1819,17 +1844,17 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
value=""
|
||||
>
|
||||
<div
|
||||
className="ms-TextField ms-TextField--multiline root-151"
|
||||
className="ms-TextField ms-TextField--multiline root-213"
|
||||
>
|
||||
<div
|
||||
className="ms-TextField-wrapper"
|
||||
>
|
||||
<div
|
||||
className="ms-TextField-fieldGroup fieldGroup-163"
|
||||
className="ms-TextField-fieldGroup fieldGroup-225"
|
||||
>
|
||||
<textarea
|
||||
aria-invalid={false}
|
||||
className="ms-TextField-field field-164"
|
||||
className="ms-TextField-field field-226"
|
||||
id="deleteCollectionFeedbackInput"
|
||||
onBlur={[Function]}
|
||||
onChange={[Function]}
|
||||
@@ -2919,7 +2944,6 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
"borderColor": "#f3f2f1",
|
||||
"color": "#a19f9d",
|
||||
"cursor": "default",
|
||||
"pointerEvents": "none",
|
||||
"selectors": Object {
|
||||
":focus": Object {
|
||||
"outline": 0,
|
||||
@@ -3266,6 +3290,35 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
},
|
||||
},
|
||||
},
|
||||
"splitButtonMenuFocused": Object {
|
||||
"outline": "transparent",
|
||||
"position": "relative",
|
||||
"selectors": Object {
|
||||
".ms-Fabric--isFocusVisible &:focus:after": Object {
|
||||
"border": "1px solid #ffffff",
|
||||
"bottom": 3,
|
||||
"content": "\\"\\"",
|
||||
"left": 3,
|
||||
"outline": "1px solid #605e5c",
|
||||
"position": "absolute",
|
||||
"right": 3,
|
||||
"selectors": Object {
|
||||
"@media screen and (-ms-high-contrast: active), (forced-colors: active)": Object {
|
||||
"border": "none",
|
||||
"bottom": -2,
|
||||
"left": -2,
|
||||
"right": -2,
|
||||
"top": -2,
|
||||
},
|
||||
},
|
||||
"top": 3,
|
||||
"zIndex": 1,
|
||||
},
|
||||
"::-moz-focus-inner": Object {
|
||||
"border": "0",
|
||||
},
|
||||
},
|
||||
},
|
||||
"splitButtonMenuIcon": Object {
|
||||
"color": "#ffffff",
|
||||
},
|
||||
@@ -3563,7 +3616,7 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
>
|
||||
<button
|
||||
aria-label="Submit"
|
||||
className="ms-Button ms-Button--primary genericPaneSubmitBtn root-166"
|
||||
className="ms-Button ms-Button--primary genericPaneSubmitBtn root-228"
|
||||
data-is-focusable={true}
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
@@ -3581,14 +3634,14 @@ exports[`Delete Collection Confirmation Pane submit() should call delete collect
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
className="ms-Button-flexContainer flexContainer-141"
|
||||
className="ms-Button-flexContainer flexContainer-203"
|
||||
data-automationid="splitbuttonprimary"
|
||||
>
|
||||
<span
|
||||
className="ms-Button-textContainer textContainer-142"
|
||||
className="ms-Button-textContainer textContainer-204"
|
||||
>
|
||||
<span
|
||||
className="ms-Button-label label-167"
|
||||
className="ms-Button-label label-229"
|
||||
id="id__9"
|
||||
key="id__9"
|
||||
>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useBoolean } from "@uifabric/react-hooks";
|
||||
import { Text, TextField } from "office-ui-fabric-react";
|
||||
import { useBoolean } from "@fluentui/react-hooks";
|
||||
import { Text, TextField } from "@fluentui/react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import { Areas } from "../../Common/Constants";
|
||||
import { deleteDatabase } from "../../Common/dataAccess/deleteDatabase";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useBoolean } from "@uifabric/react-hooks";
|
||||
import { IDropdownOption, IImageProps, Image, Stack, Text } from "@fluentui/react";
|
||||
import { useBoolean } from "@fluentui/react-hooks";
|
||||
import AddPropertyIcon from "images/Add-property.svg";
|
||||
import { IDropdownOption, IImageProps, Image, Stack, Text } from "office-ui-fabric-react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import StoredProcedure from "../../Tree/StoredProcedure";
|
||||
import {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Label,
|
||||
Stack,
|
||||
TextField,
|
||||
} from "office-ui-fabric-react";
|
||||
} from "@fluentui/react";
|
||||
import React, { FunctionComponent } from "react";
|
||||
|
||||
const dropdownStyles: Partial<IDropdownStyles> = { dropdown: { width: 100 } };
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
import { IconButton, PrimaryButton } from "@fluentui/react";
|
||||
import ErrorRedIcon from "images/error_red.svg";
|
||||
import LoadingIndicatorIcon from "images/LoadingIndicator_3Squares.gif";
|
||||
import { IconButton, PrimaryButton } from "office-ui-fabric-react/lib/Button";
|
||||
import React, { FunctionComponent, ReactNode } from "react";
|
||||
import { KeyCodes } from "../../../Common/Constants";
|
||||
|
||||
|
||||
@@ -388,8 +388,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"userTableQuery": [Function],
|
||||
"visible": [Function],
|
||||
},
|
||||
"clickHostedAccountSwitch": [Function],
|
||||
"clickHostedDirectorySwitch": [Function],
|
||||
"closeDialog": undefined,
|
||||
"closeSidePanel": undefined,
|
||||
"collapsedResourceTreeWidth": 36,
|
||||
@@ -411,9 +409,7 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"parameters": [Function],
|
||||
"tabsButtons": Array [],
|
||||
},
|
||||
"databaseAccount": [Function],
|
||||
"databases": [Function],
|
||||
"defaultExperience": [Function],
|
||||
"deleteCollectionText": [Function],
|
||||
"deleteDatabaseText": [Function],
|
||||
"gitHubClient": GitHubClient {
|
||||
@@ -1206,7 +1202,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"hasStorageAnalyticsAfecFeature": [Function],
|
||||
"isAccountReady": [Function],
|
||||
"isAutoscaleDefaultEnabled": [Function],
|
||||
"isEnableMongoCapabilityPresent": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
@@ -1215,7 +1210,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isPublishNotebookPaneEnabled": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
"isRightPanelV2Enabled": [Function],
|
||||
"isSchemaEnabled": [Function],
|
||||
"isServerlessEnabled": [Function],
|
||||
"isSparkEnabled": [Function],
|
||||
@@ -1224,7 +1218,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"isTabsContentExpanded": [Function],
|
||||
"junoClient": JunoClient {
|
||||
"cachedPinnedRepos": [Function],
|
||||
"databaseAccount": undefined,
|
||||
},
|
||||
"memoryUsageInfo": [Function],
|
||||
"notebookBasePath": [Function],
|
||||
@@ -1232,14 +1225,12 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"onGitHubClientError": [Function],
|
||||
"onRefreshDatabasesKeyPress": [Function],
|
||||
"onRefreshResourcesClick": [Function],
|
||||
"onSwitchToConnectionString": [Function],
|
||||
"openDialog": undefined,
|
||||
"openSidePanel": undefined,
|
||||
"provideFeedbackEmail": [Function],
|
||||
"queriesClient": QueriesClient {
|
||||
"container": [Circular],
|
||||
},
|
||||
"refreshDatabaseAccount": [Function],
|
||||
"refreshNotebookList": [Function],
|
||||
"refreshTreeTitle": [Function],
|
||||
"resourceTokenCollection": [Function],
|
||||
@@ -1263,7 +1254,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||
"setIsNotificationConsoleExpanded": undefined,
|
||||
"setNotificationConsoleData": undefined,
|
||||
"signInAad": [Function],
|
||||
"sparkClusterConnectionInfo": [Function],
|
||||
"splitter": Splitter {
|
||||
"bounds": Object {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useBoolean } from "@uifabric/react-hooks";
|
||||
import { IImageProps, Image, ImageFit, Stack, TextField } from "@fluentui/react";
|
||||
import { useBoolean } from "@fluentui/react-hooks";
|
||||
import folderIcon from "images/folder_16x16.svg";
|
||||
import { IImageProps, Image, ImageFit, Stack, TextField } from "office-ui-fabric-react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import { logError } from "../../../Common/Logger";
|
||||
import { Collection } from "../../../Contracts/ViewModels";
|
||||
|
||||
@@ -39,7 +39,7 @@ exports[`Load Query Pane should render Default properly 1`] = `
|
||||
className="customFileUpload"
|
||||
htmlFor="importQueryInputId"
|
||||
>
|
||||
<StyledImageBase
|
||||
<Image
|
||||
alt="upload files"
|
||||
className="fileIcon"
|
||||
height={20}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useBoolean } from "@uifabric/react-hooks";
|
||||
import { useBoolean } from "@fluentui/react-hooks";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||
import Explorer from "../../Explorer";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IPanelProps, IRenderFunction, Panel, PanelType } from "office-ui-fabric-react";
|
||||
import { IPanelProps, IRenderFunction, Panel, PanelType } from "@fluentui/react";
|
||||
import * as React from "react";
|
||||
|
||||
export interface PanelContainerProps {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import { PrimaryButton } from "office-ui-fabric-react";
|
||||
import { PrimaryButton } from "@fluentui/react";
|
||||
|
||||
export interface PanelFooterProps {
|
||||
buttonLabel: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Icon, Link, Stack, Text } from "office-ui-fabric-react";
|
||||
import { Icon, Link, Stack, Text } from "@fluentui/react";
|
||||
import React from "react";
|
||||
|
||||
export interface PanelInfoErrorProps {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Dropdown, IDropdownProps, ITextFieldProps, Stack, Text, TextField } from "@fluentui/react";
|
||||
import { ImmutableNotebook } from "@nteract/commutable";
|
||||
import Html2Canvas from "html2canvas";
|
||||
import { Dropdown, IDropdownProps, ITextFieldProps, Stack, Text, TextField } from "office-ui-fabric-react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import { GalleryCardComponent } from "../../Controls/NotebookGallery/Cards/GalleryCardComponent";
|
||||
import * as FileSystemUtil from "../../Notebook/FileSystemUtil";
|
||||
|
||||
@@ -50,7 +50,7 @@ exports[`PublishNotebookPaneComponent renders 1`] = `
|
||||
/>
|
||||
</StackItem>
|
||||
<StackItem>
|
||||
<StyledWithResponsiveMode
|
||||
<Dropdown
|
||||
ariaLabel="Cover image"
|
||||
defaultSelectedKey="Custom Image"
|
||||
label="Cover image"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useBoolean } from "@uifabric/react-hooks";
|
||||
import { Text, TextField } from "office-ui-fabric-react";
|
||||
import { useBoolean } from "@fluentui/react-hooks";
|
||||
import { Text, TextField } from "@fluentui/react";
|
||||
import React, { FunctionComponent, useState } from "react";
|
||||
import { Areas, SavedQueries } from "../../../Common/Constants";
|
||||
import { getErrorMessage, getErrorStack } from "../../../Common/ErrorHandlingUtils";
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user