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:
Amir Omidi
2020-07-31 20:07:30 -07:00
committed by GitHub
parent 68e7a293ad
commit f941f9910b
15 changed files with 267 additions and 49 deletions

View File

@@ -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;