mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 01:25:38 -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:
@@ -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