Mongo RU Schema Analyzer Deprecation (#2117)

* remove menu item

* remove unused import
This commit is contained in:
Sourabh Jain 2025-04-28 07:13:24 +05:30 committed by GitHub
parent af4e1d10b4
commit 714f38a1be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 53 deletions

View File

@ -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",

View File

@ -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],

View File

@ -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) {