From b783ebc83411e44419a2591e2ef05d311eb0dc55 Mon Sep 17 00:00:00 2001 From: Victor Meng Date: Tue, 10 Aug 2021 16:55:53 -0700 Subject: [PATCH] Remove feature flag --- src/Common/ResourceTreeContainer.tsx | 2 -- src/Explorer/Tree/GenericResourceTree.tsx | 28 +++++++++++++++++++++++ src/Platform/Hosted/extractFeatures.ts | 2 -- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 src/Explorer/Tree/GenericResourceTree.tsx diff --git a/src/Common/ResourceTreeContainer.tsx b/src/Common/ResourceTreeContainer.tsx index 18a769b12..86a3f2400 100644 --- a/src/Common/ResourceTreeContainer.tsx +++ b/src/Common/ResourceTreeContainer.tsx @@ -54,8 +54,6 @@ export const ResourceTreeContainer: FunctionComponent {userContext.authType === AuthType.ResourceToken ? ( - ) : userContext.features.enableKoResourceTree ? ( -
) : ( )} diff --git a/src/Explorer/Tree/GenericResourceTree.tsx b/src/Explorer/Tree/GenericResourceTree.tsx new file mode 100644 index 000000000..bc0de068c --- /dev/null +++ b/src/Explorer/Tree/GenericResourceTree.tsx @@ -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 = ({ + rootNodes, +}: GenericResourceTreeProps): JSX.Element => { + return ( + + {rootNodes.map((rootNodeProps: RootNodeProps) => { + + + ; + })} + + ); +}; diff --git a/src/Platform/Hosted/extractFeatures.ts b/src/Platform/Hosted/extractFeatures.ts index c7ea359ab..518b2c607 100644 --- a/src/Platform/Hosted/extractFeatures.ts +++ b/src/Platform/Hosted/extractFeatures.ts @@ -16,7 +16,6 @@ export type Features = { readonly enableTtl: boolean; readonly executeSproc: boolean; readonly enableAadDataPlane: boolean; - readonly enableKoResourceTree: boolean; readonly hostedDataExplorer: boolean; readonly junoEndpoint?: string; readonly livyEndpoint?: string; @@ -58,7 +57,6 @@ export function extractFeatures(given = new URLSearchParams(window.location.sear enableSDKoperations: "true" === get("enablesdkoperations"), enableSpark: "true" === get("enablespark"), enableTtl: "true" === get("enablettl"), - enableKoResourceTree: "true" === get("enablekoresourcetree"), executeSproc: "true" === get("dataexplorerexecutesproc"), hostedDataExplorer: "true" === get("hosteddataexplorerenabled"), junoEndpoint: get("junoendpoint"),