diff --git a/client-react/src/SiteState.ts b/client-react/src/SiteState.ts index a1cd0dc938..d3d4775396 100644 --- a/client-react/src/SiteState.ts +++ b/client-react/src/SiteState.ts @@ -12,7 +12,6 @@ export interface ISiteState { isWordPressApp: boolean; isKubeApp: boolean; isFlexConsumptionApp: boolean; - isWorkflowApp: boolean; resourceId?: string; site?: ArmObj; refresh: () => Promise; diff --git a/client-react/src/pages/app/SiteRouter.tsx b/client-react/src/pages/app/SiteRouter.tsx index 59c8d9b67a..c4762523a1 100644 --- a/client-react/src/pages/app/SiteRouter.tsx +++ b/client-react/src/pages/app/SiteRouter.tsx @@ -17,7 +17,6 @@ import { isLinuxApp, isWordPressApp, isFlexConsumption, - isWorkflowApp, } from '../../utils/arm-utils'; import { CommonConstants } from '../../utils/CommonConstants'; import { ArmSiteDescriptor } from '../../utils/resourceDescriptors'; @@ -82,7 +81,6 @@ const SiteRouter: React.FC> = () => { const [isWordPressApplication, setIsWordPressApplication] = useState(false); const [isKubeApplication, setIsKubeApplication] = useState(false); const [isFlexConsumptionApplication, setIsFlexConsumptionApplication] = useState(false); - const [isWorkflowApplication, setIsWorkflowApplication] = useState(false); const [isLoading, setIsLoading] = useState(false); const fetchDataAndSetState = useCallback(async (resourceId?: string) => { @@ -141,7 +139,6 @@ const SiteRouter: React.FC> = () => { setIsKubeApplication(isKubeApp(site)); setSiteAppEditState(editMode); setIsFlexConsumptionApplication(isFlexConsumption(site)); - setIsWorkflowApplication(isWorkflowApp(site)); } } }, []); @@ -167,7 +164,6 @@ const SiteRouter: React.FC> = () => { isWordPressApp: isWordPressApplication, isKubeApp: isKubeApplication, isFlexConsumptionApp: isFlexConsumptionApplication, - isWorkflowApp: isWorkflowApplication, refresh: () => fetchDataAndSetState(resourceId), setIsLoading, }}> 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 178eca5d93..51547a3773 100644 --- a/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx +++ b/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx @@ -38,9 +38,10 @@ const GeneralSettings: React.FC> = props => { const isSiteContainer = values.config?.properties.linuxFxVersion ? StringUtils.equalsIgnoreCase(values.config?.properties.linuxFxVersion, DeploymentCenterConstants.sitecontainers) : false; + const showStackSettingStatus = scenarioChecker.checkScenario(ScenarioIds.showStackSettings, { site }).status; - return !isSiteContainer && !siteStateContext.isWorkflowApp; - }, [values.config?.properties.linuxFxVersion, siteStateContext.isWorkflowApp]); + return !isSiteContainer && showStackSettingStatus !== 'disabled'; + }, [values.config?.properties.linuxFxVersion, site]); return ( <> 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: () => {