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:
brian-harris
2021-08-02 13:29:27 -07:00
committed by GitHub
parent 244e27c2de
commit 919cc732b7
7 changed files with 55 additions and 1 deletions

View File

@@ -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')
};
}
}

View File

@@ -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");

View File

@@ -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'

View File

@@ -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 {
}