diff --git a/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx b/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx index b047002ff0..610fce7c3d 100644 --- a/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx +++ b/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx @@ -32,15 +32,18 @@ const GeneralSettings: React.FC> = props => { return null; }; - const isSiteContainer = useMemo(() => { - return values.config?.properties.linuxFxVersion + const showStack = useMemo(() => { + const isSiteContainer = values.config?.properties.linuxFxVersion ? StringUtils.equalsIgnoreCase(values.config?.properties.linuxFxVersion, DeploymentCenterConstants.sitecontainers) : false; - }, [values.config?.properties.linuxFxVersion]); + const showStackSettingStatus = scenarioChecker.checkScenario(ScenarioIds.showStackSettings, { site }).status; + + return !isSiteContainer && showStackSettingStatus !== 'disabled'; + }, [values.config?.properties.linuxFxVersion, site]); return ( <> - {!isSiteContainer && } + {showStack && } {/* NOTE (krmitta): Need to hide platform settings except TLS settings for KubeApp as elements within are not shown */} <>

{t('platformSettings')}

diff --git a/client-react/src/utils/scenario-checker/scenario-ids.ts b/client-react/src/utils/scenario-checker/scenario-ids.ts index e17a99d625..b62f0d510f 100644 --- a/client-react/src/utils/scenario-checker/scenario-ids.ts +++ b/client-react/src/utils/scenario-checker/scenario-ids.ts @@ -106,6 +106,7 @@ export class ScenarioIds { public static readonly xenonAppRuntimeStack = 'xenonAppRuntimeStack'; public static readonly showAppInsightsLogs = 'showAppInsightsLogs'; public static readonly showRuntimeVersionSetting = 'showRuntimeVersionSetting'; + public static readonly showStackSettings = 'showStackSettings'; public static readonly deploymentCenterLogs = 'deploymentCenterLogs'; public static readonly kuduBuildProvider = 'kuduBuildProvider'; public static readonly dockerCompose = 'dockerCompose'; diff --git a/client-react/src/utils/scenario-checker/workflow-app.environment.ts b/client-react/src/utils/scenario-checker/workflow-app.environment.ts index 8d8cc67e3d..258cf3d0b9 100644 --- a/client-react/src/utils/scenario-checker/workflow-app.environment.ts +++ b/client-react/src/utils/scenario-checker/workflow-app.environment.ts @@ -22,6 +22,13 @@ export class WorkflowAppEnvironment extends FunctionAppEnvironment { }, }; + this.scenarioChecks[ScenarioIds.showStackSettings] = { + id: ScenarioIds.showStackSettings, + runCheck: () => { + return { status: 'disabled' }; + }, + }; + this.scenarioChecks[ScenarioIds.enableCustomErrorPages] = { id: ScenarioIds.enableCustomErrorPages, runCheck: () => {