mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-05-11 19:04:35 +01:00
Mongo RU Schema Analyzer Deprecation (#2117)
* remove menu item * remove unused import
This commit is contained in:
parent
af4e1d10b4
commit
714f38a1be
@ -241,21 +241,6 @@ export class ResourceTreeAdapter implements ReactAdapter {
|
||||
contextMenu: ResourceTreeContextMenuButtonFactory.createCollectionContextMenuButton(this.container, collection),
|
||||
});
|
||||
|
||||
if (
|
||||
useNotebook.getState().isNotebookEnabled &&
|
||||
userContext.apiType === "Mongo" &&
|
||||
isPublicInternetAccessAllowed()
|
||||
) {
|
||||
children.push({
|
||||
label: "Schema (Preview)",
|
||||
onClick: collection.onSchemaAnalyzerClick.bind(collection),
|
||||
isSelected: () =>
|
||||
useSelectedNode
|
||||
.getState()
|
||||
.isDataNodeSelected(collection.databaseId, collection.id(), [ViewModels.CollectionTabKind.SchemaAnalyzer]),
|
||||
});
|
||||
}
|
||||
|
||||
if (userContext.apiType !== "Cassandra" || !isServerlessAccount()) {
|
||||
children.push({
|
||||
label: database.isDatabaseShared() || isServerlessAccount() ? "Settings" : "Scale & Settings",
|
||||
|
@ -338,11 +338,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the Mo
|
||||
"label": "Documents",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"isSelected": [Function],
|
||||
"label": "Schema (Preview)",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"isSelected": [Function],
|
||||
@ -406,11 +401,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the Mo
|
||||
"label": "Documents",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"isSelected": [Function],
|
||||
"label": "Schema (Preview)",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"isSelected": [Function],
|
||||
@ -515,11 +505,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the Mo
|
||||
"label": "Documents",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"isSelected": [Function],
|
||||
"label": "Schema (Preview)",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"id": "sampleSettings",
|
||||
"isSelected": [Function],
|
||||
@ -610,11 +595,6 @@ exports[`createDatabaseTreeNodes generates the correct tree structure for the Mo
|
||||
"label": "Documents",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"isSelected": [Function],
|
||||
"label": "Schema (Preview)",
|
||||
"onClick": [Function],
|
||||
},
|
||||
{
|
||||
"id": "",
|
||||
"isSelected": [Function],
|
||||
|
@ -11,7 +11,6 @@ import { getItemName } from "Utils/APITypeUtils";
|
||||
import { isServerlessAccount } from "Utils/CapabilityUtils";
|
||||
import { useTabs } from "hooks/useTabs";
|
||||
import React from "react";
|
||||
import { isPublicInternetAccessAllowed } from "../../Common/DatabaseAccountUtility";
|
||||
import { Platform, configContext } from "../../ConfigContext";
|
||||
import * as DataModels from "../../Contracts/DataModels";
|
||||
import * as ViewModels from "../../Contracts/ViewModels";
|
||||
@ -19,7 +18,6 @@ import { userContext } from "../../UserContext";
|
||||
import * as ResourceTreeContextMenuButtonFactory from "../ContextMenuButtonFactory";
|
||||
import Explorer from "../Explorer";
|
||||
import { useCommandBar } from "../Menus/CommandBar/CommandBarComponentAdapter";
|
||||
import { useNotebook } from "../Notebook/useNotebook";
|
||||
import { useSelectedNode } from "../useSelectedNode";
|
||||
|
||||
export const shouldShowScriptNodes = (): boolean => {
|
||||
@ -294,22 +292,6 @@ const buildCollectionNodeChildren = (
|
||||
contextMenu: ResourceTreeContextMenuButtonFactory.createCollectionContextMenuButton(container, collection),
|
||||
});
|
||||
|
||||
if (
|
||||
isNotebookEnabled &&
|
||||
userContext.apiType === "Mongo" &&
|
||||
isPublicInternetAccessAllowed() &&
|
||||
useNotebook.getState().isPhoenixFeatures
|
||||
) {
|
||||
children.push({
|
||||
label: "Schema (Preview)",
|
||||
onClick: collection.onSchemaAnalyzerClick.bind(collection),
|
||||
isSelected: () =>
|
||||
useSelectedNode
|
||||
.getState()
|
||||
.isDataNodeSelected(collection.databaseId, collection.id(), [ViewModels.CollectionTabKind.SchemaAnalyzer]),
|
||||
});
|
||||
}
|
||||
|
||||
if (userContext.apiType !== "Cassandra" || !isServerlessAccount()) {
|
||||
let id = "";
|
||||
if (collection.isSampleCollection) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user