From: Revanshu Paliwal Date: Mon, 29 Aug 2022 13:21:30 +0000 (+0200) Subject: SONAR-17228 Making title as optional for authentication use case X-Git-Tag: 9.7.0.61563~306 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=70fd6789e58e19d3e5ab5e71b67444b57f8940d3;p=sonarqube.git SONAR-17228 Making title as optional for authentication use case --- diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx index 473ef418995..683fd3404c0 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.tsx @@ -33,6 +33,7 @@ interface Props { component?: Component; definitions: ExtendedSettingDefinition[]; subCategory?: string; + displaySubCategoryTitle?: boolean; } interface State { @@ -86,7 +87,7 @@ export default class CategoryDefinitionsList extends React.PureComponent ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx index a133d64cc90..975c87a54f9 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.tsx @@ -33,6 +33,7 @@ export interface SubCategoryDefinitionsListProps { location: Location; settings: Array; subCategory?: string; + displaySubCategoryTitle?: boolean; } export class SubCategoryDefinitionsList extends React.PureComponent< @@ -65,7 +66,8 @@ export class SubCategoryDefinitionsList extends React.PureComponent< }; render() { - const bySubCategory = groupBy(this.props.settings, setting => setting.definition.subCategory); + const { displaySubCategoryTitle = true, settings, subCategory, component } = this.props; + const bySubCategory = groupBy(settings, setting => setting.definition.subCategory); const subCategories = Object.keys(bySubCategory).map(key => ({ key, name: getSubCategoryName(bySubCategory[key][0].definition.category, key), @@ -74,19 +76,21 @@ export class SubCategoryDefinitionsList extends React.PureComponent< const sortedSubCategories = sortBy(subCategories, subCategory => subCategory.name.toLowerCase() ); - const filteredSubCategories = this.props.subCategory - ? sortedSubCategories.filter(c => c.key === this.props.subCategory) + const filteredSubCategories = subCategory + ? sortedSubCategories.filter(c => c.key === subCategory) : sortedSubCategories; return (
    {filteredSubCategories.map(subCategory => (
  • -

    - {subCategory.name} -

    + {displaySubCategoryTitle && ( +

    + {subCategory.name} +

    + )} {subCategory.description != null && (
    )} diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx index 0aeb3c0f341..5b9360ed0eb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx @@ -155,6 +155,7 @@ export default function Authentication(props: Props) { category={AUTHENTICATION_CATEGORY} definitions={definitions} subCategory={currentTab} + displaySubCategoryTitle={false} />
    diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 633911af4fe..2050505e6aa 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1308,10 +1308,6 @@ property.category.general.qualityGate=Quality Gate property.category.general.subProjects=Sub-projects property.category.almintegration=DevOps Platform Integrations property.category.authentication=Authentication -property.category.authentication.github= -property.category.authentication.gitlab= -property.category.authentication.bitbucket= -property.category.authentication.saml= property.category.organizations=Organizations property.category.security=Security property.category.security.encryption=Encryption