mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Arc - Enable Postgres support request link (#12560)
Co-authored-by: Brian Bergeron <brberger@microsoft.com>
This commit is contained in:
@@ -33,7 +33,7 @@ export class PostgresDashboard extends Dashboard {
|
|||||||
// TODO: Removed properties page while investigating bug where refreshed values don't appear in UI
|
// TODO: Removed properties page while investigating bug where refreshed values don't appear in UI
|
||||||
// const propertiesPage = new PostgresPropertiesPage(modelView, this._controllerModel, this._postgresModel);
|
// const propertiesPage = new PostgresPropertiesPage(modelView, this._controllerModel, this._postgresModel);
|
||||||
const diagnoseAndSolveProblemsPage = new PostgresDiagnoseAndSolveProblemsPage(modelView, this._context, this._postgresModel);
|
const diagnoseAndSolveProblemsPage = new PostgresDiagnoseAndSolveProblemsPage(modelView, this._context, this._postgresModel);
|
||||||
const supportRequestPage = new PostgresSupportRequestPage(modelView);
|
const supportRequestPage = new PostgresSupportRequestPage(modelView, this._controllerModel, this._postgresModel);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
overviewPage.tab,
|
overviewPage.tab,
|
||||||
|
|||||||
@@ -3,13 +3,17 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import * as vscode from 'vscode';
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { IconPathHelper, cssStyles } from '../../../constants';
|
import { IconPathHelper, cssStyles } from '../../../constants';
|
||||||
import { DashboardPage } from '../../components/dashboardPage';
|
import { DashboardPage } from '../../components/dashboardPage';
|
||||||
|
import { ControllerModel } from '../../../models/controllerModel';
|
||||||
|
import { ResourceType } from 'arc';
|
||||||
|
import { PostgresModel } from '../../../models/postgresModel';
|
||||||
|
|
||||||
export class PostgresSupportRequestPage extends DashboardPage {
|
export class PostgresSupportRequestPage extends DashboardPage {
|
||||||
constructor(protected modelView: azdata.ModelView) {
|
constructor(protected modelView: azdata.ModelView, private _controllerModel: ControllerModel, private _postgresModel: PostgresModel) {
|
||||||
super(modelView);
|
super(modelView);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,15 +52,13 @@ export class PostgresSupportRequestPage extends DashboardPage {
|
|||||||
|
|
||||||
this.disposables.push(
|
this.disposables.push(
|
||||||
supportRequestButton.onDidClick(() => {
|
supportRequestButton.onDidClick(() => {
|
||||||
/*
|
const azure = this._controllerModel.controllerConfig?.spec.settings.azure;
|
||||||
const r = this._controllerModel.getRegistration(ResourceType.postgresInstances, this._postgresModel.namespace, this._postgresModel.name);
|
if (azure) {
|
||||||
if (!r) {
|
|
||||||
vscode.window.showErrorMessage(loc.couldNotFindAzureResource(this._postgresModel.fullName));
|
|
||||||
} else {
|
|
||||||
vscode.env.openExternal(vscode.Uri.parse(
|
vscode.env.openExternal(vscode.Uri.parse(
|
||||||
`https://portal.azure.com/#resource/subscriptions/${r.subscriptionId}/resourceGroups/${r.resourceGroupName}/providers/Microsoft.AzureData/${ResourceType.postgresInstances}/${r.instanceName}/supportrequest`));
|
`https://portal.azure.com/#resource/subscriptions/${azure.subscription}/resourceGroups/${azure.resourceGroup}/providers/Microsoft.AzureData/${ResourceType.postgresInstances}/${this._postgresModel.info.name}/supportrequest`));
|
||||||
|
} else {
|
||||||
|
vscode.window.showErrorMessage(loc.couldNotFindControllerRegistration);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
content.addItem(supportRequestButton);
|
content.addItem(supportRequestButton);
|
||||||
|
|||||||
Reference in New Issue
Block a user