mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-16 17:25:58 +00:00
Merge branch 'master' of https://github.com/Azure/cosmos-explorer
This commit is contained in:
commit
b456e53b2f
@ -381,6 +381,7 @@ export enum TerminalKind {
|
|||||||
export interface DataExplorerInputsFrame {
|
export interface DataExplorerInputsFrame {
|
||||||
databaseAccount: any;
|
databaseAccount: any;
|
||||||
subscriptionId?: string;
|
subscriptionId?: string;
|
||||||
|
tenantId?: string;
|
||||||
resourceGroup?: string;
|
resourceGroup?: string;
|
||||||
masterKey?: string;
|
masterKey?: string;
|
||||||
hasWriteAccess?: boolean;
|
hasWriteAccess?: boolean;
|
||||||
|
@ -38,7 +38,6 @@ import {
|
|||||||
TextSortDescendingRegular,
|
TextSortDescendingRegular,
|
||||||
} from "@fluentui/react-icons";
|
} from "@fluentui/react-icons";
|
||||||
import { NormalizedEventKey } from "Common/Constants";
|
import { NormalizedEventKey } from "Common/Constants";
|
||||||
import { Environment, getEnvironment } from "Common/EnvironmentUtility";
|
|
||||||
import { TableColumnSelectionPane } from "Explorer/Panes/TableColumnSelectionPane/TableColumnSelectionPane";
|
import { TableColumnSelectionPane } from "Explorer/Panes/TableColumnSelectionPane/TableColumnSelectionPane";
|
||||||
import {
|
import {
|
||||||
ColumnSizesMap,
|
ColumnSizesMap,
|
||||||
@ -228,31 +227,29 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
|
|||||||
<MenuItem key="refresh" icon={<ArrowClockwise16Regular />} onClick={onRefreshTable}>
|
<MenuItem key="refresh" icon={<ArrowClockwise16Regular />} onClick={onRefreshTable}>
|
||||||
Refresh
|
Refresh
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{[Environment.Development, Environment.Mpac].includes(getEnvironment()) && (
|
<>
|
||||||
<>
|
<MenuItem
|
||||||
<MenuItem
|
icon={<TextSortAscendingRegular />}
|
||||||
icon={<TextSortAscendingRegular />}
|
onClick={(e) => onSortClick(e, column.id, "ascending")}
|
||||||
onClick={(e) => onSortClick(e, column.id, "ascending")}
|
>
|
||||||
>
|
Sort ascending
|
||||||
Sort ascending
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
icon={<TextSortDescendingRegular />}
|
||||||
|
onClick={(e) => onSortClick(e, column.id, "descending")}
|
||||||
|
>
|
||||||
|
Sort descending
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem icon={<ArrowResetRegular />} onClick={(e) => onSortClick(e, undefined, undefined)}>
|
||||||
|
Reset sorting
|
||||||
|
</MenuItem>
|
||||||
|
{!isColumnSelectionDisabled && (
|
||||||
|
<MenuItem key="editcolumns" icon={<EditRegular />} onClick={openColumnSelectionPane}>
|
||||||
|
Edit columns
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem
|
)}
|
||||||
icon={<TextSortDescendingRegular />}
|
<MenuDivider />
|
||||||
onClick={(e) => onSortClick(e, column.id, "descending")}
|
</>
|
||||||
>
|
|
||||||
Sort descending
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem icon={<ArrowResetRegular />} onClick={(e) => onSortClick(e, undefined, undefined)}>
|
|
||||||
Reset sorting
|
|
||||||
</MenuItem>
|
|
||||||
{!isColumnSelectionDisabled && (
|
|
||||||
<MenuItem key="editcolumns" icon={<EditRegular />} onClick={openColumnSelectionPane}>
|
|
||||||
Edit columns
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
<MenuDivider />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<MenuItem
|
<MenuItem
|
||||||
key="keyboardresize"
|
key="keyboardresize"
|
||||||
icon={<TableResizeColumnRegular />}
|
icon={<TableResizeColumnRegular />}
|
||||||
@ -260,25 +257,24 @@ export const DocumentsTableComponent: React.FC<IDocumentsTableComponentProps> =
|
|||||||
>
|
>
|
||||||
Resize with left/right arrow keys
|
Resize with left/right arrow keys
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
{[Environment.Development, Environment.Mpac].includes(getEnvironment()) &&
|
{!isColumnSelectionDisabled && (
|
||||||
!isColumnSelectionDisabled && (
|
<MenuItem
|
||||||
<MenuItem
|
key="remove"
|
||||||
key="remove"
|
icon={<DeleteRegular />}
|
||||||
icon={<DeleteRegular />}
|
onClick={() => {
|
||||||
onClick={() => {
|
// Remove column id from selectedColumnIds
|
||||||
// Remove column id from selectedColumnIds
|
const index = selectedColumnIds.indexOf(column.id);
|
||||||
const index = selectedColumnIds.indexOf(column.id);
|
if (index === -1) {
|
||||||
if (index === -1) {
|
return;
|
||||||
return;
|
}
|
||||||
}
|
const newSelectedColumnIds = [...selectedColumnIds];
|
||||||
const newSelectedColumnIds = [...selectedColumnIds];
|
newSelectedColumnIds.splice(index, 1);
|
||||||
newSelectedColumnIds.splice(index, 1);
|
onColumnSelectionChange(newSelectedColumnIds);
|
||||||
onColumnSelectionChange(newSelectedColumnIds);
|
}}
|
||||||
}}
|
>
|
||||||
>
|
Remove column
|
||||||
Remove column
|
</MenuItem>
|
||||||
</MenuItem>
|
)}
|
||||||
)}
|
|
||||||
</MenuList>
|
</MenuList>
|
||||||
</MenuPopover>
|
</MenuPopover>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
@ -74,6 +74,7 @@ export interface UserContext {
|
|||||||
readonly authType?: AuthType;
|
readonly authType?: AuthType;
|
||||||
readonly masterKey?: string;
|
readonly masterKey?: string;
|
||||||
readonly subscriptionId?: string;
|
readonly subscriptionId?: string;
|
||||||
|
readonly tenantId?: string;
|
||||||
readonly resourceGroup?: string;
|
readonly resourceGroup?: string;
|
||||||
readonly databaseAccount?: DatabaseAccount;
|
readonly databaseAccount?: DatabaseAccount;
|
||||||
readonly endpoint?: string;
|
readonly endpoint?: string;
|
||||||
|
@ -693,6 +693,7 @@ function updateContextsFromPortalMessage(inputs: DataExplorerInputsFrame) {
|
|||||||
databaseAccount,
|
databaseAccount,
|
||||||
resourceGroup: inputs.resourceGroup,
|
resourceGroup: inputs.resourceGroup,
|
||||||
subscriptionId: inputs.subscriptionId,
|
subscriptionId: inputs.subscriptionId,
|
||||||
|
tenantId: inputs.tenantId,
|
||||||
subscriptionType: inputs.subscriptionType,
|
subscriptionType: inputs.subscriptionType,
|
||||||
quotaId: inputs.quotaId,
|
quotaId: inputs.quotaId,
|
||||||
portalEnv: inputs.serverId as PortalEnv,
|
portalEnv: inputs.serverId as PortalEnv,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user