Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial changes for reusable QDS report #23527

Merged
merged 15 commits into from
Jun 29, 2023
Merged

Initial changes for reusable QDS report #23527

merged 15 commits into from
Jun 29, 2023

Conversation

kisantia
Copy link
Contributor

This PR has the initial changes for building a reusable report in the QDS extension using Modelview components. The two placeholder reports being added in this PR are Overall Resource Consumption and Top Resource Consuming Queries. Right now it has placeholder text components in flex containers to show the different sections in the reports, but those will be replaced with chart/table/query plan components in the future.
image
image

The entry points for these reports are currently commands in the command palette. Updating the reports to be opened with the context of a database is a task for later

The BaseQueryStoreReport class supports resizable components by using splitviews, and also supports building non-resizeable reports (for example, the Overall Resource Consumption report is not resizable in SSMS).

initialReports

export async function activate(_context: vscode.ExtensionContext): Promise<void> {
export async function activate(context: vscode.ExtensionContext): Promise<void> {
// TODO: get db name
context.subscriptions.push(vscode.commands.registerCommand('queryStore.topResourceConsumingQueriesOpen', async () => { await new TopResourceConsumingQueries(context, 'WideWorldImporters').open() }));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Declare a const with the hardcoded database name below the TODO.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the database name/connection profile will later get passed into the command from where the command is launched from, so it'll look like context.subscriptions.push(vscode.commands.registerCommand('queryStore.topResourceConsumingQueriesOpen', async (profile: azdata.IConnectionProfile) => { await new TopResourceConsumingQueries(context, profile).open() }));

Copy link
Contributor

@aasimkhan30 aasimkhan30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the break in switch case, rest of the code looks good for initial check in .

Copy link
Contributor

@lewis-sanchez lewis-sanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for the break.

@kisantia kisantia merged commit 220b2b4 into main Jun 29, 2023
@kisantia kisantia deleted the kisantia/qdsReport branch June 29, 2023 23:24
cssuh pushed a commit that referenced this pull request Jun 30, 2023
* initial changes for making a QDS report with placeholders

* Add icon for configure button

* Add another example report to show layout

* move files

* add placeholder names to components and cleanup toolbar

* cleanup

* switch to createViews() instead of createTop and BottomSections()

* add QueryStoreView class for the different components in a report

* cleanup

* add more comments

* fix yarn not running for query store extension folder

* add missing break

* change one more view to container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants