mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-28 21:32:05 +00:00
Compare commits
3 Commits
users/aisa
...
NPS_Dialog
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b7cbfbf23 | ||
|
|
76913d42f1 | ||
|
|
7ab2bd38f4 |
@@ -2352,8 +2352,8 @@ a:link {
|
||||
|
||||
.tabsManagerContainer {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
display: grid;
|
||||
grid-template-rows: 36px 36px 1fr;
|
||||
min-width: 0; // This prevents it to grow past the parent's width if its content is too wide
|
||||
}
|
||||
|
||||
@@ -2610,8 +2610,9 @@ a:link {
|
||||
}
|
||||
|
||||
.tabPanesContainer {
|
||||
grid-row: span 2; // Fill the remaining space
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ export function sendMessage(data: any): void {
|
||||
}
|
||||
|
||||
export function sendReadyMessage(): void {
|
||||
console.log("SENDING READY MESSAGE");
|
||||
_sendMessage({
|
||||
signature: "pcIframe",
|
||||
kind: "ready",
|
||||
|
||||
@@ -676,8 +676,8 @@ export function useMongoProxyEndpoint(api: string): boolean {
|
||||
const activeMongoProxyEndpoints: string[] = [
|
||||
MongoProxyEndpoints.Local,
|
||||
MongoProxyEndpoints.Mpac,
|
||||
// MongoProxyEndpoints.Prod,
|
||||
// MongoProxyEndpoints.Fairfax,
|
||||
MongoProxyEndpoints.Prod,
|
||||
MongoProxyEndpoints.Fairfax,
|
||||
];
|
||||
let canAccessMongoProxy: boolean = userContext.databaseAccount.properties.publicNetworkAccess === "Enabled";
|
||||
if (
|
||||
|
||||
@@ -109,14 +109,14 @@ let configContext: Readonly<ConfigContext> = {
|
||||
PORTAL_BACKEND_ENDPOINT: PortalBackendEndpoints.Prod,
|
||||
MONGO_PROXY_ENDPOINT: MongoProxyEndpoints.Prod,
|
||||
NEW_MONGO_APIS: [
|
||||
"resourcelist",
|
||||
"queryDocuments",
|
||||
"createDocument",
|
||||
"readDocument",
|
||||
"updateDocument",
|
||||
"deleteDocument",
|
||||
"createCollectionWithProxy",
|
||||
"legacyMongoShell",
|
||||
// "resourcelist",
|
||||
// "queryDocuments",
|
||||
// "createDocument",
|
||||
// "readDocument",
|
||||
// "updateDocument",
|
||||
// "deleteDocument",
|
||||
// "createCollectionWithProxy",
|
||||
// "legacyMongoShell",
|
||||
],
|
||||
MONGO_PROXY_OUTBOUND_IPS_ALLOWLISTED: false,
|
||||
CASSANDRA_PROXY_ENDPOINT: CassandraProxyEndpoints.Prod,
|
||||
|
||||
@@ -57,8 +57,7 @@ export const Tabs = ({ explorer }: TabsProps): JSX.Element => {
|
||||
const defaultMessageBarStyles: IMessageBarStyles = {
|
||||
root: {
|
||||
height: `${LayoutConstants.rowHeight}px`,
|
||||
overflow: "hidden",
|
||||
flexDirection: "row",
|
||||
overflow: "auto",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -85,61 +85,18 @@ export const queryPagesUntilContentPresent = async (
|
||||
};
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
// export const extractPartitionKeyValues = (
|
||||
// documentContent: any,
|
||||
// partitionKeyDefinition: PartitionKeyDefinition,
|
||||
// ): PartitionKey[] => {
|
||||
// if (!partitionKeyDefinition.paths || partitionKeyDefinition.paths.length === 0) {
|
||||
// return undefined;
|
||||
// }
|
||||
|
||||
// const partitionKeyValues: PartitionKey[] = [];
|
||||
// partitionKeyDefinition.paths.forEach((partitionKeyPath: string) => {
|
||||
// const partitionKeyPathWithoutSlash: string = partitionKeyPath.substring(1);
|
||||
// // if (documentContent[partitionKeyPathWithoutSlash]) {
|
||||
// // partitionKeyValues.push(documentContent[partitionKeyPathWithoutSlash]);
|
||||
// // }
|
||||
|
||||
// const partitionKeyPathParts: string[] = partitionKeyPathWithoutSlash.split("/");
|
||||
// let partitionKeyValue: any = documentContent;
|
||||
|
||||
// for(let partitionKeyPathPartIndex in partitionKeyPathParts) {
|
||||
// const partitionKeyPathPart: string = partitionKeyPathParts[partitionKeyPathPartIndex];
|
||||
// if (!(partitionKeyPathPart in documentContent)) {
|
||||
// partitionKeyValue = {};
|
||||
// break;
|
||||
// }
|
||||
// partitionKeyValue = partitionKeyValue[partitionKeyPathPart];
|
||||
// }
|
||||
|
||||
// partitionKeyValues.push(partitionKeyValue);
|
||||
// });
|
||||
// return partitionKeyValues;
|
||||
// };
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
export const extractPartitionKeyValues = (document: any, partitionKeyDefinition: PartitionKeyDefinition): PartitionKey[] => {
|
||||
if (partitionKeyDefinition && partitionKeyDefinition.paths && partitionKeyDefinition.paths.length > 0) {
|
||||
var partitionKey: any = [];
|
||||
partitionKeyDefinition.paths.forEach(function (path) {
|
||||
path = path.substring(1);
|
||||
const pathParts: string[] = path.split("/");
|
||||
|
||||
var obj = document;
|
||||
for (var i = 0; i < pathParts.length; ++i) {
|
||||
if (!((typeof obj === "object") && (pathParts[i] in obj))) {
|
||||
obj = {};
|
||||
break;
|
||||
}
|
||||
|
||||
obj = obj[pathParts[i]];
|
||||
}
|
||||
|
||||
partitionKey.push(obj);
|
||||
});
|
||||
|
||||
return partitionKey;
|
||||
export const extractPartitionKeyValues = (
|
||||
documentContent: any,
|
||||
partitionKeyDefinition: PartitionKeyDefinition,
|
||||
): PartitionKey[] => {
|
||||
if (!partitionKeyDefinition.paths || partitionKeyDefinition.paths.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const partitionKeyValues: PartitionKey[] = [];
|
||||
partitionKeyDefinition.paths.forEach((partitionKeyPath: string) => {
|
||||
const partitionKeyPathWithoutSlash: string = partitionKeyPath.substring(1);
|
||||
partitionKeyValues.push(documentContent[partitionKeyPathWithoutSlash]);
|
||||
});
|
||||
return partitionKeyValues;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user