expose realm field to the wizard UI (#11388)

* add realm

* optional fields

* use default values

* localized constant
This commit is contained in:
Alan Ren
2020-07-16 21:33:56 -07:00
committed by GitHub
parent 48ef272c66
commit b098ce64b5
5 changed files with 22 additions and 5 deletions

View File

@@ -19,5 +19,6 @@ export const signIn = localize('azure.signin', "Sign in…");
export const refresh = localize('azure.refresh', "Refresh");
export const createNewResourceGroup = localize('azure.resourceGroup.createNewResourceGroup', "Create a new resource group");
export const NewResourceGroupAriaLabel = localize('azure.resourceGroup.NewResourceGroupAriaLabel', "New resource group name");
export const realm = localize('deployCluster.Realm', "Realm");

View File

@@ -26,6 +26,7 @@ export interface ActiveDirectorySettings {
domainControllerFQDNs: string;
dnsIPAddresses: string;
domainDNSName: string;
realm?: string;
clusterUsers: string;
clusterAdmins: string;
appReaders?: string;
@@ -284,7 +285,7 @@ export class BigDataClusterDeploymentProfile {
activeDirectoryObject.domainDnsName = adSettings.domainDNSName;
activeDirectoryObject.subdomain = adSettings.subdomain;
activeDirectoryObject.accountPrefix = adSettings.accountPrefix;
activeDirectoryObject.realm = adSettings.domainDNSName.toUpperCase();
activeDirectoryObject.realm = adSettings.realm ?? adSettings.domainDNSName.toUpperCase();
activeDirectoryObject.clusterAdmins = this.splitByComma(adSettings.clusterAdmins);
activeDirectoryObject.clusterUsers = this.splitByComma(adSettings.clusterUsers);
if (adSettings.appReaders) {

View File

@@ -128,6 +128,7 @@ export class DeployClusterWizardModel extends Model {
organizationalUnit: this.getStringValue(VariableNames.OrganizationalUnitDistinguishedName_VariableName)!,
domainControllerFQDNs: this.getStringValue(VariableNames.DomainControllerFQDNs_VariableName)!,
domainDNSName: this.getStringValue(VariableNames.DomainDNSName_VariableName)!,
realm: this.getStringValue(VariableNames.Realm_VariableName),
dnsIPAddresses: this.getStringValue(VariableNames.DomainDNSIPAddresses_VariableName)!,
clusterAdmins: this.getStringValue(VariableNames.ClusterAdmins_VariableName)!,
clusterUsers: this.getStringValue(VariableNames.ClusterUsers_VariableName)!,

View File

@@ -13,6 +13,7 @@ import { WizardPageBase } from '../../wizardPageBase';
import * as VariableNames from '../constants';
import { DeployClusterWizard } from '../deployClusterWizard';
import { AuthenticationMode } from '../deployClusterWizardModel';
import * as localizedConstants from '../../../localizedConstants';
const localize = nls.loadMessageBundle();
const ConfirmPasswordName = 'ConfirmPassword';
@@ -148,6 +149,12 @@ export class ClusterSettingsPage extends WizardPageBase<DeployClusterWizard> {
label: localize('deployCluster.DomainDNSName', "Domain DNS name"),
required: true,
variableName: VariableNames.DomainDNSName_VariableName
}, {
type: FieldType.Text,
label: localizedConstants.realm,
required: false,
variableName: VariableNames.Realm_VariableName,
description: localize('deployCluster.RealmDescription', "If not provided, the domain DNS name will be used as the default value.")
}, {
type: FieldType.Text,
label: localize('deployCluster.ClusterAdmins', "Cluster admin group"),

View File

@@ -10,6 +10,7 @@ import { createSection, createGroupContainer, createFlexContainer, createLabel }
import { WizardPageBase } from '../../wizardPageBase';
import * as VariableNames from '../constants';
import { AuthenticationMode } from '../deployClusterWizardModel';
import * as localizedConstants from '../../../localizedConstants';
const localize = nls.loadMessageBundle();
export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
@@ -53,6 +54,7 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
{
type: FieldType.ReadonlyText,
label: localize('deployCluster.ClusterContext', "Cluster context"),
defaultValue: this.wizard.model.getStringValue(VariableNames.ClusterContext_VariableName),
labelCSSStyles: { fontWeight: FontWeight.Bold }
}]
}
@@ -151,13 +153,13 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
{
type: FieldType.ReadonlyText,
label: localize('deployCluster.AppOwners', "App owners"),
defaultValue: this.wizard.model.getStringValue(VariableNames.AppOwners_VariableName),
defaultValue: this.wizard.model.getStringValue(VariableNames.AppOwners_VariableName, ''),
labelCSSStyles: { fontWeight: FontWeight.Bold }
},
{
type: FieldType.ReadonlyText,
label: localize('deployCluster.AppReaders', "App readers"),
defaultValue: this.wizard.model.getStringValue(VariableNames.AppReaders_VariableName),
defaultValue: this.wizard.model.getStringValue(VariableNames.AppReaders_VariableName, ''),
labelCSSStyles: { fontWeight: FontWeight.Bold }
}]
});
@@ -166,13 +168,13 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
{
type: FieldType.ReadonlyText,
label: localize('deployCluster.Subdomain', "Subdomain"),
defaultValue: this.wizard.model.getStringValue(VariableNames.Subdomain_VariableName),
defaultValue: this.wizard.model.getStringValue(VariableNames.Subdomain_VariableName, ''),
labelCSSStyles: { fontWeight: FontWeight.Bold }
},
{
type: FieldType.ReadonlyText,
label: localize('deployCluster.AccountPrefix', "Account prefix"),
defaultValue: this.wizard.model.getStringValue(VariableNames.AccountPrefix_VariableName),
defaultValue: this.wizard.model.getStringValue(VariableNames.AccountPrefix_VariableName, ''),
labelCSSStyles: { fontWeight: FontWeight.Bold }
}]
});
@@ -183,6 +185,11 @@ export class SummaryPage extends WizardPageBase<DeployClusterWizard> {
label: localize('deployCluster.DomainServiceAccountUserName', "Service account username"),
defaultValue: this.wizard.model.getStringValue(VariableNames.DomainServiceAccountUserName_VariableName),
labelCSSStyles: { fontWeight: FontWeight.Bold }
}, {
type: FieldType.ReadonlyText,
label: localizedConstants.realm,
defaultValue: this.wizard.model.getStringValue(VariableNames.Realm_VariableName, ''),
labelCSSStyles: { fontWeight: FontWeight.Bold }
}]
});
}