mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 02:11:29 +00:00
Merge with mater
This commit is contained in:
@@ -69,7 +69,8 @@ module.exports = {
|
|||||||
moduleNameMapper: {
|
moduleNameMapper: {
|
||||||
"^.*[.](svg|png|gif|less|css)$": "<rootDir>/mockModule",
|
"^.*[.](svg|png|gif|less|css)$": "<rootDir>/mockModule",
|
||||||
"@nteract/stateful-components/(.*)$": "<rootDir>/mockModule",
|
"@nteract/stateful-components/(.*)$": "<rootDir>/mockModule",
|
||||||
"office-ui-fabric-react/lib/(.*)$": "office-ui-fabric-react/lib-commonjs/$1", // https://github.com/OfficeDev/office-ui-fabric-react/wiki/Fabric-6-Release-Notes
|
"@fluentui/react/lib/(.*)$": "@fluentui/react/lib-commonjs/$1", // https://github.com/microsoft/fluentui/wiki/Version-8-release-notes
|
||||||
|
"monaco-editor/(.*)$": "<rootDir>/__mocks__/monaco-editor",
|
||||||
"^dnd-core$": "dnd-core/dist/cjs",
|
"^dnd-core$": "dnd-core/dist/cjs",
|
||||||
"^react-dnd$": "react-dnd/dist/cjs",
|
"^react-dnd$": "react-dnd/dist/cjs",
|
||||||
"^react-dnd-html5-backend$": "react-dnd-html5-backend/dist/cjs",
|
"^react-dnd-html5-backend$": "react-dnd-html5-backend/dist/cjs",
|
||||||
|
|||||||
888
package-lock.json
generated
888
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,7 @@
|
|||||||
"@azure/ms-rest-nodeauth": "3.0.7",
|
"@azure/ms-rest-nodeauth": "3.0.7",
|
||||||
"@babel/plugin-proposal-class-properties": "7.12.1",
|
"@babel/plugin-proposal-class-properties": "7.12.1",
|
||||||
"@babel/plugin-proposal-decorators": "7.12.12",
|
"@babel/plugin-proposal-decorators": "7.12.12",
|
||||||
|
"@fluentui/react": "8.10.1",
|
||||||
"@jupyterlab/services": "6.0.2",
|
"@jupyterlab/services": "6.0.2",
|
||||||
"@jupyterlab/terminal": "3.0.3",
|
"@jupyterlab/terminal": "3.0.3",
|
||||||
"@microsoft/applicationinsights-web": "2.6.1",
|
"@microsoft/applicationinsights-web": "2.6.1",
|
||||||
@@ -43,8 +44,6 @@
|
|||||||
"@types/mkdirp": "1.0.1",
|
"@types/mkdirp": "1.0.1",
|
||||||
"@types/node-fetch": "2.5.7",
|
"@types/node-fetch": "2.5.7",
|
||||||
"@uifabric/react-cards": "0.109.110",
|
"@uifabric/react-cards": "0.109.110",
|
||||||
"@uifabric/react-hooks": "7.14.0",
|
|
||||||
"@uifabric/styling": "7.13.7",
|
|
||||||
"applicationinsights": "1.8.0",
|
"applicationinsights": "1.8.0",
|
||||||
"bootstrap": "3.4.1",
|
"bootstrap": "3.4.1",
|
||||||
"canvas": "file:./canvas",
|
"canvas": "file:./canvas",
|
||||||
@@ -78,7 +77,6 @@
|
|||||||
"monaco-editor": "0.18.1",
|
"monaco-editor": "0.18.1",
|
||||||
"ms": "2.1.3",
|
"ms": "2.1.3",
|
||||||
"msal": "1.4.4",
|
"msal": "1.4.4",
|
||||||
"office-ui-fabric-react": "7.164.2",
|
|
||||||
"p-retry": "4.2.0",
|
"p-retry": "4.2.0",
|
||||||
"plotly.js-cartesian-dist-min": "1.52.3",
|
"plotly.js-cartesian-dist-min": "1.52.3",
|
||||||
"post-robot": "10.0.42",
|
"post-robot": "10.0.42",
|
||||||
|
|||||||
@@ -43,12 +43,7 @@ export const endpoint = () => {
|
|||||||
const location = _global.parent ? _global.parent.location : _global.location;
|
const location = _global.parent ? _global.parent.location : _global.location;
|
||||||
return configContext.EMULATOR_ENDPOINT || location.origin;
|
return configContext.EMULATOR_ENDPOINT || location.origin;
|
||||||
}
|
}
|
||||||
return (
|
return userContext.endpoint || userContext?.databaseAccount?.properties?.documentEndpoint;
|
||||||
userContext.endpoint ||
|
|
||||||
(userContext.databaseAccount &&
|
|
||||||
userContext.databaseAccount.properties &&
|
|
||||||
userContext.databaseAccount.properties.documentEndpoint)
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export async function getTokenFromAuthService(verb: string, resourceType: string, resourceId?: string): Promise<any> {
|
export async function getTokenFromAuthService(verb: string, resourceType: string, resourceId?: string): Promise<any> {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { DatePicker, TextField } from "office-ui-fabric-react";
|
import { DatePicker, TextField } from "@fluentui/react";
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
|
|
||||||
export interface TableEntityProps {
|
export interface TableEntityProps {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export function queryDocuments(
|
|||||||
query: string,
|
query: string,
|
||||||
continuationToken?: string
|
continuationToken?: string
|
||||||
): Promise<QueryResponse> {
|
): Promise<QueryResponse> {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount } = userContext;
|
||||||
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
||||||
const params = {
|
const params = {
|
||||||
db: databaseId,
|
db: databaseId,
|
||||||
@@ -121,7 +121,7 @@ export function readDocument(
|
|||||||
collection: Collection,
|
collection: Collection,
|
||||||
documentId: DocumentId
|
documentId: DocumentId
|
||||||
): Promise<DataModels.DocumentId> {
|
): Promise<DataModels.DocumentId> {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount } = userContext;
|
||||||
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
||||||
const idComponents = documentId.self.split("/");
|
const idComponents = documentId.self.split("/");
|
||||||
const path = idComponents.slice(0, 4).join("/");
|
const path = idComponents.slice(0, 4).join("/");
|
||||||
@@ -167,7 +167,7 @@ export function createDocument(
|
|||||||
partitionKeyProperty: string,
|
partitionKeyProperty: string,
|
||||||
documentContent: unknown
|
documentContent: unknown
|
||||||
): Promise<DataModels.DocumentId> {
|
): Promise<DataModels.DocumentId> {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount } = userContext;
|
||||||
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
||||||
const params = {
|
const params = {
|
||||||
db: databaseId,
|
db: databaseId,
|
||||||
@@ -206,7 +206,7 @@ export function updateDocument(
|
|||||||
documentId: DocumentId,
|
documentId: DocumentId,
|
||||||
documentContent: string
|
documentContent: string
|
||||||
): Promise<DataModels.DocumentId> {
|
): Promise<DataModels.DocumentId> {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount } = userContext;
|
||||||
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
||||||
const idComponents = documentId.self.split("/");
|
const idComponents = documentId.self.split("/");
|
||||||
const path = idComponents.slice(0, 5).join("/");
|
const path = idComponents.slice(0, 5).join("/");
|
||||||
@@ -247,7 +247,7 @@ export function updateDocument(
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deleteDocument(databaseId: string, collection: Collection, documentId: DocumentId): Promise<void> {
|
export function deleteDocument(databaseId: string, collection: Collection, documentId: DocumentId): Promise<void> {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount } = userContext;
|
||||||
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
const resourceEndpoint = databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint;
|
||||||
const idComponents = documentId.self.split("/");
|
const idComponents = documentId.self.split("/");
|
||||||
const path = idComponents.slice(0, 5).join("/");
|
const path = idComponents.slice(0, 5).join("/");
|
||||||
@@ -289,7 +289,7 @@ export function deleteDocument(databaseId: string, collection: Collection, docum
|
|||||||
export function createMongoCollectionWithProxy(
|
export function createMongoCollectionWithProxy(
|
||||||
params: DataModels.CreateCollectionParams
|
params: DataModels.CreateCollectionParams
|
||||||
): Promise<DataModels.Collection> {
|
): Promise<DataModels.Collection> {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount } = userContext;
|
||||||
const shardKey: string = params.partitionKey?.paths[0];
|
const shardKey: string = params.partitionKey?.paths[0];
|
||||||
const mongoParams: DataModels.MongoParameters = {
|
const mongoParams: DataModels.MongoParameters = {
|
||||||
resourceUrl: databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint,
|
resourceUrl: databaseAccount.properties.mongoEndpoint || databaseAccount.properties.documentEndpoint,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
import { configContext, Platform } from "../ConfigContext";
|
||||||
import * as DataModels from "../Contracts/DataModels";
|
import * as DataModels from "../Contracts/DataModels";
|
||||||
import * as ViewModels from "../Contracts/ViewModels";
|
import * as ViewModels from "../Contracts/ViewModels";
|
||||||
import { getAuthorizationHeader } from "../Utils/AuthorizationUtils";
|
|
||||||
import { userContext } from "../UserContext";
|
import { userContext } from "../UserContext";
|
||||||
import { configContext, Platform } from "../ConfigContext";
|
import { getAuthorizationHeader } from "../Utils/AuthorizationUtils";
|
||||||
|
|
||||||
const notificationsPath = () => {
|
const notificationsPath = () => {
|
||||||
switch (configContext.platform) {
|
switch (configContext.platform) {
|
||||||
@@ -20,9 +20,7 @@ export const fetchPortalNotifications = async (): Promise<DataModels.Notificatio
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount, resourceGroup, subscriptionId } = userContext;
|
||||||
const subscriptionId = userContext.subscriptionId;
|
|
||||||
const resourceGroup = userContext.resourceGroup;
|
|
||||||
const url = `${configContext.BACKEND_ENDPOINT}${notificationsPath()}?accountName=${
|
const url = `${configContext.BACKEND_ENDPOINT}${notificationsPath()}?accountName=${
|
||||||
databaseAccount.name
|
databaseAccount.name
|
||||||
}&subscriptionId=${subscriptionId}&resourceGroup=${resourceGroup}`;
|
}&subscriptionId=${subscriptionId}&resourceGroup=${resourceGroup}`;
|
||||||
|
|||||||
@@ -182,11 +182,8 @@ export class QueriesClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public getResourceId(): string {
|
public getResourceId(): string {
|
||||||
const databaseAccount = userContext.databaseAccount;
|
const { databaseAccount, subscriptionId = "", resourceGroup = "" } = userContext;
|
||||||
const databaseAccountName = (databaseAccount && databaseAccount.name) || "";
|
const databaseAccountName = databaseAccount?.name || "";
|
||||||
const subscriptionId = userContext.subscriptionId || "";
|
|
||||||
const resourceGroup = userContext.resourceGroup || "";
|
|
||||||
|
|
||||||
return `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDb/databaseAccounts/${databaseAccountName}`;
|
return `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDb/databaseAccounts/${databaseAccountName}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
TextField,
|
TextField,
|
||||||
TooltipHost,
|
TooltipHost,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
import DeleteIcon from "../../images/delete.svg";
|
import DeleteIcon from "../../images/delete.svg";
|
||||||
import EditIcon from "../../images/Edit_entity.svg";
|
import EditIcon from "../../images/Edit_entity.svg";
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useId } from "@uifabric/react-hooks";
|
import { IButtonStyles, IconButton, ITooltipHostStyles, TooltipHost } from "@fluentui/react";
|
||||||
import { IButtonStyles, IconButton } from "office-ui-fabric-react";
|
import { useId } from "@fluentui/react-hooks";
|
||||||
import { ITooltipHostStyles, TooltipHost } from "office-ui-fabric-react/lib/Tooltip";
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
||||||
const calloutProps = { gapSpace: 0 };
|
const calloutProps = { gapSpace: 0 };
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Image, Stack, TextField } from "office-ui-fabric-react";
|
import { Image, Stack, TextField } from "@fluentui/react";
|
||||||
import React, { ChangeEvent, FunctionComponent, KeyboardEvent, useRef, useState } from "react";
|
import React, { ChangeEvent, FunctionComponent, KeyboardEvent, useRef, useState } from "react";
|
||||||
import FolderIcon from "../../../images/folder_16x16.svg";
|
import FolderIcon from "../../../images/folder_16x16.svg";
|
||||||
import * as Constants from "../Constants";
|
import * as Constants from "../Constants";
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ export const createCollection = async (params: DataModels.CreateCollectionParams
|
|||||||
};
|
};
|
||||||
|
|
||||||
const createCollectionWithARM = async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
|
const createCollectionWithARM = async (params: DataModels.CreateCollectionParams): Promise<DataModels.Collection> => {
|
||||||
const defaultExperience = userContext.apiType;
|
const { apiType } = userContext;
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
return createSqlContainer(params);
|
return createSqlContainer(params);
|
||||||
case "Mongo":
|
case "Mongo":
|
||||||
@@ -75,7 +75,7 @@ const createCollectionWithARM = async (params: DataModels.CreateCollectionParams
|
|||||||
case "Tables":
|
case "Tables":
|
||||||
return createTable(params);
|
return createTable(params);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -48,8 +48,9 @@ export async function createDatabase(params: DataModels.CreateDatabaseParams): P
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createDatabaseWithARM(params: DataModels.CreateDatabaseParams): Promise<DataModels.Database> {
|
async function createDatabaseWithARM(params: DataModels.CreateDatabaseParams): Promise<DataModels.Database> {
|
||||||
const defaultExperience = userContext.apiType;
|
const { apiType } = userContext;
|
||||||
switch (defaultExperience) {
|
|
||||||
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
return createSqlDatabase(params);
|
return createSqlDatabase(params);
|
||||||
case "Mongo":
|
case "Mongo":
|
||||||
@@ -59,7 +60,7 @@ async function createDatabaseWithARM(params: DataModels.CreateDatabaseParams): P
|
|||||||
case "Gremlin":
|
case "Gremlin":
|
||||||
return createGremlineDatabase(params);
|
return createGremlineDatabase(params);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,12 +27,10 @@ export async function deleteCollection(databaseId: string, collectionId: string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deleteCollectionWithARM(databaseId: string, collectionId: string): Promise<void> {
|
function deleteCollectionWithARM(databaseId: string, collectionId: string): Promise<void> {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
return deleteSqlContainer(subscriptionId, resourceGroup, accountName, databaseId, collectionId);
|
return deleteSqlContainer(subscriptionId, resourceGroup, accountName, databaseId, collectionId);
|
||||||
case "Mongo":
|
case "Mongo":
|
||||||
@@ -44,6 +42,6 @@ function deleteCollectionWithARM(databaseId: string, collectionId: string): Prom
|
|||||||
case "Tables":
|
case "Tables":
|
||||||
return deleteTable(subscriptionId, resourceGroup, accountName, collectionId);
|
return deleteTable(subscriptionId, resourceGroup, accountName, collectionId);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,10 @@ export async function deleteDatabase(databaseId: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deleteDatabaseWithARM(databaseId: string): Promise<void> {
|
function deleteDatabaseWithARM(databaseId: string): Promise<void> {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
return deleteSqlDatabase(subscriptionId, resourceGroup, accountName, databaseId);
|
return deleteSqlDatabase(subscriptionId, resourceGroup, accountName, databaseId);
|
||||||
case "Mongo":
|
case "Mongo":
|
||||||
@@ -45,6 +43,6 @@ function deleteDatabaseWithARM(databaseId: string): Promise<void> {
|
|||||||
case "Gremlin":
|
case "Gremlin":
|
||||||
return deleteGremlinDatabase(subscriptionId, resourceGroup, accountName, databaseId);
|
return deleteGremlinDatabase(subscriptionId, resourceGroup, accountName, databaseId);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { AuthType } from "../../AuthType";
|
import { AuthType } from "../../AuthType";
|
||||||
import { armRequest } from "../../Utils/arm/request";
|
|
||||||
import { configContext } from "../../ConfigContext";
|
import { configContext } from "../../ConfigContext";
|
||||||
import { handleError } from "../ErrorHandlingUtils";
|
|
||||||
import { userContext } from "../../UserContext";
|
import { userContext } from "../../UserContext";
|
||||||
|
import { armRequest } from "../../Utils/arm/request";
|
||||||
|
import { handleError } from "../ErrorHandlingUtils";
|
||||||
|
|
||||||
interface TimeSeriesData {
|
interface TimeSeriesData {
|
||||||
data: {
|
data: {
|
||||||
@@ -45,9 +45,9 @@ export const getCollectionUsageSizeInKB = async (databaseName: string, container
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const filter = `DatabaseName eq '${databaseName}' and CollectionName eq '${containerName}'`;
|
const filter = `DatabaseName eq '${databaseName}' and CollectionName eq '${containerName}'`;
|
||||||
const metricNames = "DataUsage,IndexUsage";
|
const metricNames = "DataUsage,IndexUsage";
|
||||||
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/providers/microsoft.insights/metrics`;
|
const path = `/subscriptions/${subscriptionId}/resourceGroups/${resourceGroup}/providers/Microsoft.DocumentDB/databaseAccounts/${accountName}/providers/microsoft.insights/metrics`;
|
||||||
|
|||||||
@@ -28,14 +28,12 @@ export const readCollectionOffer = async (params: ReadCollectionOfferParams): Pr
|
|||||||
};
|
};
|
||||||
|
|
||||||
const readCollectionOfferWithARM = async (databaseId: string, collectionId: string): Promise<Offer> => {
|
const readCollectionOfferWithARM = async (databaseId: string, collectionId: string): Promise<Offer> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
let rpResponse;
|
let rpResponse;
|
||||||
try {
|
try {
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
rpResponse = await getSqlContainerThroughput(
|
rpResponse = await getSqlContainerThroughput(
|
||||||
subscriptionId,
|
subscriptionId,
|
||||||
@@ -76,7 +74,7 @@ const readCollectionOfferWithARM = async (databaseId: string, collectionId: stri
|
|||||||
rpResponse = await getTableThroughput(subscriptionId, resourceGroup, accountName, collectionId);
|
rpResponse = await getTableThroughput(subscriptionId, resourceGroup, accountName, collectionId);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code !== "NotFound") {
|
if (error.code !== "NotFound") {
|
||||||
|
|||||||
@@ -29,12 +29,11 @@ export async function readCollections(databaseId: string): Promise<DataModels.Co
|
|||||||
|
|
||||||
async function readCollectionsWithARM(databaseId: string): Promise<DataModels.Collection[]> {
|
async function readCollectionsWithARM(databaseId: string): Promise<DataModels.Collection[]> {
|
||||||
let rpResponse;
|
let rpResponse;
|
||||||
const subscriptionId = userContext.subscriptionId;
|
|
||||||
const resourceGroup = userContext.resourceGroup;
|
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
switch (defaultExperience) {
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
|
const accountName = databaseAccount.name;
|
||||||
|
|
||||||
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
rpResponse = await listSqlContainers(subscriptionId, resourceGroup, accountName, databaseId);
|
rpResponse = await listSqlContainers(subscriptionId, resourceGroup, accountName, databaseId);
|
||||||
break;
|
break;
|
||||||
@@ -51,7 +50,7 @@ async function readCollectionsWithARM(databaseId: string): Promise<DataModels.Co
|
|||||||
rpResponse = await listTables(subscriptionId, resourceGroup, accountName);
|
rpResponse = await listTables(subscriptionId, resourceGroup, accountName);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rpResponse?.value?.map((collection) => collection.properties?.resource as DataModels.Collection);
|
return rpResponse?.value?.map((collection) => collection.properties?.resource as DataModels.Collection);
|
||||||
|
|||||||
@@ -27,14 +27,12 @@ export const readDatabaseOffer = async (params: ReadDatabaseOfferParams): Promis
|
|||||||
};
|
};
|
||||||
|
|
||||||
const readDatabaseOfferWithARM = async (databaseId: string): Promise<Offer> => {
|
const readDatabaseOfferWithARM = async (databaseId: string): Promise<Offer> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
let rpResponse;
|
let rpResponse;
|
||||||
try {
|
try {
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
rpResponse = await getSqlDatabaseThroughput(subscriptionId, resourceGroup, accountName, databaseId);
|
rpResponse = await getSqlDatabaseThroughput(subscriptionId, resourceGroup, accountName, databaseId);
|
||||||
break;
|
break;
|
||||||
@@ -48,7 +46,7 @@ const readDatabaseOfferWithARM = async (databaseId: string): Promise<Offer> => {
|
|||||||
rpResponse = await getGremlinDatabaseThroughput(subscriptionId, resourceGroup, accountName, databaseId);
|
rpResponse = await getGremlinDatabaseThroughput(subscriptionId, resourceGroup, accountName, databaseId);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.code !== "NotFound") {
|
if (error.code !== "NotFound") {
|
||||||
|
|||||||
@@ -29,12 +29,10 @@ export async function readDatabases(): Promise<DataModels.Database[]> {
|
|||||||
|
|
||||||
async function readDatabasesWithARM(): Promise<DataModels.Database[]> {
|
async function readDatabasesWithARM(): Promise<DataModels.Database[]> {
|
||||||
let rpResponse;
|
let rpResponse;
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
rpResponse = await listSqlDatabases(subscriptionId, resourceGroup, accountName);
|
rpResponse = await listSqlDatabases(subscriptionId, resourceGroup, accountName);
|
||||||
break;
|
break;
|
||||||
@@ -48,7 +46,7 @@ async function readDatabasesWithARM(): Promise<DataModels.Database[]> {
|
|||||||
rpResponse = await listGremlinDatabases(subscriptionId, resourceGroup, accountName);
|
rpResponse = await listGremlinDatabases(subscriptionId, resourceGroup, accountName);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rpResponse?.value?.map((database) => database.properties?.resource as DataModels.Database);
|
return rpResponse?.value?.map((database) => database.properties?.resource as DataModels.Database);
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
|
import { AuthType } from "../../AuthType";
|
||||||
import { userContext } from "../../UserContext";
|
import { userContext } from "../../UserContext";
|
||||||
import { getMongoDBCollection } from "../../Utils/arm/generatedClients/2020-04-01/mongoDBResources";
|
import { getMongoDBCollection } from "../../Utils/arm/generatedClients/2020-04-01/mongoDBResources";
|
||||||
import { MongoDBCollectionResource } from "../../Utils/arm/generatedClients/2020-04-01/types";
|
import { MongoDBCollectionResource } from "../../Utils/arm/generatedClients/2020-04-01/types";
|
||||||
import { logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
import { logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
||||||
import { handleError } from "../ErrorHandlingUtils";
|
import { handleError } from "../ErrorHandlingUtils";
|
||||||
import { AuthType } from "../../AuthType";
|
|
||||||
|
|
||||||
export async function readMongoDBCollectionThroughRP(
|
export async function readMongoDBCollectionThroughRP(
|
||||||
databaseId: string,
|
databaseId: string,
|
||||||
@@ -13,9 +13,9 @@ export async function readMongoDBCollectionThroughRP(
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
let collection: MongoDBCollectionResource;
|
let collection: MongoDBCollectionResource;
|
||||||
const subscriptionId = userContext.subscriptionId;
|
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const accountName = userContext.databaseAccount.name;
|
const accountName = databaseAccount.name;
|
||||||
|
|
||||||
const clearMessage = logConsoleProgress(`Reading container ${collectionId}`);
|
const clearMessage = logConsoleProgress(`Reading container ${collectionId}`);
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -11,12 +11,13 @@ export async function readUserDefinedFunctions(
|
|||||||
collectionId: string
|
collectionId: string
|
||||||
): Promise<(UserDefinedFunctionDefinition & Resource)[]> {
|
): Promise<(UserDefinedFunctionDefinition & Resource)[]> {
|
||||||
const clearMessage = logConsoleProgress(`Querying user defined functions for container ${collectionId}`);
|
const clearMessage = logConsoleProgress(`Querying user defined functions for container ${collectionId}`);
|
||||||
|
const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
try {
|
try {
|
||||||
if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") {
|
if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") {
|
||||||
const rpResponse = await listSqlUserDefinedFunctions(
|
const rpResponse = await listSqlUserDefinedFunctions(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId
|
collectionId
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -63,12 +63,10 @@ async function updateCollectionWithARM(
|
|||||||
collectionId: string,
|
collectionId: string,
|
||||||
newCollection: Partial<Collection>
|
newCollection: Partial<Collection>
|
||||||
): Promise<Collection> {
|
): Promise<Collection> {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, apiType, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
const defaultExperience = userContext.apiType;
|
|
||||||
|
|
||||||
switch (defaultExperience) {
|
switch (apiType) {
|
||||||
case "SQL":
|
case "SQL":
|
||||||
return updateSqlContainer(databaseId, collectionId, subscriptionId, resourceGroup, accountName, newCollection);
|
return updateSqlContainer(databaseId, collectionId, subscriptionId, resourceGroup, accountName, newCollection);
|
||||||
case "Cassandra":
|
case "Cassandra":
|
||||||
@@ -87,7 +85,7 @@ async function updateCollectionWithARM(
|
|||||||
newCollection
|
newCollection
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported default experience type: ${defaultExperience}`);
|
throw new Error(`Unsupported default experience type: ${apiType}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -144,9 +144,8 @@ const updateDatabaseOfferWithARM = async (params: UpdateOfferParams): Promise<Of
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateSqlContainerOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateSqlContainerOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateSqlContainerToAutoscale(
|
await migrateSqlContainerToAutoscale(
|
||||||
@@ -178,9 +177,8 @@ const updateSqlContainerOffer = async (params: UpdateOfferParams): Promise<void>
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateMongoCollectionOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateMongoCollectionOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateMongoDBCollectionToAutoscale(
|
await migrateMongoDBCollectionToAutoscale(
|
||||||
@@ -212,9 +210,8 @@ const updateMongoCollectionOffer = async (params: UpdateOfferParams): Promise<vo
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateCassandraTableOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateCassandraTableOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateCassandraTableToAutoscale(
|
await migrateCassandraTableToAutoscale(
|
||||||
@@ -246,9 +243,8 @@ const updateCassandraTableOffer = async (params: UpdateOfferParams): Promise<voi
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateGremlinGraphOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateGremlinGraphOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateGremlinGraphToAutoscale(
|
await migrateGremlinGraphToAutoscale(
|
||||||
@@ -280,9 +276,8 @@ const updateGremlinGraphOffer = async (params: UpdateOfferParams): Promise<void>
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateTableOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateTableOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateTableToAutoscale(subscriptionId, resourceGroup, accountName, params.collectionId);
|
await migrateTableToAutoscale(subscriptionId, resourceGroup, accountName, params.collectionId);
|
||||||
@@ -295,9 +290,8 @@ const updateTableOffer = async (params: UpdateOfferParams): Promise<void> => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateSqlDatabaseOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateSqlDatabaseOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateSqlDatabaseToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
await migrateSqlDatabaseToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
||||||
@@ -310,9 +304,8 @@ const updateSqlDatabaseOffer = async (params: UpdateOfferParams): Promise<void>
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateMongoDatabaseOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateMongoDatabaseOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateMongoDBDatabaseToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
await migrateMongoDBDatabaseToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
||||||
@@ -325,9 +318,8 @@ const updateMongoDatabaseOffer = async (params: UpdateOfferParams): Promise<void
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateCassandraKeyspaceOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateCassandraKeyspaceOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateCassandraKeyspaceToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
await migrateCassandraKeyspaceToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
||||||
@@ -340,9 +332,8 @@ const updateCassandraKeyspaceOffer = async (params: UpdateOfferParams): Promise<
|
|||||||
};
|
};
|
||||||
|
|
||||||
const updateGremlinDatabaseOffer = async (params: UpdateOfferParams): Promise<void> => {
|
const updateGremlinDatabaseOffer = async (params: UpdateOfferParams): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
const resourceGroup = userContext.resourceGroup;
|
const accountName = databaseAccount.name;
|
||||||
const accountName = userContext.databaseAccount.name;
|
|
||||||
|
|
||||||
if (params.migrateToAutoPilot) {
|
if (params.migrateToAutoPilot) {
|
||||||
await migrateGremlinDatabaseToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
await migrateGremlinDatabaseToAutoscale(subscriptionId, resourceGroup, accountName, params.databaseId);
|
||||||
|
|||||||
@@ -20,11 +20,13 @@ export async function updateStoredProcedure(
|
|||||||
): Promise<StoredProcedureDefinition & Resource> {
|
): Promise<StoredProcedureDefinition & Resource> {
|
||||||
const clearMessage = logConsoleProgress(`Updating stored procedure ${storedProcedure.id}`);
|
const clearMessage = logConsoleProgress(`Updating stored procedure ${storedProcedure.id}`);
|
||||||
try {
|
try {
|
||||||
if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") {
|
const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
|
|
||||||
|
if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") {
|
||||||
const getResponse = await getSqlStoredProcedure(
|
const getResponse = await getSqlStoredProcedure(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId,
|
collectionId,
|
||||||
storedProcedure.id
|
storedProcedure.id
|
||||||
@@ -38,9 +40,9 @@ export async function updateStoredProcedure(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
const rpResponse = await createUpdateSqlStoredProcedure(
|
const rpResponse = await createUpdateSqlStoredProcedure(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId,
|
collectionId,
|
||||||
storedProcedure.id,
|
storedProcedure.id,
|
||||||
|
|||||||
@@ -16,12 +16,13 @@ export async function updateTrigger(
|
|||||||
trigger: TriggerDefinition
|
trigger: TriggerDefinition
|
||||||
): Promise<TriggerDefinition> {
|
): Promise<TriggerDefinition> {
|
||||||
const clearMessage = logConsoleProgress(`Updating trigger ${trigger.id}`);
|
const clearMessage = logConsoleProgress(`Updating trigger ${trigger.id}`);
|
||||||
|
const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
try {
|
try {
|
||||||
if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") {
|
if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") {
|
||||||
const getResponse = await getSqlTrigger(
|
const getResponse = await getSqlTrigger(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId,
|
collectionId,
|
||||||
trigger.id
|
trigger.id
|
||||||
@@ -35,9 +36,9 @@ export async function updateTrigger(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
const rpResponse = await createUpdateSqlTrigger(
|
const rpResponse = await createUpdateSqlTrigger(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId,
|
collectionId,
|
||||||
trigger.id,
|
trigger.id,
|
||||||
|
|||||||
@@ -19,12 +19,13 @@ export async function updateUserDefinedFunction(
|
|||||||
userDefinedFunction: UserDefinedFunctionDefinition
|
userDefinedFunction: UserDefinedFunctionDefinition
|
||||||
): Promise<UserDefinedFunctionDefinition & Resource> {
|
): Promise<UserDefinedFunctionDefinition & Resource> {
|
||||||
const clearMessage = logConsoleProgress(`Updating user defined function ${userDefinedFunction.id}`);
|
const clearMessage = logConsoleProgress(`Updating user defined function ${userDefinedFunction.id}`);
|
||||||
|
const { authType, useSDKOperations, apiType, subscriptionId, resourceGroup, databaseAccount } = userContext;
|
||||||
try {
|
try {
|
||||||
if (userContext.authType === AuthType.AAD && !userContext.useSDKOperations && userContext.apiType === "SQL") {
|
if (authType === AuthType.AAD && !useSDKOperations && apiType === "SQL") {
|
||||||
const getResponse = await getSqlUserDefinedFunction(
|
const getResponse = await getSqlUserDefinedFunction(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId,
|
collectionId,
|
||||||
userDefinedFunction.id
|
userDefinedFunction.id
|
||||||
@@ -38,9 +39,9 @@ export async function updateUserDefinedFunction(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
const rpResponse = await createUpdateSqlUserDefinedFunction(
|
const rpResponse = await createUpdateSqlUserDefinedFunction(
|
||||||
userContext.subscriptionId,
|
subscriptionId,
|
||||||
userContext.resourceGroup,
|
resourceGroup,
|
||||||
userContext.databaseAccount.name,
|
databaseAccount.name,
|
||||||
databaseId,
|
databaseId,
|
||||||
collectionId,
|
collectionId,
|
||||||
userDefinedFunction.id,
|
userDefinedFunction.id,
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
|
import { DefaultButton, IButtonStyles, IContextualMenuItem, IContextualMenuProps } from "@fluentui/react";
|
||||||
import * as React from "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 { getErrorMessage } from "../../../Common/ErrorHandlingUtils";
|
||||||
|
import * as Logger from "../../../Common/Logger";
|
||||||
|
import { ArcadiaWorkspace, SparkPool } from "../../../Contracts/DataModels";
|
||||||
|
|
||||||
export interface ArcadiaMenuPickerProps {
|
export interface ArcadiaMenuPickerProps {
|
||||||
selectText?: string;
|
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 * as React from "react";
|
||||||
import { accordionStackTokens } from "../Settings/SettingsRenderUtils";
|
import { accordionStackTokens } from "../Settings/SettingsRenderUtils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
import {
|
import {
|
||||||
ChoiceGroup,
|
ChoiceGroup,
|
||||||
|
DefaultButton,
|
||||||
|
Dialog as FluentDialog,
|
||||||
|
DialogFooter,
|
||||||
|
DialogType,
|
||||||
FontIcon,
|
FontIcon,
|
||||||
|
IButtonProps,
|
||||||
IChoiceGroupProps,
|
IChoiceGroupProps,
|
||||||
|
IDialogProps,
|
||||||
IProgressIndicatorProps,
|
IProgressIndicatorProps,
|
||||||
|
ITextFieldProps,
|
||||||
|
Link,
|
||||||
|
PrimaryButton,
|
||||||
ProgressIndicator,
|
ProgressIndicator,
|
||||||
} from "office-ui-fabric-react";
|
TextField,
|
||||||
import { DefaultButton, IButtonProps, PrimaryButton } from "office-ui-fabric-react/lib/Button";
|
} from "@fluentui/react";
|
||||||
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";
|
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
|
|
||||||
export interface TextFieldProps extends ITextFieldProps {
|
export interface TextFieldProps extends ITextFieldProps {
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
* React component for Switch Directory
|
* React component for Switch Directory
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import _ from "underscore";
|
import { Dropdown, IDropdownOption, IDropdownProps } from "@fluentui/react";
|
||||||
import * as React from "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";
|
import { Tenant } from "../../../Contracts/DataModels";
|
||||||
|
|
||||||
export interface DefaultDirectoryDropdownProps {
|
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 * as React from "react";
|
||||||
|
import _ from "underscore";
|
||||||
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 { Tenant } from "../../../Contracts/DataModels";
|
import { Tenant } from "../../../Contracts/DataModels";
|
||||||
|
|
||||||
export interface DirectoryListProps {
|
export interface DirectoryListProps {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`test render renders with directories and default 1`] = `
|
exports[`test render renders with directories and default 1`] = `
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
className="defaultDirectoryDropdown"
|
className="defaultDirectoryDropdown"
|
||||||
defaultSelectedKey="asdfghjklzxcvbnm9876543210"
|
defaultSelectedKey="asdfghjklzxcvbnm9876543210"
|
||||||
label="Set your default directory"
|
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`] = `
|
exports[`test render renders with directories and last visit default 1`] = `
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
className="defaultDirectoryDropdown"
|
className="defaultDirectoryDropdown"
|
||||||
defaultSelectedKey="lastVisited"
|
defaultSelectedKey="lastVisited"
|
||||||
label="Set your default directory"
|
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`] = `
|
exports[`test render renders with directories but no default 1`] = `
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
className="defaultDirectoryDropdown"
|
className="defaultDirectoryDropdown"
|
||||||
defaultSelectedKey="lastVisited"
|
defaultSelectedKey="lastVisited"
|
||||||
label="Set your default directory"
|
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`] = `
|
exports[`test render renders with no directories 1`] = `
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
className="defaultDirectoryDropdown"
|
className="defaultDirectoryDropdown"
|
||||||
defaultSelectedKey="lastVisited"
|
defaultSelectedKey="lastVisited"
|
||||||
label="Set your default directory"
|
label="Set your default directory"
|
||||||
|
|||||||
@@ -350,11 +350,11 @@ exports[`test render renders with filters 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ScrollablePane root-40"
|
className="ms-ScrollablePane root-53"
|
||||||
data-is-scrollable="true"
|
data-is-scrollable="true"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="stickyAbove-42"
|
className="stickyAbove-55"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
"height": 0,
|
"height": 0,
|
||||||
@@ -365,7 +365,7 @@ exports[`test render renders with filters 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className="ms-ScrollablePane--contentContainer contentContainer-41"
|
className="ms-ScrollablePane--contentContainer contentContainer-54"
|
||||||
data-is-scrollable={true}
|
data-is-scrollable={true}
|
||||||
>
|
>
|
||||||
<Sticky
|
<Sticky
|
||||||
@@ -408,7 +408,6 @@ exports[`test render renders with filters 1`] = `
|
|||||||
>
|
>
|
||||||
<TextFieldBase
|
<TextFieldBase
|
||||||
ariaLabel="Directory filter text box"
|
ariaLabel="Directory filter text box"
|
||||||
canRevealPassword={false}
|
|
||||||
className="directoryListFilterTextBox"
|
className="directoryListFilterTextBox"
|
||||||
deferredValidationTime={200}
|
deferredValidationTime={200}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -691,18 +690,18 @@ exports[`test render renders with filters 1`] = `
|
|||||||
validateOnLoad={true}
|
validateOnLoad={true}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-TextField directoryListFilterTextBox root-46"
|
className="ms-TextField directoryListFilterTextBox root-59"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-TextField-wrapper"
|
className="ms-TextField-wrapper"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-TextField-fieldGroup fieldGroup-47"
|
className="ms-TextField-fieldGroup fieldGroup-60"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
aria-invalid={false}
|
aria-invalid={false}
|
||||||
aria-label="Directory filter text box"
|
aria-label="Directory filter text box"
|
||||||
className="ms-TextField-field field-48"
|
className="ms-TextField-field field-61"
|
||||||
id="TextField0"
|
id="TextField0"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -1266,7 +1265,6 @@ exports[`test render renders with filters 1`] = `
|
|||||||
"borderColor": "#f3f2f1",
|
"borderColor": "#f3f2f1",
|
||||||
"color": "#a19f9d",
|
"color": "#a19f9d",
|
||||||
"cursor": "default",
|
"cursor": "default",
|
||||||
"pointerEvents": "none",
|
|
||||||
"selectors": Object {
|
"selectors": Object {
|
||||||
":focus": Object {
|
":focus": Object {
|
||||||
"outline": 0,
|
"outline": 0,
|
||||||
@@ -1611,6 +1609,35 @@ exports[`test render renders with filters 1`] = `
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"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 {
|
"splitButtonMenuIcon": Object {
|
||||||
"color": "#323130",
|
"color": "#323130",
|
||||||
},
|
},
|
||||||
@@ -1900,7 +1927,7 @@ exports[`test render renders with filters 1`] = `
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-disabled={true}
|
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}
|
data-is-focusable={false}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@@ -1912,7 +1939,7 @@ exports[`test render renders with filters 1`] = `
|
|||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="ms-Button-flexContainer flexContainer-58"
|
className="ms-Button-flexContainer flexContainer-71"
|
||||||
data-automationid="splitbuttonprimary"
|
data-automationid="splitbuttonprimary"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -1943,7 +1970,7 @@ exports[`test render renders with filters 1`] = `
|
|||||||
</List>
|
</List>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="stickyBelow-43"
|
className="stickyBelow-56"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
"bottom": "0px",
|
"bottom": "0px",
|
||||||
@@ -1954,7 +1981,7 @@ exports[`test render renders with filters 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="stickyBelowItems-44"
|
className="stickyBelowItems-57"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
|
import {
|
||||||
|
Checkbox,
|
||||||
|
DefaultButton,
|
||||||
|
Dropdown,
|
||||||
|
IDropdownOption,
|
||||||
|
IDropdownStyles,
|
||||||
|
ITextFieldStyles,
|
||||||
|
Stack,
|
||||||
|
TextField,
|
||||||
|
} from "@fluentui/react";
|
||||||
import * as React from "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";
|
import "./FeaturePanelComponent.less";
|
||||||
|
|
||||||
export const FeaturePanelComponent: React.FunctionComponent = () => {
|
export const FeaturePanelComponent: React.FunctionComponent = () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { FeaturePanelComponent } from "./FeaturePanelComponent";
|
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";
|
import "./FeaturePanelLauncher.less";
|
||||||
|
|
||||||
// Modal wrapper
|
// Modal wrapper
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ exports[`Feature panel renders all flags 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
label="Base Url"
|
label="Base Url"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
@@ -85,7 +85,7 @@ exports[`Feature panel renders all flags 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
label="Platform"
|
label="Platform"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
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 React from "react";
|
||||||
import * as Constants from "../../../Common/Constants";
|
import * as Constants from "../../../Common/Constants";
|
||||||
import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
import { Action } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
import {
|
import { ChoiceGroup, IButtonProps, IChoiceGroupProps, PrimaryButton, IChoiceGroupOption } from "@fluentui/react";
|
||||||
ChoiceGroup,
|
|
||||||
IButtonProps,
|
|
||||||
IChoiceGroupProps,
|
|
||||||
PrimaryButton,
|
|
||||||
IChoiceGroupOption,
|
|
||||||
} from "office-ui-fabric-react";
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { ChildrenMargin } from "./GitHubStyleConstants";
|
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 * as React from "react";
|
||||||
import { IGitHubBranch, IGitHubRepo } from "../../../GitHub/GitHubClient";
|
import { IGitHubBranch, IGitHubRepo } from "../../../GitHub/GitHubClient";
|
||||||
import { AddRepoComponent, AddRepoComponentProps } from "./AddRepoComponent";
|
import { AddRepoComponent, AddRepoComponentProps } from "./AddRepoComponent";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
IDropdownStyleProps,
|
IDropdownStyleProps,
|
||||||
IDropdownStyles,
|
IDropdownStyles,
|
||||||
IStyleFunctionOrObject,
|
IStyleFunctionOrObject,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
|
|
||||||
export const ButtonsFooterStyle: React.CSSProperties = {
|
export const ButtonsFooterStyle: React.CSSProperties = {
|
||||||
paddingTop: 14,
|
paddingTop: 14,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import {
|
|||||||
ResponsiveMode,
|
ResponsiveMode,
|
||||||
SelectionMode,
|
SelectionMode,
|
||||||
Text,
|
Text,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { IGitHubBranch, IGitHubPageInfo } from "../../../GitHub/GitHubClient";
|
import { IGitHubBranch, IGitHubPageInfo } from "../../../GitHub/GitHubClient";
|
||||||
import * as GitHubUtils from "../../../Utils/GitHubUtils";
|
import * as GitHubUtils from "../../../Utils/GitHubUtils";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from "react";
|
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 {
|
export class GalleryHeaderComponent extends React.Component {
|
||||||
private static readonly azureText = "Microsoft Azure";
|
private static readonly azureText = "Microsoft Azure";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { Card } from "@uifabric/react-cards";
|
|
||||||
import {
|
import {
|
||||||
BaseButton,
|
BaseButton,
|
||||||
Button,
|
Button,
|
||||||
@@ -8,14 +7,14 @@ import {
|
|||||||
Image,
|
Image,
|
||||||
ImageFit,
|
ImageFit,
|
||||||
Link,
|
Link,
|
||||||
LinkBase,
|
|
||||||
Persona,
|
Persona,
|
||||||
Separator,
|
Separator,
|
||||||
Spinner,
|
Spinner,
|
||||||
SpinnerSize,
|
SpinnerSize,
|
||||||
Text,
|
Text,
|
||||||
TooltipHost,
|
TooltipHost,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
|
import { Card } from "@uifabric/react-cards";
|
||||||
import React, { FunctionComponent, useState } from "react";
|
import React, { FunctionComponent, useState } from "react";
|
||||||
import CosmosDBLogo from "../../../../../images/CosmosDB-logo.svg";
|
import CosmosDBLogo from "../../../../../images/CosmosDB-logo.svg";
|
||||||
import { IGalleryItem } from "../../../../Juno/JunoClient";
|
import { IGalleryItem } from "../../../../Juno/JunoClient";
|
||||||
@@ -110,7 +109,7 @@ export const GalleryCardComponent: FunctionComponent<GalleryCardComponentProps>
|
|||||||
|
|
||||||
const handlerOnClick = (
|
const handlerOnClick = (
|
||||||
event:
|
event:
|
||||||
| React.MouseEvent<HTMLElement | HTMLAnchorElement | HTMLButtonElement | LinkBase, MouseEvent>
|
| React.MouseEvent<HTMLElement | HTMLAnchorElement | HTMLButtonElement | MouseEvent>
|
||||||
| React.MouseEvent<
|
| React.MouseEvent<
|
||||||
HTMLAnchorElement | HTMLButtonElement | HTMLDivElement | BaseButton | Button | HTMLSpanElement,
|
HTMLAnchorElement | HTMLButtonElement | HTMLDivElement | BaseButton | Button | HTMLSpanElement,
|
||||||
MouseEvent
|
MouseEvent
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ exports[`GalleryCardComponent renders 1`] = `
|
|||||||
/>
|
/>
|
||||||
</CardItem>
|
</CardItem>
|
||||||
<CardItem>
|
<CardItem>
|
||||||
<StyledImageBase
|
<Image
|
||||||
alt="name cover image"
|
alt="name cover image"
|
||||||
height={144}
|
height={144}
|
||||||
imageFit={2}
|
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;
|
let codeOfConductProps: CodeOfConductComponentProps;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const junoClient = new JunoClient(undefined);
|
const junoClient = new JunoClient();
|
||||||
junoClient.acceptCodeOfConduct = jest.fn().mockReturnValue({
|
junoClient.acceptCodeOfConduct = jest.fn().mockReturnValue({
|
||||||
status: HttpStatusCodes.OK,
|
status: HttpStatusCodes.OK,
|
||||||
data: true,
|
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 React, { FunctionComponent, useEffect, useState } from "react";
|
||||||
import { CodeOfConductEndpoints, HttpStatusCodes } from "../../../../Common/Constants";
|
import { CodeOfConductEndpoints, HttpStatusCodes } from "../../../../Common/Constants";
|
||||||
import { getErrorMessage, getErrorStack, handleError } from "../../../../Common/ErrorHandlingUtils";
|
import { getErrorMessage, getErrorStack, handleError } from "../../../../Common/ErrorHandlingUtils";
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import {
|
|||||||
SpinnerSize,
|
SpinnerSize,
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { HttpStatusCodes } from "../../../Common/Constants";
|
import { HttpStatusCodes } from "../../../Common/Constants";
|
||||||
import { handleError } from "../../../Common/ErrorHandlingUtils";
|
import { handleError } from "../../../Common/ErrorHandlingUtils";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from "react";
|
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 { CodeOfConductEndpoints } from "../../../../Common/Constants";
|
||||||
import "./InfoComponent.less";
|
import "./InfoComponent.less";
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="galleryContainer"
|
className="galleryContainer"
|
||||||
>
|
>
|
||||||
<StyledPivotBase
|
<StyledPivot
|
||||||
onLinkClick={[Function]}
|
onLinkClick={[Function]}
|
||||||
selectedKey="OfficialSamples"
|
selectedKey="OfficialSamples"
|
||||||
>
|
>
|
||||||
@@ -41,7 +41,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
|||||||
<StackItem
|
<StackItem
|
||||||
grow={true}
|
grow={true}
|
||||||
>
|
>
|
||||||
<StyledSearchBoxBase
|
<StyledSearchBox
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
/>
|
/>
|
||||||
@@ -60,7 +60,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
Array [
|
Array [
|
||||||
@@ -127,7 +127,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
|||||||
<StackItem
|
<StackItem
|
||||||
grow={true}
|
grow={true}
|
||||||
>
|
>
|
||||||
<StyledSearchBoxBase
|
<StyledSearchBox
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
/>
|
/>
|
||||||
@@ -146,7 +146,7 @@ exports[`GalleryViewerComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
Array [
|
Array [
|
||||||
@@ -182,6 +182,6 @@ exports[`GalleryViewerComponent renders 1`] = `
|
|||||||
</StackItem>
|
</StackItem>
|
||||||
</Stack>
|
</Stack>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
</StyledPivotBase>
|
</StyledPivot>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,17 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Wrapper around Notebook metadata
|
* Wrapper around Notebook metadata
|
||||||
*/
|
*/
|
||||||
import {
|
import { FontWeights, Icon, IconButton, Link, Persona, PersonaSize, PrimaryButton, Stack, Text } from "@fluentui/react";
|
||||||
FontWeights,
|
|
||||||
Icon,
|
|
||||||
IconButton,
|
|
||||||
Link,
|
|
||||||
Persona,
|
|
||||||
PersonaSize,
|
|
||||||
PrimaryButton,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
} from "office-ui-fabric-react";
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { IGalleryItem } from "../../../Juno/JunoClient";
|
import { IGalleryItem } from "../../../Juno/JunoClient";
|
||||||
import * as FileSystemUtil from "../../Notebook/FileSystemUtil";
|
import * as FileSystemUtil from "../../Notebook/FileSystemUtil";
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
import { Notebook } from "@nteract/commutable";
|
import { Notebook } from "@nteract/commutable";
|
||||||
import { createContentRef } from "@nteract/core";
|
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 * as React from "react";
|
||||||
import { contents } from "rx-jupyter";
|
import { contents } from "rx-jupyter";
|
||||||
import { IGalleryItem, JunoClient } from "../../../Juno/JunoClient";
|
import { IGalleryItem, JunoClient } from "../../../Juno/JunoClient";
|
||||||
|
|||||||
@@ -1,22 +1,24 @@
|
|||||||
import { IButtonProps, IconButton } from "office-ui-fabric-react/lib/Button";
|
|
||||||
import { ContextualMenu, IContextualMenuProps } from "office-ui-fabric-react/lib/ContextualMenu";
|
|
||||||
import {
|
import {
|
||||||
|
ContextualMenu,
|
||||||
DetailsList,
|
DetailsList,
|
||||||
DetailsListLayoutMode,
|
DetailsListLayoutMode,
|
||||||
DetailsRow,
|
DetailsRow,
|
||||||
|
FocusZone,
|
||||||
|
IButtonProps,
|
||||||
IColumn,
|
IColumn,
|
||||||
|
IconButton,
|
||||||
|
IContextualMenuProps,
|
||||||
IDetailsListProps,
|
IDetailsListProps,
|
||||||
IDetailsRowProps,
|
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,
|
IObjectWithKey,
|
||||||
ISelectionZoneProps,
|
ISelectionZoneProps,
|
||||||
|
ITextField,
|
||||||
|
ITextFieldProps,
|
||||||
Selection,
|
Selection,
|
||||||
SelectionMode,
|
SelectionMode,
|
||||||
SelectionZone,
|
SelectionZone,
|
||||||
} from "office-ui-fabric-react/lib/utilities/selection/index";
|
TextField,
|
||||||
|
} from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as _ from "underscore";
|
import * as _ from "underscore";
|
||||||
import SaveQueryBannerIcon from "../../../../images/save_query_banner.png";
|
import SaveQueryBannerIcon from "../../../../images/save_query_banner.png";
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
* Horizontal switch component
|
* Horizontal switch component
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { Icon } from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import "./RadioSwitchComponent.less";
|
|
||||||
import { Icon } from "office-ui-fabric-react/lib/Icon";
|
|
||||||
import { NormalizedEventKey } from "../../../Common/Constants";
|
import { NormalizedEventKey } from "../../../Common/Constants";
|
||||||
|
import "./RadioSwitchComponent.less";
|
||||||
|
|
||||||
export interface Choice {
|
export interface Choice {
|
||||||
key: string;
|
key: string;
|
||||||
|
|||||||
@@ -154,19 +154,20 @@ describe("SettingsComponent", () => {
|
|||||||
expect(settingsComponentInstance.hasConflictResolution()).toEqual(undefined);
|
expect(settingsComponentInstance.hasConflictResolution()).toEqual(undefined);
|
||||||
|
|
||||||
const newContainer = new Explorer();
|
const newContainer = new Explorer();
|
||||||
newContainer.databaseAccount = ko.observable({
|
updateUserContext({
|
||||||
id: undefined,
|
databaseAccount: {
|
||||||
name: undefined,
|
id: undefined,
|
||||||
location: undefined,
|
name: undefined,
|
||||||
type: undefined,
|
location: undefined,
|
||||||
kind: undefined,
|
type: undefined,
|
||||||
tags: undefined,
|
kind: undefined,
|
||||||
properties: {
|
properties: {
|
||||||
documentEndpoint: undefined,
|
documentEndpoint: undefined,
|
||||||
tableEndpoint: undefined,
|
tableEndpoint: undefined,
|
||||||
gremlinEndpoint: undefined,
|
gremlinEndpoint: undefined,
|
||||||
cassandraEndpoint: undefined,
|
cassandraEndpoint: undefined,
|
||||||
enableMultipleWriteLocations: true,
|
enableMultipleWriteLocations: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const newCollection = { ...collection };
|
const newCollection = { ...collection };
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { IPivotItemProps, IPivotProps, Pivot, PivotItem } from "office-ui-fabric-react";
|
import { IPivotItemProps, IPivotProps, Pivot, PivotItem } from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import DiscardIcon from "../../../../images/discard.svg";
|
import DiscardIcon from "../../../../images/discard.svg";
|
||||||
import SaveIcon from "../../../../images/save-cosmos.svg";
|
import SaveIcon from "../../../../images/save-cosmos.svg";
|
||||||
@@ -233,11 +233,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
}
|
}
|
||||||
|
|
||||||
public loadMongoIndexes = async (): Promise<void> => {
|
public loadMongoIndexes = async (): Promise<void> => {
|
||||||
if (
|
if (userContext.apiType === "Mongo" && userContext?.databaseAccount) {
|
||||||
userContext.apiType === "Mongo" &&
|
|
||||||
this.container.isEnableMongoCapabilityPresent() &&
|
|
||||||
this.container.databaseAccount()
|
|
||||||
) {
|
|
||||||
this.mongoDBCollectionResource = await readMongoDBCollectionThroughRP(
|
this.mongoDBCollectionResource = await readMongoDBCollectionThroughRP(
|
||||||
this.collection.databaseId,
|
this.collection.databaseId,
|
||||||
this.collection.id()
|
this.collection.id()
|
||||||
@@ -300,8 +296,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
this.container && userContext.apiType === "Cassandra" && hasDatabaseSharedThroughput(this.collection);
|
this.container && userContext.apiType === "Cassandra" && hasDatabaseSharedThroughput(this.collection);
|
||||||
|
|
||||||
public hasConflictResolution = (): boolean =>
|
public hasConflictResolution = (): boolean =>
|
||||||
this.container?.databaseAccount &&
|
userContext?.databaseAccount?.properties?.enableMultipleWriteLocations &&
|
||||||
this.container.databaseAccount()?.properties?.enableMultipleWriteLocations &&
|
|
||||||
this.collection.conflictResolutionPolicy &&
|
this.collection.conflictResolutionPolicy &&
|
||||||
!!this.collection.conflictResolutionPolicy();
|
!!this.collection.conflictResolutionPolicy();
|
||||||
|
|
||||||
@@ -876,7 +871,7 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
|
|||||||
mongoIndexingPolicyComponentProps: MongoIndexingPolicyComponentProps
|
mongoIndexingPolicyComponentProps: MongoIndexingPolicyComponentProps
|
||||||
): JSX.Element => {
|
): JSX.Element => {
|
||||||
if (userContext.authType === AuthType.AAD) {
|
if (userContext.authType === AuthType.AAD) {
|
||||||
if (this.container.isEnableMongoCapabilityPresent()) {
|
if (userContext.apiType === "Mongo") {
|
||||||
return <MongoIndexingPolicyComponent {...mongoIndexingPolicyComponentProps} />;
|
return <MongoIndexingPolicyComponent {...mongoIndexingPolicyComponentProps} />;
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { shallow } from "enzyme";
|
import { shallow } from "enzyme";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { IColumn, Text } from "office-ui-fabric-react";
|
import { IColumn, Text } from "@fluentui/react";
|
||||||
import {
|
import {
|
||||||
getAutoPilotV3SpendElement,
|
getAutoPilotV3SpendElement,
|
||||||
getEstimatedSpendingElement,
|
getEstimatedSpendingElement,
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import {
|
|||||||
IDetailsRowProps,
|
IDetailsRowProps,
|
||||||
DetailsRow,
|
DetailsRow,
|
||||||
IDetailsColumnStyles,
|
IDetailsColumnStyles,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import { isDirtyTypes, isDirty } from "./SettingsUtils";
|
import { isDirtyTypes, isDirty } from "./SettingsUtils";
|
||||||
|
|
||||||
export interface EstimatedSpendingDisplayProps {
|
export interface EstimatedSpendingDisplayProps {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
subComponentStackProps,
|
subComponentStackProps,
|
||||||
getChoiceGroupStyles,
|
getChoiceGroupStyles,
|
||||||
} from "../SettingsRenderUtils";
|
} 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 { ToolTipLabelComponent } from "./ToolTipLabelComponent";
|
||||||
import { isDirty } from "../SettingsUtils";
|
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 React from "react";
|
||||||
import * as DataModels from "../../../../Contracts/DataModels";
|
import * as DataModels from "../../../../Contracts/DataModels";
|
||||||
import { loadMonaco, monaco } from "../../../LazyMonaco";
|
import { loadMonaco } from "../../../LazyMonaco";
|
||||||
import { indexingPolicynUnsavedWarningMessage, titleAndInputStackProps } from "../SettingsRenderUtils";
|
import { indexingPolicynUnsavedWarningMessage, titleAndInputStackProps } from "../SettingsRenderUtils";
|
||||||
import { isDirty, isIndexTransforming } from "../SettingsUtils";
|
import { isDirty, isIndexTransforming } from "../SettingsUtils";
|
||||||
import { IndexingPolicyRefreshComponent } from "./IndexingPolicyRefresh/IndexingPolicyRefreshComponent";
|
import { IndexingPolicyRefreshComponent } from "./IndexingPolicyRefresh/IndexingPolicyRefreshComponent";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { MessageBar, MessageBarType } from "office-ui-fabric-react";
|
import { MessageBar, MessageBarType } from "@fluentui/react";
|
||||||
import {
|
import {
|
||||||
mongoIndexTransformationRefreshingMessage,
|
mongoIndexTransformationRefreshingMessage,
|
||||||
renderMongoIndexTransformationRefreshMessage,
|
renderMongoIndexTransformationRefreshMessage,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`IndexingPolicyRefreshComponent renders 1`] = `
|
exports[`IndexingPolicyRefreshComponent renders 1`] = `
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarType={5}
|
messageBarType={5}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
@@ -20,5 +20,5 @@ exports[`IndexingPolicyRefreshComponent renders 1`] = `
|
|||||||
Refresh to check the progress.
|
Refresh to check the progress.
|
||||||
</StyledLinkBase>
|
</StyledLinkBase>
|
||||||
</Text>
|
</Text>
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Dropdown,
|
Dropdown,
|
||||||
IDropdownOption,
|
IDropdownOption,
|
||||||
ITextField,
|
ITextField,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import {
|
import {
|
||||||
addMongoIndexSubElementsTokens,
|
addMongoIndexSubElementsTokens,
|
||||||
mongoErrorMessageStyles,
|
mongoErrorMessageStyles,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
Spinner,
|
Spinner,
|
||||||
SpinnerSize,
|
SpinnerSize,
|
||||||
Separator,
|
Separator,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import {
|
import {
|
||||||
addMongoIndexStackProps,
|
addMongoIndexStackProps,
|
||||||
customDetailsListStyles,
|
customDetailsListStyles,
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
value="sample_key"
|
value="sample_key"
|
||||||
/>
|
/>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
ariaLabel="Index Type 1"
|
ariaLabel="Index Type 1"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
@@ -67,7 +67,7 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
|||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarType={1}
|
messageBarType={1}
|
||||||
styles={
|
styles={
|
||||||
Object {
|
Object {
|
||||||
@@ -78,6 +78,6 @@ exports[`AddMongoIndexComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
sample error
|
sample error
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
</Stack>
|
</Stack>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import React from "react";
|
|||||||
import * as Constants from "../../../../Common/Constants";
|
import * as Constants from "../../../../Common/Constants";
|
||||||
import * as DataModels from "../../../../Contracts/DataModels";
|
import * as DataModels from "../../../../Contracts/DataModels";
|
||||||
import * as SharedConstants from "../../../../Shared/Constants";
|
import * as SharedConstants from "../../../../Shared/Constants";
|
||||||
|
import { updateUserContext } from "../../../../UserContext";
|
||||||
import Explorer from "../../../Explorer";
|
import Explorer from "../../../Explorer";
|
||||||
import { throughputUnit } from "../SettingsRenderUtils";
|
import { throughputUnit } from "../SettingsRenderUtils";
|
||||||
import { collection, container } from "../TestUtils";
|
import { collection, container } from "../TestUtils";
|
||||||
@@ -80,24 +81,25 @@ describe("ScaleComponent", () => {
|
|||||||
|
|
||||||
it("autoScale enabled", () => {
|
it("autoScale enabled", () => {
|
||||||
const newContainer = new Explorer();
|
const newContainer = new Explorer();
|
||||||
|
updateUserContext({
|
||||||
newContainer.databaseAccount({
|
databaseAccount: {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
name: undefined,
|
name: undefined,
|
||||||
location: undefined,
|
location: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
kind: "documentdb",
|
kind: "documentdb",
|
||||||
properties: {
|
properties: {
|
||||||
documentEndpoint: undefined,
|
documentEndpoint: undefined,
|
||||||
tableEndpoint: undefined,
|
tableEndpoint: undefined,
|
||||||
gremlinEndpoint: undefined,
|
gremlinEndpoint: undefined,
|
||||||
cassandraEndpoint: undefined,
|
cassandraEndpoint: undefined,
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
name: Constants.CapabilityNames.EnableAutoScale.toLowerCase(),
|
name: Constants.CapabilityNames.EnableAutoScale.toLowerCase(),
|
||||||
description: undefined,
|
description: undefined,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const props = { ...baseProps, container: newContainer };
|
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 React from "react";
|
||||||
import * as Constants from "../../../../Common/Constants";
|
import * as Constants from "../../../../Common/Constants";
|
||||||
import { configContext, Platform } from "../../../../ConfigContext";
|
import { configContext, Platform } from "../../../../ConfigContext";
|
||||||
@@ -54,8 +54,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public isAutoScaleEnabled = (): boolean => {
|
public isAutoScaleEnabled = (): boolean => {
|
||||||
const accountCapabilities: DataModels.Capability[] = this.props.container?.databaseAccount()?.properties
|
const accountCapabilities: DataModels.Capability[] = userContext?.databaseAccount?.properties?.capabilities;
|
||||||
?.capabilities;
|
|
||||||
const enableAutoScaleCapability =
|
const enableAutoScaleCapability =
|
||||||
accountCapabilities &&
|
accountCapabilities &&
|
||||||
accountCapabilities.find((capability: DataModels.Capability) => {
|
accountCapabilities.find((capability: DataModels.Capability) => {
|
||||||
@@ -170,7 +169,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
|||||||
|
|
||||||
private getThroughputInputComponent = (): JSX.Element => (
|
private getThroughputInputComponent = (): JSX.Element => (
|
||||||
<ThroughputInputAutoPilotV3Component
|
<ThroughputInputAutoPilotV3Component
|
||||||
databaseAccount={this.props.container.databaseAccount()}
|
databaseAccount={userContext?.databaseAccount}
|
||||||
databaseName={this.databaseId}
|
databaseName={this.databaseId}
|
||||||
collectionName={this.collectionId}
|
collectionName={this.collectionId}
|
||||||
throughput={this.props.throughput}
|
throughput={this.props.throughput}
|
||||||
@@ -199,8 +198,7 @@ export class ScaleComponent extends React.Component<ScaleComponentProps> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
private isFreeTierAccount(): boolean {
|
private isFreeTierAccount(): boolean {
|
||||||
const databaseAccount = this.props.container?.databaseAccount();
|
return userContext?.databaseAccount?.properties?.enableFreeTier;
|
||||||
return databaseAccount?.properties?.enableFreeTier;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private getFreeTierInfoMessage(): JSX.Element {
|
private getFreeTierInfoMessage(): JSX.Element {
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
import {
|
import { ChoiceGroup, IChoiceGroupOption, Label, Link, MessageBar, Stack, Text, TextField } from "@fluentui/react";
|
||||||
ChoiceGroup,
|
|
||||||
IChoiceGroupOption,
|
|
||||||
Label,
|
|
||||||
Link,
|
|
||||||
MessageBar,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
TextField,
|
|
||||||
} from "office-ui-fabric-react";
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import * as ViewModels from "../../../../Contracts/ViewModels";
|
import * as ViewModels from "../../../../Contracts/ViewModels";
|
||||||
import { userContext } from "../../../../UserContext";
|
import { userContext } from "../../../../UserContext";
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
TextField,
|
TextField,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import * as DataModels from "../../../../../Contracts/DataModels";
|
import * as DataModels from "../../../../../Contracts/DataModels";
|
||||||
import { SubscriptionType } from "../../../../../Contracts/SubscriptionType";
|
import { SubscriptionType } from "../../../../../Contracts/SubscriptionType";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarIconProps={
|
messageBarIconProps={
|
||||||
Object {
|
Object {
|
||||||
"className": "messageBarWarningIcon",
|
"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
|
Your bill will be affected as you update your throughput settings. Please review the updated cost estimate below before saving your changes
|
||||||
</Text>
|
</Text>
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
<Stack>
|
<Stack>
|
||||||
<StyledLabelBase
|
<StyledLabelBase
|
||||||
id="settingsV2RadioButtonLabelId"
|
id="settingsV2RadioButtonLabelId"
|
||||||
@@ -49,7 +49,7 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarIconProps={
|
messageBarIconProps={
|
||||||
Object {
|
Object {
|
||||||
"className": "messageBarInfoIcon",
|
"className": "messageBarInfoIcon",
|
||||||
@@ -86,8 +86,8 @@ exports[`ThroughputInputAutoPilotV3Component autopilot input visible 1`] = `
|
|||||||
Learn more
|
Learn more
|
||||||
</a>
|
</a>
|
||||||
</Text>
|
</Text>
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
@@ -196,7 +196,7 @@ exports[`ThroughputInputAutoPilotV3Component spendAck checkbox visible 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
@@ -470,7 +470,7 @@ exports[`ThroughputInputAutoPilotV3Component throughput input visible 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
ariaLabelledBy="settingsV2RadioButtonLabelId"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from "react";
|
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";
|
import { toolTipLabelStackTokens } from "../SettingsRenderUtils";
|
||||||
|
|
||||||
export interface ToolTipLabelComponentProps {
|
export interface ToolTipLabelComponentProps {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ exports[`ConflictResolutionComponent Path text field displayed 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
label="Mode"
|
label="Mode"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
@@ -80,7 +80,7 @@ exports[`ConflictResolutionComponent Sproc text field displayed 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
label="Mode"
|
label="Mode"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ exports[`ScaleComponent renders with correct initial notification 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarType={5}
|
messageBarType={5}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
@@ -26,7 +26,7 @@ exports[`ScaleComponent renders with correct initial notification 1`] = `
|
|||||||
Database: test, Container: test
|
Database: test, Container: test
|
||||||
, Current autoscale throughput: 100 - 1000 RU/s, Target autoscale throughput: 600 - 6000 RU/s
|
, Current autoscale throughput: 100 - 1000 RU/s, Target autoscale throughput: 600 - 6000 RU/s
|
||||||
</Text>
|
</Text>
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
<Stack
|
<Stack
|
||||||
tokens={
|
tokens={
|
||||||
Object {
|
Object {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="timeToLive"
|
id="timeToLive"
|
||||||
label="Time to Live"
|
label="Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -85,7 +85,7 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
|||||||
value="1000"
|
value="1000"
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
label="Geospatial Configuration"
|
label="Geospatial Configuration"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -146,7 +146,7 @@ exports[`SubSettingsComponent analyticalTimeToLive hidden 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||||
id="changeFeedPolicy"
|
id="changeFeedPolicy"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -238,7 +238,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="timeToLive"
|
id="timeToLive"
|
||||||
label="Time to Live"
|
label="Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -308,7 +308,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
|||||||
value="1000"
|
value="1000"
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
label="Geospatial Configuration"
|
label="Geospatial Configuration"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -355,7 +355,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="analyticalStorageTimeToLive"
|
id="analyticalStorageTimeToLive"
|
||||||
label="Analytical Storage Time to Live"
|
label="Analytical Storage Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -422,7 +422,7 @@ exports[`SubSettingsComponent analyticalTimeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||||
id="changeFeedPolicy"
|
id="changeFeedPolicy"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -514,7 +514,7 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="timeToLive"
|
id="timeToLive"
|
||||||
label="Time to Live"
|
label="Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -584,7 +584,7 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
|||||||
value="1000"
|
value="1000"
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
label="Geospatial Configuration"
|
label="Geospatial Configuration"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -631,7 +631,7 @@ exports[`SubSettingsComponent changeFeedPolicy hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="analyticalStorageTimeToLive"
|
id="analyticalStorageTimeToLive"
|
||||||
label="Analytical Storage Time to Live"
|
label="Analytical Storage Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -753,7 +753,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="timeToLive"
|
id="timeToLive"
|
||||||
label="Time to Live"
|
label="Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -823,7 +823,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
|||||||
value="1000"
|
value="1000"
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
label="Geospatial Configuration"
|
label="Geospatial Configuration"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -870,7 +870,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="analyticalStorageTimeToLive"
|
id="analyticalStorageTimeToLive"
|
||||||
label="Analytical Storage Time to Live"
|
label="Analytical Storage Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -962,7 +962,7 @@ exports[`SubSettingsComponent renders 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||||
id="changeFeedPolicy"
|
id="changeFeedPolicy"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -1054,7 +1054,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="timeToLive"
|
id="timeToLive"
|
||||||
label="Time to Live"
|
label="Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -1099,7 +1099,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="geoSpatialConfig"
|
id="geoSpatialConfig"
|
||||||
label="Geospatial Configuration"
|
label="Geospatial Configuration"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -1146,7 +1146,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
id="analyticalStorageTimeToLive"
|
id="analyticalStorageTimeToLive"
|
||||||
label="Analytical Storage Time to Live"
|
label="Analytical Storage Time to Live"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -1238,7 +1238,7 @@ exports[`SubSettingsComponent timeToLiveSeconds hidden 1`] = `
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
aria-labelledby="settingsV2ChangeFeedLabelId"
|
aria-labelledby="settingsV2ChangeFeedLabelId"
|
||||||
id="changeFeedPolicy"
|
id="changeFeedPolicy"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="settingsV2TabsContainer"
|
className="settingsV2TabsContainer"
|
||||||
>
|
>
|
||||||
<StyledPivotBase
|
<StyledPivot
|
||||||
onLinkClick={[Function]}
|
onLinkClick={[Function]}
|
||||||
selectedKey="ScaleTab"
|
selectedKey="ScaleTab"
|
||||||
>
|
>
|
||||||
@@ -399,8 +399,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"userTableQuery": [Function],
|
"userTableQuery": [Function],
|
||||||
"visible": [Function],
|
"visible": [Function],
|
||||||
},
|
},
|
||||||
"clickHostedAccountSwitch": [Function],
|
|
||||||
"clickHostedDirectorySwitch": [Function],
|
|
||||||
"closeDialog": undefined,
|
"closeDialog": undefined,
|
||||||
"closeSidePanel": undefined,
|
"closeSidePanel": undefined,
|
||||||
"collapsedResourceTreeWidth": 36,
|
"collapsedResourceTreeWidth": 36,
|
||||||
@@ -422,7 +420,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"parameters": [Function],
|
"parameters": [Function],
|
||||||
"tabsButtons": Array [],
|
"tabsButtons": Array [],
|
||||||
},
|
},
|
||||||
"databaseAccount": [Function],
|
|
||||||
"databases": [Function],
|
"databases": [Function],
|
||||||
"deleteCollectionText": [Function],
|
"deleteCollectionText": [Function],
|
||||||
"deleteDatabaseText": [Function],
|
"deleteDatabaseText": [Function],
|
||||||
@@ -1216,7 +1213,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"hasStorageAnalyticsAfecFeature": [Function],
|
"hasStorageAnalyticsAfecFeature": [Function],
|
||||||
"isAccountReady": [Function],
|
"isAccountReady": [Function],
|
||||||
"isAutoscaleDefaultEnabled": [Function],
|
"isAutoscaleDefaultEnabled": [Function],
|
||||||
"isEnableMongoCapabilityPresent": [Function],
|
|
||||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||||
"isHostedDataExplorerEnabled": [Function],
|
"isHostedDataExplorerEnabled": [Function],
|
||||||
"isLeftPaneExpanded": [Function],
|
"isLeftPaneExpanded": [Function],
|
||||||
@@ -1225,7 +1221,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isNotebooksEnabledForAccount": [Function],
|
"isNotebooksEnabledForAccount": [Function],
|
||||||
"isPublishNotebookPaneEnabled": [Function],
|
"isPublishNotebookPaneEnabled": [Function],
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isRightPanelV2Enabled": [Function],
|
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
@@ -1234,7 +1229,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isTabsContentExpanded": [Function],
|
"isTabsContentExpanded": [Function],
|
||||||
"junoClient": JunoClient {
|
"junoClient": JunoClient {
|
||||||
"cachedPinnedRepos": [Function],
|
"cachedPinnedRepos": [Function],
|
||||||
"databaseAccount": undefined,
|
|
||||||
},
|
},
|
||||||
"memoryUsageInfo": [Function],
|
"memoryUsageInfo": [Function],
|
||||||
"notebookBasePath": [Function],
|
"notebookBasePath": [Function],
|
||||||
@@ -1242,14 +1236,12 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"onGitHubClientError": [Function],
|
"onGitHubClientError": [Function],
|
||||||
"onRefreshDatabasesKeyPress": [Function],
|
"onRefreshDatabasesKeyPress": [Function],
|
||||||
"onRefreshResourcesClick": [Function],
|
"onRefreshResourcesClick": [Function],
|
||||||
"onSwitchToConnectionString": [Function],
|
|
||||||
"openDialog": undefined,
|
"openDialog": undefined,
|
||||||
"openSidePanel": undefined,
|
"openSidePanel": undefined,
|
||||||
"provideFeedbackEmail": [Function],
|
"provideFeedbackEmail": [Function],
|
||||||
"queriesClient": QueriesClient {
|
"queriesClient": QueriesClient {
|
||||||
"container": [Circular],
|
"container": [Circular],
|
||||||
},
|
},
|
||||||
"refreshDatabaseAccount": [Function],
|
|
||||||
"refreshNotebookList": [Function],
|
"refreshNotebookList": [Function],
|
||||||
"refreshTreeTitle": [Function],
|
"refreshTreeTitle": [Function],
|
||||||
"resourceTokenCollection": [Function],
|
"resourceTokenCollection": [Function],
|
||||||
@@ -1273,7 +1265,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||||
"setIsNotificationConsoleExpanded": undefined,
|
"setIsNotificationConsoleExpanded": undefined,
|
||||||
"setNotificationConsoleData": undefined,
|
"setNotificationConsoleData": undefined,
|
||||||
"signInAad": [Function],
|
|
||||||
"sparkClusterConnectionInfo": [Function],
|
"sparkClusterConnectionInfo": [Function],
|
||||||
"splitter": Splitter {
|
"splitter": Splitter {
|
||||||
"bounds": Object {
|
"bounds": Object {
|
||||||
@@ -1684,8 +1675,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"userTableQuery": [Function],
|
"userTableQuery": [Function],
|
||||||
"visible": [Function],
|
"visible": [Function],
|
||||||
},
|
},
|
||||||
"clickHostedAccountSwitch": [Function],
|
|
||||||
"clickHostedDirectorySwitch": [Function],
|
|
||||||
"closeDialog": undefined,
|
"closeDialog": undefined,
|
||||||
"closeSidePanel": undefined,
|
"closeSidePanel": undefined,
|
||||||
"collapsedResourceTreeWidth": 36,
|
"collapsedResourceTreeWidth": 36,
|
||||||
@@ -1707,7 +1696,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"parameters": [Function],
|
"parameters": [Function],
|
||||||
"tabsButtons": Array [],
|
"tabsButtons": Array [],
|
||||||
},
|
},
|
||||||
"databaseAccount": [Function],
|
|
||||||
"databases": [Function],
|
"databases": [Function],
|
||||||
"deleteCollectionText": [Function],
|
"deleteCollectionText": [Function],
|
||||||
"deleteDatabaseText": [Function],
|
"deleteDatabaseText": [Function],
|
||||||
@@ -2501,7 +2489,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"hasStorageAnalyticsAfecFeature": [Function],
|
"hasStorageAnalyticsAfecFeature": [Function],
|
||||||
"isAccountReady": [Function],
|
"isAccountReady": [Function],
|
||||||
"isAutoscaleDefaultEnabled": [Function],
|
"isAutoscaleDefaultEnabled": [Function],
|
||||||
"isEnableMongoCapabilityPresent": [Function],
|
|
||||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||||
"isHostedDataExplorerEnabled": [Function],
|
"isHostedDataExplorerEnabled": [Function],
|
||||||
"isLeftPaneExpanded": [Function],
|
"isLeftPaneExpanded": [Function],
|
||||||
@@ -2510,7 +2497,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isNotebooksEnabledForAccount": [Function],
|
"isNotebooksEnabledForAccount": [Function],
|
||||||
"isPublishNotebookPaneEnabled": [Function],
|
"isPublishNotebookPaneEnabled": [Function],
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isRightPanelV2Enabled": [Function],
|
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
@@ -2519,7 +2505,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isTabsContentExpanded": [Function],
|
"isTabsContentExpanded": [Function],
|
||||||
"junoClient": JunoClient {
|
"junoClient": JunoClient {
|
||||||
"cachedPinnedRepos": [Function],
|
"cachedPinnedRepos": [Function],
|
||||||
"databaseAccount": undefined,
|
|
||||||
},
|
},
|
||||||
"memoryUsageInfo": [Function],
|
"memoryUsageInfo": [Function],
|
||||||
"notebookBasePath": [Function],
|
"notebookBasePath": [Function],
|
||||||
@@ -2527,14 +2512,12 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"onGitHubClientError": [Function],
|
"onGitHubClientError": [Function],
|
||||||
"onRefreshDatabasesKeyPress": [Function],
|
"onRefreshDatabasesKeyPress": [Function],
|
||||||
"onRefreshResourcesClick": [Function],
|
"onRefreshResourcesClick": [Function],
|
||||||
"onSwitchToConnectionString": [Function],
|
|
||||||
"openDialog": undefined,
|
"openDialog": undefined,
|
||||||
"openSidePanel": undefined,
|
"openSidePanel": undefined,
|
||||||
"provideFeedbackEmail": [Function],
|
"provideFeedbackEmail": [Function],
|
||||||
"queriesClient": QueriesClient {
|
"queriesClient": QueriesClient {
|
||||||
"container": [Circular],
|
"container": [Circular],
|
||||||
},
|
},
|
||||||
"refreshDatabaseAccount": [Function],
|
|
||||||
"refreshNotebookList": [Function],
|
"refreshNotebookList": [Function],
|
||||||
"refreshTreeTitle": [Function],
|
"refreshTreeTitle": [Function],
|
||||||
"resourceTokenCollection": [Function],
|
"resourceTokenCollection": [Function],
|
||||||
@@ -2558,7 +2541,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||||
"setIsNotificationConsoleExpanded": undefined,
|
"setIsNotificationConsoleExpanded": undefined,
|
||||||
"setNotificationConsoleData": undefined,
|
"setNotificationConsoleData": undefined,
|
||||||
"signInAad": [Function],
|
|
||||||
"sparkClusterConnectionInfo": [Function],
|
"sparkClusterConnectionInfo": [Function],
|
||||||
"splitter": Splitter {
|
"splitter": Splitter {
|
||||||
"bounds": Object {
|
"bounds": Object {
|
||||||
@@ -2982,8 +2964,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"userTableQuery": [Function],
|
"userTableQuery": [Function],
|
||||||
"visible": [Function],
|
"visible": [Function],
|
||||||
},
|
},
|
||||||
"clickHostedAccountSwitch": [Function],
|
|
||||||
"clickHostedDirectorySwitch": [Function],
|
|
||||||
"closeDialog": undefined,
|
"closeDialog": undefined,
|
||||||
"closeSidePanel": undefined,
|
"closeSidePanel": undefined,
|
||||||
"collapsedResourceTreeWidth": 36,
|
"collapsedResourceTreeWidth": 36,
|
||||||
@@ -3005,7 +2985,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"parameters": [Function],
|
"parameters": [Function],
|
||||||
"tabsButtons": Array [],
|
"tabsButtons": Array [],
|
||||||
},
|
},
|
||||||
"databaseAccount": [Function],
|
|
||||||
"databases": [Function],
|
"databases": [Function],
|
||||||
"deleteCollectionText": [Function],
|
"deleteCollectionText": [Function],
|
||||||
"deleteDatabaseText": [Function],
|
"deleteDatabaseText": [Function],
|
||||||
@@ -3799,7 +3778,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"hasStorageAnalyticsAfecFeature": [Function],
|
"hasStorageAnalyticsAfecFeature": [Function],
|
||||||
"isAccountReady": [Function],
|
"isAccountReady": [Function],
|
||||||
"isAutoscaleDefaultEnabled": [Function],
|
"isAutoscaleDefaultEnabled": [Function],
|
||||||
"isEnableMongoCapabilityPresent": [Function],
|
|
||||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||||
"isHostedDataExplorerEnabled": [Function],
|
"isHostedDataExplorerEnabled": [Function],
|
||||||
"isLeftPaneExpanded": [Function],
|
"isLeftPaneExpanded": [Function],
|
||||||
@@ -3808,7 +3786,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isNotebooksEnabledForAccount": [Function],
|
"isNotebooksEnabledForAccount": [Function],
|
||||||
"isPublishNotebookPaneEnabled": [Function],
|
"isPublishNotebookPaneEnabled": [Function],
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isRightPanelV2Enabled": [Function],
|
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
@@ -3817,7 +3794,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isTabsContentExpanded": [Function],
|
"isTabsContentExpanded": [Function],
|
||||||
"junoClient": JunoClient {
|
"junoClient": JunoClient {
|
||||||
"cachedPinnedRepos": [Function],
|
"cachedPinnedRepos": [Function],
|
||||||
"databaseAccount": undefined,
|
|
||||||
},
|
},
|
||||||
"memoryUsageInfo": [Function],
|
"memoryUsageInfo": [Function],
|
||||||
"notebookBasePath": [Function],
|
"notebookBasePath": [Function],
|
||||||
@@ -3825,14 +3801,12 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"onGitHubClientError": [Function],
|
"onGitHubClientError": [Function],
|
||||||
"onRefreshDatabasesKeyPress": [Function],
|
"onRefreshDatabasesKeyPress": [Function],
|
||||||
"onRefreshResourcesClick": [Function],
|
"onRefreshResourcesClick": [Function],
|
||||||
"onSwitchToConnectionString": [Function],
|
|
||||||
"openDialog": undefined,
|
"openDialog": undefined,
|
||||||
"openSidePanel": undefined,
|
"openSidePanel": undefined,
|
||||||
"provideFeedbackEmail": [Function],
|
"provideFeedbackEmail": [Function],
|
||||||
"queriesClient": QueriesClient {
|
"queriesClient": QueriesClient {
|
||||||
"container": [Circular],
|
"container": [Circular],
|
||||||
},
|
},
|
||||||
"refreshDatabaseAccount": [Function],
|
|
||||||
"refreshNotebookList": [Function],
|
"refreshNotebookList": [Function],
|
||||||
"refreshTreeTitle": [Function],
|
"refreshTreeTitle": [Function],
|
||||||
"resourceTokenCollection": [Function],
|
"resourceTokenCollection": [Function],
|
||||||
@@ -3856,7 +3830,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||||
"setIsNotificationConsoleExpanded": undefined,
|
"setIsNotificationConsoleExpanded": undefined,
|
||||||
"setNotificationConsoleData": undefined,
|
"setNotificationConsoleData": undefined,
|
||||||
"signInAad": [Function],
|
|
||||||
"sparkClusterConnectionInfo": [Function],
|
"sparkClusterConnectionInfo": [Function],
|
||||||
"splitter": Splitter {
|
"splitter": Splitter {
|
||||||
"bounds": Object {
|
"bounds": Object {
|
||||||
@@ -4267,8 +4240,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"userTableQuery": [Function],
|
"userTableQuery": [Function],
|
||||||
"visible": [Function],
|
"visible": [Function],
|
||||||
},
|
},
|
||||||
"clickHostedAccountSwitch": [Function],
|
|
||||||
"clickHostedDirectorySwitch": [Function],
|
|
||||||
"closeDialog": undefined,
|
"closeDialog": undefined,
|
||||||
"closeSidePanel": undefined,
|
"closeSidePanel": undefined,
|
||||||
"collapsedResourceTreeWidth": 36,
|
"collapsedResourceTreeWidth": 36,
|
||||||
@@ -4290,7 +4261,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"parameters": [Function],
|
"parameters": [Function],
|
||||||
"tabsButtons": Array [],
|
"tabsButtons": Array [],
|
||||||
},
|
},
|
||||||
"databaseAccount": [Function],
|
|
||||||
"databases": [Function],
|
"databases": [Function],
|
||||||
"deleteCollectionText": [Function],
|
"deleteCollectionText": [Function],
|
||||||
"deleteDatabaseText": [Function],
|
"deleteDatabaseText": [Function],
|
||||||
@@ -5084,7 +5054,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"hasStorageAnalyticsAfecFeature": [Function],
|
"hasStorageAnalyticsAfecFeature": [Function],
|
||||||
"isAccountReady": [Function],
|
"isAccountReady": [Function],
|
||||||
"isAutoscaleDefaultEnabled": [Function],
|
"isAutoscaleDefaultEnabled": [Function],
|
||||||
"isEnableMongoCapabilityPresent": [Function],
|
|
||||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||||
"isHostedDataExplorerEnabled": [Function],
|
"isHostedDataExplorerEnabled": [Function],
|
||||||
"isLeftPaneExpanded": [Function],
|
"isLeftPaneExpanded": [Function],
|
||||||
@@ -5093,7 +5062,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isNotebooksEnabledForAccount": [Function],
|
"isNotebooksEnabledForAccount": [Function],
|
||||||
"isPublishNotebookPaneEnabled": [Function],
|
"isPublishNotebookPaneEnabled": [Function],
|
||||||
"isResourceTokenCollectionNodeSelected": [Function],
|
"isResourceTokenCollectionNodeSelected": [Function],
|
||||||
"isRightPanelV2Enabled": [Function],
|
|
||||||
"isSchemaEnabled": [Function],
|
"isSchemaEnabled": [Function],
|
||||||
"isServerlessEnabled": [Function],
|
"isServerlessEnabled": [Function],
|
||||||
"isSparkEnabled": [Function],
|
"isSparkEnabled": [Function],
|
||||||
@@ -5102,7 +5070,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"isTabsContentExpanded": [Function],
|
"isTabsContentExpanded": [Function],
|
||||||
"junoClient": JunoClient {
|
"junoClient": JunoClient {
|
||||||
"cachedPinnedRepos": [Function],
|
"cachedPinnedRepos": [Function],
|
||||||
"databaseAccount": undefined,
|
|
||||||
},
|
},
|
||||||
"memoryUsageInfo": [Function],
|
"memoryUsageInfo": [Function],
|
||||||
"notebookBasePath": [Function],
|
"notebookBasePath": [Function],
|
||||||
@@ -5110,14 +5077,12 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"onGitHubClientError": [Function],
|
"onGitHubClientError": [Function],
|
||||||
"onRefreshDatabasesKeyPress": [Function],
|
"onRefreshDatabasesKeyPress": [Function],
|
||||||
"onRefreshResourcesClick": [Function],
|
"onRefreshResourcesClick": [Function],
|
||||||
"onSwitchToConnectionString": [Function],
|
|
||||||
"openDialog": undefined,
|
"openDialog": undefined,
|
||||||
"openSidePanel": undefined,
|
"openSidePanel": undefined,
|
||||||
"provideFeedbackEmail": [Function],
|
"provideFeedbackEmail": [Function],
|
||||||
"queriesClient": QueriesClient {
|
"queriesClient": QueriesClient {
|
||||||
"container": [Circular],
|
"container": [Circular],
|
||||||
},
|
},
|
||||||
"refreshDatabaseAccount": [Function],
|
|
||||||
"refreshNotebookList": [Function],
|
"refreshNotebookList": [Function],
|
||||||
"refreshTreeTitle": [Function],
|
"refreshTreeTitle": [Function],
|
||||||
"resourceTokenCollection": [Function],
|
"resourceTokenCollection": [Function],
|
||||||
@@ -5141,7 +5106,6 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
"setInProgressConsoleDataIdToBeDeleted": undefined,
|
||||||
"setIsNotificationConsoleExpanded": undefined,
|
"setIsNotificationConsoleExpanded": undefined,
|
||||||
"setNotificationConsoleData": undefined,
|
"setNotificationConsoleData": undefined,
|
||||||
"signInAad": [Function],
|
|
||||||
"sparkClusterConnectionInfo": [Function],
|
"sparkClusterConnectionInfo": [Function],
|
||||||
"splitter": Splitter {
|
"splitter": Splitter {
|
||||||
"bounds": Object {
|
"bounds": Object {
|
||||||
@@ -5214,7 +5178,7 @@ exports[`SettingsComponent renders 1`] = `
|
|||||||
shouldDiscardIndexingPolicy={false}
|
shouldDiscardIndexingPolicy={false}
|
||||||
/>
|
/>
|
||||||
</PivotItem>
|
</PivotItem>
|
||||||
</StyledPivotBase>
|
</StyledPivot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ exports[`SettingsUtils functions render 1`] = `
|
|||||||
</StyledLinkBase>
|
</StyledLinkBase>
|
||||||
are only used for sorting query results. If you need to add a compound index, you can create one using the Mongo shell.
|
are only used for sorting query results. If you need to add a compound index, you can create one using the Mongo shell.
|
||||||
</Text>
|
</Text>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarType={1}
|
messageBarType={1}
|
||||||
>
|
>
|
||||||
<Text>
|
<Text>
|
||||||
@@ -350,7 +350,7 @@ exports[`SettingsUtils functions render 1`] = `
|
|||||||
azure portal.
|
azure portal.
|
||||||
</StyledLinkBase>
|
</StyledLinkBase>
|
||||||
</Text>
|
</Text>
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
<Stack
|
<Stack
|
||||||
horizontal={true}
|
horizontal={true}
|
||||||
tokens={
|
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 { 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 * as React from "react";
|
||||||
import {
|
import {
|
||||||
ChoiceItem,
|
ChoiceItem,
|
||||||
|
|||||||
@@ -77,22 +77,11 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CustomizedSpinButton
|
<StyledSpinButton
|
||||||
aria-labelledby="throughput-label"
|
aria-labelledby="throughput-label"
|
||||||
ariaLabel="Throughput (input)"
|
ariaLabel="Throughput (input)"
|
||||||
decrementButtonIcon={
|
|
||||||
Object {
|
|
||||||
"iconName": "ChevronDownSmall",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
disabled={true}
|
disabled={true}
|
||||||
id="throughput-spinner-input"
|
id="throughput-spinner-input"
|
||||||
incrementButtonIcon={
|
|
||||||
Object {
|
|
||||||
"iconName": "ChevronUpSmall",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
label=""
|
|
||||||
labelPosition={0}
|
labelPosition={0}
|
||||||
max={500}
|
max={500}
|
||||||
min={400}
|
min={400}
|
||||||
@@ -169,12 +158,12 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StackItem>
|
<StackItem>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarType={1}
|
messageBarType={1}
|
||||||
>
|
>
|
||||||
Error:
|
Error:
|
||||||
label, truelabel and falselabel are required for boolean input 'throughput3'
|
label, truelabel and falselabel are required for boolean input 'throughput3'
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
</StackItem>
|
</StackItem>
|
||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
@@ -282,7 +271,7 @@ exports[`SmartUiComponent disable all inputs 1`] = `
|
|||||||
label="Database"
|
label="Database"
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
aria-labelledby="database-label"
|
aria-labelledby="database-label"
|
||||||
disabled={true}
|
disabled={true}
|
||||||
id="database-dropdown-input"
|
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"
|
aria-labelledby="throughput-label"
|
||||||
ariaLabel="Throughput (input)"
|
ariaLabel="Throughput (input)"
|
||||||
decrementButtonIcon={
|
|
||||||
Object {
|
|
||||||
"iconName": "ChevronDownSmall",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
disabled={false}
|
|
||||||
id="throughput-spinner-input"
|
id="throughput-spinner-input"
|
||||||
incrementButtonIcon={
|
|
||||||
Object {
|
|
||||||
"iconName": "ChevronUpSmall",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
label=""
|
|
||||||
labelPosition={0}
|
labelPosition={0}
|
||||||
max={500}
|
max={500}
|
||||||
min={400}
|
min={400}
|
||||||
@@ -493,12 +470,12 @@ exports[`SmartUiComponent should render and honor input's hidden, disabled state
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<StackItem>
|
<StackItem>
|
||||||
<StyledMessageBarBase
|
<StyledMessageBar
|
||||||
messageBarType={1}
|
messageBarType={1}
|
||||||
>
|
>
|
||||||
Error:
|
Error:
|
||||||
label, truelabel and falselabel are required for boolean input 'throughput3'
|
label, truelabel and falselabel are required for boolean input 'throughput3'
|
||||||
</StyledMessageBarBase>
|
</StyledMessageBar>
|
||||||
</StackItem>
|
</StackItem>
|
||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
@@ -604,7 +581,7 @@ exports[`SmartUiComponent should render and honor input's hidden, disabled state
|
|||||||
label="Database"
|
label="Database"
|
||||||
/>
|
/>
|
||||||
</StyledLabelBase>
|
</StyledLabelBase>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
aria-labelledby="database-label"
|
aria-labelledby="database-label"
|
||||||
id="database-dropdown-input"
|
id="database-dropdown-input"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Text } from "office-ui-fabric-react";
|
import { Text } from "@fluentui/react";
|
||||||
import React, { FunctionComponent } from "react";
|
import React, { FunctionComponent } from "react";
|
||||||
import { Tooltip } from "../../../../Common/Tooltip/Tooltip";
|
import { Tooltip } from "../../../../Common/Tooltip/Tooltip";
|
||||||
import * as SharedConstants from "../../../../Shared/Constants";
|
import * as SharedConstants from "../../../../Shared/Constants";
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
TextField,
|
TextField,
|
||||||
TooltipHost,
|
TooltipHost,
|
||||||
} from "office-ui-fabric-react";
|
} from "@fluentui/react";
|
||||||
import React, { FunctionComponent, useState } from "react";
|
import React, { FunctionComponent, useState } from "react";
|
||||||
import * as Constants from "../../../Common/Constants";
|
import * as Constants from "../../../Common/Constants";
|
||||||
import { Tooltip } from "../../../Common/Tooltip/Tooltip";
|
import { Tooltip } from "../../../Common/Tooltip/Tooltip";
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
horizontal={true}
|
horizontal={true}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-Stack css-40"
|
className="ms-Stack css-121"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="mandatoryStar"
|
className="mandatoryStar"
|
||||||
@@ -35,7 +35,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="css-41"
|
className="css-122"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
"fontWeight": 600,
|
"fontWeight": 600,
|
||||||
@@ -834,7 +834,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
"borderColor": "#f3f2f1",
|
"borderColor": "#f3f2f1",
|
||||||
"color": "#a19f9d",
|
"color": "#a19f9d",
|
||||||
"cursor": "default",
|
"cursor": "default",
|
||||||
"pointerEvents": "none",
|
|
||||||
"selectors": Object {
|
"selectors": Object {
|
||||||
":focus": Object {
|
":focus": Object {
|
||||||
"outline": 0,
|
"outline": 0,
|
||||||
@@ -1097,6 +1096,35 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"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 {
|
"textContainer": Object {
|
||||||
"display": "block",
|
"display": "block",
|
||||||
"flexGrow": 1,
|
"flexGrow": 1,
|
||||||
@@ -1380,7 +1408,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-label="Info"
|
aria-label="Info"
|
||||||
className="ms-Button ms-Button--icon root-42"
|
className="ms-Button ms-Button--icon root-123"
|
||||||
data-is-focusable={true}
|
data-is-focusable={true}
|
||||||
id="iconButton1"
|
id="iconButton1"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@@ -1392,18 +1420,17 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="ms-Button-flexContainer flexContainer-43"
|
className="ms-Button-flexContainer flexContainer-124"
|
||||||
data-automationid="splitbuttonprimary"
|
data-automationid="splitbuttonprimary"
|
||||||
>
|
>
|
||||||
<Component
|
<Component
|
||||||
className="ms-Button-icon icon-45"
|
className="ms-Button-icon icon-126"
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
aria-hidden={true}
|
aria-hidden={true}
|
||||||
className="ms-Icon root-37 css-50 ms-Button-icon icon-45"
|
className="ms-Icon root-37 css-131 ms-Button-icon icon-126"
|
||||||
data-icon-name="Info"
|
data-icon-name="Info"
|
||||||
role="presentation"
|
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
"fontFamily": "\\"FabricMDL2Icons\\"",
|
"fontFamily": "\\"FabricMDL2Icons\\"",
|
||||||
@@ -1431,9 +1458,9 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
verticalAlign="center"
|
verticalAlign="center"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-Stack css-51"
|
className="ms-Stack css-132"
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupBase
|
<StyledChoiceGroup
|
||||||
aria-label="mode"
|
aria-label="mode"
|
||||||
key=".0:$.0"
|
key=".0:$.0"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
@@ -1451,7 +1478,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
}
|
}
|
||||||
selectedKey="true"
|
selectedKey="true"
|
||||||
>
|
>
|
||||||
<ChoiceGroupBase
|
<ChoiceGroup
|
||||||
aria-label="mode"
|
aria-label="mode"
|
||||||
onChange={[Function]}
|
onChange={[Function]}
|
||||||
options={
|
options={
|
||||||
@@ -1744,19 +1771,19 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
aria-label="mode"
|
aria-label="mode"
|
||||||
className=""
|
className="ms-ChoiceFieldGroup root-133"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ChoiceFieldGroup root-52"
|
|
||||||
role="radiogroup"
|
role="radiogroup"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ChoiceFieldGroup-flexContainer"
|
className="ms-ChoiceFieldGroup-flexContainer"
|
||||||
>
|
>
|
||||||
<StyledChoiceGroupOptionBase
|
<StyledChoiceGroupOption
|
||||||
checked={true}
|
checked={true}
|
||||||
focused={false}
|
focused={false}
|
||||||
id="ChoiceGroup6-true"
|
id="ChoiceGroup6-true"
|
||||||
|
itemKey="true"
|
||||||
key="true"
|
key="true"
|
||||||
labelId="ChoiceGroupLabel7-true"
|
labelId="ChoiceGroupLabel7-true"
|
||||||
name="ChoiceGroup6"
|
name="ChoiceGroup6"
|
||||||
@@ -1765,16 +1792,11 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
onFocus={[Function]}
|
onFocus={[Function]}
|
||||||
text="Autoscale"
|
text="Autoscale"
|
||||||
>
|
>
|
||||||
<ChoiceGroupOptionBase
|
<ChoiceGroupOption
|
||||||
checked={true}
|
checked={true}
|
||||||
focused={false}
|
focused={false}
|
||||||
id="ChoiceGroup6-true"
|
id="ChoiceGroup6-true"
|
||||||
imageSize={
|
itemKey="true"
|
||||||
Object {
|
|
||||||
"height": 32,
|
|
||||||
"width": 32,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
labelId="ChoiceGroupLabel7-true"
|
labelId="ChoiceGroupLabel7-true"
|
||||||
name="ChoiceGroup6"
|
name="ChoiceGroup6"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@@ -2057,14 +2079,14 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ChoiceField root-53"
|
className="ms-ChoiceField root-134"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ChoiceField-wrapper"
|
className="ms-ChoiceField-wrapper"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
checked={true}
|
checked={true}
|
||||||
className="ms-ChoiceField-input input-54"
|
className="ms-ChoiceField-input input-135"
|
||||||
id="ChoiceGroup6-true"
|
id="ChoiceGroup6-true"
|
||||||
name="ChoiceGroup6"
|
name="ChoiceGroup6"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@@ -2073,7 +2095,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
type="radio"
|
type="radio"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
className="ms-ChoiceField-field is-checked field-55"
|
className="ms-ChoiceField-field is-checked field-136"
|
||||||
htmlFor="ChoiceGroup6-true"
|
htmlFor="ChoiceGroup6-true"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -2085,12 +2107,13 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ChoiceGroupOptionBase>
|
</ChoiceGroupOption>
|
||||||
</StyledChoiceGroupOptionBase>
|
</StyledChoiceGroupOption>
|
||||||
<StyledChoiceGroupOptionBase
|
<StyledChoiceGroupOption
|
||||||
checked={false}
|
checked={false}
|
||||||
focused={false}
|
focused={false}
|
||||||
id="ChoiceGroup6-false"
|
id="ChoiceGroup6-false"
|
||||||
|
itemKey="false"
|
||||||
key="false"
|
key="false"
|
||||||
labelId="ChoiceGroupLabel7-false"
|
labelId="ChoiceGroupLabel7-false"
|
||||||
name="ChoiceGroup6"
|
name="ChoiceGroup6"
|
||||||
@@ -2099,16 +2122,11 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
onFocus={[Function]}
|
onFocus={[Function]}
|
||||||
text="Manual"
|
text="Manual"
|
||||||
>
|
>
|
||||||
<ChoiceGroupOptionBase
|
<ChoiceGroupOption
|
||||||
checked={false}
|
checked={false}
|
||||||
focused={false}
|
focused={false}
|
||||||
id="ChoiceGroup6-false"
|
id="ChoiceGroup6-false"
|
||||||
imageSize={
|
itemKey="false"
|
||||||
Object {
|
|
||||||
"height": 32,
|
|
||||||
"width": 32,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
labelId="ChoiceGroupLabel7-false"
|
labelId="ChoiceGroupLabel7-false"
|
||||||
name="ChoiceGroup6"
|
name="ChoiceGroup6"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@@ -2391,14 +2409,14 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ChoiceField root-53"
|
className="ms-ChoiceField root-134"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-ChoiceField-wrapper"
|
className="ms-ChoiceField-wrapper"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
checked={false}
|
checked={false}
|
||||||
className="ms-ChoiceField-input input-54"
|
className="ms-ChoiceField-input input-135"
|
||||||
id="ChoiceGroup6-false"
|
id="ChoiceGroup6-false"
|
||||||
name="ChoiceGroup6"
|
name="ChoiceGroup6"
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@@ -2407,7 +2425,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
type="radio"
|
type="radio"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
className="ms-ChoiceField-field field-60"
|
className="ms-ChoiceField-field field-141"
|
||||||
htmlFor="ChoiceGroup6-false"
|
htmlFor="ChoiceGroup6-false"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
@@ -2419,20 +2437,20 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ChoiceGroupOptionBase>
|
</ChoiceGroupOption>
|
||||||
</StyledChoiceGroupOptionBase>
|
</StyledChoiceGroupOption>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ChoiceGroupBase>
|
</ChoiceGroup>
|
||||||
</StyledChoiceGroupBase>
|
</StyledChoiceGroup>
|
||||||
</div>
|
</div>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Stack
|
<Stack
|
||||||
className="throughputInputSpacing"
|
className="throughputInputSpacing"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-Stack throughputInputSpacing css-63"
|
className="ms-Stack throughputInputSpacing css-144"
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
data-testid="ruDescription"
|
data-testid="ruDescription"
|
||||||
@@ -2440,7 +2458,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="css-41"
|
className="css-122"
|
||||||
data-testid="ruDescription"
|
data-testid="ruDescription"
|
||||||
>
|
>
|
||||||
Estimate your required RU/s with
|
Estimate your required RU/s with
|
||||||
@@ -2729,7 +2747,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
className="ms-Link root-64"
|
className="ms-Link root-145"
|
||||||
data-testid="ruDescription"
|
data-testid="ruDescription"
|
||||||
href="https://cosmos.azure.com/capacitycalculator/"
|
href="https://cosmos.azure.com/capacitycalculator/"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@@ -2747,7 +2765,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
key=".0:$.1"
|
key=".0:$.1"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-Stack css-40"
|
className="ms-Stack css-121"
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
data-testid="maxRUDescription"
|
data-testid="maxRUDescription"
|
||||||
@@ -2761,7 +2779,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="css-41"
|
className="css-122"
|
||||||
data-testid="maxRUDescription"
|
data-testid="maxRUDescription"
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
@@ -3562,7 +3580,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
"borderColor": "#f3f2f1",
|
"borderColor": "#f3f2f1",
|
||||||
"color": "#a19f9d",
|
"color": "#a19f9d",
|
||||||
"cursor": "default",
|
"cursor": "default",
|
||||||
"pointerEvents": "none",
|
|
||||||
"selectors": Object {
|
"selectors": Object {
|
||||||
":focus": Object {
|
":focus": Object {
|
||||||
"outline": 0,
|
"outline": 0,
|
||||||
@@ -3825,6 +3842,35 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"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 {
|
"textContainer": Object {
|
||||||
"display": "block",
|
"display": "block",
|
||||||
"flexGrow": 1,
|
"flexGrow": 1,
|
||||||
@@ -4108,7 +4154,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
aria-label="Info"
|
aria-label="Info"
|
||||||
className="ms-Button ms-Button--icon root-42"
|
className="ms-Button ms-Button--icon root-123"
|
||||||
data-is-focusable={true}
|
data-is-focusable={true}
|
||||||
id="iconButton9"
|
id="iconButton9"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
@@ -4120,18 +4166,17 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="ms-Button-flexContainer flexContainer-43"
|
className="ms-Button-flexContainer flexContainer-124"
|
||||||
data-automationid="splitbuttonprimary"
|
data-automationid="splitbuttonprimary"
|
||||||
>
|
>
|
||||||
<Component
|
<Component
|
||||||
className="ms-Button-icon icon-45"
|
className="ms-Button-icon icon-126"
|
||||||
iconName="Info"
|
iconName="Info"
|
||||||
>
|
>
|
||||||
<i
|
<i
|
||||||
aria-hidden={true}
|
aria-hidden={true}
|
||||||
className="ms-Icon root-37 css-50 ms-Button-icon icon-45"
|
className="ms-Icon root-37 css-131 ms-Button-icon icon-126"
|
||||||
data-icon-name="Info"
|
data-icon-name="Info"
|
||||||
role="presentation"
|
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
"fontFamily": "\\"FabricMDL2Icons\\"",
|
"fontFamily": "\\"FabricMDL2Icons\\"",
|
||||||
@@ -4178,7 +4223,6 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
>
|
>
|
||||||
<TextFieldBase
|
<TextFieldBase
|
||||||
aria-label="Max request units per second"
|
aria-label="Max request units per second"
|
||||||
canRevealPassword={false}
|
|
||||||
deferredValidationTime={200}
|
deferredValidationTime={200}
|
||||||
errorMessage=""
|
errorMessage=""
|
||||||
min={4000}
|
min={4000}
|
||||||
@@ -4465,17 +4509,17 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
value="4000"
|
value="4000"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-TextField is-required root-66"
|
className="ms-TextField is-required root-147"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-TextField-wrapper"
|
className="ms-TextField-wrapper"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="ms-TextField-fieldGroup fieldGroup-67"
|
className="ms-TextField-fieldGroup fieldGroup-148"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
aria-invalid={false}
|
aria-invalid={false}
|
||||||
className="ms-TextField-field field-68"
|
className="ms-TextField-field field-149"
|
||||||
id="TextField14"
|
id="TextField14"
|
||||||
min={4000}
|
min={4000}
|
||||||
onBlur={[Function]}
|
onBlur={[Function]}
|
||||||
@@ -4497,7 +4541,7 @@ exports[`ThroughputInput Pane should render Default properly 1`] = `
|
|||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="css-41"
|
className="css-122"
|
||||||
>
|
>
|
||||||
Your
|
Your
|
||||||
container
|
container
|
||||||
|
|||||||
@@ -5,21 +5,21 @@
|
|||||||
* - context menu
|
* - context menu
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as React from "react";
|
|
||||||
import * as Constants from "../../../Common/Constants";
|
|
||||||
import AnimateHeight from "react-animate-height";
|
|
||||||
import { IconButton, IButtonStyles } from "office-ui-fabric-react/lib/Button";
|
|
||||||
import {
|
import {
|
||||||
DirectionalHint,
|
DirectionalHint,
|
||||||
|
IButtonStyles,
|
||||||
|
IconButton,
|
||||||
IContextualMenuItemProps,
|
IContextualMenuItemProps,
|
||||||
IContextualMenuProps,
|
IContextualMenuProps,
|
||||||
} from "office-ui-fabric-react/lib/ContextualMenu";
|
} from "@fluentui/react";
|
||||||
|
import * as React from "react";
|
||||||
|
import AnimateHeight from "react-animate-height";
|
||||||
|
import LoadingIndicator_3Squares from "../../../../images/LoadingIndicator_3Squares.gif";
|
||||||
import TriangleDownIcon from "../../../../images/Triangle-down.svg";
|
import TriangleDownIcon from "../../../../images/Triangle-down.svg";
|
||||||
import TriangleRightIcon from "../../../../images/Triangle-right.svg";
|
import TriangleRightIcon from "../../../../images/Triangle-right.svg";
|
||||||
import LoadingIndicator_3Squares from "../../../../images/LoadingIndicator_3Squares.gif";
|
import * as Constants from "../../../Common/Constants";
|
||||||
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
|
||||||
import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||||
|
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
||||||
|
|
||||||
export interface TreeNodeMenuItem {
|
export interface TreeNodeMenuItem {
|
||||||
label: string;
|
label: string;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export class ContainerSampleGenerator {
|
|||||||
if (!queries || queries.length < 1) {
|
if (!queries || queries.length < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const account = userContext.databaseAccount;
|
const { databaseAccount: account } = userContext;
|
||||||
const databaseId = collection.databaseId;
|
const databaseId = collection.databaseId;
|
||||||
const gremlinClient = new GremlinClient();
|
const gremlinClient = new GremlinClient();
|
||||||
gremlinClient.initialize({
|
gremlinClient.initialize({
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as ko from "knockout";
|
import * as ko from "knockout";
|
||||||
import { IChoiceGroupProps } from "office-ui-fabric-react";
|
import { IChoiceGroupProps } from "@fluentui/react";
|
||||||
import * as path from "path";
|
import * as path from "path";
|
||||||
import Q from "q";
|
import Q from "q";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -12,7 +12,7 @@ import { readCollection } from "../Common/dataAccess/readCollection";
|
|||||||
import { readDatabases } from "../Common/dataAccess/readDatabases";
|
import { readDatabases } from "../Common/dataAccess/readDatabases";
|
||||||
import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils";
|
import { getErrorMessage, getErrorStack, handleError } from "../Common/ErrorHandlingUtils";
|
||||||
import * as Logger from "../Common/Logger";
|
import * as Logger from "../Common/Logger";
|
||||||
import { sendCachedDataMessage, sendMessage } from "../Common/MessageHandler";
|
import { sendCachedDataMessage } from "../Common/MessageHandler";
|
||||||
import { QueriesClient } from "../Common/QueriesClient";
|
import { QueriesClient } from "../Common/QueriesClient";
|
||||||
import { Splitter, SplitterBounds, SplitterDirection } from "../Common/Splitter";
|
import { Splitter, SplitterBounds, SplitterDirection } from "../Common/Splitter";
|
||||||
import { configContext, Platform } from "../ConfigContext";
|
import { configContext, Platform } from "../ConfigContext";
|
||||||
@@ -31,7 +31,7 @@ import { ExplorerSettings } from "../Shared/ExplorerSettings";
|
|||||||
import { Action, ActionModifiers } from "../Shared/Telemetry/TelemetryConstants";
|
import { Action, ActionModifiers } from "../Shared/Telemetry/TelemetryConstants";
|
||||||
import * as TelemetryProcessor from "../Shared/Telemetry/TelemetryProcessor";
|
import * as TelemetryProcessor from "../Shared/Telemetry/TelemetryProcessor";
|
||||||
import { ArcadiaResourceManager } from "../SparkClusterManager/ArcadiaResourceManager";
|
import { ArcadiaResourceManager } from "../SparkClusterManager/ArcadiaResourceManager";
|
||||||
import { userContext } from "../UserContext";
|
import { updateUserContext, userContext } from "../UserContext";
|
||||||
import { getCollectionName } from "../Utils/APITypeUtils";
|
import { getCollectionName } from "../Utils/APITypeUtils";
|
||||||
import { decryptJWTToken, getAuthorizationHeader } from "../Utils/AuthorizationUtils";
|
import { decryptJWTToken, getAuthorizationHeader } from "../Utils/AuthorizationUtils";
|
||||||
import { stringToBlob } from "../Utils/BlobUtils";
|
import { stringToBlob } from "../Utils/BlobUtils";
|
||||||
@@ -110,18 +110,8 @@ export default class Explorer {
|
|||||||
public refreshTreeTitle: ko.Observable<string>;
|
public refreshTreeTitle: ko.Observable<string>;
|
||||||
public collapsedResourceTreeWidth: number = ExplorerMetrics.CollapsedResourceTreeWidth;
|
public collapsedResourceTreeWidth: number = ExplorerMetrics.CollapsedResourceTreeWidth;
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* Use userContext.databaseAccount instead
|
|
||||||
* */
|
|
||||||
public databaseAccount: ko.Observable<DataModels.DatabaseAccount>;
|
|
||||||
public collectionCreationDefaults: ViewModels.CollectionCreationDefaults = SharedConstants.CollectionCreationDefaults;
|
public collectionCreationDefaults: ViewModels.CollectionCreationDefaults = SharedConstants.CollectionCreationDefaults;
|
||||||
public isFixedCollectionWithSharedThroughputSupported: ko.Computed<boolean>;
|
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 isServerlessEnabled: ko.Computed<boolean>;
|
||||||
public isAccountReady: ko.Observable<boolean>;
|
public isAccountReady: ko.Observable<boolean>;
|
||||||
public canSaveQueries: ko.Computed<boolean>;
|
public canSaveQueries: ko.Computed<boolean>;
|
||||||
@@ -172,7 +162,6 @@ export default class Explorer {
|
|||||||
// features
|
// features
|
||||||
public isPublishNotebookPaneEnabled: ko.Observable<boolean>;
|
public isPublishNotebookPaneEnabled: ko.Observable<boolean>;
|
||||||
public isHostedDataExplorerEnabled: ko.Computed<boolean>;
|
public isHostedDataExplorerEnabled: ko.Computed<boolean>;
|
||||||
public isRightPanelV2Enabled: ko.Computed<boolean>;
|
|
||||||
public isMongoIndexingEnabled: ko.Observable<boolean>;
|
public isMongoIndexingEnabled: ko.Observable<boolean>;
|
||||||
public canExceedMaximumValue: ko.Computed<boolean>;
|
public canExceedMaximumValue: ko.Computed<boolean>;
|
||||||
public isAutoscaleDefaultEnabled: ko.Observable<boolean>;
|
public isAutoscaleDefaultEnabled: ko.Observable<boolean>;
|
||||||
@@ -232,7 +221,6 @@ export default class Explorer {
|
|||||||
this.deleteDatabaseText = ko.observable<string>("Delete Database");
|
this.deleteDatabaseText = ko.observable<string>("Delete Database");
|
||||||
this.refreshTreeTitle = ko.observable<string>("Refresh collections");
|
this.refreshTreeTitle = ko.observable<string>("Refresh collections");
|
||||||
|
|
||||||
this.databaseAccount = ko.observable<DataModels.DatabaseAccount>();
|
|
||||||
this.isAccountReady = ko.observable<boolean>(false);
|
this.isAccountReady = ko.observable<boolean>(false);
|
||||||
this._isInitializingNotebooks = false;
|
this._isInitializingNotebooks = false;
|
||||||
this.arcadiaToken = ko.observable<string>();
|
this.arcadiaToken = ko.observable<string>();
|
||||||
@@ -267,7 +255,7 @@ export default class Explorer {
|
|||||||
async () => {
|
async () => {
|
||||||
this.isNotebookEnabled(
|
this.isNotebookEnabled(
|
||||||
userContext.authType !== AuthType.ResourceToken &&
|
userContext.authType !== AuthType.ResourceToken &&
|
||||||
((await this._containsDefaultNotebookWorkspace(this.databaseAccount())) ||
|
((await this._containsDefaultNotebookWorkspace(userContext.databaseAccount)) ||
|
||||||
userContext.features.enableNotebooks)
|
userContext.features.enableNotebooks)
|
||||||
);
|
);
|
||||||
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
TelemetryProcessor.trace(Action.NotebookEnabled, ActionModifiers.Mark, {
|
||||||
@@ -276,7 +264,7 @@ export default class Explorer {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (this.isNotebookEnabled()) {
|
if (this.isNotebookEnabled()) {
|
||||||
await this.initNotebooks(this.databaseAccount());
|
await this.initNotebooks(userContext.databaseAccount);
|
||||||
const workspaces = await this._getArcadiaWorkspaces();
|
const workspaces = await this._getArcadiaWorkspaces();
|
||||||
this.arcadiaWorkspaces(workspaces);
|
this.arcadiaWorkspaces(workspaces);
|
||||||
} else if (this.notebookToImport) {
|
} else if (this.notebookToImport) {
|
||||||
@@ -378,43 +366,26 @@ export default class Explorer {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.databaseAccount && !this.databaseAccount()) {
|
if (!userContext.databaseAccount) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.isEnableMongoCapabilityPresent();
|
return userContext.apiType === "Mongo";
|
||||||
});
|
});
|
||||||
|
|
||||||
this.isServerlessEnabled = ko.computed(
|
this.isServerlessEnabled = ko.computed(
|
||||||
() =>
|
() =>
|
||||||
this.databaseAccount &&
|
userContext.databaseAccount?.properties?.capabilities?.find(
|
||||||
this.databaseAccount()?.properties?.capabilities?.find(
|
|
||||||
(item) => item.name === Constants.CapabilityNames.EnableServerless
|
(item) => item.name === Constants.CapabilityNames.EnableServerless
|
||||||
) !== undefined
|
) !== 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>(
|
this.isHostedDataExplorerEnabled = ko.computed<boolean>(
|
||||||
() =>
|
() =>
|
||||||
configContext.platform === Platform.Portal &&
|
configContext.platform === Platform.Portal &&
|
||||||
!this.isRunningOnNationalCloud() &&
|
!this.isRunningOnNationalCloud() &&
|
||||||
userContext.apiType !== "Gremlin"
|
userContext.apiType !== "Gremlin"
|
||||||
);
|
);
|
||||||
this.isRightPanelV2Enabled = ko.computed<boolean>(() => userContext.features.enableRightPanelV2);
|
|
||||||
this.selectedDatabaseId = ko.computed<string>(() => {
|
this.selectedDatabaseId = ko.computed<string>(() => {
|
||||||
const selectedNode = this.selectedNode();
|
const selectedNode = this.selectedNode();
|
||||||
if (!selectedNode) {
|
if (!selectedNode) {
|
||||||
@@ -673,11 +644,11 @@ export default class Explorer {
|
|||||||
this.isSynapseLinkUpdating(true);
|
this.isSynapseLinkUpdating(true);
|
||||||
this._closeSynapseLinkModalDialog();
|
this._closeSynapseLinkModalDialog();
|
||||||
|
|
||||||
const resourceProviderClient = new ResourceProviderClientFactory().getOrCreate(this.databaseAccount().id);
|
const resourceProviderClient = new ResourceProviderClientFactory().getOrCreate(userContext.databaseAccount.id);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const databaseAccount: DataModels.DatabaseAccount = await resourceProviderClient.patchAsync(
|
const databaseAccount: DataModels.DatabaseAccount = await resourceProviderClient.patchAsync(
|
||||||
this.databaseAccount().id,
|
userContext.databaseAccount.id,
|
||||||
"2019-12-12",
|
"2019-12-12",
|
||||||
{
|
{
|
||||||
properties: {
|
properties: {
|
||||||
@@ -688,7 +659,7 @@ export default class Explorer {
|
|||||||
clearInProgressMessage();
|
clearInProgressMessage();
|
||||||
logConsoleInfo("Enabled Azure Synapse Link for this account");
|
logConsoleInfo("Enabled Azure Synapse Link for this account");
|
||||||
TelemetryProcessor.traceSuccess(Action.EnableAzureSynapseLink, {}, startTime);
|
TelemetryProcessor.traceSuccess(Action.EnableAzureSynapseLink, {}, startTime);
|
||||||
this.databaseAccount(databaseAccount);
|
updateUserContext({ databaseAccount });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
clearInProgressMessage();
|
clearInProgressMessage();
|
||||||
logConsoleError(`Enabling Azure Synapse Link for this account failed. ${getErrorMessage(error)}`);
|
logConsoleError(`Enabling Azure Synapse Link for this account failed. ${getErrorMessage(error)}`);
|
||||||
@@ -737,10 +708,6 @@ export default class Explorer {
|
|||||||
this.setIsNotificationConsoleExpanded(true);
|
this.setIsNotificationConsoleExpanded(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public collapseConsole(): void {
|
|
||||||
this.setIsNotificationConsoleExpanded(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public toggleLeftPaneExpanded() {
|
public toggleLeftPaneExpanded() {
|
||||||
this.isLeftPaneExpanded(!this.isLeftPaneExpanded());
|
this.isLeftPaneExpanded(!this.isLeftPaneExpanded());
|
||||||
|
|
||||||
@@ -1011,14 +978,14 @@ export default class Explorer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async ensureNotebookWorkspaceRunning() {
|
private async ensureNotebookWorkspaceRunning() {
|
||||||
if (!this.databaseAccount()) {
|
if (!userContext.databaseAccount) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let clearMessage;
|
let clearMessage;
|
||||||
try {
|
try {
|
||||||
const notebookWorkspace = await this.notebookWorkspaceManager.getNotebookWorkspaceAsync(
|
const notebookWorkspace = await this.notebookWorkspaceManager.getNotebookWorkspaceAsync(
|
||||||
this.databaseAccount().id,
|
userContext.databaseAccount.id,
|
||||||
"default"
|
"default"
|
||||||
);
|
);
|
||||||
if (
|
if (
|
||||||
@@ -1028,7 +995,7 @@ export default class Explorer {
|
|||||||
notebookWorkspace.properties.status.toLowerCase() === "stopped"
|
notebookWorkspace.properties.status.toLowerCase() === "stopped"
|
||||||
) {
|
) {
|
||||||
clearMessage = NotificationConsoleUtils.logConsoleProgress("Initializing notebook workspace");
|
clearMessage = NotificationConsoleUtils.logConsoleProgress("Initializing notebook workspace");
|
||||||
await this.notebookWorkspaceManager.startNotebookWorkspaceAsync(this.databaseAccount().id, "default");
|
await this.notebookWorkspaceManager.startNotebookWorkspaceAsync(userContext.databaseAccount.id, "default");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
handleError(error, "Explorer/ensureNotebookWorkspaceRunning", "Failed to initialize notebook workspace");
|
handleError(error, "Explorer/ensureNotebookWorkspaceRunning", "Failed to initialize notebook workspace");
|
||||||
@@ -1113,21 +1080,10 @@ export default class Explorer {
|
|||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
sessionStorage.setItem("portalDataExplorerInitMessage", JSON.stringify(inputs));
|
sessionStorage.setItem("portalDataExplorerInitMessage", JSON.stringify(inputs));
|
||||||
}
|
}
|
||||||
|
|
||||||
const databaseAccount = inputs.databaseAccount || null;
|
|
||||||
if (inputs.defaultCollectionThroughput) {
|
if (inputs.defaultCollectionThroughput) {
|
||||||
this.collectionCreationDefaults = inputs.defaultCollectionThroughput;
|
this.collectionCreationDefaults = inputs.defaultCollectionThroughput;
|
||||||
}
|
}
|
||||||
this.databaseAccount(databaseAccount);
|
|
||||||
this.setFeatureFlagsFromFlights(inputs.flights);
|
this.setFeatureFlagsFromFlights(inputs.flights);
|
||||||
TelemetryProcessor.traceSuccess(
|
|
||||||
Action.LoadDatabaseAccount,
|
|
||||||
{
|
|
||||||
dataExplorerArea: Constants.Areas.ResourceTree,
|
|
||||||
},
|
|
||||||
inputs.loadDatabaseAccountTimestamp
|
|
||||||
);
|
|
||||||
|
|
||||||
this.isAccountReady(true);
|
this.isAccountReady(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1166,38 +1122,6 @@ export default class Explorer {
|
|||||||
this.commandBarComponentAdapter.onUpdateTabsButtons(buttons);
|
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> {
|
private refreshAndExpandNewDatabases(newDatabases: ViewModels.Database[]): Q.Promise<void> {
|
||||||
// we reload collections for all databases so the resource tree reflects any collection-level changes
|
// we reload collections for all databases so the resource tree reflects any collection-level changes
|
||||||
// i.e addition of stored procedures, etc.
|
// i.e addition of stored procedures, etc.
|
||||||
@@ -1617,7 +1541,7 @@ export default class Explorer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
private async _refreshNotebooksEnabledStateForAccount(): Promise<void> {
|
||||||
const authType = userContext.authType;
|
const { databaseAccount, authType } = userContext;
|
||||||
if (
|
if (
|
||||||
authType === AuthType.EncryptedToken ||
|
authType === AuthType.EncryptedToken ||
|
||||||
authType === AuthType.ResourceToken ||
|
authType === AuthType.ResourceToken ||
|
||||||
@@ -1627,7 +1551,6 @@ export default class Explorer {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const databaseAccount = this.databaseAccount();
|
|
||||||
const firstWriteLocation =
|
const firstWriteLocation =
|
||||||
databaseAccount?.properties?.writeLocations &&
|
databaseAccount?.properties?.writeLocations &&
|
||||||
databaseAccount?.properties?.writeLocations[0]?.locationName.toLowerCase();
|
databaseAccount?.properties?.writeLocations[0]?.locationName.toLowerCase();
|
||||||
@@ -1666,9 +1589,8 @@ export default class Explorer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public _refreshSparkEnabledStateForAccount = async (): Promise<void> => {
|
public _refreshSparkEnabledStateForAccount = async (): Promise<void> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, authType } = userContext;
|
||||||
const armEndpoint = configContext.ARM_ENDPOINT;
|
const armEndpoint = configContext.ARM_ENDPOINT;
|
||||||
const authType = userContext.authType;
|
|
||||||
if (!subscriptionId || !armEndpoint || authType === AuthType.EncryptedToken) {
|
if (!subscriptionId || !armEndpoint || authType === AuthType.EncryptedToken) {
|
||||||
// explorer is not aware of the database account yet
|
// explorer is not aware of the database account yet
|
||||||
this.isSparkEnabledForAccount(false);
|
this.isSparkEnabledForAccount(false);
|
||||||
@@ -1695,9 +1617,8 @@ export default class Explorer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public _isAfecFeatureRegistered = async (featureName: string): Promise<boolean> => {
|
public _isAfecFeatureRegistered = async (featureName: string): Promise<boolean> => {
|
||||||
const subscriptionId = userContext.subscriptionId;
|
const { subscriptionId, authType } = userContext;
|
||||||
const armEndpoint = configContext.ARM_ENDPOINT;
|
const armEndpoint = configContext.ARM_ENDPOINT;
|
||||||
const authType = userContext.authType;
|
|
||||||
if (!featureName || !subscriptionId || !armEndpoint || authType === AuthType.EncryptedToken) {
|
if (!featureName || !subscriptionId || !armEndpoint || authType === AuthType.EncryptedToken) {
|
||||||
// explorer is not aware of the database account yet
|
// explorer is not aware of the database account yet
|
||||||
return false;
|
return false;
|
||||||
@@ -2009,7 +1930,7 @@ export default class Explorer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async handleOpenFileAction(path: string): Promise<void> {
|
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.closeAllPanes();
|
||||||
this._openSetupNotebooksPaneForQuickstart();
|
this._openSetupNotebooksPaneForQuickstart();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { FocusZone } from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { FocusZone } from "office-ui-fabric-react/lib/FocusZone";
|
|
||||||
import { AccessibleElement } from "../../Controls/AccessibleElement/AccessibleElement";
|
import { AccessibleElement } from "../../Controls/AccessibleElement/AccessibleElement";
|
||||||
|
|
||||||
export interface CaptionId {
|
export interface CaptionId {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Dropdown, IDropdownOption, Stack, TextField } from "office-ui-fabric-react";
|
import { Dropdown, IDropdownOption, Stack, TextField } from "@fluentui/react";
|
||||||
import React, { FunctionComponent, useRef, useState } from "react";
|
import React, { FunctionComponent, useRef, useState } from "react";
|
||||||
import AddIcon from "../../../../images/Add-property.svg";
|
import AddIcon from "../../../../images/Add-property.svg";
|
||||||
import DeleteIcon from "../../../../images/delete.svg";
|
import DeleteIcon from "../../../../images/delete.svg";
|
||||||
|
|||||||
@@ -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
|
* 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.
|
* and update any knockout observables passed from the parent.
|
||||||
*/
|
*/
|
||||||
|
import { CommandBar, ICommandBarItemProps } from "@fluentui/react";
|
||||||
import * as ko from "knockout";
|
import * as ko from "knockout";
|
||||||
import { CommandBar, ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { ReactAdapter } from "../../../Bindings/ReactBindingHandler";
|
import { ReactAdapter } from "../../../Bindings/ReactBindingHandler";
|
||||||
import { StyleConstants } from "../../../Common/Constants";
|
import { StyleConstants } from "../../../Common/Constants";
|
||||||
import * as ViewModels from "../../../Contracts/ViewModels";
|
import * as ViewModels from "../../../Contracts/ViewModels";
|
||||||
|
import { userContext } from "../../../UserContext";
|
||||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||||
import Explorer from "../../Explorer";
|
import Explorer from "../../Explorer";
|
||||||
import * as CommandBarComponentButtonFactory from "./CommandBarComponentButtonFactory";
|
import * as CommandBarComponentButtonFactory from "./CommandBarComponentButtonFactory";
|
||||||
@@ -39,7 +40,7 @@ export class CommandBarComponentAdapter implements ReactAdapter {
|
|||||||
container.isResourceTokenCollectionNodeSelected,
|
container.isResourceTokenCollectionNodeSelected,
|
||||||
container.isHostedDataExplorerEnabled,
|
container.isHostedDataExplorerEnabled,
|
||||||
container.isSynapseLinkUpdating,
|
container.isSynapseLinkUpdating,
|
||||||
container.databaseAccount,
|
userContext?.databaseAccount,
|
||||||
this.isNotebookTabActive,
|
this.isNotebookTabActive,
|
||||||
container.isServerlessEnabled,
|
container.isServerlessEnabled,
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -239,21 +239,11 @@ function createOpenSynapseLinkDialogButton(container: Explorer): CommandButtonCo
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (userContext?.databaseAccount?.properties?.enableAnalyticalStorage) {
|
||||||
container.databaseAccount &&
|
|
||||||
container.databaseAccount() &&
|
|
||||||
container.databaseAccount().properties &&
|
|
||||||
container.databaseAccount().properties.enableAnalyticalStorage
|
|
||||||
) {
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
const capabilities =
|
const capabilities = userContext?.databaseAccount?.properties?.capabilities || [];
|
||||||
(container.databaseAccount &&
|
|
||||||
container.databaseAccount() &&
|
|
||||||
container.databaseAccount().properties &&
|
|
||||||
container.databaseAccount().properties.capabilities) ||
|
|
||||||
[];
|
|
||||||
if (capabilities.some((capability) => capability.name === Constants.CapabilityNames.EnableStorageAnalytics)) {
|
if (capabilities.some((capability) => capability.name === Constants.CapabilityNames.EnableStorageAnalytics)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import * as CommandBarUtil from "./CommandBarUtil";
|
import { ICommandBarItemProps } from "@fluentui/react";
|
||||||
import { ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
|
||||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||||
|
import * as CommandBarUtil from "./CommandBarUtil";
|
||||||
|
|
||||||
describe("CommandBarUtil tests", () => {
|
describe("CommandBarUtil tests", () => {
|
||||||
const createButton = (): CommandButtonComponentProps => {
|
const createButton = (): CommandButtonComponentProps => {
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
import _ from "underscore";
|
import {
|
||||||
import * as React from "react";
|
Dropdown,
|
||||||
|
ICommandBarItemProps,
|
||||||
|
IComponentAsProps,
|
||||||
|
IconType,
|
||||||
|
IDropdownOption,
|
||||||
|
IDropdownStyles,
|
||||||
|
} from "@fluentui/react";
|
||||||
import { Observable } from "knockout";
|
import { Observable } from "knockout";
|
||||||
import { IconType } from "office-ui-fabric-react/lib/Icon";
|
import * as React from "react";
|
||||||
import { IComponentAsProps } from "office-ui-fabric-react/lib/Utilities";
|
import _ from "underscore";
|
||||||
import { StyleConstants } from "../../../Common/Constants";
|
|
||||||
import { ICommandBarItemProps } from "office-ui-fabric-react/lib/CommandBar";
|
|
||||||
import { Dropdown, IDropdownStyles, IDropdownOption } from "office-ui-fabric-react/lib/Dropdown";
|
|
||||||
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
|
||||||
import ChevronDownIcon from "../../../../images/Chevron_down.svg";
|
import ChevronDownIcon from "../../../../images/Chevron_down.svg";
|
||||||
import { ArcadiaMenuPicker } from "../../Controls/Arcadia/ArcadiaMenuPicker";
|
import { StyleConstants } from "../../../Common/Constants";
|
||||||
import { MemoryTrackerComponent } from "./MemoryTrackerComponent";
|
|
||||||
import { MemoryUsageInfo } from "../../../Contracts/DataModels";
|
import { MemoryUsageInfo } from "../../../Contracts/DataModels";
|
||||||
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
|
||||||
import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
import { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||||
|
import * as TelemetryProcessor from "../../../Shared/Telemetry/TelemetryProcessor";
|
||||||
|
import { ArcadiaMenuPicker } from "../../Controls/Arcadia/ArcadiaMenuPicker";
|
||||||
|
import { CommandButtonComponentProps } from "../../Controls/CommandButton/CommandButtonComponent";
|
||||||
|
import { MemoryTrackerComponent } from "./MemoryTrackerComponent";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert our NavbarButtonConfig to UI Fabric buttons
|
* Convert our NavbarButtonConfig to UI Fabric buttons
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import * as React from "react";
|
import { ProgressIndicator, Spinner, SpinnerSize, Stack } from "@fluentui/react";
|
||||||
import { Observable, Subscription } from "knockout";
|
import { Observable, Subscription } from "knockout";
|
||||||
|
import * as React from "react";
|
||||||
import { MemoryUsageInfo } from "../../../Contracts/DataModels";
|
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 {
|
interface MemoryTrackerProps {
|
||||||
memoryUsageInfo: Observable<MemoryUsageInfo>;
|
memoryUsageInfo: Observable<MemoryUsageInfo>;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* React component for control bar
|
* React component for control bar
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Dropdown, IDropdownOption } from "office-ui-fabric-react";
|
import { Dropdown, IDropdownOption } from "@fluentui/react";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import AnimateHeight from "react-animate-height";
|
import AnimateHeight from "react-animate-height";
|
||||||
import LoaderIcon from "../../../../images/circular_loader_black_16x16.gif";
|
import LoaderIcon from "../../../../images/circular_loader_black_16x16.gif";
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ exports[`NotificationConsoleComponent renders the console 1`] = `
|
|||||||
<div
|
<div
|
||||||
className="notificationConsoleControls"
|
className="notificationConsoleControls"
|
||||||
>
|
>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
aria-label="All"
|
aria-label="All"
|
||||||
aria-labelledby="consoleFilterLabel"
|
aria-labelledby="consoleFilterLabel"
|
||||||
label="Filter:"
|
label="Filter:"
|
||||||
@@ -277,7 +277,7 @@ exports[`NotificationConsoleComponent renders the console 2`] = `
|
|||||||
<div
|
<div
|
||||||
className="notificationConsoleControls"
|
className="notificationConsoleControls"
|
||||||
>
|
>
|
||||||
<StyledWithResponsiveMode
|
<Dropdown
|
||||||
aria-label="All"
|
aria-label="All"
|
||||||
aria-labelledby="consoleFilterLabel"
|
aria-labelledby="consoleFilterLabel"
|
||||||
label="Filter:"
|
label="Filter:"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import * as Constants from "../../Common/Constants";
|
|||||||
import { getErrorMessage } from "../../Common/ErrorHandlingUtils";
|
import { getErrorMessage } from "../../Common/ErrorHandlingUtils";
|
||||||
import * as Logger from "../../Common/Logger";
|
import * as Logger from "../../Common/Logger";
|
||||||
import * as DataModels from "../../Contracts/DataModels";
|
import * as DataModels from "../../Contracts/DataModels";
|
||||||
|
import { userContext } from "../../UserContext";
|
||||||
import { logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
import { logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
||||||
|
|
||||||
export class NotebookContainerClient {
|
export class NotebookContainerClient {
|
||||||
@@ -130,14 +131,15 @@ export class NotebookContainerClient {
|
|||||||
|
|
||||||
private async recreateNotebookWorkspaceAsync(): Promise<void> {
|
private async recreateNotebookWorkspaceAsync(): Promise<void> {
|
||||||
const explorer = window.dataExplorer;
|
const explorer = window.dataExplorer;
|
||||||
if (!explorer || !explorer.databaseAccount() || !explorer.databaseAccount().id) {
|
const { databaseAccount } = userContext;
|
||||||
|
if (!databaseAccount?.id) {
|
||||||
throw new Error("DataExplorer not initialized");
|
throw new Error("DataExplorer not initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
const notebookWorkspaceManager = explorer.notebookWorkspaceManager;
|
const notebookWorkspaceManager = explorer.notebookWorkspaceManager;
|
||||||
try {
|
try {
|
||||||
await notebookWorkspaceManager.deleteNotebookWorkspaceAsync(explorer.databaseAccount().id, "default");
|
await notebookWorkspaceManager.deleteNotebookWorkspaceAsync(databaseAccount?.id, "default");
|
||||||
await notebookWorkspaceManager.createNotebookWorkspaceAsync(explorer.databaseAccount().id, "default");
|
await notebookWorkspaceManager.createNotebookWorkspaceAsync(databaseAccount?.id, "default");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.logError(getErrorMessage(error), "NotebookContainerClient/recreateNotebookWorkspaceAsync");
|
Logger.logError(getErrorMessage(error), "NotebookContainerClient/recreateNotebookWorkspaceAsync");
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import { GitHubOAuthService } from "../../GitHub/GitHubOAuthService";
|
|||||||
import { JunoClient } from "../../Juno/JunoClient";
|
import { JunoClient } from "../../Juno/JunoClient";
|
||||||
import { Action, ActionModifiers } from "../../Shared/Telemetry/TelemetryConstants";
|
import { Action, ActionModifiers } from "../../Shared/Telemetry/TelemetryConstants";
|
||||||
import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor";
|
import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor";
|
||||||
|
import { userContext } from "../../UserContext";
|
||||||
import { getFullName } from "../../Utils/UserUtils";
|
import { getFullName } from "../../Utils/UserUtils";
|
||||||
import Explorer from "../Explorer";
|
import Explorer from "../Explorer";
|
||||||
import { ContextualPaneBase } from "../Panes/ContextualPaneBase";
|
import { ContextualPaneBase } from "../Panes/ContextualPaneBase";
|
||||||
@@ -56,7 +57,7 @@ export default class NotebookManager {
|
|||||||
|
|
||||||
public initialize(params: NotebookManagerOptions): void {
|
public initialize(params: NotebookManagerOptions): void {
|
||||||
this.params = params;
|
this.params = params;
|
||||||
this.junoClient = new JunoClient(this.params.container.databaseAccount);
|
this.junoClient = new JunoClient();
|
||||||
|
|
||||||
this.gitHubOAuthService = new GitHubOAuthService(this.junoClient);
|
this.gitHubOAuthService = new GitHubOAuthService(this.junoClient);
|
||||||
this.gitHubClient = new GitHubClient(this.onGitHubClientError);
|
this.gitHubClient = new GitHubClient(this.onGitHubClientError);
|
||||||
@@ -73,7 +74,7 @@ export default class NotebookManager {
|
|||||||
|
|
||||||
this.notebookClient = new NotebookContainerClient(
|
this.notebookClient = new NotebookContainerClient(
|
||||||
this.params.container.notebookServerInfo,
|
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)
|
(update: MemoryUsageInfo) => this.params.container.memoryUsageInfo(update)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
|
import { IconButton, Spinner, SpinnerSize } from "@fluentui/react";
|
||||||
import * as React from "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 { PassedPromptProps } from "./Prompt";
|
||||||
|
import "./Prompt.less";
|
||||||
|
|
||||||
export const promptContent = (props: PassedPromptProps): JSX.Element => {
|
export const promptContent = (props: PassedPromptProps): JSX.Element => {
|
||||||
if (props.status === "busy") {
|
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 { ContentRef } from "@nteract/types";
|
||||||
|
import { RecordOf } from "immutable";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Dispatch } from "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 { Action, ActionModifiers } from "../../../Shared/Telemetry/TelemetryConstants";
|
||||||
|
import * as cdbActions from "../NotebookComponent/actions";
|
||||||
|
|
||||||
export interface ComponentProps {
|
export interface ComponentProps {
|
||||||
contentRef: ContentRef;
|
contentRef: ContentRef;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
import { FontIcon, PrimaryButton, Spinner, SpinnerSize, Stack, Text, TextField } from "@fluentui/react";
|
||||||
import { ImmutableOutput } from "@nteract/commutable";
|
import { ImmutableOutput } from "@nteract/commutable";
|
||||||
import { actions, AppState, ContentRef, KernelRef, selectors } from "@nteract/core";
|
import { actions, AppState, ContentRef, KernelRef, selectors } from "@nteract/core";
|
||||||
import Immutable from "immutable";
|
import Immutable from "immutable";
|
||||||
import { FontIcon, PrimaryButton, Spinner, SpinnerSize, Stack, Text, TextField } from "office-ui-fabric-react";
|
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { Dispatch } from "redux";
|
import { Dispatch } from "redux";
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import { Spinner, Stack, Text, TextField } from "office-ui-fabric-react";
|
import { DefaultButton, PrimaryButton, Spinner, Stack, Text, TextField } from "@fluentui/react";
|
||||||
import { DefaultButton, PrimaryButton } from "office-ui-fabric-react/lib/Button";
|
import copyToClipboard from "clipboard-copy";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import { useFullScreenURLs } from "../hooks/useFullScreenURLs";
|
import { useFullScreenURLs } from "../hooks/useFullScreenURLs";
|
||||||
import copyToClipboard from "clipboard-copy";
|
|
||||||
|
|
||||||
export const OpenFullScreen: React.FunctionComponent = () => {
|
export const OpenFullScreen: React.FunctionComponent = () => {
|
||||||
const result = useFullScreenURLs();
|
const result = useFullScreenURLs();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user