mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Add link to Azure pricing calculator in New Database dialog (#23389)
This commit is contained in:
@@ -160,6 +160,7 @@ export const BackupRedundancyText = localize('objectManagement.backupRedundancyL
|
|||||||
export const CurrentSLOText = localize('objectManagement.currentSLOLabel', "Current Service Level Objective");
|
export const CurrentSLOText = localize('objectManagement.currentSLOLabel', "Current Service Level Objective");
|
||||||
export const EditionText = localize('objectManagement.editionLabel', "Edition");
|
export const EditionText = localize('objectManagement.editionLabel', "Edition");
|
||||||
export const MaxSizeText = localize('objectManagement.maxSizeLabel', "Max Size");
|
export const MaxSizeText = localize('objectManagement.maxSizeLabel', "Max Size");
|
||||||
|
export const AzurePricingLinkText = localize('objectManagement.azurePricingLink', "Azure SQL Database pricing calculator");
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
export const BlankPasswordConfirmationText: string = localize('objectManagement.blankPasswordConfirmation', "Creating a login with a blank password is a security risk. Are you sure you want to continue?");
|
export const BlankPasswordConfirmationText: string = localize('objectManagement.blankPasswordConfirmation', "Creating a login with a blank password is a security risk. Are you sure you want to continue?");
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ export class DatabaseDialog extends ObjectManagementDialogBase<Database, Databas
|
|||||||
containers.push(this.createLabelInputContainer(localizedConstants.BackupRedundancyText, backupDropbox));
|
containers.push(this.createLabelInputContainer(localizedConstants.BackupRedundancyText, backupDropbox));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
containers.push(this.createHyperlink(localizedConstants.AzurePricingLinkText, 'https://go.microsoft.com/fwlink/?linkid=2239183'));
|
||||||
|
|
||||||
return this.createGroup(localizedConstants.ConfigureSLOSectionHeader, containers, true, true);
|
return this.createGroup(localizedConstants.ConfigureSLOSectionHeader, containers, true, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ export abstract class DialogBase<DialogResult> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected createLabelInputContainer(label: string, component: azdata.Component, required: boolean = false): azdata.FlexContainer {
|
protected createLabelInputContainer(label: string, component: azdata.Component, required: boolean = false): azdata.FlexContainer {
|
||||||
const labelComponent = this.modelView.modelBuilder.text().withProps({ width: DefaultLabelWidth, value: label, requiredIndicator: required }).component();
|
const labelComponent = this.modelView.modelBuilder.text().withProps({ width: DefaultLabelWidth, value: label, requiredIndicator: required, CSSStyles: { 'padding-right': '10px' } }).component();
|
||||||
const container = this.modelView.modelBuilder.flexContainer().withLayout({ flexFlow: 'horizontal', flexWrap: 'nowrap', alignItems: 'center' }).withItems([labelComponent], { flex: '0 0 auto' }).component();
|
const container = this.modelView.modelBuilder.flexContainer().withLayout({ flexFlow: 'horizontal', flexWrap: 'nowrap', alignItems: 'center' }).withItems([labelComponent], { flex: '0 0 auto' }).component();
|
||||||
container.addItem(component, { flex: '1 1 auto' });
|
container.addItem(component, { flex: '1 1 auto' });
|
||||||
return container;
|
return container;
|
||||||
@@ -356,4 +356,8 @@ export abstract class DialogBase<DialogResult> {
|
|||||||
protected getSectionItemLayout(): azdata.FlexItemLayout {
|
protected getSectionItemLayout(): azdata.FlexItemLayout {
|
||||||
return { CSSStyles: { 'margin-block-end': '5px' } };
|
return { CSSStyles: { 'margin-block-end': '5px' } };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected createHyperlink(label: string, url: string): azdata.HyperlinkComponent {
|
||||||
|
return this.modelView.modelBuilder.hyperlink().withProps({ label: label, ariaLabel: label, url: url, showLinkIcon: true }).component();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user