-
Notifications
You must be signed in to change notification settings - Fork 906
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
Conversation
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() })); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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() }));
There was a problem hiding this 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 .
There was a problem hiding this 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.
* 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
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.
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).