Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AB#30275542 Hide stack settings for logic app #7912

Merged
merged 6 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading