From 7c0d1642fd56e237019e926df26e79361e80744e Mon Sep 17 00:00:00 2001 From: Chuck Skelton Date: Mon, 10 Jul 2023 12:32:25 -0700 Subject: [PATCH] Initial add of index advisor tab. --- .../Controls/Query/IndexAdvisorComponent.tsx | 46 +++++++++++++++++++ .../Tabs/QueryTab/QueryTabComponent.tsx | 5 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 src/Explorer/Controls/Query/IndexAdvisorComponent.tsx diff --git a/src/Explorer/Controls/Query/IndexAdvisorComponent.tsx b/src/Explorer/Controls/Query/IndexAdvisorComponent.tsx new file mode 100644 index 000000000..389443b7d --- /dev/null +++ b/src/Explorer/Controls/Query/IndexAdvisorComponent.tsx @@ -0,0 +1,46 @@ +import { + Checkbox, + CheckboxVisibility, + DetailsHeader, + DetailsList, + IDetailsHeaderProps, + IDetailsListCheckboxProps, + IRenderFunction, + Stack, + Text +} from "@fluentui/react"; +import React from "react"; + +interface IndexAdvisorComponentProps { }; + +export const IndexAdvisorComponent: React.FC = (): JSX.Element => { + + const onRenderCheckbox = (props: IDetailsListCheckboxProps, _defaultRender?: IRenderFunction) => { + return ; + }; + + const onRenderDetailsHeader = (props: IDetailsHeaderProps, _defaultRender?: IRenderFunction) => { + return ; + }; + + return ( + + + Here is an analysis on the indexes utilized for executing this query. + Based on the analysis, Cosmos DB recommends adding the selected index(es) to your indexing policy to + optimize your query performance. + + Indexes analysis + + + ); +}; \ No newline at end of file diff --git a/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx b/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx index 95ac41b93..661ec7c60 100644 --- a/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx +++ b/src/Explorer/Tabs/QueryTab/QueryTabComponent.tsx @@ -195,7 +195,10 @@ export default class QueryTabComponent extends React.Component