Skip to content

Commit

Permalink
add ssh info bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
Krrish Mittal authored and Krrish Mittal committed Oct 11, 2023
1 parent bdd6db7 commit edcbce7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Field, FormikProps } from 'formik';
import React, { useCallback, useContext } from 'react';
import React, { useCallback, useContext, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import Dropdown from '../../../../components/form-controls/DropDown';
import RadioButton from '../../../../components/form-controls/RadioButton';
Expand Down Expand Up @@ -30,6 +30,7 @@ const Platform: React.FC<FormikProps<AppSettingsFormValues>> = props => {
const platformOptionEnable = scenarioChecker.checkScenario(ScenarioIds.enablePlatform64, { site });
const websocketsEnable = scenarioChecker.checkScenario(ScenarioIds.webSocketsEnabled, { site });
const alwaysOnEnable = scenarioChecker.checkScenario(ScenarioIds.enableAlwaysOn, { site });
const sshControlEnabled = useMemo(() => !stackVersionDetails.data?.supportedFeatures?.disableSSH, [stackVersionDetails]);

const showHttpsOnlyInfo = (): boolean => {
const siteProperties = values.site.properties;
Expand Down Expand Up @@ -268,7 +269,8 @@ const Platform: React.FC<FormikProps<AppSettingsFormValues>> = props => {
component={RadioButton}
label={t('feature_sshName')}
id="app-settings-ssh-enabled"
disabled={disableAllControls || !stackVersionDetails.data?.supportedFeatures?.disableSSH}
disabled={disableAllControls || !sshControlEnabled}
infoBubbleMessage={sshControlEnabled ? '' : t('sshDisabledInfoBubbleMessage')}
options={[
{
key: true,
Expand Down
3 changes: 3 additions & 0 deletions server/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -7870,4 +7870,7 @@ Set to "External URL" to use an API definition that is hosted elsewhere.</value>
<data name="authenticationSettingsIdentityPermissionsLinkAriaLabel" xml:space="preserve">
<value>Click here to learn more about how to manage federated identity credentials on a user-assigned identity.</value>
</data>
<data name="sshDisabledInfoBubbleMessage" xml:space="preserve">
<value>SSH isn't supported for your selected stack version.</value>
</data>
</root>

0 comments on commit edcbce7

Please sign in to comment.