mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-18 16:31:31 +00:00
Initial commit
This commit is contained in:
@@ -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,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ export interface QueryResults extends QueryResultsMetadata {
|
||||
roundTrips?: number;
|
||||
headers?: any;
|
||||
queryMetrics?: QueryMetrics;
|
||||
indexMetrics?: string;
|
||||
}
|
||||
|
||||
export interface Button {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user