Initial commit

This commit is contained in:
Chuck Skelton 2023-07-24 17:05:23 -07:00
parent 7c0d1642fd
commit dda648fa27
5 changed files with 17 additions and 9 deletions

19
package-lock.json generated
View File

@ -9,7 +9,7 @@
"version": "1.0.0",
"dependencies": {
"@azure/arm-cosmosdb": "9.1.0",
"@azure/cosmos": "3.16.2",
"@azure/cosmos": "3.17.4-beta.1",
"@azure/cosmos-language-service": "0.0.5",
"@azure/identity": "1.2.1",
"@azure/ms-rest-nodeauth": "3.0.7",
@ -396,10 +396,12 @@
"integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ=="
},
"node_modules/@azure/cosmos": {
"version": "3.16.2",
"resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.16.2.tgz",
"integrity": "sha512-sceY5LWj0BHGj8PSyaVCfDRQLVZyoCfIY78kyIROJVEw0k+p9XFs8fhpykN8JklkCftL0WlaVY+X25SQwnhZsw==",
"version": "3.17.4-beta.1",
"resolved": "https://msazure.pkgs.visualstudio.com/_packaging/AzurePortal/npm/registry/@azure/cosmos/-/cosmos-3.17.4-beta.1.tgz",
"integrity": "sha1-axE6QafE98LT4IOEeug1NB2hC74=",
"license": "MIT",
"dependencies": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.2.0",
"@azure/core-tracing": "^1.0.0",
@ -414,7 +416,7 @@
"uuid": "^8.3.0"
},
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
}
},
"node_modules/@azure/cosmos-language-service": {
@ -31470,10 +31472,11 @@
}
},
"@azure/cosmos": {
"version": "3.16.2",
"resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.16.2.tgz",
"integrity": "sha512-sceY5LWj0BHGj8PSyaVCfDRQLVZyoCfIY78kyIROJVEw0k+p9XFs8fhpykN8JklkCftL0WlaVY+X25SQwnhZsw==",
"version": "3.17.4-beta.1",
"resolved": "https://msazure.pkgs.visualstudio.com/_packaging/AzurePortal/npm/registry/@azure/cosmos/-/cosmos-3.17.4-beta.1.tgz",
"integrity": "sha1-axE6QafE98LT4IOEeug1NB2hC74=",
"requires": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.2.0",
"@azure/core-tracing": "^1.0.0",

View File

@ -5,7 +5,7 @@
"main": "index.js",
"dependencies": {
"@azure/arm-cosmosdb": "9.1.0",
"@azure/cosmos": "3.16.2",
"@azure/cosmos": "3.17.4-beta.1",
"@azure/cosmos-language-service": "0.0.5",
"@azure/identity": "1.2.1",
"@azure/ms-rest-nodeauth": "3.0.7",

View File

@ -7,6 +7,7 @@ interface QueryResponse {
hasMoreResults: boolean;
activityId: string;
requestCharge: number;
indexMetrics: string;
}
export interface MinimalQueryIterator {
@ -30,6 +31,7 @@ export function nextPage(documentsIterator: MinimalQueryIterator, firstItemIndex
headers,
activityId: response.activityId,
requestCharge: response.requestCharge,
indexMetrics: response.indexMetrics,
};
});
}

View File

@ -45,6 +45,7 @@ export interface QueryResults extends QueryResultsMetadata {
roundTrips?: number;
headers?: any;
queryMetrics?: QueryMetrics;
indexMetrics?: string;
}
export interface Button {

View File

@ -219,10 +219,12 @@ export default class QueryTabComponent extends React.Component<IQueryTabComponen
});
try {
//CTODO: Add index metrics to the following method?
const queryResults: ViewModels.QueryResults = await QueryUtils.queryPagesUntilContentPresent(
firstItemIndex,
queryDocuments
);
console.log("Index Metrics: " + queryResults.indexMetrics);
this.setState({ queryResults, error: "" });
} catch (error) {
this.props.tabsBaseInstance.isExecutionError(true);