Skip to content

Commit

Permalink
AB#30275542 Hide stack settings for logic app (#7912)
Browse files Browse the repository at this point in the history
* disable stack settings version update for logic app

* update stack error string

* update siterouter

* hide stack settings for logic app

* use a scenario instead

* remove unused imports

---------

Co-authored-by: Qi Liu <[email protected]>
  • Loading branch information
liuqidake and Qi Liu authored Nov 19, 2024
1 parent e71aa52 commit 003c517
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ const GeneralSettings: React.FC<FormikProps<AppSettingsFormValues>> = 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 && <Stacks {...props} />}
{showStack && <Stacks {...props} />}
{/* NOTE (krmitta): Need to hide platform settings except TLS settings for KubeApp as elements within are not shown */}
<>
<h3>{t('platformSettings')}</h3>
Expand Down
1 change: 1 addition & 0 deletions client-react/src/utils/scenario-checker/scenario-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => {
Expand Down

0 comments on commit 003c517

Please sign in to comment.