diff --git a/src/Contracts/ViewModels.ts b/src/Contracts/ViewModels.ts index 767665686..f8c6d885c 100644 --- a/src/Contracts/ViewModels.ts +++ b/src/Contracts/ViewModels.ts @@ -381,6 +381,7 @@ export enum TerminalKind { export interface DataExplorerInputsFrame { databaseAccount: any; subscriptionId?: string; + tenantId?: string; resourceGroup?: string; masterKey?: string; hasWriteAccess?: boolean; diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx index 36689dc59..730e2c1a6 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTableComponent.tsx @@ -38,7 +38,6 @@ import { TextSortDescendingRegular, } from "@fluentui/react-icons"; import { NormalizedEventKey } from "Common/Constants"; -import { Environment, getEnvironment } from "Common/EnvironmentUtility"; import { TableColumnSelectionPane } from "Explorer/Panes/TableColumnSelectionPane/TableColumnSelectionPane"; import { ColumnSizesMap, @@ -228,31 +227,29 @@ export const DocumentsTableComponent: React.FC = } onClick={onRefreshTable}> Refresh - {[Environment.Development, Environment.Mpac].includes(getEnvironment()) && ( - <> - } - onClick={(e) => onSortClick(e, column.id, "ascending")} - > - Sort ascending + <> + } + onClick={(e) => onSortClick(e, column.id, "ascending")} + > + Sort ascending + + } + onClick={(e) => onSortClick(e, column.id, "descending")} + > + Sort descending + + } onClick={(e) => onSortClick(e, undefined, undefined)}> + Reset sorting + + {!isColumnSelectionDisabled && ( + } onClick={openColumnSelectionPane}> + Edit columns - } - onClick={(e) => onSortClick(e, column.id, "descending")} - > - Sort descending - - } onClick={(e) => onSortClick(e, undefined, undefined)}> - Reset sorting - - {!isColumnSelectionDisabled && ( - } onClick={openColumnSelectionPane}> - Edit columns - - )} - - - )} + )} + + } @@ -260,25 +257,24 @@ export const DocumentsTableComponent: React.FC = > Resize with left/right arrow keys - {[Environment.Development, Environment.Mpac].includes(getEnvironment()) && - !isColumnSelectionDisabled && ( - } - onClick={() => { - // Remove column id from selectedColumnIds - const index = selectedColumnIds.indexOf(column.id); - if (index === -1) { - return; - } - const newSelectedColumnIds = [...selectedColumnIds]; - newSelectedColumnIds.splice(index, 1); - onColumnSelectionChange(newSelectedColumnIds); - }} - > - Remove column - - )} + {!isColumnSelectionDisabled && ( + } + onClick={() => { + // Remove column id from selectedColumnIds + const index = selectedColumnIds.indexOf(column.id); + if (index === -1) { + return; + } + const newSelectedColumnIds = [...selectedColumnIds]; + newSelectedColumnIds.splice(index, 1); + onColumnSelectionChange(newSelectedColumnIds); + }} + > + Remove column + + )} diff --git a/src/UserContext.ts b/src/UserContext.ts index ac534029a..f4b43a2f3 100644 --- a/src/UserContext.ts +++ b/src/UserContext.ts @@ -74,6 +74,7 @@ export interface UserContext { readonly authType?: AuthType; readonly masterKey?: string; readonly subscriptionId?: string; + readonly tenantId?: string; readonly resourceGroup?: string; readonly databaseAccount?: DatabaseAccount; readonly endpoint?: string; diff --git a/src/hooks/useKnockoutExplorer.ts b/src/hooks/useKnockoutExplorer.ts index 590b9195b..f86e380a1 100644 --- a/src/hooks/useKnockoutExplorer.ts +++ b/src/hooks/useKnockoutExplorer.ts @@ -693,6 +693,7 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) { databaseAccount, resourceGroup: inputs.resourceGroup, subscriptionId: inputs.subscriptionId, + tenantId: inputs.tenantId, subscriptionType: inputs.subscriptionType, quotaId: inputs.quotaId, portalEnv: inputs.serverId as PortalEnv,