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

View File

@ -5,7 +5,7 @@
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@azure/arm-cosmosdb": "9.1.0", "@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/cosmos-language-service": "0.0.5",
"@azure/identity": "1.2.1", "@azure/identity": "1.2.1",
"@azure/ms-rest-nodeauth": "3.0.7", "@azure/ms-rest-nodeauth": "3.0.7",

View File

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

View File

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

View File

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