mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 09:35:38 -05:00
Tenant list UI for Firewall Rules (#11539)
* Start on the tenant list * continue work * Finish up... * Fix test * Fix * Fix tests * Some PR feedback * Move responsibilities around * Fix comment
This commit is contained in:
@@ -138,11 +138,10 @@ export class FirewallRuleDialog extends Modal {
|
||||
});
|
||||
this._accountPickerService.addAccountStartEvent(() => this.spinner = true);
|
||||
this._accountPickerService.onAccountSelectionChangeEvent((account) => this.onAccountSelectionChange(account));
|
||||
this._accountPickerService.onTenantSelectionChangeEvent((tenantId) => this.onTenantSelectionChange(tenantId));
|
||||
|
||||
const azureAccountSection = DOM.append(body, DOM.$('.azure-account-section.new-section'));
|
||||
const azureAccountLabel = localize('azureAccount', "Azure account");
|
||||
this.createLabelElement(azureAccountSection, azureAccountLabel, true);
|
||||
this._accountPickerService.renderAccountPicker(DOM.append(azureAccountSection, DOM.$('.dialog-input')));
|
||||
this._accountPickerService.renderAccountPicker(azureAccountSection);
|
||||
|
||||
const firewallRuleSection = DOM.append(body, DOM.$('.firewall-rule-section.new-section'));
|
||||
const firewallRuleLabel = localize('filewallRule', "Firewall rule");
|
||||
@@ -215,7 +214,9 @@ export class FirewallRuleDialog extends Modal {
|
||||
if (isHeader) {
|
||||
className += ' header';
|
||||
}
|
||||
DOM.append(container, DOM.$(`.${className}`)).innerText = content;
|
||||
const element = DOM.append(container, DOM.$(`.${className}`));
|
||||
element.innerText = content;
|
||||
return element;
|
||||
}
|
||||
|
||||
// Update theming that is specific to firewall rule flyout body
|
||||
@@ -289,6 +290,10 @@ export class FirewallRuleDialog extends Modal {
|
||||
}
|
||||
}
|
||||
|
||||
public onTenantSelectionChange(tenantId: string): void {
|
||||
this.viewModel.selectedTenantId = tenantId;
|
||||
}
|
||||
|
||||
public onServiceComplete() {
|
||||
this._createButton.enabled = true;
|
||||
this.spinner = false;
|
||||
|
||||
Reference in New Issue
Block a user