Skip to content

Commit

Permalink
Merge d1a5cd0 into 064251c
Browse files Browse the repository at this point in the history
  • Loading branch information
nertim committed Oct 9, 2018
2 parents 064251c + d1a5cd0 commit 53a837d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<textbox [control] = "dockerHubForm.controls.image"></textbox>
</div>

<div *ngIf = "containerImageSourceInfo.container.id === 'single'" class="container-setting-property">
<label>{{ 'containerStartupFile' | translate }}</label>
<textbox [control] = "dockerHubForm.controls.startupFile"></textbox>
</div>

<div *ngIf = "containerImageSourceInfo.container.id !== 'single'">
<div class="container-setting-property">
<label>{{ 'containerMultiConfigurationFile' | translate }}</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ export class ContainerSettingsManager {
return this._fb.group({
serverUrl: [ContainerConstants.dockerHubUrl, []],
image: [fxVersion ? fxVersion.split('|')[1] : '', this.requiredValidator.validate.bind(this.requiredValidator)],
startupFile: [this._getSiteConfigAppCommandLine(siteConfig), []],
});
} else {
return this._fb.group({
Expand All @@ -688,6 +689,7 @@ export class ContainerSettingsManager {
login: [this._getAppSettingsUsername(appSettings), this.requiredValidator.validate.bind(this.requiredValidator)],
password: [this._getAppSettingsPassword(appSettings), this.requiredValidator.validate.bind(this.requiredValidator)],
image: [fxVersion ? fxVersion.split('|')[1] : '', this.requiredValidator.validate.bind(this.requiredValidator)],
startupFile: [this._getSiteConfigAppCommandLine(siteConfig), []],
});
} else {
return this._fb.group({
Expand Down Expand Up @@ -848,11 +850,16 @@ export class ContainerSettingsManager {

private _getAppCommandLineFormData(containerType: ContainerType, containerForm: FormGroup): string {
const imageSourceType: ImageSourceType = containerForm.controls.imageSource.value;
if (containerType === 'single'
&& (imageSourceType === 'azureContainerRegistry' || imageSourceType === 'privateRegistry')) {
if (containerType === 'single') {
const imageSourceForm = this.getImageSourceForm(containerForm, imageSourceType);

return imageSourceForm.controls.startupFile.value;
if (imageSourceType === 'dockerHub') {
const accessType: DockerHubAccessType = imageSourceForm.controls.accessType.value;
const dockerHubForm = this.getDockerHubForm(imageSourceForm, accessType);
return dockerHubForm.controls.startupFile.value;
} else {
return imageSourceForm.controls.startupFile.value;
}
}

return '';
Expand Down

0 comments on commit 53a837d

Please sign in to comment.