mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-01 07:11:23 +00:00
Compare commits
3 Commits
users/aisa
...
NPS_Dialog
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b7cbfbf23 | ||
|
|
76913d42f1 | ||
|
|
7ab2bd38f4 |
@@ -2352,8 +2352,8 @@ a:link {
|
|||||||
|
|
||||||
.tabsManagerContainer {
|
.tabsManagerContainer {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: grid;
|
||||||
flex-direction: column;
|
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
|
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 {
|
.tabPanesContainer {
|
||||||
|
grid-row: span 2; // Fill the remaining space
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ export function sendMessage(data: any): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function sendReadyMessage(): void {
|
export function sendReadyMessage(): void {
|
||||||
|
console.log("SENDING READY MESSAGE");
|
||||||
_sendMessage({
|
_sendMessage({
|
||||||
signature: "pcIframe",
|
signature: "pcIframe",
|
||||||
kind: "ready",
|
kind: "ready",
|
||||||
|
|||||||
@@ -676,8 +676,8 @@ export function useMongoProxyEndpoint(api: string): boolean {
|
|||||||
const activeMongoProxyEndpoints: string[] = [
|
const activeMongoProxyEndpoints: string[] = [
|
||||||
MongoProxyEndpoints.Local,
|
MongoProxyEndpoints.Local,
|
||||||
MongoProxyEndpoints.Mpac,
|
MongoProxyEndpoints.Mpac,
|
||||||
// MongoProxyEndpoints.Prod,
|
MongoProxyEndpoints.Prod,
|
||||||
// MongoProxyEndpoints.Fairfax,
|
MongoProxyEndpoints.Fairfax,
|
||||||
];
|
];
|
||||||
let canAccessMongoProxy: boolean = userContext.databaseAccount.properties.publicNetworkAccess === "Enabled";
|
let canAccessMongoProxy: boolean = userContext.databaseAccount.properties.publicNetworkAccess === "Enabled";
|
||||||
if (
|
if (
|
||||||
|
|||||||
@@ -109,14 +109,14 @@ let configContext: Readonly<ConfigContext> = {
|
|||||||
PORTAL_BACKEND_ENDPOINT: PortalBackendEndpoints.Prod,
|
PORTAL_BACKEND_ENDPOINT: PortalBackendEndpoints.Prod,
|
||||||
MONGO_PROXY_ENDPOINT: MongoProxyEndpoints.Prod,
|
MONGO_PROXY_ENDPOINT: MongoProxyEndpoints.Prod,
|
||||||
NEW_MONGO_APIS: [
|
NEW_MONGO_APIS: [
|
||||||
"resourcelist",
|
// "resourcelist",
|
||||||
"queryDocuments",
|
// "queryDocuments",
|
||||||
"createDocument",
|
// "createDocument",
|
||||||
"readDocument",
|
// "readDocument",
|
||||||
"updateDocument",
|
// "updateDocument",
|
||||||
"deleteDocument",
|
// "deleteDocument",
|
||||||
"createCollectionWithProxy",
|
// "createCollectionWithProxy",
|
||||||
"legacyMongoShell",
|
// "legacyMongoShell",
|
||||||
],
|
],
|
||||||
MONGO_PROXY_OUTBOUND_IPS_ALLOWLISTED: false,
|
MONGO_PROXY_OUTBOUND_IPS_ALLOWLISTED: false,
|
||||||
CASSANDRA_PROXY_ENDPOINT: CassandraProxyEndpoints.Prod,
|
CASSANDRA_PROXY_ENDPOINT: CassandraProxyEndpoints.Prod,
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ export const Tabs = ({ explorer }: TabsProps): JSX.Element => {
|
|||||||
const defaultMessageBarStyles: IMessageBarStyles = {
|
const defaultMessageBarStyles: IMessageBarStyles = {
|
||||||
root: {
|
root: {
|
||||||
height: `${LayoutConstants.rowHeight}px`,
|
height: `${LayoutConstants.rowHeight}px`,
|
||||||
overflow: "hidden",
|
overflow: "auto",
|
||||||
flexDirection: "row",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -85,61 +85,18 @@ export const queryPagesUntilContentPresent = async (
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
// export const extractPartitionKeyValues = (
|
export const extractPartitionKeyValues = (
|
||||||
// documentContent: any,
|
documentContent: any,
|
||||||
// partitionKeyDefinition: PartitionKeyDefinition,
|
partitionKeyDefinition: PartitionKeyDefinition,
|
||||||
// ): PartitionKey[] => {
|
): PartitionKey[] => {
|
||||||
// if (!partitionKeyDefinition.paths || partitionKeyDefinition.paths.length === 0) {
|
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);
|
|
||||||
// // 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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