Compare commits

..

3 Commits

Author SHA1 Message Date
Sung-Hyun Kang
0b7cbfbf23 move nps survey open dialog call to after explorer initialization 2024-08-13 13:06:01 -05:00
Sung-Hyun Kang
76913d42f1 Merge branch 'master' into NPS_Dialog 2024-08-13 12:44:32 -05:00
Sung-Hyun Kang
7ab2bd38f4 move nps survey open dialog call to after explorer initialization 2024-08-13 12:34:46 -05:00
6 changed files with 30 additions and 72 deletions

View File

@@ -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;
}

View File

@@ -70,6 +70,7 @@ export function sendMessage(data: any): void {
}
export function sendReadyMessage(): void {
console.log("SENDING READY MESSAGE");
_sendMessage({
signature: "pcIframe",
kind: "ready",

View File

@@ -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 (

View File

@@ -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,

View File

@@ -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",
},
};

View File

@@ -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;
};