mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-10 04:56:56 +00:00
Remove feature flag
This commit is contained in:
@@ -54,8 +54,6 @@ export const ResourceTreeContainer: FunctionComponent<ResourceTreeContainerProps
|
|||||||
</div>
|
</div>
|
||||||
{userContext.authType === AuthType.ResourceToken ? (
|
{userContext.authType === AuthType.ResourceToken ? (
|
||||||
<ResourceTokenTree />
|
<ResourceTokenTree />
|
||||||
) : userContext.features.enableKoResourceTree ? (
|
|
||||||
<div style={{ overflowY: "auto" }} data-bind="react:resourceTree" />
|
|
||||||
) : (
|
) : (
|
||||||
<ResourceTree container={container} />
|
<ResourceTree container={container} />
|
||||||
)}
|
)}
|
||||||
|
|||||||
28
src/Explorer/Tree/GenericResourceTree.tsx
Normal file
28
src/Explorer/Tree/GenericResourceTree.tsx
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { AccordionComponent, AccordionItemComponent } from "../Controls/Accordion/AccordionComponent";
|
||||||
|
import { TreeComponent, TreeNode } from "../Controls/TreeComponent/TreeComponent";
|
||||||
|
|
||||||
|
interface RootNodeProps {
|
||||||
|
rootNode: TreeNode;
|
||||||
|
title: string;
|
||||||
|
className: string;
|
||||||
|
isExpanded: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GenericResourceTreeProps {
|
||||||
|
rootNodes: RootNodeProps[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export const GenericResourceTree: React.FC<GenericResourceTreeProps> = ({
|
||||||
|
rootNodes,
|
||||||
|
}: GenericResourceTreeProps): JSX.Element => {
|
||||||
|
return (
|
||||||
|
<AccordionComponent>
|
||||||
|
{rootNodes.map((rootNodeProps: RootNodeProps) => {
|
||||||
|
<AccordionItemComponent title={rootNodeProps.title} isExpanded={rootNodeProps.isExpanded}>
|
||||||
|
<TreeComponent className={rootNodeProps.className} rootNode={rootNodeProps.rootNode} />
|
||||||
|
</AccordionItemComponent>;
|
||||||
|
})}
|
||||||
|
</AccordionComponent>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -16,7 +16,6 @@ export type Features = {
|
|||||||
readonly enableTtl: boolean;
|
readonly enableTtl: boolean;
|
||||||
readonly executeSproc: boolean;
|
readonly executeSproc: boolean;
|
||||||
readonly enableAadDataPlane: boolean;
|
readonly enableAadDataPlane: boolean;
|
||||||
readonly enableKoResourceTree: boolean;
|
|
||||||
readonly hostedDataExplorer: boolean;
|
readonly hostedDataExplorer: boolean;
|
||||||
readonly junoEndpoint?: string;
|
readonly junoEndpoint?: string;
|
||||||
readonly livyEndpoint?: string;
|
readonly livyEndpoint?: string;
|
||||||
@@ -58,7 +57,6 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear
|
|||||||
enableSDKoperations: "true" === get("enablesdkoperations"),
|
enableSDKoperations: "true" === get("enablesdkoperations"),
|
||||||
enableSpark: "true" === get("enablespark"),
|
enableSpark: "true" === get("enablespark"),
|
||||||
enableTtl: "true" === get("enablettl"),
|
enableTtl: "true" === get("enablettl"),
|
||||||
enableKoResourceTree: "true" === get("enablekoresourcetree"),
|
|
||||||
executeSproc: "true" === get("dataexplorerexecutesproc"),
|
executeSproc: "true" === get("dataexplorerexecutesproc"),
|
||||||
hostedDataExplorer: "true" === get("hosteddataexplorerenabled"),
|
hostedDataExplorer: "true" === get("hosteddataexplorerenabled"),
|
||||||
junoEndpoint: get("junoendpoint"),
|
junoEndpoint: get("junoendpoint"),
|
||||||
|
|||||||
Reference in New Issue
Block a user