From 2acec847fd1441eaf2feffdb19da28ab76943fc8 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 19 Nov 2024 10:08:12 -0800 Subject: [PATCH 1/6] disable stack settings version update for logic app --- client-react/src/SiteState.ts | 1 + client-react/src/pages/app/SiteRouter.tsx | 4 ++ .../function-app/FunctionAppStackSettings.tsx | 56 ++++++++++--------- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/client-react/src/SiteState.ts b/client-react/src/SiteState.ts index d3d4775396..a1cd0dc938 100644 --- a/client-react/src/SiteState.ts +++ b/client-react/src/SiteState.ts @@ -12,6 +12,7 @@ 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 c4762523a1..bc2318c267 100644 --- a/client-react/src/pages/app/SiteRouter.tsx +++ b/client-react/src/pages/app/SiteRouter.tsx @@ -17,6 +17,7 @@ import { isLinuxApp, isWordPressApp, isFlexConsumption, + isWorkflowApp, } from '../../utils/arm-utils'; import { CommonConstants } from '../../utils/CommonConstants'; import { ArmSiteDescriptor } from '../../utils/resourceDescriptors'; @@ -81,6 +82,7 @@ const SiteRouter: React.FC> = () => { const [isWordPressApplication, setIsWordPressApplication] = useState(false); const [isKubeApplication, setIsKubeApplication] = useState(false); const [isFlexConsumptionApplication, setIsFlexConsumptionApplication] = useState(false); + const [isWorkflowApploading, setIsWorkflowApploading] = useState(false); const [isLoading, setIsLoading] = useState(false); const fetchDataAndSetState = useCallback(async (resourceId?: string) => { @@ -139,6 +141,7 @@ const SiteRouter: React.FC> = () => { setIsKubeApplication(isKubeApp(site)); setSiteAppEditState(editMode); setIsFlexConsumptionApplication(isFlexConsumption(site)); + setIsWordPressApplication(isWorkflowApp(site)); } } }, []); @@ -164,6 +167,7 @@ const SiteRouter: React.FC> = () => { isWordPressApp: isWordPressApplication, isKubeApp: isKubeApplication, isFlexConsumptionApp: isFlexConsumptionApplication, + isWorkflowApp: isWordPressApplication, refresh: () => fetchDataAndSetState(resourceId), setIsLoading, }}> diff --git a/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx b/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx index 646d24a74f..1afac89ba1 100644 --- a/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx +++ b/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx @@ -121,34 +121,36 @@ const FunctionAppStackSettings: React.FC = props => { ); const stackErrorMessage = React.useMemo(() => { - // Handle errors on stack - if (!runtimeStack) { - return t('noRuntimeStackFound'); - } - if (!currentStackData) { - return t('invalidStack').format(runtimeStack); - } + if (!siteStateContext.isWorkflowApp) { + // Handle errors on stack + if (!runtimeStack) { + return t('noRuntimeStackFound'); + } + if (!currentStackData) { + return t('invalidStack').format(runtimeStack); + } - // Handle errors on version - if (!StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.custom)) { - const selectedVersionOption = options.find(option => option.key === selectedStackVersion); - if (!selectedVersionOption) { - if (isWindowsNodeApp(siteStateContext.isLinuxApp, runtimeStack)) { - return t('invalidWindowsNodeStackVersion'); - } else { - return t('invalidNonWindowsNodeStackVersion').format(currentStackData.displayText); + // Handle errors on version + if (!StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.custom)) { + const selectedVersionOption = options.find(option => option.key === selectedStackVersion); + if (!selectedVersionOption) { + if (isWindowsNodeApp(siteStateContext.isLinuxApp, runtimeStack)) { + return t('invalidWindowsNodeStackVersion'); + } else { + return t('invalidNonWindowsNodeStackVersion').format(currentStackData.displayText); + } } - } - if (selectedVersionOption.disabled) { - return t('disabledDotNetVersion').format( - selectedVersionOption.text, - runtimeStack, - StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.dotnetIsolated) ? 'dotnet' : 'dotnet-isolated' - ); + if (selectedVersionOption.disabled) { + return t('disabledDotNetVersion').format( + selectedVersionOption.text, + runtimeStack, + StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.dotnetIsolated) ? 'dotnet' : 'dotnet-isolated' + ); + } } } - }, [runtimeStack, currentStackData, selectedStackVersion, options, siteStateContext.isLinuxApp, t]); + }, [runtimeStack, currentStackData, selectedStackVersion, options, siteStateContext.isLinuxApp, siteStateContext.isWorkflowApp, t]); const onMajorVersionChange = React.useCallback( (_, option: IDropdownOption) => { @@ -181,6 +183,10 @@ const FunctionAppStackSettings: React.FC = props => { ); const getEolBanner = React.useCallback(() => { + if (siteStateContext.isWorkflowApp) { + return null; + } + const data = options.find(option => option.key === selectedStackVersion)?.data; if (data) { const eolDate = siteStateContext.isLinuxApp @@ -192,7 +198,7 @@ const FunctionAppStackSettings: React.FC = props => { } return null; - }, [selectedStackVersion, options, siteStateContext, t]); + }, [selectedStackVersion, options, siteStateContext.isLinuxApp, siteStateContext.isWorkflowApp, t]); useEffect(() => { setDirtyState(initialStackVersion !== selectedStackVersion); @@ -237,7 +243,7 @@ const FunctionAppStackSettings: React.FC = props => { onChange={onMajorVersionChange} dirty={dirtyState} component={Dropdown} - disabled={disableAllControls} + disabled={disableAllControls || siteStateContext.isWorkflowApp} label={t('versionLabel').format(currentStackData?.displayText)} options={options} /> From a558d14842fce1ba34d32d4fb7ba02a87f16756b Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 19 Nov 2024 10:42:14 -0800 Subject: [PATCH 2/6] update stack error string --- .../function-app/FunctionAppStackSettings.tsx | 52 ++++++++++--------- server/Resources/Resources.resx | 12 +++-- 2 files changed, 36 insertions(+), 28 deletions(-) diff --git a/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx b/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx index 1afac89ba1..560e9542cf 100644 --- a/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx +++ b/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx @@ -121,36 +121,38 @@ const FunctionAppStackSettings: React.FC = props => { ); const stackErrorMessage = React.useMemo(() => { - if (!siteStateContext.isWorkflowApp) { - // Handle errors on stack - if (!runtimeStack) { - return t('noRuntimeStackFound'); - } - if (!currentStackData) { - return t('invalidStack').format(runtimeStack); - } + // Handle errors on stack + if (!runtimeStack) { + return t('noRuntimeStackFound'); + } + if (!currentStackData) { + return t('invalidStack').format(runtimeStack); + } - // Handle errors on version - if (!StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.custom)) { - const selectedVersionOption = options.find(option => option.key === selectedStackVersion); - if (!selectedVersionOption) { - if (isWindowsNodeApp(siteStateContext.isLinuxApp, runtimeStack)) { - return t('invalidWindowsNodeStackVersion'); - } else { - return t('invalidNonWindowsNodeStackVersion').format(currentStackData.displayText); - } + // Handle errors on version + if (!StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.custom)) { + const selectedVersionOption = options.find(option => option.key === selectedStackVersion); + if (!selectedVersionOption) { + if (isWindowsNodeApp(siteStateContext.isLinuxApp, runtimeStack)) { + return selectedStackVersion + ? t('invalidWindowsNodeStackVersion').format(selectedStackVersion) + : t('missingWindowsNodeStackVersion'); + } else { + return selectedStackVersion + ? t('invalidNonWindowsNodeStackVersion').format(selectedStackVersion, currentStackData.displayText) + : t('missingNonWindowsNodeStackVersion').format(currentStackData.displayText); } + } - if (selectedVersionOption.disabled) { - return t('disabledDotNetVersion').format( - selectedVersionOption.text, - runtimeStack, - StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.dotnetIsolated) ? 'dotnet' : 'dotnet-isolated' - ); - } + if (selectedVersionOption.disabled) { + return t('disabledDotNetVersion').format( + selectedVersionOption.text, + runtimeStack, + StringUtils.equalsIgnoreCase(runtimeStack, WorkerRuntimeLanguages.dotnetIsolated) ? 'dotnet' : 'dotnet-isolated' + ); } } - }, [runtimeStack, currentStackData, selectedStackVersion, options, siteStateContext.isLinuxApp, siteStateContext.isWorkflowApp, t]); + }, [runtimeStack, currentStackData, selectedStackVersion, options, siteStateContext.isLinuxApp, t]); const onMajorVersionChange = React.useCallback( (_, option: IDropdownOption) => { diff --git a/server/Resources/Resources.resx b/server/Resources/Resources.resx index 4ec59218d3..3b2b27d839 100644 --- a/server/Resources/Resources.resx +++ b/server/Resources/Resources.resx @@ -7996,13 +7996,19 @@ Set to "External URL" to use an API definition that is hosted elsewhere. {0} is not a valid stack - Node.js version is missing or invalid. Please select a valid version or go to Environment variables to add/update WEBSITE_NODE_DEFAULT_VERSION app setting + '{0}' is not a valid Node.js version. Please go to Environment variables to update WEBSITE_NODE_DEFAULT_VERSION app setting, or select a valid version if applicable. + + + Node.js version is missing. Please go to Environment variables to add WEBSITE_NODE_DEFAULT_VERSION app setting, or select a valid version if applicable. - {0} version is missing or invalid. Please select a valid version + '{0}' is not a valid {1} version. Please select a valid version if applicable. + + + {0} version is missing. Please select a valid version if applicable. - The selected version '{0}' does not match with the stack {1}. Please select a valid .NET version or go to Environment Variables to add/update FUNCTIONS_WORKER_RUNTIME to {2} + The selected version '{0}' does not match with the stack {1}. Please go to Environment Variables to update FUNCTIONS_WORKER_RUNTIME to {2}, or select a valid .NET version if applicable. IPv4 From 5d8da7a09c9565b6372b73f4db4bd42c5075c81d Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 19 Nov 2024 10:45:37 -0800 Subject: [PATCH 3/6] update siterouter --- client-react/src/pages/app/SiteRouter.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client-react/src/pages/app/SiteRouter.tsx b/client-react/src/pages/app/SiteRouter.tsx index bc2318c267..59c8d9b67a 100644 --- a/client-react/src/pages/app/SiteRouter.tsx +++ b/client-react/src/pages/app/SiteRouter.tsx @@ -82,7 +82,7 @@ const SiteRouter: React.FC> = () => { const [isWordPressApplication, setIsWordPressApplication] = useState(false); const [isKubeApplication, setIsKubeApplication] = useState(false); const [isFlexConsumptionApplication, setIsFlexConsumptionApplication] = useState(false); - const [isWorkflowApploading, setIsWorkflowApploading] = useState(false); + const [isWorkflowApplication, setIsWorkflowApplication] = useState(false); const [isLoading, setIsLoading] = useState(false); const fetchDataAndSetState = useCallback(async (resourceId?: string) => { @@ -141,7 +141,7 @@ const SiteRouter: React.FC> = () => { setIsKubeApplication(isKubeApp(site)); setSiteAppEditState(editMode); setIsFlexConsumptionApplication(isFlexConsumption(site)); - setIsWordPressApplication(isWorkflowApp(site)); + setIsWorkflowApplication(isWorkflowApp(site)); } } }, []); @@ -167,7 +167,7 @@ const SiteRouter: React.FC> = () => { isWordPressApp: isWordPressApplication, isKubeApp: isKubeApplication, isFlexConsumptionApp: isFlexConsumptionApplication, - isWorkflowApp: isWordPressApplication, + isWorkflowApp: isWorkflowApplication, refresh: () => fetchDataAndSetState(resourceId), setIsLoading, }}> From cb887092d3f34cee7c60b74cdc66429053e46f15 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 19 Nov 2024 11:10:01 -0800 Subject: [PATCH 4/6] hide stack settings for logic app --- .../function-app/FunctionAppStackSettings.tsx | 16 ++++------------ .../app-settings/Sections/GeneralSettings.tsx | 14 +++++++++----- server/Resources/Resources.resx | 12 +++--------- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx b/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx index 560e9542cf..646d24a74f 100644 --- a/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx +++ b/client-react/src/pages/app/app-settings/GeneralSettings/stacks/function-app/FunctionAppStackSettings.tsx @@ -134,13 +134,9 @@ const FunctionAppStackSettings: React.FC = props => { const selectedVersionOption = options.find(option => option.key === selectedStackVersion); if (!selectedVersionOption) { if (isWindowsNodeApp(siteStateContext.isLinuxApp, runtimeStack)) { - return selectedStackVersion - ? t('invalidWindowsNodeStackVersion').format(selectedStackVersion) - : t('missingWindowsNodeStackVersion'); + return t('invalidWindowsNodeStackVersion'); } else { - return selectedStackVersion - ? t('invalidNonWindowsNodeStackVersion').format(selectedStackVersion, currentStackData.displayText) - : t('missingNonWindowsNodeStackVersion').format(currentStackData.displayText); + return t('invalidNonWindowsNodeStackVersion').format(currentStackData.displayText); } } @@ -185,10 +181,6 @@ const FunctionAppStackSettings: React.FC = props => { ); const getEolBanner = React.useCallback(() => { - if (siteStateContext.isWorkflowApp) { - return null; - } - const data = options.find(option => option.key === selectedStackVersion)?.data; if (data) { const eolDate = siteStateContext.isLinuxApp @@ -200,7 +192,7 @@ const FunctionAppStackSettings: React.FC = props => { } return null; - }, [selectedStackVersion, options, siteStateContext.isLinuxApp, siteStateContext.isWorkflowApp, t]); + }, [selectedStackVersion, options, siteStateContext, t]); useEffect(() => { setDirtyState(initialStackVersion !== selectedStackVersion); @@ -245,7 +237,7 @@ const FunctionAppStackSettings: React.FC = props => { onChange={onMajorVersionChange} dirty={dirtyState} component={Dropdown} - disabled={disableAllControls || siteStateContext.isWorkflowApp} + disabled={disableAllControls} label={t('versionLabel').format(currentStackData?.displayText)} options={options} /> 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..178eca5d93 100644 --- a/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx +++ b/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useMemo } from 'react'; +import React, { useRef, useMemo, useContext } from 'react'; import Platform from '../GeneralSettings/Platform'; import SlotAutoSwap from '../GeneralSettings/SlotAutoSwap'; import Stacks from '../GeneralSettings/Stacks'; @@ -14,10 +14,12 @@ import { isEqual } from 'lodash-es'; import ClientCert from '../GeneralSettings/ClientCert/ClientCert'; import { DeploymentCenterConstants } from '../../deployment-center/DeploymentCenterConstants'; import StringUtils from '../../../../utils/string'; +import { SiteStateContext } from '../../../../SiteState'; const GeneralSettings: React.FC> = props => { const { values } = props; const { site } = values; + const siteStateContext = useContext(SiteStateContext); const { t } = useTranslation(); const scenarioCheckerRef = useRef(new ScenarioService(t)); const scenarioChecker = scenarioCheckerRef.current!; @@ -32,15 +34,17 @@ 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]); + + return !isSiteContainer && !siteStateContext.isWorkflowApp; + }, [values.config?.properties.linuxFxVersion, siteStateContext.isWorkflowApp]); 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/server/Resources/Resources.resx b/server/Resources/Resources.resx index 3b2b27d839..4ec59218d3 100644 --- a/server/Resources/Resources.resx +++ b/server/Resources/Resources.resx @@ -7996,19 +7996,13 @@ Set to "External URL" to use an API definition that is hosted elsewhere. {0} is not a valid stack
- '{0}' is not a valid Node.js version. Please go to Environment variables to update WEBSITE_NODE_DEFAULT_VERSION app setting, or select a valid version if applicable. - - - Node.js version is missing. Please go to Environment variables to add WEBSITE_NODE_DEFAULT_VERSION app setting, or select a valid version if applicable. + Node.js version is missing or invalid. Please select a valid version or go to Environment variables to add/update WEBSITE_NODE_DEFAULT_VERSION app setting - '{0}' is not a valid {1} version. Please select a valid version if applicable. - - - {0} version is missing. Please select a valid version if applicable. + {0} version is missing or invalid. Please select a valid version - The selected version '{0}' does not match with the stack {1}. Please go to Environment Variables to update FUNCTIONS_WORKER_RUNTIME to {2}, or select a valid .NET version if applicable. + The selected version '{0}' does not match with the stack {1}. Please select a valid .NET version or go to Environment Variables to add/update FUNCTIONS_WORKER_RUNTIME to {2} IPv4 From b93bfe59a053d11d8ad9a88096530925e7fa2e4e Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 19 Nov 2024 12:38:06 -0800 Subject: [PATCH 5/6] use a scenario instead --- client-react/src/SiteState.ts | 1 - client-react/src/pages/app/SiteRouter.tsx | 4 ---- .../pages/app/app-settings/Sections/GeneralSettings.tsx | 5 +++-- client-react/src/utils/scenario-checker/scenario-ids.ts | 1 + .../src/utils/scenario-checker/workflow-app.environment.ts | 7 +++++++ 5 files changed, 11 insertions(+), 7 deletions(-) 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: () => { From 915bf179872c1d1ac0c10e833b39360f7f9c3822 Mon Sep 17 00:00:00 2001 From: Qi Liu Date: Tue, 19 Nov 2024 12:39:14 -0800 Subject: [PATCH 6/6] remove unused imports --- .../src/pages/app/app-settings/Sections/GeneralSettings.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 51547a3773..610fce7c3d 100644 --- a/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx +++ b/client-react/src/pages/app/app-settings/Sections/GeneralSettings.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useMemo, useContext } from 'react'; +import React, { useRef, useMemo } from 'react'; import Platform from '../GeneralSettings/Platform'; import SlotAutoSwap from '../GeneralSettings/SlotAutoSwap'; import Stacks from '../GeneralSettings/Stacks'; @@ -14,12 +14,10 @@ import { isEqual } from 'lodash-es'; import ClientCert from '../GeneralSettings/ClientCert/ClientCert'; import { DeploymentCenterConstants } from '../../deployment-center/DeploymentCenterConstants'; import StringUtils from '../../../../utils/string'; -import { SiteStateContext } from '../../../../SiteState'; const GeneralSettings: React.FC> = props => { const { values } = props; const { site } = values; - const siteStateContext = useContext(SiteStateContext); const { t } = useTranslation(); const scenarioCheckerRef = useRef(new ScenarioService(t)); const scenarioChecker = scenarioCheckerRef.current!;