diff --git a/extensions/sql-migration/src/dashboard/migrationsListTab.ts b/extensions/sql-migration/src/dashboard/migrationsListTab.ts index 8db5c621c2..471ba54061 100644 --- a/extensions/sql-migration/src/dashboard/migrationsListTab.ts +++ b/extensions/sql-migration/src/dashboard/migrationsListTab.ts @@ -414,11 +414,13 @@ export class MigrationsListTab extends TabBase { { icon: IconPathHelper.sqlDatabaseLogo, title: migration.properties.sourceDatabaseName ?? EmptySettingValue, + role: 'button' }, // sourceDatabase migration.properties.sourceServerName ?? EmptySettingValue, // sourceServer { icon: getMigrationStatusImage(migration), title: getMigrationStatusWithErrors(migration), + role: 'button' }, // statue getMigrationMode(migration), // mode getMigrationTargetType(migration), // targetType diff --git a/src/sql/azdata.proposed.d.ts b/src/sql/azdata.proposed.d.ts index edf4859a6c..6b33307645 100644 --- a/src/sql/azdata.proposed.d.ts +++ b/src/sql/azdata.proposed.d.ts @@ -749,6 +749,10 @@ declare module 'azdata' { * The url to open. */ url?: string; + /** + * The role of the hyperlink. By default, the role is 'link' and the url will be opened in a new tab. + */ + role?: 'button' | 'link'; } export interface ContextMenuColumnCellValue { diff --git a/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts b/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts index 4715e4fefc..b02de015c5 100644 --- a/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts +++ b/src/sql/base/browser/ui/table/plugins/hyperlinkColumn.plugin.ts @@ -11,6 +11,7 @@ export interface HyperlinkCellValue { iconCssClass?: string; title: string; url?: string; + role?: 'button' | 'link'; } export interface HyperlinkColumnOptions extends IconColumnOptions, ClickableColumnOptions { @@ -32,7 +33,7 @@ export class HyperlinkColumn extends BaseClickableCol const cssClasses = iconValue.iconCssClass ? `codicon icon slick-plugin-icon ${iconValue.iconCssClass}` : ''; const urlPart = cellValue?.url ? `href="${encodeURI(cellValue.url)}" target="blank"` : ''; const disabledAttribute = this.isCellEnabled(row, cell) ? '' : 'disabled'; - return `${escapedTitle}`; + return `${escapedTitle}`; }, name: this.options.name, resizable: true, diff --git a/src/sql/workbench/browser/modelComponents/table.component.ts b/src/sql/workbench/browser/modelComponents/table.component.ts index 8cbff8ff0e..4695456f7f 100644 --- a/src/sql/workbench/browser/modelComponents/table.component.ts +++ b/src/sql/workbench/browser/modelComponents/table.component.ts @@ -205,7 +205,8 @@ export default class TableComponent extends ComponentBase{ iconCssClass: hyperlinkValue.icon ? this.createIconCssClassInternal(hyperlinkValue.icon) : undefined, title: hyperlinkValue.title, - url: hyperlinkValue.url + url: hyperlinkValue.url, + role: hyperlinkValue.role }; break; }