mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
add new support request buttons (#16045)
* add new support request buttons * hide feedback and new support incedent commands from command palette
This commit is contained in:
4
extensions/sql-migration/images/newSupportRequest.svg
Normal file
4
extensions/sql-migration/images/newSupportRequest.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.60021 10.4C10.174 10.0352 10.648 9.53353 10.9797 8.94002C11.3114 8.34651 11.4902 7.67983 11.5002 7C11.5002 5.93913 11.0788 4.92172 10.3286 4.17157C9.57849 3.42143 8.56107 3 7.50021 3C6.43934 3 5.42192 3.42143 4.67178 4.17157C3.92163 4.92172 3.50021 5.93913 3.50021 7C3.51016 7.67983 3.68903 8.34651 4.0207 8.94002C4.35237 9.53353 4.82643 10.0352 5.40021 10.4C4.25008 10.8144 3.25707 11.5758 2.55842 12.5789C1.85978 13.5821 1.49 14.7776 1.50021 16H2.50021C2.50021 14.6739 3.02699 13.4021 3.96467 12.4645C4.90235 11.5268 6.17412 11 7.50021 11C8.82629 11 10.0981 11.5268 11.0357 12.4645C11.9734 13.4021 12.5002 14.6739 12.5002 16H13.5002C13.5104 14.7776 13.1406 13.5821 12.442 12.5789C11.7433 11.5758 10.7503 10.8144 9.60021 10.4ZM4.50021 7C4.48685 6.61911 4.54869 6.23932 4.68222 5.88235C4.81574 5.52539 5.01832 5.19824 5.27836 4.91961C5.53841 4.64099 5.85083 4.41636 6.19775 4.25857C6.54468 4.10077 6.9193 4.01291 7.30021 4C7.36687 4 7.43354 4 7.50021 4C7.88109 3.98664 8.26088 4.04849 8.61785 4.18201C8.97482 4.31553 9.30197 4.51811 9.58059 4.77816C9.85921 5.0382 10.0838 5.35062 10.2416 5.69755C10.3994 6.04447 10.4873 6.4191 10.5002 6.8C10.5002 6.86667 10.5002 6.93333 10.5002 7C10.5136 7.38089 10.4517 7.76068 10.3182 8.11765C10.1847 8.47462 9.9821 8.80176 9.72205 9.08039C9.462 9.35901 9.14958 9.58364 8.80266 9.74143C8.45574 9.89923 8.08111 9.98709 7.70021 10C7.63354 10 7.56687 10 7.50021 10C7.11932 10.0134 6.73953 9.95151 6.38256 9.81799C6.02559 9.68447 5.69844 9.48189 5.41982 9.22184C5.1412 8.9618 4.91657 8.64938 4.75877 8.30245C4.60098 7.95553 4.51311 7.5809 4.50021 7.2C4.50021 7.13333 4.50021 7.06667 4.50021 7Z" fill="#0078D4"/>
|
||||
<path d="M14.5 7C14.5267 6.1074 14.3773 5.2183 14.0603 4.38344C13.7434 3.54859 13.2651 2.78434 12.6528 2.13433C12.0404 1.48432 11.3061 0.961276 10.4917 0.595068C9.6772 0.228859 8.7986 0.0266543 7.906 0C7.771 0 7.635 0 7.5 0C6.03483 0.0318025 4.62829 0.581585 3.52993 1.55181C2.43157 2.52203 1.71239 3.84996 1.5 5.3C1.5 5.43261 1.55268 5.55979 1.64645 5.65355C1.74021 5.74732 1.86739 5.8 2 5.8C2.09374 5.81785 2.19063 5.8085 2.27923 5.77306C2.36782 5.73763 2.44443 5.67757 2.5 5.6C2.68072 4.37665 3.27585 3.25239 4.18592 2.41513C5.09599 1.57787 6.26586 1.07833 7.5 1C8.27483 0.986756 9.04468 1.12628 9.76557 1.41061C10.4865 1.69494 11.1443 2.11851 11.7015 2.65711C12.2586 3.19571 12.7042 3.8388 13.0128 4.54964C13.3214 5.26049 13.487 6.02517 13.5 6.8C13.5 6.868 13.5 6.935 13.5 7V8H9C8.86739 8 8.74021 8.05268 8.64645 8.14645C8.55268 8.24021 8.5 8.36739 8.5 8.5C8.5 8.63261 8.55268 8.75979 8.64645 8.85355C8.74021 8.94732 8.86739 9 9 9H14C14.1326 9 14.2598 8.94732 14.3536 8.85355C14.4473 8.75979 14.5 8.63261 14.5 8.5V7Z" fill="#0078D4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
@@ -15,6 +15,7 @@
|
||||
"activationEvents": [
|
||||
"onDashboardOpen",
|
||||
"onCommand:sqlmigration.start",
|
||||
"onCommand:sqlmigration.newsupportrequest",
|
||||
"onCommand:sqlmigration.sendfeedback",
|
||||
"onCommand:sqlmigration.openNotebooks"
|
||||
],
|
||||
@@ -34,6 +35,12 @@
|
||||
"category": "%migration-command-category%",
|
||||
"icon": "./images/migration.svg"
|
||||
},
|
||||
{
|
||||
"command": "sqlmigration.newsupportrequest",
|
||||
"title": "%new-support-request-command%",
|
||||
"category": "%migration-command-category%",
|
||||
"icon": "./images/newSupportRequest.svg"
|
||||
},
|
||||
{
|
||||
"command": "sqlmigration.sendfeedback",
|
||||
"title": "%send-feedback-command%",
|
||||
@@ -78,6 +85,10 @@
|
||||
],
|
||||
"menu": {
|
||||
"commandPalette": [
|
||||
{
|
||||
"command": "sqlmigration.newsupportrequest",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "sqlmigration.sendfeedback",
|
||||
"when": "false"
|
||||
@@ -128,6 +139,7 @@
|
||||
"widget": {
|
||||
"tasks-widget": [
|
||||
"sqlmigration.start",
|
||||
"sqlmigration.newsupportrequest",
|
||||
"sqlmigration.sendfeedback"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"migration-command-category": "Azure SQL Migration",
|
||||
"start-migration-command": "Migrate to Azure SQL",
|
||||
"send-feedback-command": "Feedback",
|
||||
"new-support-request-command": "New support request",
|
||||
"migration-context-menu-category": "Migration Context Menu",
|
||||
"complete-cutover-menu": "Complete cutover",
|
||||
"database-details-menu": "Database details",
|
||||
|
||||
@@ -34,6 +34,7 @@ export class IconPathHelper {
|
||||
public static completingCutover: IconPath;
|
||||
public static migrationService: IconPath;
|
||||
public static sendFeedback: IconPath;
|
||||
public static newSupportRequest: IconPath;
|
||||
|
||||
public static setExtensionContext(context: vscode.ExtensionContext) {
|
||||
IconPathHelper.copy = {
|
||||
@@ -128,5 +129,9 @@ export class IconPathHelper {
|
||||
light: context.asAbsolutePath('images/sendFeedback.svg'),
|
||||
dark: context.asAbsolutePath('images/sendFeedback.svg')
|
||||
};
|
||||
IconPathHelper.newSupportRequest = {
|
||||
light: context.asAbsolutePath('images/newSupportRequest.svg'),
|
||||
dark: context.asAbsolutePath('images/newSupportRequest.svg')
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ export const AZURE_SQL = localize('sql.migration.azure.sql', "Azure SQL");
|
||||
export const CLOSE = localize('sql.migration.close', "Close");
|
||||
export const DATA_UPLOADED = localize('sql.migraiton.data.uploaded.size', "Data Uploaded/Size");
|
||||
export const COPY_THROUGHPUT = localize('sql.migration.copy.throughput', "Copy Throughput (MBPS)");
|
||||
|
||||
export const NEW_SUPPORT_REQUEST = localize('sql.migration.newsupportrequest', "New support request");
|
||||
|
||||
//Summary Page
|
||||
export const SUMMARY_PAGE_TITLE = localize('sql.migration.summary.page.title', "Summary");
|
||||
|
||||
@@ -28,6 +28,7 @@ export class MigrationCutoverDialog {
|
||||
private _cancelButton!: azdata.ButtonComponent;
|
||||
private _refreshLoader!: azdata.LoadingComponent;
|
||||
private _copyDatabaseMigrationDetails!: azdata.ButtonComponent;
|
||||
private _newSupportRequest!: azdata.ButtonComponent;
|
||||
|
||||
private _sourceDatabaseInfoField!: InfoFieldSchema;
|
||||
private _sourceDetailsInfoField!: InfoFieldSchema;
|
||||
@@ -325,6 +326,29 @@ export class MigrationCutoverDialog {
|
||||
}
|
||||
});
|
||||
|
||||
// create new support request button. Hiding button until sql migration support has been setup.
|
||||
this._newSupportRequest = this._view.modelBuilder.button().withProps({
|
||||
label: loc.NEW_SUPPORT_REQUEST,
|
||||
iconPath: IconPathHelper.newSupportRequest,
|
||||
iconHeight: '16px',
|
||||
iconWidth: '16px',
|
||||
height: '20px',
|
||||
width: '140px',
|
||||
}).component();
|
||||
|
||||
this._newSupportRequest.onDidClick(async (e) => {
|
||||
const serviceId = this._model._migration.controller.id;
|
||||
const supportUrl = `https://portal.azure.com/#resource${serviceId}/supportrequest`;
|
||||
await vscode.env.openExternal(vscode.Uri.parse(supportUrl));
|
||||
});
|
||||
|
||||
headerActions.addItem(this._newSupportRequest, {
|
||||
flex: '0',
|
||||
CSSStyles: {
|
||||
'margin-left': '5px'
|
||||
}
|
||||
});
|
||||
|
||||
this._refreshLoader = this._view.modelBuilder.loadingComponent().withProps({
|
||||
loading: false,
|
||||
height: '15px'
|
||||
|
||||
@@ -57,6 +57,9 @@ class SQLMigration {
|
||||
azdata.tasks.registerTask('sqlmigration.start', async () => {
|
||||
await this.launchMigrationWizard();
|
||||
}),
|
||||
azdata.tasks.registerTask('sqlmigration.newsupportrequest', async () => {
|
||||
await this.launchNewSupportRequest();
|
||||
}),
|
||||
azdata.tasks.registerTask('sqlmigration.sendfeedback', async () => {
|
||||
const actionId = 'workbench.action.openIssueReporter';
|
||||
const args = {
|
||||
@@ -85,6 +88,11 @@ class SQLMigration {
|
||||
await wizardController.openWizard(connectionId);
|
||||
}
|
||||
|
||||
async launchNewSupportRequest(): Promise<void> {
|
||||
await vscode.env.openExternal(vscode.Uri.parse(
|
||||
`https://portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/newsupportrequest`));
|
||||
}
|
||||
|
||||
stop(): void {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user