Skip to content

Commit

Permalink
Merge acca7e9 into 7137411
Browse files Browse the repository at this point in the history
  • Loading branch information
Allison Gruninger committed Sep 19, 2018
2 parents 7137411 + acca7e9 commit 6e49140
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</div>
</div>
</ng-container>
<div *ngIf="hasFunctions && !functionRuntimeSelectorDisabled" class="alert alert-warning">
<div *ngIf="disableRuntimeSelector" class="alert alert-warning">
<img class="alert-icon" src="image/warning.svg" alt="{{ 'warning' | translate}}"/>
<div class="alert-message">
<span class="title-label">{{ 'appFunctionSettings_warning_6' | translate }}</span><br/>
Expand All @@ -112,7 +112,7 @@
<radio-selector
[defaultValue]="extensionVersion"
[options]="functionRutimeOptions"
[disabled]="hasFunctions || functionRuntimeSelectorDisabled"
[disabled]="disableRuntimeSelector"
(value)="functionRuntimeValueStream.next($event)"
id="runtimeVersionRadioButton"
aria-labelledby="runtimeVersionLabel runtimeVersionRadioButton">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export class FunctionRuntimeComponent extends FunctionAppContextComponent {
public slotsStatusOptions: SelectOption<boolean>[];
public slotsAppSetting: string;
public slotsEnabled: boolean;
public functionRuntimeSelectorDisabled = false;
public betaDisabled = false;
public disableRuntimeSelector = false;
public slotsValueChange: Subject<boolean>;
private _busyManager: BusyStateScopeManager;

Expand All @@ -96,7 +97,7 @@ export class FunctionRuntimeComponent extends FunctionAppContextComponent {

this._busyManager = new BusyStateScopeManager(broadcastService, SiteTabIds.functionRuntime);

this.functionRuntimeSelectorDisabled = this._scenarioService.checkScenario(ScenarioIds.functionBeta).status === 'disabled';
this.betaDisabled = this._scenarioService.checkScenario(ScenarioIds.functionBeta).status === 'disabled';

this.functionStatusOptions = [
{
Expand Down Expand Up @@ -263,6 +264,8 @@ export class FunctionRuntimeComponent extends FunctionAppContextComponent {
this.extensionVersion = Constants.latest;
}

this.disableRuntimeSelector = (this.extensionVersion !== Constants.latest) && (this.hasFunctions || this.betaDisabled);

this.badRuntimeVersion = !this._validRuntimeVersion();

this.setNeedUpdateExtensionVersion();
Expand Down

0 comments on commit 6e49140

Please sign in to comment.