From d5b076b2fc8988e9a3799ba7775f851e1a12cbb7 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 17 Jul 2017 10:07:30 +0200 Subject: [PATCH] upgrade prettier and remove prettier-eslint (#2254) --- server/sonar-web/.eslintrc | 4 +- server/sonar-web/package.json | 25 +- .../sonar-web/src/main/js/api/components.js | 14 +- server/sonar-web/src/main/js/api/issues.js | 14 +- .../src/main/js/api/organizations.js | 10 +- .../sonar-web/src/main/js/api/permissions.js | 28 +- .../sonar-web/src/main/js/api/user_groups.js | 28 +- .../main/js/app/components/GlobalFooter.js | 18 +- .../js/app/components/GlobalFooterBranding.js | 15 +- .../GlobalFooterForSonarQubeDotCom.js | 31 +- .../main/js/app/components/MarkdownHelp.js | 33 +- .../src/main/js/app/components/NotFound.js | 6 +- .../js/app/components/ProjectContainer.js | 2 +- .../extensions/ExtensionNotFound.js | 4 +- .../main/js/app/components/help/GlobalHelp.js | 16 +- .../main/js/app/components/help/LinksHelp.js | 16 +- .../components/help/LinksHelpSonarCloud.js | 32 +- .../js/app/components/help/ShortcutsHelp.js | 16 +- .../js/app/components/help/TutorialsHelp.js | 8 +- .../nav/component/ComponentNavBreadcrumbs.js | 12 +- .../nav/component/ComponentNavMeta.js | 23 +- .../nav/global/GlobalNavBranding.js | 4 +- .../components/nav/global/GlobalNavMenu.js | 11 +- .../components/nav/global/GlobalNavUser.js | 24 +- .../components/nav/settings/SettingsNav.js | 4 +- .../main/js/app/components/search/Search.js | 10 +- .../js/app/components/search/SearchResult.js | 14 +- .../js/app/components/search/SearchResults.js | 4 +- .../app/components/search/SearchShowMore.js | 4 +- .../search/__tests__/SearchResults-test.js | 10 +- .../src/main/js/app/styles/boxed-group.css | 6 +- .../src/main/js/app/utils/startReactApp.js | 9 +- .../apps/about/components/AboutCleanCode.js | 8 +- .../apps/about/components/AboutLanguages.js | 20 +- .../apps/about/components/AboutLeakPeriod.js | 8 +- .../about/components/AboutQualityGates.js | 8 +- .../about/components/AboutQualityModel.js | 25 +- .../AboutQualityModelForSonarQubeDotCom.js | 17 +- .../AboutRulesForSonarQubeDotCom.js | 4 +- .../js/apps/about/components/AboutScanners.js | 12 +- .../apps/about/components/AboutStandards.js | 8 +- .../apps/about/components/EntryIssueTypes.js | 12 +- .../EntryIssueTypesForSonarQubeDotCom.js | 12 +- .../main/js/apps/about/components/ReadMore.js | 4 +- .../apps/about/sonarqube-dot-com-styles.css | 3 +- .../js/apps/account/components/Password.js | 7 +- .../js/apps/account/components/UserCard.js | 4 +- .../notifications/GlobalNotifications.js | 8 +- .../notifications/NotificationsList.js | 12 +- .../notifications/ProjectNotifications.js | 12 +- .../js/apps/account/notifications/Projects.js | 8 +- .../organizations/CreateOrganizationForm.js | 4 +- .../account/organizations/OrganizationCard.js | 4 +- .../organizations/OrganizationsList.js | 4 +- .../organizations/UserOrganizations.js | 4 +- .../account/profile/UserExternalIdentity.js | 7 +- .../js/apps/account/profile/UserGroups.js | 8 +- .../apps/account/profile/UserScmAccounts.js | 8 +- .../js/apps/account/projects/ProjectCard.js | 8 +- .../main/js/apps/account/projects/Projects.js | 4 +- .../components/BackgroundTasksApp.js | 2 +- .../background-tasks/components/DateFilter.js | 3 +- .../components/ScannerContext.js | 6 +- .../background-tasks/components/Search.js | 23 +- .../background-tasks/components/Stacktrace.js | 28 +- .../components/TaskComponent.js | 4 +- .../background-tasks/components/TaskDate.js | 6 +- .../background-tasks/components/TaskStatus.js | 18 +- .../apps/background-tasks/components/Tasks.js | 32 +- .../components/TypesFilter.js | 6 +- .../js/apps/code/components/Breadcrumbs.js | 4 +- .../main/js/apps/code/components/Component.js | 4 +- .../js/apps/code/components/ComponentName.js | 20 +- .../js/apps/code/components/Components.js | 4 +- .../apps/code/components/ComponentsHeader.js | 4 +- .../src/main/js/apps/coding-rules/init.js | 12 +- .../coding-rules/rule/rule-issues-view.js | 3 +- .../components/LeakPeriodLegend.js | 6 +- .../details/MeasureDetailsHeader.js | 1 - .../details/drilldown/Breadcrumb.js | 11 +- .../details/drilldown/Breadcrumbs.js | 9 +- .../details/drilldown/ComponentCell.js | 5 +- .../details/drilldown/ComponentsList.js | 16 +- .../details/drilldown/ComponentsListRow.js | 4 +- .../details/drilldown/ListView.js | 26 +- .../details/drilldown/TreeView.js | 26 +- .../component-measures/home/AllMeasures.js | 4 +- .../js/apps/component-measures/home/Home.js | 4 +- .../component-measures/home/MeasuresList.js | 4 +- .../js/apps/component-measures/styles.css | 9 +- .../src/main/js/apps/issues/actions.js | 5 +- .../src/main/js/apps/issues/components/App.js | 9 +- .../apps/issues/components/BulkChangeModal.js | 68 ++-- .../apps/issues/components/FiltersHeader.js | 4 +- .../apps/issues/components/IssuesCounter.js | 14 +- .../js/apps/issues/components/IssuesList.js | 4 +- .../issues/components/IssuesSourceViewer.js | 14 +- .../conciseIssuesList/ConciseIssueBox.js | 7 +- .../ConciseIssueComponent.js | 5 +- .../ConciseIssueLocationBadge.js | 3 +- .../ConciseIssueLocationsNavigator.js | 11 +- .../conciseIssuesList/ConciseIssuesList.js | 4 +- .../js/apps/issues/sidebar/AssigneeFacet.js | 4 +- .../js/apps/issues/sidebar/AuthorFacet.js | 4 +- .../apps/issues/sidebar/CreationDateFacet.js | 16 +- .../js/apps/issues/sidebar/DirectoryFacet.js | 4 +- .../main/js/apps/issues/sidebar/FacetMode.js | 4 +- .../main/js/apps/issues/sidebar/FileFacet.js | 4 +- .../js/apps/issues/sidebar/LanguageFacet.js | 4 +- .../js/apps/issues/sidebar/ModuleFacet.js | 4 +- .../js/apps/issues/sidebar/ProjectFacet.js | 4 +- .../main/js/apps/issues/sidebar/RuleFacet.js | 4 +- .../js/apps/issues/sidebar/StatusFacet.js | 4 +- .../main/js/apps/issues/sidebar/TagFacet.js | 4 +- .../main/js/apps/issues/sidebar/TypeFacet.js | 6 +- .../issues/sidebar/components/FacetHeader.js | 8 +- .../issues/sidebar/components/FacetItem.js | 16 +- .../components/__tests__/FacetBox-test.js | 8 +- .../__tests__/FacetItemsList-test.js | 8 +- .../src/main/js/apps/issues/styles.css | 6 +- .../organizations/components/MembersList.js | 4 +- .../components/MembersListHeader.js | 3 +- .../components/MembersListItem.js | 12 +- .../components/OrganizationDelete.js | 18 +- .../components/OrganizationEdit.js | 8 +- .../components/OrganizationGroupCheckbox.js | 3 +- .../components/forms/AddMemberForm.js | 8 +- .../forms/ManageMemberGroupsForm.js | 15 +- .../components/forms/RemoveMemberForm.js | 4 +- .../navigation/OrganizationNavigation.js | 4 +- .../apps/overview/components/EmptyOverview.js | 8 +- .../overview/components/LeakPeriodLegend.js | 4 +- .../main/js/apps/overview/events/Analysis.js | 4 +- .../src/main/js/apps/overview/events/Event.js | 13 +- .../js/apps/overview/events/PreviewGraph.js | 5 +- .../events/PreviewGraphTooltipsContent.js | 4 +- .../overview/main/BugsAndVulnerabilities.js | 9 +- .../main/js/apps/overview/main/CodeSmells.js | 1 - .../main/js/apps/overview/main/Coverage.js | 54 +-- .../js/apps/overview/main/Duplications.js | 54 +-- .../src/main/js/apps/overview/main/enhance.js | 11 +- .../main/js/apps/overview/meta/MetaSize.js | 4 +- .../qualityGate/QualityGateCondition.js | 2 +- .../qualityGate/QualityGateConditions.js | 4 +- .../src/main/js/apps/overview/styles.css | 10 +- .../components/ActionsCell.js | 28 +- .../components/Defaults.js | 7 +- .../permission-templates/components/List.js | 8 +- .../components/ListHeader.js | 8 +- .../components/ListItem.js | 4 +- .../components/NameCell.js | 4 +- .../components/PermissionCell.js | 10 +- .../components/Template.js | 2 - .../global/components/AllHoldersList.js | 9 +- .../global/components/PageHeader.js | 8 +- .../project/components/AllHoldersList.js | 2 - .../permissions/project/components/App.js | 55 +-- .../project/components/PageHeader.js | 16 +- .../components/PublicProjectDisclaimer.js | 10 +- .../shared/components/GroupHolder.js | 8 +- .../shared/components/HoldersList.js | 22 +- .../shared/components/SearchForm.js | 1 - .../shared/components/UserHolder.js | 18 +- .../src/main/js/apps/permissions/styles.css | 3 +- .../js/apps/project-admin/deletion/Form.js | 4 +- .../project-admin/key/BulkUpdateResults.js | 12 +- .../project-admin/key/FineGrainedUpdate.js | 8 +- .../js/apps/project-admin/key/UpdateForm.js | 3 +- .../js/apps/project-admin/links/LinkRow.js | 26 +- .../main/js/apps/project-admin/links/Table.js | 8 +- .../apps/project-admin/quality-gate/Form.js | 4 +- .../quality-profiles/ProfileRow.js | 12 +- .../project-admin/quality-profiles/Table.js | 16 +- .../js/apps/project-admin/store/actions.js | 7 +- .../projectActivity/__tests__/utils-test.js | 4 +- .../apps/projectActivity/components/Event.js | 4 +- .../projectActivity/components/EventInner.js | 7 +- .../apps/projectActivity/components/Events.js | 4 +- .../components/GraphsHistory.js | 5 +- .../components/GraphsLegendStatic.js | 4 +- .../components/GraphsTooltipsContent.js | 4 +- .../GraphsTooltipsContentCoverage.js | 14 +- .../GraphsTooltipsContentDuplication.js | 10 +- .../components/GraphsTooltipsContentEvents.js | 10 +- .../GraphsTooltipsContentOverview.js | 8 +- .../projectActivity/components/GraphsZoom.js | 5 +- .../components/ProjectActivityAnalysesList.js | 21 +- .../components/ProjectActivityAnalysis.js | 5 +- .../ProjectActivityEventSelectOption.js | 4 +- .../ProjectActivityEventSelectValue.js | 4 +- .../components/forms/AddEventForm.js | 13 +- .../components/forms/AddGraphMetric.js | 8 +- .../components/forms/ChangeEventForm.js | 13 +- .../components/forms/RemoveAnalysisForm.js | 5 +- .../components/forms/RemoveEventForm.js | 5 +- .../components/projectActivity.css | 12 +- .../src/main/js/apps/projectActivity/utils.js | 2 +- .../js/apps/projects-admin/AppContainer.js | 4 +- .../projects-admin/ChangeVisibilityForm.js | 14 +- .../apps/projects-admin/CreateProjectForm.js | 21 +- .../src/main/js/apps/projects-admin/header.js | 11 +- .../main/js/apps/projects-admin/projects.js | 16 +- .../views/BulkApplyTemplateView.js | 7 +- .../apps/projects/components/AllProjects.js | 14 +- .../apps/projects/components/EmptyInstance.js | 4 +- .../projects/components/NoFavoriteProjects.js | 8 +- .../js/apps/projects/components/PageHeader.js | 3 +- .../apps/projects/components/PageSidebar.js | 4 +- .../projects/components/PerspectiveSelect.js | 4 +- .../components/ProjectCardLanguages.js | 11 +- .../projects/components/ProjectCardLeak.js | 4 +- .../projects/components/ProjectCardOverall.js | 4 +- .../apps/projects/components/ProjectsList.js | 4 +- .../components/ProjectsSortingSelect.js | 4 +- .../apps/projects/filters/CoverageFilter.js | 4 +- .../projects/filters/DuplicationsFilter.js | 4 +- .../main/js/apps/projects/filters/Filter.js | 5 +- .../js/apps/projects/filters/IssuesFilter.js | 4 +- .../apps/projects/filters/LanguagesFilter.js | 5 +- .../projects/filters/NewReliabilityFilter.js | 5 +- .../filters/SearchableFilterOption.js | 6 +- .../projects/visualizations/RatingsLegend.js | 4 +- .../js/apps/projects/visualizations/Risk.js | 29 +- .../visualizations/SimpleBubbleChart.js | 24 +- .../projects/visualizations/Visualizations.js | 4 +- .../quality-gates/components/Condition.js | 7 +- .../quality-gates/components/Conditions.js | 16 +- .../components/ConditionsAlert.js | 12 +- .../quality-gates/components/DetailsHeader.js | 4 +- .../js/apps/quality-gates/components/Intro.js | 8 +- .../js/apps/quality-gates/components/List.js | 8 +- .../quality-gates/components/ListHeader.js | 4 +- .../src/main/js/apps/quality-gates/styles.css | 2 +- .../quality-profiles/changelog/Changelog.js | 28 +- .../quality-profiles/changelog/ChangesList.js | 4 +- .../changelog/SeverityChange.js | 3 +- .../compare/ComparisonResults.js | 61 ++-- .../components/BuiltInBadge.js | 9 +- .../components/CopyProfileForm.js | 9 +- .../components/DeleteProfileForm.js | 6 +- .../components/ProfileDate.js | 6 +- .../components/RenameProfileForm.js | 9 +- .../details/ChangeParentForm.js | 6 +- .../details/ChangeProjectsForm.js | 10 +- .../details/ProfileExporters.js | 8 +- .../quality-profiles/details/ProfileHeader.js | 16 +- .../details/ProfileInheritance.js | 8 +- .../details/ProfileProjects.js | 8 +- .../quality-profiles/details/ProfileRules.js | 16 +- .../home/CreateProfileForm.js | 21 +- .../home/EvolutionDeprecated.js | 8 +- .../quality-profiles/home/EvolutionRules.js | 11 +- .../home/EvolutionStagnant.js | 8 +- .../quality-profiles/home/ProfilesList.js | 11 +- .../home/ProfilesListHeader.js | 4 +- .../quality-profiles/home/ProfilesListRow.js | 12 +- .../home/RestoreProfileForm.js | 41 ++- .../main/js/apps/quality-profiles/styles.css | 6 +- .../main/js/apps/quality-profiles/utils.js | 2 +- .../js/apps/sessions/components/LoginForm.js | 28 +- .../components/SimpleSessionsContainer.js | 6 +- .../apps/sessions/components/Unauthorized.js | 2 +- .../settings/components/CategoriesList.js | 9 +- .../settings/components/DefinitionDefaults.js | 8 +- .../settings/components/DefinitionsList.js | 4 +- .../js/apps/settings/components/EmailForm.js | 4 +- .../js/apps/settings/components/PageHeader.js | 22 +- .../components/SubCategoryDefinitionsList.js | 8 +- .../apps/settings/components/WildcardsHelp.js | 4 +- .../components/inputs/InputForBoolean.js | 5 +- .../components/inputs/InputForPassword.js | 4 +- .../components/inputs/PropertySetInput.js | 12 +- .../apps/settings/encryption/EncryptionApp.js | 4 +- .../settings/encryption/EncryptionForm.js | 6 +- .../encryption/GenerateSecretKeyForm.js | 34 +- .../settings/licenses/LicenseChangeForm.js | 12 +- .../js/apps/settings/licenses/LicenseRow.js | 12 +- .../settings/licenses/LicensesAppHeader.js | 4 +- .../js/apps/settings/licenses/LicensesList.js | 24 +- .../js/apps/settings/serverId/ServerIdApp.js | 20 +- .../src/main/js/apps/settings/styles.css | 6 +- .../src/main/js/apps/system/item-log-level.js | 21 +- .../src/main/js/apps/system/item-object.js | 12 +- .../src/main/js/apps/system/item-value.js | 6 +- .../sonar-web/src/main/js/apps/system/main.js | 16 +- .../src/main/js/apps/system/section.js | 8 +- .../apps/tutorials/onboarding/AnalysisStep.js | 27 +- .../apps/tutorials/onboarding/LanguageStep.js | 24 +- .../onboarding/NewOrganizationForm.js | 8 +- .../tutorials/onboarding/NewProjectForm.js | 8 +- .../apps/tutorials/onboarding/Onboarding.js | 4 +- .../tutorials/onboarding/OrganizationStep.js | 23 +- .../tutorials/onboarding/ProjectKeyStep.js | 8 +- .../main/js/apps/tutorials/onboarding/Step.js | 8 +- .../js/apps/tutorials/onboarding/TokenStep.js | 20 +- .../tutorials/onboarding/commands/Command.js | 4 +- .../onboarding/commands/JavaGradle.js | 4 +- .../onboarding/commands/JavaMaven.js | 8 +- .../onboarding/commands/MSBuildScanner.js | 4 +- .../js/apps/tutorials/onboarding/styles.css | 6 +- .../users/components/UsersSelectSearch.js | 7 +- .../components/UsersSelectSearchOption.js | 8 +- .../components/UsersSelectSearchValue.js | 8 +- .../__tests__/UsersSelectSearchOption-test.js | 8 +- .../__tests__/UsersSelectSearchValue-test.js | 8 +- .../main/js/apps/web-api/components/Action.js | 5 +- .../web-api/components/ActionChangelog.js | 4 +- .../main/js/apps/web-api/components/Domain.js | 8 +- .../main/js/apps/web-api/components/Menu.js | 4 +- .../main/js/apps/web-api/components/Params.js | 32 +- .../web-api/components/ResponseExample.js | 5 +- .../js/apps/web-api/components/WebApiApp.js | 4 +- .../main/js/apps/web-api/styles/web-api.css | 3 +- .../components/SourceViewer/SourceViewer.js | 8 +- .../SourceViewer/SourceViewerCode.js | 22 +- .../SourceViewer/SourceViewerHeader.js | 8 +- .../SourceViewer/components/Line.js | 6 +- .../SourceViewer/components/LineCode.js | 29 +- .../components/LineIssuesIndicator.js | 5 +- .../SourceViewer/components/LineIssuesList.js | 4 +- .../SourceViewer/helpers/highlight.js | 18 +- .../js/components/charts/AdvancedTimeline.js | 23 +- .../main/js/components/charts/BubbleChart.js | 42 ++- .../src/main/js/components/charts/Timeline.js | 18 +- .../main/js/components/charts/ZoomTimeLine.js | 43 ++- .../main/js/components/charts/bar-chart.js | 18 +- .../main/js/components/charts/histogram.js | 18 +- .../main/js/components/charts/line-chart.js | 36 +- .../components/charts/treemap-breadcrumbs.js | 4 +- .../main/js/components/charts/word-cloud.js | 10 +- .../js/components/common/BubblePopupHelper.js | 2 +- .../main/js/components/common/EmptySearch.js | 13 +- .../main/js/components/common/FavoriteIcon.js | 6 +- .../main/js/components/common/MarkdownTips.js | 12 +- .../main/js/components/common/MultiSelect.js | 8 +- .../js/components/common/MultiSelectOption.js | 3 +- .../main/js/components/common/SelectList.js | 4 +- .../common/UpgradeOrganizationBox.js | 8 +- .../components/common/VisibilitySelector.js | 12 +- .../common/__tests__/BubblePopup-test.js | 6 +- .../common/__tests__/DeferredSpinner-test.js | 12 +- .../common/__tests__/SelectList-test.js | 8 +- .../common/__tests__/SelectListItem-test.js | 3 +- .../js/components/controls/RadioToggle.js | 4 +- .../main/js/components/controls/styles.css | 2 +- .../src/main/js/components/issue/IssueView.js | 4 +- .../issue/components/IssueChangelog.js | 4 +- .../issue/components/IssueChangelogDiff.js | 6 +- .../issue/components/IssueCommentLine.js | 4 +- .../issue/components/IssueTitleBar.js | 4 +- .../issue/components/SimilarIssuesFilter.js | 3 +- .../components/issue/popups/ChangelogPopup.js | 4 +- .../issue/popups/CommentDeletePopup.js | 8 +- .../issue/popups/SetAssigneePopup.js | 4 +- .../issue/popups/SetIssueTagsPopup.js | 2 +- .../issue/popups/SetSeverityPopup.js | 4 +- .../components/issue/popups/SetTypePopup.js | 4 +- .../issue/popups/SimilarIssuesPopup.js | 8 +- .../main/js/components/select-list/footer.js | 6 +- .../main/js/components/select-list/list.js | 6 +- .../main/js/components/shared/StatusHelper.js | 8 +- .../main/js/components/shared/TypeHelper.js | 5 +- .../js/components/shared/drilldown-link.js | 12 +- .../src/main/js/components/tags/TagsList.js | 4 +- .../main/js/components/ui/IssueTypeIcon.js | 6 +- .../src/main/js/components/ui/Level.js | 6 +- .../main/js/components/ui/OrganizationLink.js | 18 +- .../src/main/js/components/ui/Rating.js | 6 +- .../src/main/js/components/ui/SizeRating.js | 6 +- .../main/js/components/widgets/barchart.js | 5 +- .../sonar-web/src/main/js/helpers/latinize.js | 75 +++-- server/sonar-web/src/main/js/helpers/query.js | 12 +- .../src/main/js/helpers/scrolling.js | 5 +- .../src/main/js/store/globalMessages/duck.js | 3 +- .../js/store/organizationsMembers/reducer.js | 2 +- .../src/main/less/components/alerts.less | 24 +- .../src/main/less/components/badges.less | 36 +- .../main/less/components/bubble-popup.less | 4 +- .../src/main/less/components/columns.less | 6 +- .../main/less/components/component-name.less | 2 - .../src/main/less/components/dropdowns.less | 1 - .../src/main/less/components/graphics.less | 32 +- .../src/main/less/components/issues.less | 13 +- .../src/main/less/components/measures.less | 3 - .../src/main/less/components/menu.less | 22 +- .../src/main/less/components/modals.less | 10 +- .../src/main/less/components/navbar.less | 9 +- .../main/less/components/navigator/base.less | 57 ++-- .../less/components/navigator/config.less | 2 - .../less/components/navigator/filters.less | 26 +- .../src/main/less/components/page.less | 3 +- .../src/main/less/components/pills.less | 1 - .../main/less/components/react-select.less | 16 +- .../less/components/search-navigator.less | 69 ++-- .../src/main/less/components/source.less | 15 +- .../src/main/less/components/tooltips.less | 13 +- .../src/main/less/components/typography.less | 21 +- .../src/main/less/components/ui.less | 17 +- .../src/main/less/components/workspace.less | 11 +- server/sonar-web/src/main/less/init/base.less | 55 ++- .../sonar-web/src/main/less/init/forms.less | 55 ++- .../sonar-web/src/main/less/init/icons.less | 176 ++++++---- .../sonar-web/src/main/less/init/links.less | 63 ++-- .../sonar-web/src/main/less/init/lists.less | 17 +- server/sonar-web/src/main/less/init/misc.less | 259 ++++++++++---- .../sonar-web/src/main/less/init/tables.less | 31 +- server/sonar-web/src/main/less/init/type.less | 155 ++++++--- .../src/main/less/pages/coding-rules.less | 41 ++- .../sonar-web/src/main/less/pages/login.less | 11 +- server/sonar-web/yarn.lock | 315 ++---------------- 410 files changed, 3278 insertions(+), 2178 deletions(-) diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index 6b892cf526f..00b255d3206 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -48,7 +48,7 @@ "jsx-quotes": 2, "key-spacing": 2, "keyword-spacing": 2, - "max-len": [2, 100], + // "max-len": [2, 100], "new-parens": 2, "no-lonely-if": 2, "no-multi-spaces": 2, @@ -71,7 +71,7 @@ "prefer-const": 2, "prefer-spread": 2, "quote-props": [2, "as-needed"], - "quotes": [2, "single"], + "quotes": [2, "single", { "avoidEscape": true }], "rest-spread-spacing": 2, "semi": [2, "always"], "semi-spacing": 2, diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json index bf0c0af035b..7405c034c03 100644 --- a/server/sonar-web/package.json +++ b/server/sonar-web/package.json @@ -57,7 +57,7 @@ "css-loader": "0.28.4", "enzyme": "^2.6.0", "enzyme-to-json": "^1.4.5", - "eslint": "^3.12.2", + "eslint": "3.14.1", "eslint-loader": "1.8.0", "eslint-plugin-flowtype": "^2.29.1", "eslint-plugin-import": "^2.2.0", @@ -73,10 +73,7 @@ "less": "2.7.1", "less-loader": "4.0.4", "postcss-loader": "2.0.6", - "prettier": "1.2.2", - "prettier-css": "0.0.7", - "prettier-eslint": "5.1.0", - "prettier-eslint-cli": "3.4.1", + "prettier": "1.5.2", "react-addons-test-utils": "15.4.2", "react-dev-utils": "3.0.0", "react-error-overlay": "1.0.7", @@ -92,8 +89,7 @@ "build": "node scripts/build.js", "test": "node scripts/test.js", "coverage": "npm test -- --coverage", - "format": "prettier-eslint --write \"src/main/js/!(libs)/**/*.js\"", - "format-css": "prettier-css \"src/main/js/**/*.css\"", + "format": "prettier --write --single-quote --jsx-bracket-same-line --print-width 100 'src/main/{js,less}/!(libs)/**/*.{js,css,less}'", "lint": "eslint src/main/js", "typecheck": "flow src/main/js", "validate": "eslint src/main/js && flow check src/main/js && NODE_ENV=test jest" @@ -110,15 +106,8 @@ ], "jest": { "coverageDirectory": "/target/coverage", - "coveragePathIgnorePatterns": [ - "/node_modules", - "/tests" - ], - "moduleFileExtensions": [ - "jsx", - "js", - "json" - ], + "coveragePathIgnorePatterns": ["/node_modules", "/tests"], + "moduleFileExtensions": ["jsx", "js", "json"], "moduleNameMapper": { "^.+\\.(hbs|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/config/jest/FileStub.js", "^.+\\.css$": "/config/jest/CSSStub.js" @@ -127,9 +116,7 @@ "/config/polyfills.js", "/config/jest/SetupTestEnvironment.js" ], - "snapshotSerializers": [ - "enzyme-to-json/serializer" - ], + "snapshotSerializers": ["enzyme-to-json/serializer"], "testPathIgnorePatterns": [ "/node_modules", "/src/main/webapp", diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js index 60d33b1f346..8c94bf752f4 100644 --- a/server/sonar-web/src/main/js/api/components.js +++ b/server/sonar-web/src/main/js/api/components.js @@ -47,14 +47,12 @@ export function deleteProject(project: string) { return post(url, data); } -export function createProject( - data: { - branch?: string, - name: string, - project: string, - organization?: string - } -) { +export function createProject(data: { + branch?: string, + name: string, + project: string, + organization?: string +}) { const url = '/api/projects/create'; return postJSON(url, data).catch(throwGlobalError); } diff --git a/server/sonar-web/src/main/js/api/issues.js b/server/sonar-web/src/main/js/api/issues.js index 92e3c94912d..30cb211e96e 100644 --- a/server/sonar-web/src/main/js/api/issues.js +++ b/server/sonar-web/src/main/js/api/issues.js @@ -117,9 +117,10 @@ export function editIssueComment(data: { comment: string, text: string }): Promi return postJSON(url, data); } -export function setIssueAssignee( - data: { issue: string, assignee?: string } -): Promise { +export function setIssueAssignee(data: { + issue: string, + assignee?: string +}): Promise { const url = '/api/issues/assign'; return postJSON(url, data); } @@ -134,9 +135,10 @@ export function setIssueTags(data: { issue: string, tags: string }): Promise { +export function setIssueTransition(data: { + issue: string, + transition: string +}): Promise { const url = '/api/issues/do_transition'; return postJSON(url, data); } diff --git a/server/sonar-web/src/main/js/api/organizations.js b/server/sonar-web/src/main/js/api/organizations.js index 7ca0263ba81..8daf98ac96d 100644 --- a/server/sonar-web/src/main/js/api/organizations.js +++ b/server/sonar-web/src/main/js/api/organizations.js @@ -63,9 +63,13 @@ export const updateOrganization = (key: string, changes: {}) => export const deleteOrganization = (key: string) => post('/api/organizations/delete', { key }).catch(throwGlobalError); -export const searchMembers = ( - data: { organization?: string, p?: number, ps?: number, q?: string, selected?: string } -) => getJSON('/api/organizations/search_members', data); +export const searchMembers = (data: { + organization?: string, + p?: number, + ps?: number, + q?: string, + selected?: string +}) => getJSON('/api/organizations/search_members', data); export const addMember = (data: { login: string, organization: string }) => postJSON('/api/organizations/add_member', data).then(r => r.user); diff --git a/server/sonar-web/src/main/js/api/permissions.js b/server/sonar-web/src/main/js/api/permissions.js index f002618224a..9598197dfe7 100644 --- a/server/sonar-web/src/main/js/api/permissions.js +++ b/server/sonar-web/src/main/js/api/permissions.js @@ -130,26 +130,22 @@ export function bulkApplyTemplate(data: Object) { return post(url, data); } -export function grantTemplatePermissionToUser( - data: { - templateId: string, - login: string, - permission: string, - organization?: string - } -) { +export function grantTemplatePermissionToUser(data: { + templateId: string, + login: string, + permission: string, + organization?: string +}) { const url = '/api/permissions/add_user_to_template'; return post(url, data); } -export function revokeTemplatePermissionFromUser( - data: { - templateId: string, - login: string, - permission: string, - organization?: string - } -) { +export function revokeTemplatePermissionFromUser(data: { + templateId: string, + login: string, + permission: string, + organization?: string +}) { const url = '/api/permissions/remove_user_from_template'; return post(url, data); } diff --git a/server/sonar-web/src/main/js/api/user_groups.js b/server/sonar-web/src/main/js/api/user_groups.js index de515f119b0..fdbe521e94f 100644 --- a/server/sonar-web/src/main/js/api/user_groups.js +++ b/server/sonar-web/src/main/js/api/user_groups.js @@ -20,23 +20,33 @@ //@flow import { getJSON, post } from '../helpers/request'; -export function searchUsersGroups( - data: { f?: string, organization?: string, p?: number, ps?: number, q?: string } -) { +export function searchUsersGroups(data: { + f?: string, + organization?: string, + p?: number, + ps?: number, + q?: string +}) { const url = '/api/user_groups/search'; return getJSON(url, data); } -export function addUserToGroup( - data: { id?: string, name?: string, login?: string, organization?: string } -) { +export function addUserToGroup(data: { + id?: string, + name?: string, + login?: string, + organization?: string +}) { const url = '/api/user_groups/add_user'; return post(url, data); } -export function removeUserFromGroup( - data: { id?: string, name?: string, login?: string, organization?: string } -) { +export function removeUserFromGroup(data: { + id?: string, + name?: string, + login?: string, + organization?: string +}) { const url = '/api/user_groups/remove_user'; return post(url, data); } diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.js b/server/sonar-web/src/main/js/app/components/GlobalFooter.js index 5cfa781fbd9..a6a0c34dd45 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.js +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.js @@ -60,9 +60,13 @@ export default function GlobalFooter({ sonarqubeVersion && translateWithParameters('footer.version_x', sonarqubeVersion)} {!hideLoggedInInfo && sonarqubeVersion && ' - '} - {translate('footer.licence')} + + {translate('footer.licence')} + {' - '} - {translate('footer.community')} + + {translate('footer.community')} + {' - '} {translate('footer.documentation')} @@ -76,9 +80,15 @@ export default function GlobalFooter({ {translate('footer.plugins')} {!hideLoggedInInfo && ' - '} - {!hideLoggedInInfo && {translate('footer.web_api')}} + {!hideLoggedInInfo && + + {translate('footer.web_api')} + } {!hideLoggedInInfo && ' - '} - {!hideLoggedInInfo && {translate('footer.about')}} + {!hideLoggedInInfo && + + {translate('footer.about')} + } ); diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.js b/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.js index bfe622734c1..5e7d3719a3c 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.js +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterBranding.js @@ -23,13 +23,14 @@ import React from 'react'; export default function GlobalFooterBranding() { return (
- This application is based on - {' '} - SonarQube™ - {' '} - but is not an official version provided by - {' '} - SonarSource SA. + This application is based on{' '} + + SonarQube™ + {' '} + but is not an official version provided by{' '} + + SonarSource SA + .
); } diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js b/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js index ab8ec94f97a..f2763723da2 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/app/components/GlobalFooterForSonarQubeDotCom.js @@ -26,24 +26,37 @@ export default function GlobalFooterForSonarQubeDotCom() { return ( ); diff --git a/server/sonar-web/src/main/js/app/components/MarkdownHelp.js b/server/sonar-web/src/main/js/app/components/MarkdownHelp.js index e957fe31bdd..a5ac92da031 100644 --- a/server/sonar-web/src/main/js/app/components/MarkdownHelp.js +++ b/server/sonar-web/src/main/js/app/components/MarkdownHelp.js @@ -34,20 +34,26 @@ export default function MarkdownHelp() { *this text is bold* - this text is bold + + this text is bold + - {'http://sonarqube.org'} + + {'http://sonarqube.org'} + - {'http://sonarqube.org'} + + {'http://sonarqube.org'} + - - [SonarQube™ Home Page](http://www.sonarqube.org) - + [SonarQube™ Home Page](http://www.sonarqube.org) - SonarQube™ Home Page + + SonarQube™ Home Page + @@ -94,15 +100,20 @@ export default function MarkdownHelp() { ``Lists#newArrayList()`` - Lists#newArrayList() + + Lists#newArrayList() + ``
// code on multiple lines
- {'public void foo() {'}
-   {'// do some logic here'}
- {'}'}
+ {'public void foo() {'} +
+   {'// do some logic here'} +
+ {'}'} +
`` diff --git a/server/sonar-web/src/main/js/app/components/NotFound.js b/server/sonar-web/src/main/js/app/components/NotFound.js index c3191e6b8ea..b3254b82fbc 100644 --- a/server/sonar-web/src/main/js/app/components/NotFound.js +++ b/server/sonar-web/src/main/js/app/components/NotFound.js @@ -25,10 +25,10 @@ export default function NotFound() { return (

The page you were looking for does not exist.

-

- You may have mistyped the address or the page may have moved. +

You may have mistyped the address or the page may have moved.

+

+ Go back to the homepage

-

Go back to the homepage

); } diff --git a/server/sonar-web/src/main/js/app/components/ProjectContainer.js b/server/sonar-web/src/main/js/app/components/ProjectContainer.js index 472f974fa03..06898e30d8d 100644 --- a/server/sonar-web/src/main/js/app/components/ProjectContainer.js +++ b/server/sonar-web/src/main/js/app/components/ProjectContainer.js @@ -41,7 +41,7 @@ class ProjectContainer extends React.PureComponent { qualifier: string }, fetchProject: string => Promise<*>, - receiveComponents: Array<*> => void + receiveComponents: (Array<*>) => void }; componentDidMount() { diff --git a/server/sonar-web/src/main/js/app/components/extensions/ExtensionNotFound.js b/server/sonar-web/src/main/js/app/components/extensions/ExtensionNotFound.js index a634c3556d2..330b818f931 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/ExtensionNotFound.js +++ b/server/sonar-web/src/main/js/app/components/extensions/ExtensionNotFound.js @@ -44,7 +44,9 @@ export default class ExtensionNotFound extends React.PureComponent {

You may have mistyped the address or the page may have moved.

-

Go back to the homepage

+

+ Go back to the homepage +

); diff --git a/server/sonar-web/src/main/js/app/components/help/GlobalHelp.js b/server/sonar-web/src/main/js/app/components/help/GlobalHelp.js index 6f941b93f4b..ffc57095a47 100644 --- a/server/sonar-web/src/main/js/app/components/help/GlobalHelp.js +++ b/server/sonar-web/src/main/js/app/components/help/GlobalHelp.js @@ -68,7 +68,7 @@ export default class GlobalHelp extends React.PureComponent { } }; - renderMenuItem = (section: string) => ( + renderMenuItem = (section: string) =>
  • {translate('help.section', section)} -
  • - ); + ; - renderMenu = () => ( + renderMenu = () =>
      {(this.props.currentUser.isLoggedIn ? ['shortcuts', 'tutorials', 'links'] : ['shortcuts', 'links']).map(this.renderMenuItem)} -
    - ); + ; render() { return ( @@ -96,9 +94,10 @@ export default class GlobalHelp extends React.PureComponent { className="modal modal-medium" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {translate('help')}

    +

    + {translate('help')} +

    @@ -115,7 +114,6 @@ export default class GlobalHelp extends React.PureComponent { {translate('close')}
    - ); } diff --git a/server/sonar-web/src/main/js/app/components/help/LinksHelp.js b/server/sonar-web/src/main/js/app/components/help/LinksHelp.js index b84c28222d5..c541d5fd7a5 100644 --- a/server/sonar-web/src/main/js/app/components/help/LinksHelp.js +++ b/server/sonar-web/src/main/js/app/components/help/LinksHelp.js @@ -27,10 +27,14 @@ type Props = { onClose: () => void }; export default function LinksHelp({ onClose }: Props) { return (
    -

    {translate('help.section.links')}

    +

    + {translate('help.section.links')} +

    - {translate('footer.community')} + + {translate('footer.community')} +

    @@ -52,11 +56,15 @@ export default function LinksHelp({ onClose }: Props) {

    - {translate('footer.web_api')} + + {translate('footer.web_api')} +

    - {translate('footer.about')} + + {translate('footer.about')} +

    ); diff --git a/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js b/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js index ac2a737796e..3ce8b842da5 100644 --- a/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js +++ b/server/sonar-web/src/main/js/app/components/help/LinksHelpSonarCloud.js @@ -27,34 +27,50 @@ type Props = { onClose: () => void }; export default function LinksHelpSonarCloud({ onClose }: Props) { return (
    -

    {translate('help.section.links')}

    +

    + {translate('help.section.links')} +

    - {translate('footer.news')} + + {translate('footer.news')} +

    - {translate('footer.terms')} + + {translate('footer.terms')} +

    - {translate('footer.twitter')} + + {translate('footer.twitter')} +

    - {translate('footer.get_started')} + + {translate('footer.get_started')} +

    - {translate('footer.help')} + + {translate('footer.help')} +

    - {translate('footer.web_api')} + + {translate('footer.web_api')} +

    - {translate('footer.about')} + + {translate('footer.about')} +

    ); diff --git a/server/sonar-web/src/main/js/app/components/help/ShortcutsHelp.js b/server/sonar-web/src/main/js/app/components/help/ShortcutsHelp.js index 1787524f5dc..feb27478d89 100644 --- a/server/sonar-web/src/main/js/app/components/help/ShortcutsHelp.js +++ b/server/sonar-web/src/main/js/app/components/help/ShortcutsHelp.js @@ -24,12 +24,16 @@ import { translate } from '../../../helpers/l10n'; export default function ShortcutsHelp() { return (
    -

    {translate('help.section.shortcuts')}

    +

    + {translate('help.section.shortcuts')} +

    -

    {translate('shortcuts.section.global')}

    +

    + {translate('shortcuts.section.global')} +

    • s @@ -42,7 +46,9 @@ export default function ShortcutsHelp() {
    -

    {translate('shortcuts.section.rules')}

    +

    + {translate('shortcuts.section.rules')} +

    • ↑ @@ -69,7 +75,9 @@ export default function ShortcutsHelp() {
    -

    {translate('shortcuts.section.issues')}

    +

    + {translate('shortcuts.section.issues')} +

    • ↑ diff --git a/server/sonar-web/src/main/js/app/components/help/TutorialsHelp.js b/server/sonar-web/src/main/js/app/components/help/TutorialsHelp.js index 5202060d984..82cc931e9f5 100644 --- a/server/sonar-web/src/main/js/app/components/help/TutorialsHelp.js +++ b/server/sonar-web/src/main/js/app/components/help/TutorialsHelp.js @@ -31,8 +31,12 @@ export default function TutorialsHelp({ onTutorialSelect }: Props) { return (
      -

      {translate('help.section.tutorials')}

      - {translate('tutorials.onboarding')} +

      + {translate('help.section.tutorials')} +

      + + {translate('tutorials.onboarding')} +
      ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js index 42c3efaa232..c719a568c70 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBreadcrumbs.js @@ -61,8 +61,12 @@ class ComponentNavBreadcrumbs extends React.PureComponent { to={{ pathname: '/dashboard', query: { id: item.key } }} className="link-base-color"> {index === breadcrumbs.length - 1 - ? {itemName} - : {itemName}} + ? + {itemName} + + : + {itemName} + } {index < breadcrumbs.length - 1 && } @@ -93,8 +97,8 @@ class ComponentNavBreadcrumbs extends React.PureComponent { } const mapStateToProps = (state, ownProps) => ({ - organization: ownProps.component.organization && - getOrganizationByKey(state, ownProps.component.organization), + organization: + ownProps.component.organization && getOrganizationByKey(state, ownProps.component.organization), shouldOrganizationBeDisplayed: areThereCustomOrganizations(state) }); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js index 78d72cb3943..fdad7ec0280 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js @@ -39,8 +39,7 @@ export default class ComponentNavMeta extends React.PureComponent { : translate('component_navigation.status.in_progress'); metaList.push(
    • - - {' '} + {' '} {translate('background_task.status.IN_PROGRESS')}
    • ); @@ -59,22 +58,34 @@ export default class ComponentNavMeta extends React.PureComponent { : translate('component_navigation.status.failed'); metaList.push(
    • - {translate('background_task.status.FAILED')} + + {translate('background_task.status.FAILED')} +
    • ); } if (this.props.analysisDate) { - metaList.push(
    • {moment(this.props.analysisDate).format('LLL')}
    • ); + metaList.push( +
    • + {moment(this.props.analysisDate).format('LLL')} +
    • + ); } if (this.props.version) { - metaList.push(
    • Version {this.props.version}
    • ); + metaList.push( +
    • + Version {this.props.version} +
    • + ); } return (
      -
        {metaList}
      +
        + {metaList} +
      ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js index 168ab4f188a..d0bac2720ea 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.js @@ -43,7 +43,9 @@ class GlobalNavBranding extends React.PureComponent { 'navbar-brand' + (this.props.customLogoUrl ? ' navbar-brand-custom' : ''); return (
      - {this.renderLogo()} + + {this.renderLogo()} +
      ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js index 0a88701f045..5b99dd06c92 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.js @@ -61,9 +61,10 @@ export default class GlobalNavMenu extends React.PureComponent { } renderIssuesLink() { - const query = this.props.currentUser.isLoggedIn && isMySet() - ? { resolved: 'false', myIssues: 'true' } - : { resolved: 'false' }; + const query = + this.props.currentUser.isLoggedIn && isMySet() + ? { resolved: 'false', myIssues: 'true' } + : { resolved: 'false' }; const active = this.props.location.pathname === 'issues'; return (
    • @@ -120,7 +121,9 @@ export default class GlobalNavMenu extends React.PureComponent { renderGlobalPageLink = ({ key, name }) => { return (
    • - {name} + + {name} +
    • ); }; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.js b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.js index a4e39e09398..72ae61d3b22 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.js @@ -123,7 +123,9 @@ export default class GlobalNavUser extends React.PureComponent {
      • - {currentUser.name} + + {currentUser.name} +
        {currentUser.email != null &&
      • - {translate('my_account.page')} + + {translate('my_account.page')} +
      • {hasOrganizations &&
      • } {hasOrganizations && -
      • {translate('my_organizations')}
      • } +
      • + {translate('my_organizations')} +
      • } {hasOrganizations && - sortBy(organizations, org => org.name.toLowerCase()).map(organization => ( + sortBy(organizations, org => org.name.toLowerCase()).map(organization =>
      • - {organization.name} + + {organization.name} +
      • - ))} + )} {hasOrganizations &&
      • }
      • - {translate('layout.logout')} + + {translate('layout.logout')} +
      } diff --git a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js index 50454783e43..88750547c4a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js +++ b/server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.js @@ -52,7 +52,9 @@ class SettingsNav extends React.PureComponent { renderExtension = ({ key, name }) => { return (
    • - {name} + + {name} +
    • ); }; diff --git a/server/sonar-web/src/main/js/app/components/search/Search.js b/server/sonar-web/src/main/js/app/components/search/Search.js index adfd90a8b83..04098668141 100644 --- a/server/sonar-web/src/main/js/app/components/search/Search.js +++ b/server/sonar-web/src/main/js/app/components/search/Search.js @@ -294,7 +294,7 @@ export default class Search extends React.PureComponent { this.nodes[component] = node; }; - renderResult = (component: Component) => ( + renderResult = (component: Component) => - ); + />; - renderNoResults = () => ( + renderNoResults = () =>
      {translateWithParameters('no_results_for_x', this.state.query)} -
      - ); +
    ; render() { const dropdownClassName = classNames('dropdown', 'navbar-search', { open: this.state.open }); diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResult.js b/server/sonar-web/src/main/js/app/components/search/SearchResult.js index 252c82fc441..7f6337dcda0 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResult.js +++ b/server/sonar-web/src/main/js/app/components/search/SearchResult.js @@ -93,7 +93,9 @@ export default class SearchResult extends React.PureComponent { const organization = this.props.organizations[component.organization]; return organization - ?
    {organization.name}
    + ?
    + {organization.name} +
    : null; }; @@ -104,7 +106,9 @@ export default class SearchResult extends React.PureComponent { const project = this.props.projects[component.project]; return project - ?
    {project.name}
    + ?
    + {project.name} +
    : null; }; @@ -127,7 +131,6 @@ export default class SearchResult extends React.PureComponent { onClick={this.props.onClose} onMouseEnter={this.handleMouseEnter} to={getProjectUrl(component.key)}> - {component.isFavorite && } {!component.isFavorite && component.isRecentlyBrowsed && } @@ -139,11 +142,12 @@ export default class SearchResult extends React.PureComponent { className="navbar-search-item-match" dangerouslySetInnerHTML={{ __html: component.match }} /> - : {component.name}} + : + {component.name} + } {this.renderOrganization(component)} {this.renderProject(component)} - diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResults.js b/server/sonar-web/src/main/js/app/components/search/SearchResults.js index 96be176aea6..ceffcd262db 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResults.js +++ b/server/sonar-web/src/main/js/app/components/search/SearchResults.js @@ -77,7 +77,9 @@ export default class SearchResults extends React.PureComponent { }); return renderedComponents.length > 0 - ?
      {renderedComponents}
    + ?
      + {renderedComponents} +
    : this.props.renderNoResults(); } } diff --git a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.js b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.js index d3a0282849f..a36c98368ce 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchShowMore.js +++ b/server/sonar-web/src/main/js/app/components/search/SearchShowMore.js @@ -69,7 +69,9 @@ export default class SearchShowMore extends React.PureComponent { ) }} /> - {translate('show_more')} + + {translate('show_more')} + diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.js b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.js index fbba231e38f..c08bba6e14b 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.js +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/SearchResults-test.js @@ -32,7 +32,10 @@ it('renders different components and dividers between them', () => { onMoreClick={jest.fn()} onSelect={jest.fn()} renderNoResults={() =>
    } - renderResult={component => {component.name}} + renderResult={component => + + {component.name} + } results={{ TRK: [component('foo'), component('bar')], BRC: [component('qwe', 'BRC'), component('qux', 'BRC')], @@ -54,7 +57,10 @@ it('renders "Show More" link', () => { onMoreClick={jest.fn()} onSelect={jest.fn()} renderNoResults={() =>
    } - renderResult={component => {component.name}} + renderResult={component => + + {component.name} + } results={{ TRK: [component('foo'), component('bar')], BRC: [component('qwe', 'BRC'), component('qux', 'BRC')] diff --git a/server/sonar-web/src/main/js/app/styles/boxed-group.css b/server/sonar-web/src/main/js/app/styles/boxed-group.css index f41ae1927d6..0fc395a3280 100644 --- a/server/sonar-web/src/main/js/app/styles/boxed-group.css +++ b/server/sonar-web/src/main/js/app/styles/boxed-group.css @@ -105,14 +105,16 @@ height: 0; } - 50%, 100% { + 50%, + 100% { width: 100%; height: 100%; } } @keyframes border-bottom-border { - 0%, 50% { + 0%, + 50% { width: 0; height: 0; border-width: 0; diff --git a/server/sonar-web/src/main/js/app/utils/startReactApp.js b/server/sonar-web/src/main/js/app/utils/startReactApp.js index 861f20199a9..18f4ba69ed7 100644 --- a/server/sonar-web/src/main/js/app/utils/startReactApp.js +++ b/server/sonar-web/src/main/js/app/utils/startReactApp.js @@ -132,8 +132,12 @@ const startReactApp = () => { - {maintenanceRoutes} - {setupRoutes} + + {maintenanceRoutes} + + + {setupRoutes} + @@ -142,7 +146,6 @@ const startReactApp = () => { - diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js b/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js index 1ed36c5127b..92e08353bbc 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutCleanCode.js @@ -26,9 +26,13 @@ const link = 'https://redirect.sonarsource.com/doc/issues.html'; export default function AboutCleanCode() { return (
    -

    {translate('about_page.clean_code')}

    +

    + {translate('about_page.clean_code')} +

    -

    {translate('about_page.clean_code.text')}

    +

    + {translate('about_page.clean_code.text')} +

    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js b/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js index dffb976146d..2a87ba96a96 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLanguages.js @@ -48,18 +48,26 @@ const half = (languages.length + 1) / 2; export default function AboutLanguages() { return (
    -

    {translate('about_page.languages')}

    +

    + {translate('about_page.languages')} +

    -

    {translate('about_page.languages.text')}

    +

    + {translate('about_page.languages.text')} +

    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js index f959dd97cbb..1e65f5f646a 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutLeakPeriod.js @@ -26,9 +26,13 @@ const link = 'https://redirect.sonarsource.com/doc/fix-the-leak.html'; export default function AboutLeakPeriod() { return (
    -

    {translate('about_page.fix_the_leak')}

    +

    + {translate('about_page.fix_the_leak')} +

    -

    {translate('about_page.fix_the_leak.text')}

    +

    + {translate('about_page.fix_the_leak.text')} +

    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js index e83d8d77b95..8499b680883 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityGates.js @@ -26,9 +26,13 @@ const link = 'https://redirect.sonarsource.com/doc/quality-gates.html'; export default function AboutQualityGates() { return (
    -

    {translate('about_page.quality_gates')}

    +

    + {translate('about_page.quality_gates')} +

    -

    {translate('about_page.quality_gates.text')}

    +

    + {translate('about_page.quality_gates.text')} +

    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js index 503ef74807f..20c483535d5 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModel.js @@ -26,33 +26,38 @@ import CodeSmellIcon from '../../../components/icons-components/CodeSmellIcon'; export default function AboutQualityModel() { return (
    -

    {translate('about_page.quality_model')}

    +

    + {translate('about_page.quality_model')} +

    -
    +
    + +

    - {translate('issue.type.BUG.plural')} - {' '} + {translate('issue.type.BUG.plural')}{' '} {translate('about_page.quality_model.bugs')}

    -
    +
    + +

    - {translate('issue.type.VULNERABILITY.plural')} - {' '} + {translate('issue.type.VULNERABILITY.plural')}{' '} {translate('about_page.quality_model.vulnerabilities')}

    -
    +
    + +

    - {translate('issue.type.CODE_SMELL.plural')} - {' '} + {translate('issue.type.CODE_SMELL.plural')}{' '} {translate('about_page.quality_model.code_smells')}

    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js index 6f7ff4125cb..26b60c32f88 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutQualityModelForSonarQubeDotCom.js @@ -26,15 +26,18 @@ import CodeSmellIconForSonarQubeDotCom from './CodeSmellIconForSonarQubeDotCom'; export default function AboutQualityModelForSonarQubeDotCom() { return (
    -

    {translate('about_page.quality_model')}

    +

    + {translate('about_page.quality_model')} +

    -
    +
    + +

    - {translate('issue.type.BUG.plural')} - {' '} + {translate('issue.type.BUG.plural')}{' '} {translate('about_page.quality_model.bugs')}

    @@ -44,8 +47,7 @@ export default function AboutQualityModelForSonarQubeDotCom() {

    - {translate('issue.type.VULNERABILITY.plural')} - {' '} + {translate('issue.type.VULNERABILITY.plural')}{' '} {translate('about_page.quality_model.vulnerabilities')}

    @@ -55,8 +57,7 @@ export default function AboutQualityModelForSonarQubeDotCom() {

    - {translate('issue.type.CODE_SMELL.plural')} - {' '} + {translate('issue.type.CODE_SMELL.plural')}{' '} {translate('about_page.quality_model.code_smells')}

    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js index da03f74b956..5add8a0eab1 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutRulesForSonarQubeDotCom.js @@ -68,7 +68,9 @@ export default function AboutRulesForSonarQubeDotCom(props: Props) { className="sqcom-about-rules-link"> C# - And More + + And More +
    ); diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js b/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js index 8396fa6289b..2e8ffe89e0e 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutScanners.js @@ -50,11 +50,15 @@ const scanners = [ export default function AboutScanners() { return (
    -

    {translate('about_page.scanners')}

    +

    + {translate('about_page.scanners')} +

    -

    {translate('about_page.scanners.text')}

    +

    + {translate('about_page.scanners.text')} +

    - {scanners.map(scanner => ( + {scanners.map(scanner => {translate('about_page.scanners', - ))} + )}
    diff --git a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js index d28330408b6..4fc1b9633ad 100644 --- a/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js +++ b/server/sonar-web/src/main/js/apps/about/components/AboutStandards.js @@ -43,9 +43,13 @@ export default function AboutStandards(props: Props) { return (
    -

    {translate('about_page.standards')}

    +

    + {translate('about_page.standards')} +

    -

    {translate('about_page.standards.text')}

    +

    + {translate('about_page.standards.text')} +

      diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js index eac9de1a53b..8ad560410b1 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypes.js @@ -50,7 +50,9 @@ export default function EntryIssueTypes({ bugs, codeSmells, loading, vulnerabili - + + + {translate('issue.type.BUG.plural')} @@ -67,7 +69,9 @@ export default function EntryIssueTypes({ bugs, codeSmells, loading, vulnerabili - + + + {translate('issue.type.VULNERABILITY.plural')} @@ -80,7 +84,9 @@ export default function EntryIssueTypes({ bugs, codeSmells, loading, vulnerabili - + + + {translate('issue.type.CODE_SMELL.plural')} diff --git a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js index 0dbe782918a..1bc8bd60d06 100644 --- a/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js +++ b/server/sonar-web/src/main/js/apps/about/components/EntryIssueTypesForSonarQubeDotCom.js @@ -55,7 +55,9 @@ export default function EntryIssueTypesForSonarQubeDotCom({ - + + + {translate('issue.type.BUG.plural')} @@ -72,7 +74,9 @@ export default function EntryIssueTypesForSonarQubeDotCom({ - + + + {translate('issue.type.VULNERABILITY.plural')} @@ -85,7 +89,9 @@ export default function EntryIssueTypesForSonarQubeDotCom({ - + + + {translate('issue.type.CODE_SMELL.plural')} diff --git a/server/sonar-web/src/main/js/apps/about/components/ReadMore.js b/server/sonar-web/src/main/js/apps/about/components/ReadMore.js index 7318f5eb703..47a2b0e442a 100644 --- a/server/sonar-web/src/main/js/apps/about/components/ReadMore.js +++ b/server/sonar-web/src/main/js/apps/about/components/ReadMore.js @@ -29,7 +29,9 @@ export default class ReadMore extends React.PureComponent { return ( ); diff --git a/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css b/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css index 1895646e681..598e1f77297 100644 --- a/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css +++ b/server/sonar-web/src/main/js/apps/about/sonarqube-dot-com-styles.css @@ -22,7 +22,8 @@ align-items: center; } -.sqcom-about-page-intro {} +.sqcom-about-page-intro { +} .sqcom-about-page-intro > h1 { line-height: 56px; diff --git a/server/sonar-web/src/main/js/apps/account/components/Password.js b/server/sonar-web/src/main/js/apps/account/components/Password.js index 925fc4ce901..ae30647b7e0 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Password.js +++ b/server/sonar-web/src/main/js/apps/account/components/Password.js @@ -81,7 +81,12 @@ export default class Password extends Component { {translate('my_profile.password.changed')}
    } - {errors && errors.map((e, i) =>
    {e}
    )} + {errors && + errors.map((e, i) => +
    + {e} +
    + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.js b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.js index 71cfd434b77..28d3181d25b 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/GlobalNotifications.js @@ -53,11 +53,13 @@ function GlobalNotifications(props: Props) { - {props.channels.map(channel => ( + {props.channels.map(channel => -

    {translate('notification.channel', channel)}

    +

    + {translate('notification.channel', channel)} +

    - ))} + )} diff --git a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.js b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.js index 31c21caf958..e9655c829f4 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/NotificationsList.js @@ -56,10 +56,12 @@ export default class NotificationsList extends React.PureComponent { return ( - {types.map(type => ( + {types.map(type => - {translate('notification.dispatcher', type)} - {channels.map(channel => ( + + {translate('notification.dispatcher', type)} + + {channels.map(channel => this.handleCheck(type, channel, checked)} /> - ))} + )} - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.js b/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.js index f79f666e9db..d774571bb83 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/ProjectNotifications.js @@ -81,14 +81,18 @@ class ProjectNotifications extends React.PureComponent {

    - {project.name} + + {project.name} +

    - {channels.map(channel => ( + {channels.map(channel => -

    {translate('notification.channel', channel)}

    +

    + {translate('notification.channel', channel)} +

    - ))} + )} - {option.label} + + {option.label} + ); }; @@ -122,9 +124,7 @@ class Projects extends React.PureComponent { {allProjects.map(project => )}
    - - Set notifications for: - + Set notifications for:
    -

    {translate('my_account.create_organization')}

    +

    + {translate('my_account.create_organization')} +

    diff --git a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.js b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.js index 8627962b54b..ee3efcc80eb 100644 --- a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.js +++ b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationCard.js @@ -50,7 +50,9 @@ export default function OrganizationCard(props: Props) { -
    {organization.key}
    +
    + {organization.key} +
    {!!organization.description &&
    diff --git a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.js b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.js index 3969d08b0df..afc2da9ffe0 100644 --- a/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.js +++ b/server/sonar-web/src/main/js/apps/account/organizations/OrganizationsList.js @@ -32,11 +32,11 @@ export default function OrganizationsList(props: Props) {
      {sortBy(props.organizations, organization => organization.name.toLocaleLowerCase() - ).map(organization => ( + ).map(organization =>
    • - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.js b/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.js index 1aebb594952..e480e8a5517 100644 --- a/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.js +++ b/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.js @@ -71,7 +71,9 @@ class UserOrganizations extends React.PureComponent {
    -

    {translate('my_account.organizations')}

    +

    + {translate('my_account.organizations')} +

    {canCreateOrganizations &&
    diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.js b/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.js index 775716fa43e..fba6c92f27c 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.js +++ b/server/sonar-web/src/main/js/apps/account/profile/UserExternalIdentity.js @@ -70,7 +70,9 @@ export default class UserExternalIdentity extends React.PureComponent { if (!identityProvider) { return (
    - {user.externalProvider}{': '}{user.externalIdentity} + {user.externalProvider} + {': '} + {user.externalIdentity}
    ); } @@ -84,8 +86,7 @@ export default class UserExternalIdentity extends React.PureComponent { width="14" height="14" alt={identityProvider.name} - /> - {' '} + />{' '} {user.externalIdentity}
    ); diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js b/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js index f67ab5124ac..7aaf49a23c8 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js +++ b/server/sonar-web/src/main/js/apps/account/profile/UserGroups.js @@ -30,13 +30,15 @@ export default class UserGroups extends React.PureComponent { return (
    -

    {translate('my_profile.groups')}

    +

    + {translate('my_profile.groups')} +

      - {groups.map(group => ( + {groups.map(group =>
    • {group}
    • - ))} + )}
    ); diff --git a/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js b/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js index d1da44d3290..968f27bc8e1 100644 --- a/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js +++ b/server/sonar-web/src/main/js/apps/account/profile/UserScmAccounts.js @@ -31,7 +31,9 @@ export default class UserScmAccounts extends React.PureComponent { return (
    -

    {translate('my_profile.scm_accounts')}

    +

    + {translate('my_profile.scm_accounts')} +

    • {user.login} @@ -42,11 +44,11 @@ export default class UserScmAccounts extends React.PureComponent { {user.email}
    • } - {scmAccounts.map(scmAccount => ( + {scmAccounts.map(scmAccount =>
    • {scmAccount}
    • - ))} + )}
    ); diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js index 2d263a0daf8..13826f80dc8 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js @@ -65,7 +65,7 @@ export default class ProjectCard extends React.PureComponent { {links.length > 0 &&
      - {links.map(link => ( + {links.map(link =>
    • - ))} + )}
    } -
    {project.key}
    +
    + {project.key} +
    {!!project.description &&
    diff --git a/server/sonar-web/src/main/js/apps/account/projects/Projects.js b/server/sonar-web/src/main/js/apps/account/projects/Projects.js index 9ecc0a633ee..71141b11ba7 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/Projects.js +++ b/server/sonar-web/src/main/js/apps/account/projects/Projects.js @@ -46,11 +46,11 @@ export default class Projects extends React.PureComponent { {projects.length > 0 &&
      - {projects.map(project => ( + {projects.map(project =>
    • - ))} + )}
    } {projects.length > 0 && diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js index c27316d41bd..4062eaea41a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.js @@ -45,7 +45,7 @@ import { translate } from '../../../helpers/l10n'; type Props = { component: Object, location: Object, - fetchOrganizations: Array => string + fetchOrganizations: (Array) => string }; type State = { diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js b/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js index e9d09a92772..4ca30c41c13 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/DateFilter.js @@ -75,8 +75,7 @@ export default class DateFilter extends Component { ref="minDate" type="text" placeholder="From" - /> - {' '} + />{' '} -

    {translate('background_tasks.scanner_context')} @@ -86,7 +85,9 @@ export default class ScannerContext extends React.PureComponent {
    {scannerContext != null - ?
    {scannerContext}
    + ?
    +                {scannerContext}
    +              
    : }
    @@ -95,7 +96,6 @@ export default class ScannerContext extends React.PureComponent { {translate('close')}

    - ); } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js index f14ff423f91..a9b301e2e11 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Search.js @@ -78,9 +78,7 @@ export default class Search extends React.PureComponent { return (
  • -
    - Search by Task or Component -
    +
    Search by Task or Component
    this.handleQueryChange(e.target.value)} @@ -110,16 +108,12 @@ export default class Search extends React.PureComponent {
    • -
      - Status -
      +
      Status
    • {types.length > 1 &&
    • -
      - Type -
      +
      Type
      } {!component &&
    • -
      - Only Latest Analysis -
      +
      Only Latest Analysis
    • }
    • -
      - Date -
      +
      Date
      - {' '} + {' '} diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.js index d6da81e314c..a89fe73ab6e 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Stacktrace.js @@ -74,7 +74,6 @@ export default class Stacktrace extends React.PureComponent { className="modal modal-large" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -

      {translate('background_tasks.error_stacktrace')} @@ -90,16 +89,22 @@ export default class Stacktrace extends React.PureComponent { {loading ? : stacktrace - ?
      -

      - {translate('background_tasks.error_stacktrace')} -

      -
      {stacktrace}
      -
      - :
      -

      {translate('background_tasks.error_message')}

      -
      {task.errorMessage}
      -
      } + ?
      +

      + {translate('background_tasks.error_stacktrace')} +

      +
      +                    {stacktrace}
      +                  
      +
      + :
      +

      + {translate('background_tasks.error_message')} +

      +
      +                    {task.errorMessage}
      +                  
      +
      }

      @@ -107,7 +112,6 @@ export default class Stacktrace extends React.PureComponent { {translate('close')}
      - ); } diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.js b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.js index 7f803d325db..fdd7aeedc7a 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.js @@ -36,7 +36,9 @@ export default function TaskComponent(props: Props) { if (!task.componentKey) { return ( - {task.id} + + {task.id} + {types.length > 1 && } ); diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.js b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.js index 119591b2e4e..0e5c2348f1f 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskDate.js @@ -25,7 +25,11 @@ const TaskDate = ({ date, baseDate, format -}: { date: string, baseDate: string, format: string }) => { +}: { + date: string, + baseDate: string, + format: string +}) => { const m = moment(date); const baseM = moment(baseDate); const diff = date && baseDate ? m.diff(baseM, 'days') : 0; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.js b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.js index 471b7de04de..5feb8665762 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TaskStatus.js @@ -36,24 +36,34 @@ const TaskStatus = ({ task }: { task: Task }) => { break; case STATUSES.SUCCESS: inner = ( - {translate('background_task.status.SUCCESS')} + + {translate('background_task.status.SUCCESS')} + ); break; case STATUSES.FAILED: inner = ( - {translate('background_task.status.FAILED')} + + {translate('background_task.status.FAILED')} + ); break; case STATUSES.CANCELED: inner = ( - {translate('background_task.status.CANCELED')} + + {translate('background_task.status.CANCELED')} + ); break; default: inner = ''; } - return {inner}; + return ( + + {inner} + + ); }; export default TaskStatus; diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.js b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.js index 5b8903a9b58..622409ca796 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/Tasks.js @@ -49,19 +49,33 @@ export default class Tasks extends React.PureComponent { - - - + + + - - - - + + + + - {tasks.map((task, index, tasks) => ( + {tasks.map((task, index, tasks) => - ))} + )}
      {translate('background_tasks.table.status')}{translate('background_tasks.table.task')}{translate('background_tasks.table.id')} + {translate('background_tasks.table.status')} + + {translate('background_tasks.table.task')} + + {translate('background_tasks.table.id')} +  {translate('background_tasks.table.submitted')}{translate('background_tasks.table.started')}{translate('background_tasks.table.finished')}{translate('background_tasks.table.duration')} + {translate('background_tasks.table.submitted')} + + {translate('background_tasks.table.started')} + + {translate('background_tasks.table.finished')} + + {translate('background_tasks.table.duration')} +  
      ); diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.js b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.js index 51d5fc4b759..5ca1ee54c67 100644 --- a/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.js +++ b/server/sonar-web/src/main/js/apps/background-tasks/components/TypesFilter.js @@ -27,7 +27,11 @@ const TypesFilter = ({ value, onChange, types -}: { value: string, onChange: Function, types: string[] }) => { +}: { + value: string, + onChange: Function, + types: string[] +}) => { const options = types.map(t => { return { value: t, diff --git a/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js b/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js index 1770620d9dd..a6f5a0aedfa 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js +++ b/server/sonar-web/src/main/js/apps/code/components/Breadcrumbs.js @@ -23,7 +23,7 @@ import Breadcrumb from './Breadcrumb'; export default function Breadcrumbs({ rootComponent, breadcrumbs }) { return (
        - {breadcrumbs.map((component, index) => ( + {breadcrumbs.map((component, index) =>
      • - ))} + )}
      ); } diff --git a/server/sonar-web/src/main/js/apps/code/components/Component.js b/server/sonar-web/src/main/js/apps/code/components/Component.js index 1f5ea5fff04..6770e4c28a6 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Component.js +++ b/server/sonar-web/src/main/js/apps/code/components/Component.js @@ -109,7 +109,7 @@ export default class Component extends React.PureComponent { /> - {columns.map(column => ( + {columns.map(column =>
      - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js index 76ea80e652f..bad7f487537 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentName.js +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentName.js @@ -51,8 +51,12 @@ const ComponentName = ({ component, rootComponent, previous, canBrowse }) => { const prefix = areBothDirs ? mostCommitPrefix([component.name + '/', previous.name + '/']) : ''; const name = prefix ? - {prefix} - {component.name.substr(prefix.length)} + + {prefix} + + + {component.name.substr(prefix.length)} + : component.name; @@ -63,9 +67,7 @@ const ComponentName = ({ component, rootComponent, previous, canBrowse }) => { - - {' '} - {name} + {name} ); } else if (canBrowse) { @@ -75,17 +77,13 @@ const ComponentName = ({ component, rootComponent, previous, canBrowse }) => { } inner = ( - - {' '} - {name} + {name} ); } else { inner = ( - - {' '} - {name} + {name} ); } diff --git a/server/sonar-web/src/main/js/apps/code/components/Components.js b/server/sonar-web/src/main/js/apps/code/components/Components.js index 2d492285a2c..8e1451ff79e 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Components.js +++ b/server/sonar-web/src/main/js/apps/code/components/Components.js @@ -39,7 +39,7 @@ export default function Components({ rootComponent, baseComponent, components, s } {components.length - ? components.map((component, index, list) => ( + ? components.map((component, index, list) => 0 ? list[index - 1] : null} canBrowse={true} /> - )) + ) : } diff --git a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js index ec63a912732..1552dfad89d 100644 --- a/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js +++ b/server/sonar-web/src/main/js/apps/code/components/ComponentsHeader.js @@ -45,11 +45,11 @@ const ComponentsHeader = ({ baseComponent, rootComponent }) => {     - {columns.map(column => ( + {columns.map(column => {baseComponent && column} - ))} + )} ); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/init.js b/server/sonar-web/src/main/js/apps/coding-rules/init.js index 6dab31d13b6..af9a1b27e24 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/init.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/init.js @@ -37,13 +37,11 @@ import { areThereCustomOrganizations } from '../../store/organizations/utils'; const App = new Marionette.Application(); -App.on('start', function( - options: { - el: HTMLElement, - organization: ?string, - isDefaultOrganization: boolean - } -) { +App.on('start', function(options: { + el: HTMLElement, + organization: ?string, + isDefaultOrganization: boolean +}) { App.organization = options.organization; const data = options.organization ? { organization: options.organization } : {}; $.get(window.baseUrl + '/api/rules/app', data) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js index b6ec74ca5a0..e9cdac4acf7 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js @@ -54,7 +54,8 @@ export default Marionette.ItemView.extend({ return { ...project, name: projectBase != null ? projectBase.longName : '', - issuesUrl: projectBase != null && + issuesUrl: + projectBase != null && getComponentIssuesUrlAsString(projectBase.key, { resolved: 'false', rules: this.model.id diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js index de46b957a1d..302c02959bf 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js +++ b/server/sonar-web/src/main/js/apps/component-measures/components/LeakPeriodLegend.js @@ -37,5 +37,9 @@ export default function LeakPeriodLegend({ period }) { const date = getPeriodDate(period); const fromNow = moment(date).fromNow(); const tooltip = fromNow + ', ' + moment(date).format('LL'); - return {label}; + return ( + + {label} + + ); } diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js index 6b2d5324559..392b7e19587 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsHeader.js @@ -61,7 +61,6 @@ export default function MeasureDetailsHeader({
      - {isDiff ?
      diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumb.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumb.js index 15ac0ded735..aa038d9d004 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumb.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumb.js @@ -37,7 +37,11 @@ const Breadcrumb = ({ component, metric, onBrowse }) => { ); } else { - inner = {component.name}; + inner = ( + + {component.name} + + ); } const value = isDiffMetric(metric.key) @@ -49,7 +53,10 @@ const Breadcrumb = ({ component, metric, onBrowse }) => {   {inner} - {value != null && {' (' + value + ')'}} + {value != null && + + {' (' + value + ')'} + } ); }; diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumbs.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumbs.js index 7bc20340cd4..227fad25782 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumbs.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/Breadcrumbs.js @@ -20,9 +20,9 @@ import React from 'react'; import Breadcrumb from './Breadcrumb'; -const Breadcrumbs = ({ breadcrumbs, metric, onBrowse }) => ( +const Breadcrumbs = ({ breadcrumbs, metric, onBrowse }) =>
        - {breadcrumbs.map((component, index) => ( + {breadcrumbs.map((component, index) =>
      • ( onBrowse={index + 1 < breadcrumbs.length ? onBrowse : null} />
      • - ))} -
      -); + )} +
    ; export default Breadcrumbs; diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js index 43d0d8bd422..6d9ae770a8a 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentCell.js @@ -51,7 +51,10 @@ const ComponentCell = ({ component, isSelected, onClick }) => {   - {head.length > 0 && {head}/} + {head.length > 0 && + + {head}/ + } {tail} ); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsList.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsList.js index 7acaeb62890..0faf5f66dfb 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsList.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsList.js @@ -39,18 +39,22 @@ const ComponentsList = ({ components, metrics, selected, metric, onClick }) => {   - {getLocalizedMetricName(metric)} + + {getLocalizedMetricName(metric)} + - {otherMetrics.map(metric => ( + {otherMetrics.map(metric => - {getLocalizedMetricName(metric)} + + {getLocalizedMetricName(metric)} + - ))} + )} } - {components.map(component => ( + {components.map(component => { metric={metric} onClick={onClick} /> - ))} + )} ); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsListRow.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsListRow.js index ca2f51c96a4..8e01925a987 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsListRow.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ComponentsListRow.js @@ -49,13 +49,13 @@ const ComponentsListRow = ({ component, otherMetrics, isSelected, metric, onClic - {otherMeasures.map(measure => ( + {otherMeasures.map(measure => - ))} + )} ); }; diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js index b3413a23c7c..901073b7a6c 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListView.js @@ -114,20 +114,20 @@ export default class ListView extends React.PureComponent { } const selectedIndex = components.indexOf(selected); const sourceViewerPeriod = metric.key.indexOf('new_') === 0 && !!leakPeriod ? leakPeriod : null; - const sourceViewerPeriodDate = sourceViewerPeriod != null - ? moment(sourceViewerPeriod.date).toDate() - : null; - - const filterLine = sourceViewerPeriodDate != null - ? line => { - if (line.scmDate) { - const scmDate = moment(line.scmDate).toDate(); - return scmDate >= sourceViewerPeriodDate; - } else { - return false; + const sourceViewerPeriodDate = + sourceViewerPeriod != null ? moment(sourceViewerPeriod.date).toDate() : null; + + const filterLine = + sourceViewerPeriodDate != null + ? line => { + if (line.scmDate) { + const scmDate = moment(line.scmDate).toDate(); + return scmDate >= sourceViewerPeriodDate; + } else { + return false; + } } - } - : undefined; + : undefined; return (
    diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeView.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeView.js index a66f31d6c64..0bbfe14681e 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeView.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeView.js @@ -107,20 +107,20 @@ export default class TreeView extends React.PureComponent { const selectedIndex = components.indexOf(selected); const sourceViewerPeriod = metric.key.indexOf('new_') === 0 && !!leakPeriod ? leakPeriod : null; - const sourceViewerPeriodDate = sourceViewerPeriod != null - ? moment(sourceViewerPeriod.date).toDate() - : null; - - const filterLine = sourceViewerPeriodDate != null - ? line => { - if (line.scmDate) { - const scmDate = moment(line.scmDate).toDate(); - return scmDate >= sourceViewerPeriodDate; - } else { - return false; + const sourceViewerPeriodDate = + sourceViewerPeriod != null ? moment(sourceViewerPeriod.date).toDate() : null; + + const filterLine = + sourceViewerPeriodDate != null + ? line => { + if (line.scmDate) { + const scmDate = moment(line.scmDate).toDate(); + return scmDate >= sourceViewerPeriodDate; + } else { + return false; + } } - } - : undefined; + : undefined; return (
    diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasures.js b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasures.js index eafc7bcc324..ab69f4baab3 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasures.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasures.js @@ -27,14 +27,14 @@ export default function AllMeasures(props) { return (
      - {domains.map(domain => ( + {domains.map(domain => - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/Home.js b/server/sonar-web/src/main/js/apps/component-measures/home/Home.js index 14cbdcdab61..fa3ddd96662 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/Home.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/Home.js @@ -55,7 +55,7 @@ export default class Home extends React.PureComponent { {translate('all')}
  • - {domains.map(domain => ( + {domains.map(domain =>
  • - ))} + )} diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js b/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js index 78bf2181269..3ba27f5785b 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/MeasuresList.js @@ -26,7 +26,7 @@ import IssueTypeIcon from '../../../components/ui/IssueTypeIcon'; const MeasuresList = ({ measures, component, className = 'domain-measures' }) => { return (
      - {measures.map(measure => ( + {measures.map(measure =>
    • - ))} + )}
    ); }; diff --git a/server/sonar-web/src/main/js/apps/component-measures/styles.css b/server/sonar-web/src/main/js/apps/component-measures/styles.css index 2d753f413ac..1c6f8c433ba 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/styles.css +++ b/server/sonar-web/src/main/js/apps/component-measures/styles.css @@ -5,7 +5,8 @@ margin-bottom: 20px; } -.measures-domains {} +.measures-domains { +} .measures-domains > li { margin-bottom: 20px; @@ -140,7 +141,8 @@ } .measure-details-metric, -.measure-details-value {} +.measure-details-value { +} .measure-details-metric { display: inline-block; @@ -221,7 +223,8 @@ fill: #4b9fd5; } -.measure-details-plain-list {} +.measure-details-plain-list { +} .measure-details-components { width: 300px; diff --git a/server/sonar-web/src/main/js/apps/issues/actions.js b/server/sonar-web/src/main/js/apps/issues/actions.js index 2bde7c95332..70f151a50d5 100644 --- a/server/sonar-web/src/main/js/apps/issues/actions.js +++ b/server/sonar-web/src/main/js/apps/issues/actions.js @@ -55,9 +55,8 @@ export const selectLocation = (nextIndex: ?number) => (state: State) => { export const selectNextLocation = (state: State) => { const { selectedFlowIndex, selectedLocationIndex: index, openIssue } = state; if (openIssue) { - const locations = selectedFlowIndex != null - ? openIssue.flows[selectedFlowIndex] - : openIssue.secondaryLocations; + const locations = + selectedFlowIndex != null ? openIssue.flows[selectedFlowIndex] : openIssue.secondaryLocations; return { selectedLocationIndex: index != null && locations.length > index + 1 ? index + 1 : index }; diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.js b/server/sonar-web/src/main/js/apps/issues/components/App.js index e003d9ec0ea..60dd9d43f9f 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.js +++ b/server/sonar-web/src/main/js/apps/issues/components/App.js @@ -385,9 +385,8 @@ export default class App extends React.PureComponent { referencedLanguages: keyBy(other.languages, 'key'), referencedRules: keyBy(other.rules, 'key'), referencedUsers: keyBy(other.users, 'login'), - selected: issues.length > 0 - ? openIssue != null ? openIssue.key : issues[0].key - : undefined, + selected: + issues.length > 0 ? (openIssue != null ? openIssue.key : issues[0].key) : undefined, selectedFlowIndex: null, selectedLocationIndex: null }); @@ -785,7 +784,9 @@ export default class App extends React.PureComponent { return (
    alt - {'+'} + + {'+'} + ↑ ↓ {hasSeveralFlows && diff --git a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js index f9854fb1cce..8fe75c2019c 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js +++ b/server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.js @@ -208,16 +208,17 @@ export default class BulkChangeModal extends React.PureComponent { })); } - renderCancelButton = () => ( + renderCancelButton = () => {translate('cancel')} - - ); + ; - renderLoading = () => ( + renderLoading = () =>
    -

    {translate('bulk_change')}

    +

    + {translate('bulk_change')} +

    @@ -227,29 +228,27 @@ export default class BulkChangeModal extends React.PureComponent {
    {this.renderCancelButton()}
    -
    - ); +
    ; - renderCheckbox = (field: string) => ( - - ); + renderCheckbox = (field: string) => + ; - renderAffected = (affected: number) => ( + renderAffected = (affected: number) =>
    ({translateWithParameters('issue_bulk_change.x_issues', affected)}) -
    - ); +
    ; - renderField = (field: string, label: string, affected: ?number, input: Object) => ( + renderField = (field: string, label: string, affected: ?number, input: Object) =>
    - + {this.renderCheckbox(field)} {input} {affected != null && this.renderAffected(affected)} -
    - ); +
    ; - renderAssigneeOption = (option: { avatar?: string, email?: string, label: string }) => ( + renderAssigneeOption = (option: { avatar?: string, email?: string, label: string }) => {(option.avatar != null || option.email != null) && } {option.label} - - ); + ; renderAssigneeField = () => { const affected: number = this.state.issues.filter(hasAction('assign')).length; @@ -294,12 +292,11 @@ export default class BulkChangeModal extends React.PureComponent { const types = ['BUG', 'VULNERABILITY', 'CODE_SMELL']; const options = types.map(type => ({ label: translate('issue.type', type), value: type })); - const optionRenderer = (option: { label: string, value: string }) => ( + const optionRenderer = (option: { label: string, value: string }) => {option.label} - - ); + ; const input = ( - ))} + )}
    ); }; @@ -458,12 +457,13 @@ export default class BulkChangeModal extends React.PureComponent { ); }; - renderNotificationsField = () => ( + renderNotificationsField = () =>
    - + {this.renderCheckbox('notifications')} -
    - ); +
    ; renderForm = () => { const { issues, paging, submitting } = this.state; @@ -474,7 +474,9 @@ export default class BulkChangeModal extends React.PureComponent { return (
    -

    {translateWithParameters('issue_bulk_change.form.title', issues.length)}

    +

    + {translateWithParameters('issue_bulk_change.form.title', issues.length)} +

    @@ -495,7 +497,9 @@ export default class BulkChangeModal extends React.PureComponent {
    {submitting && } - + {this.renderCancelButton()}
    diff --git a/server/sonar-web/src/main/js/apps/issues/components/FiltersHeader.js b/server/sonar-web/src/main/js/apps/issues/components/FiltersHeader.js index 85868906179..8971b5e76e1 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/FiltersHeader.js +++ b/server/sonar-web/src/main/js/apps/issues/components/FiltersHeader.js @@ -45,7 +45,9 @@ export default class FiltersHeader extends React.PureComponent {
    } -

    {translate('filters')}

    +

    + {translate('filters')} +

    ); } diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.js b/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.js index 019bf77961d..6fa5a9d4b3b 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.js +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesCounter.js @@ -27,15 +27,17 @@ type Props = { total: number }; -const IssuesCounter = (props: Props) => ( +const IssuesCounter = (props: Props) => - {props.current != null && {formatMeasure(props.current + 1, 'INT')} / } + {props.current != null && + + {formatMeasure(props.current + 1, 'INT')} + {' / '} + } {formatMeasure(props.total, 'INT')} - - {' '} + {' '} {translate('issues.issues')} - -); + ; export default IssuesCounter; diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesList.js b/server/sonar-web/src/main/js/apps/issues/components/IssuesList.js index f5897fd518f..a3a6097152b 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesList.js +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesList.js @@ -42,7 +42,7 @@ export default class IssuesList extends React.PureComponent { return (
    - {issues.map((issue, index) => ( + {issues.map((issue, index) => 0 ? issues[index - 1] : null} selected={selectedIssue != null && selectedIssue.key === issue.key} /> - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js index 8580fcff5b6..48aa84d718a 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js +++ b/server/sonar-web/src/main/js/apps/issues/components/IssuesSourceViewer.js @@ -65,15 +65,17 @@ export default class IssuesSourceViewer extends React.PureComponent { render() { const { openIssue, selectedFlowIndex, selectedLocationIndex } = this.props; - const locations = selectedFlowIndex != null - ? openIssue.flows[selectedFlowIndex] - : openIssue.flows.length > 0 ? openIssue.flows[0] : openIssue.secondaryLocations; + const locations = + selectedFlowIndex != null + ? openIssue.flows[selectedFlowIndex] + : openIssue.flows.length > 0 ? openIssue.flows[0] : openIssue.secondaryLocations; - const locationMessage = locations != null && + const locationMessage = + locations != null && selectedLocationIndex != null && locations.length >= selectedLocationIndex - ? { index: selectedLocationIndex, text: locations[selectedLocationIndex].msg } - : undefined; + ? { index: selectedLocationIndex, text: locations[selectedLocationIndex].msg } + : undefined; return (
    (this.node = node)}> diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.js b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.js index 922379d0a7f..e9e1c5fdce0 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.js +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueBox.js @@ -58,9 +58,10 @@ export default class ConciseIssueBox extends React.PureComponent { const { selectedFlowIndex } = this.props; const { flows, secondaryLocations } = this.props.issue; - const locations = selectedFlowIndex != null - ? flows[selectedFlowIndex] - : flows.length > 0 ? flows[0] : secondaryLocations; + const locations = + selectedFlowIndex != null + ? flows[selectedFlowIndex] + : flows.length > 0 ? flows[0] : secondaryLocations; if (locations == null || locations.length < 15) { // if there are no locations, or there are just few diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueComponent.js b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueComponent.js index 17337603555..ab8ecd13226 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueComponent.js +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueComponent.js @@ -25,10 +25,9 @@ type Props = { path: string }; -const ConciseIssueComponent = (props: Props) => ( +const ConciseIssueComponent = (props: Props) =>
    {collapsePath(props.path, 20)} -
    -); +
    ; export default ConciseIssueComponent; diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.js b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.js index ae19b8f367f..794cef4a105 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.js +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationBadge.js @@ -39,7 +39,8 @@ export default function ConciseIssueLocationBadge(props: Props) { formatMeasure(props.count) )}> - {'+'}{props.count} + {'+'} + {props.count} ); diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.js b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.js index ebe8aff7935..bbe2beb7237 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.js +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueLocationsNavigator.js @@ -42,9 +42,10 @@ export default class ConciseIssueLocationsNavigator extends React.PureComponent const { selectedFlowIndex, selectedLocationIndex } = this.props; const { flows, secondaryLocations } = this.props.issue; - const locations = selectedFlowIndex != null - ? flows[selectedFlowIndex] - : flows.length > 0 ? flows[0] : secondaryLocations; + const locations = + selectedFlowIndex != null + ? flows[selectedFlowIndex] + : flows.length > 0 ? flows[0] : secondaryLocations; if (locations == null || locations.length === 0) { return null; @@ -52,7 +53,7 @@ export default class ConciseIssueLocationsNavigator extends React.PureComponent return (
    - {locations.map((location, index) => ( + {locations.map((location, index) => - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.js b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.js index fba7825a6b4..611d14deca0 100644 --- a/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.js +++ b/server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssuesList.js @@ -46,7 +46,7 @@ export default class ConciseIssuesList extends React.PureComponent { render() { return (
    - {this.props.issues.map((issue, index) => ( + {this.props.issues.map((issue, index) => - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.js index 752666243da..f20e721b0ec 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AssigneeFacet.js @@ -144,7 +144,7 @@ export default class AssigneeFacet extends React.PureComponent { return ( - {assignees.map(assignee => ( + {assignees.map(assignee => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.js index e0f85562ef9..96f81dce317 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/AuthorFacet.js @@ -76,7 +76,7 @@ export default class AuthorFacet extends React.PureComponent { return ( - {authors.map(author => ( + {authors.map(author => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js index a1ec652908d..ab491dd167b 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js @@ -84,7 +84,10 @@ export default class CreationDateFacet extends React.PureComponent { handleBarClick = ({ createdAfter, createdBefore - }: { createdAfter: Object, createdBefore?: Object }) => { + }: { + createdAfter: Object, + createdBefore?: Object + }) => { this.resetTo({ createdAfter: createdAfter.format(DATE_FORMAT), createdBefore: createdBefore && createdBefore.format(DATE_FORMAT) @@ -123,9 +126,10 @@ export default class CreationDateFacet extends React.PureComponent { const data = periods.map((startDate, index) => { const startMoment = moment(startDate); - const nextStartMoment = index < periods.length - 1 - ? moment(periods[index + 1]) - : createdBefore ? moment(createdBefore) : undefined; + const nextStartMoment = + index < periods.length - 1 + ? moment(periods[index + 1]) + : createdBefore ? moment(createdBefore) : undefined; const endMoment = nextStartMoment && nextStartMoment.clone().subtract(1, 'days'); let tooltip = @@ -174,7 +178,9 @@ export default class CreationDateFacet extends React.PureComponent {
    {m.format('LLL')}
    - ({m.fromNow()}) + + ({m.fromNow()}) +
    ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.js index c41bad19312..13cf51d17d7 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/DirectoryFacet.js @@ -97,7 +97,7 @@ export default class DirectoryFacet extends React.PureComponent { return ( - {directories.map(directory => ( + {directories.map(directory => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetMode.js b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetMode.js index dcfb16202e9..1c178bc8873 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FacetMode.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FacetMode.js @@ -48,7 +48,7 @@ export default class FacetMode extends React.PureComponent { - {modes.map(mode => ( + {modes.map(mode => - ))} + )} ); diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.js index 48b33e83586..b6404f3fd3b 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/FileFacet.js @@ -93,7 +93,7 @@ export default class FileFacet extends React.PureComponent { return ( - {files.map(file => ( + {files.map(file => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.js index c2c8592c5ca..ec7ba416c86 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/LanguageFacet.js @@ -89,7 +89,7 @@ export default class LanguageFacet extends React.PureComponent { return ( - {languages.map(language => ( + {languages.map(language => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.js index 35e805a54bc..c7eb7c8dc26 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ModuleFacet.js @@ -90,7 +90,7 @@ export default class ModuleFacet extends React.PureComponent { return ( - {modules.map(module => ( + {modules.map(module => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.js index d7b7becca9f..e000234b6d4 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/ProjectFacet.js @@ -134,7 +134,7 @@ export default class ProjectFacet extends React.PureComponent { return ( - {projects.map(project => ( + {projects.map(project => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.js index f28e7de47b0..d4d322eeb6d 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/RuleFacet.js @@ -101,7 +101,7 @@ export default class RuleFacet extends React.PureComponent { return ( - {rules.map(rule => ( + {rules.map(rule => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.js index 14f4a09fc63..8fc81051b1b 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StatusFacet.js @@ -68,9 +68,7 @@ export default class StatusFacet extends React.PureComponent { renderStatus(status: string) { return ( - - {' '} - {translate('issue.status', status)} + {translate('issue.status', status)} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.js index 91fc77c5f54..319bf8df0eb 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TagFacet.js @@ -98,7 +98,7 @@ export default class TagFacet extends React.PureComponent { return ( - {tags.map(tag => ( + {tags.map(tag => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.js index f8b7630b834..362e690c997 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/TypeFacet.js @@ -76,7 +76,11 @@ export default class TypeFacet extends React.PureComponent { disabled={stat === 0 && !active} facetMode={this.props.facetMode} key={type} - name={ {translate('issue.type', type)}} + name={ + + {translate('issue.type', type)} + + } onClick={this.handleItemClick} stat={stat} value={type} diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetHeader.js b/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetHeader.js index 19b720e9f7e..eb084d38f65 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetHeader.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetHeader.js @@ -73,7 +73,11 @@ export default class FacetHeader extends React.PureComponent { if (this.props.open || !this.props.values) { return null; } - return {this.props.values}; + return ( + + {this.props.values} + + ); } render() { @@ -90,7 +94,7 @@ export default class FacetHeader extends React.PureComponent { {this.props.onClick ? - {this.renderCheckbox()}{' '}{this.props.name}{' '}{this.renderValueIndicator()} + {this.renderCheckbox()} {this.props.name} {this.renderValueIndicator()} : {this.props.name} diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js b/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js index 81feb40dbf1..58e64edbad7 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/FacetItem.js @@ -61,12 +61,20 @@ export default class FacetItem extends React.PureComponent { return this.props.disabled ? - {this.props.name} - {formattedStat} + + {this.props.name} + + + {formattedStat} + : - {this.props.name} - {formattedStat} + + {this.props.name} + + + {formattedStat} + ; } } diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetBox-test.js b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetBox-test.js index 0eb453e8066..2ebd4b3feaa 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetBox-test.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetBox-test.js @@ -23,5 +23,11 @@ import { shallow } from 'enzyme'; import FacetBox from '../FacetBox'; it('should render', () => { - expect(shallow(
    )).toMatchSnapshot(); + expect( + shallow( + +
    + + ) + ).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetItemsList-test.js b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetItemsList-test.js index 883e62b88d4..39fc1fb4eef 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetItemsList-test.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/components/__tests__/FacetItemsList-test.js @@ -23,5 +23,11 @@ import { shallow } from 'enzyme'; import FacetItemsList from '../FacetItemsList'; it('should render', () => { - expect(shallow(
    )).toMatchSnapshot(); + expect( + shallow( + +
    + + ) + ).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/issues/styles.css b/server/sonar-web/src/main/js/apps/issues/styles.css index b2041786cf7..3d1a53be793 100644 --- a/server/sonar-web/src/main/js/apps/issues/styles.css +++ b/server/sonar-web/src/main/js/apps/issues/styles.css @@ -2,7 +2,8 @@ line-height: 24px; } -.concise-issues-list-header, .concise-issues-list-header-inner { +.concise-issues-list-header, +.concise-issues-list-header-inner { } .concise-issues-list-header { @@ -114,7 +115,8 @@ text-align: right; } -.issues .search-navigator-facet-header, .issues .search-navigator-facet-list { +.issues .search-navigator-facet-header, +.issues .search-navigator-facet-list { padding-left: 0; padding-right: 0; } diff --git a/server/sonar-web/src/main/js/apps/organizations/components/MembersList.js b/server/sonar-web/src/main/js/apps/organizations/components/MembersList.js index c4996144eae..1d70e46c067 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/MembersList.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/MembersList.js @@ -38,7 +38,7 @@ export default class MembersList extends React.PureComponent { return ( - {this.props.members.map(member => ( + {this.props.members.map(member => - ))} + )}
    ); diff --git a/server/sonar-web/src/main/js/apps/organizations/components/MembersListHeader.js b/server/sonar-web/src/main/js/apps/organizations/components/MembersListHeader.js index a609ffce38e..51e91986524 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/MembersListHeader.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/MembersListHeader.js @@ -38,8 +38,7 @@ export default class MembersListHeader extends React.PureComponent { {total != null && - {formatMeasure(total, 'INT')} - {' '} + {formatMeasure(total, 'INT')}{' '} {translate('organization.members.members')} }
    diff --git a/server/sonar-web/src/main/js/apps/organizations/components/MembersListItem.js b/server/sonar-web/src/main/js/apps/organizations/components/MembersListItem.js index 1c4fe231339..3ee6a16d9de 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/MembersListItem.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/MembersListItem.js @@ -48,8 +48,12 @@ export default class MembersListItem extends React.PureComponent { - {member.name} - {member.login} + + {member.name} + + + {member.login} + {organization.canAdmin && @@ -64,9 +68,7 @@ export default class MembersListItem extends React.PureComponent {
    • diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js index dbfce33a3fd..0269d9640a9 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js @@ -68,9 +68,10 @@ class OrganizationDelete extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.handleCloseModal}> -
      -

      {translate('organization.delete')}

      +

      + {translate('organization.delete')} +

      @@ -82,14 +83,15 @@ class OrganizationDelete extends React.PureComponent { {this.state.loading ? :
      - +
      } - ); } @@ -101,8 +103,12 @@ class OrganizationDelete extends React.PureComponent {
      -

      {title}

      -
      {translate('organization.delete.description')}
      +

      + {title} +

      +
      + {translate('organization.delete.description')} +
      diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js index a75fd2d9444..51c3494308e 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js @@ -101,7 +101,9 @@ class OrganizationEdit extends React.PureComponent {
      -

      {title}

      +

      + {title} +

      @@ -184,7 +186,9 @@ class OrganizationEdit extends React.PureComponent {
    - + {this.state.loading && }
    diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.js b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.js index b8afa70b90d..4c831405c7a 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationGroupCheckbox.js @@ -51,8 +51,7 @@ export default class OrganizationGroupCheckbox extends React.PureComponent { tabIndex={0} role="listitem" disabled={group.default}> - - {' '}{group.name} + {group.name} ); } diff --git a/server/sonar-web/src/main/js/apps/organizations/components/forms/AddMemberForm.js b/server/sonar-web/src/main/js/apps/organizations/components/forms/AddMemberForm.js index e59f7137a8b..d31c8fa4581 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/forms/AddMemberForm.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/forms/AddMemberForm.js @@ -81,12 +81,16 @@ export default class AddMemberForm extends React.PureComponent { overlayClassName="modal-overlay" onRequestClose={this.closeForm}>
    -

    {translate('users.add')}

    +

    + {translate('users.add')} +

    - +
    -

    {translate('organization.members.manage_groups')}

    +

    + {translate('organization.members.manage_groups')} +

    @@ -118,22 +120,25 @@ export default class ManageMemberGroupsForm extends React.PureComponent { 'organization.members.members_groups', this.props.member.name )} - {' '}{this.state.loading && } + {' '} + {this.state.loading && } {!this.state.loading &&
      - {this.props.organizationGroups.map(group => ( + {this.props.organizationGroups.map(group => - ))} + )}
    }
    - + diff --git a/server/sonar-web/src/main/js/apps/organizations/components/forms/RemoveMemberForm.js b/server/sonar-web/src/main/js/apps/organizations/components/forms/RemoveMemberForm.js index 5d001dc026e..02eb6e6848f 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/forms/RemoveMemberForm.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/forms/RemoveMemberForm.js @@ -65,7 +65,9 @@ export default class RemoveMemberForm extends React.PureComponent { overlayClassName="modal-overlay" onRequestClose={this.closeForm}>
    -

    {translate('users.remove')}

    +

    + {translate('users.remove')} +

    diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js index b71ded90831..370b2bc4dfb 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js @@ -153,7 +153,9 @@ export default class OrganizationNavigation extends React.PureComponent { - {organization.name} + + {organization.name} + diff --git a/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.js b/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.js index ba9689b3b5e..3b5037fdb09 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.js +++ b/server/sonar-web/src/main/js/apps/overview/components/EmptyOverview.js @@ -48,8 +48,12 @@ export default function EmptyOverview({ component }: Props) {
    -

    {translate('key')}

    - {component.key} +

    + {translate('key')} +

    + + {component.key} +
    ); diff --git a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js index 4f3f98a9e5d..dc2af1733aa 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js +++ b/server/sonar-web/src/main/js/apps/overview/components/LeakPeriodLegend.js @@ -85,7 +85,9 @@ export default function LeakPeriodLegend({ period }: { period: Period }) {
    {translateWithParameters('overview.leak_period_x', leakPeriodLabel)}
    - {note} + + {note} +
    ); diff --git a/server/sonar-web/src/main/js/apps/overview/events/Analysis.js b/server/sonar-web/src/main/js/apps/overview/events/Analysis.js index 592c91de41b..916341a2000 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/Analysis.js +++ b/server/sonar-web/src/main/js/apps/overview/events/Analysis.js @@ -49,7 +49,9 @@ export default function Analysis(props: { analysis: AnalysisType }) { ?
    {sortedEvents.map(event => )}
    - : {translate('project_activity.project_analyzed')}} + : + {translate('project_activity.project_analyzed')} + } ); diff --git a/server/sonar-web/src/main/js/apps/overview/events/Event.js b/server/sonar-web/src/main/js/apps/overview/events/Event.js index 1d377ecd253..bb79518b167 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/Event.js +++ b/server/sonar-web/src/main/js/apps/overview/events/Event.js @@ -27,16 +27,21 @@ export default function Event(props: { event: EventType }) { const { event } = props; if (event.category === 'VERSION') { - return {props.event.name}; + return ( + + {props.event.name} + + ); } return (
    - {translate('event.category', event.category)}: - {' '} - {event.name} + {translate('event.category', event.category)}:{' '} + + {event.name} +
    diff --git a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js index 171c6d87975..42817e83c1e 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js +++ b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraph.js @@ -129,7 +129,7 @@ export default class PreviewGraph extends React.PureComponent { tabIndex={0} role="link"> - {({ width }) => ( + {({ width }) =>
    } -
    - )} +
    }
    ); diff --git a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltipsContent.js b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltipsContent.js index a91af02daf3..f77511bc923 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltipsContent.js +++ b/server/sonar-web/src/main/js/apps/overview/events/PreviewGraphTooltipsContent.js @@ -39,7 +39,9 @@ export default function PreviewGraphTooltipsContent({ serie, translatedName, val {value} - {translatedName} + + {translatedName} + ); } diff --git a/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js b/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js index 1de56542c21..f427b1a9a44 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js +++ b/server/sonar-web/src/main/js/apps/overview/main/BugsAndVulnerabilities.js @@ -41,9 +41,13 @@ class BugsAndVulnerabilities extends React.PureComponent { return (
    - {translate('metric.bugs.name')} + + {translate('metric.bugs.name')} + {' & '} - {translate('metric.vulnerabilities.name')} + + {translate('metric.vulnerabilities.name')} +
    ); @@ -95,7 +99,6 @@ class BugsAndVulnerabilities extends React.PureComponent { return (
    -
    diff --git a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js index 6ae5012f443..07bd2ae83ec 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js +++ b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js @@ -114,7 +114,6 @@ class CodeSmells extends React.PureComponent { return (
    -
    diff --git a/server/sonar-web/src/main/js/apps/overview/main/Coverage.js b/server/sonar-web/src/main/js/apps/overview/main/Coverage.js index 2c86b6e6970..915b93e6857 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Coverage.js +++ b/server/sonar-web/src/main/js/apps/overview/main/Coverage.js @@ -95,32 +95,34 @@ class Coverage extends React.PureComponent { ? getPeriodValue(newLinesToCover, leakPeriod.index) : null; - const formattedValue = newCoverageValue != null - ?
    - - - {formatMeasure(newCoverageValue, 'PERCENT')} - - -
    - : —; - const label = newLinesToCoverValue != null && newLinesToCoverValue > 0 - ?
    - {translate('overview.coverage_on')} -
    - - - {formatMeasure(newLinesToCoverValue, 'SHORT_INT')} - - - {getMetricName('new_lines_to_cover')} -
    - :
    - {getMetricName('new_coverage')} -
    ; + const formattedValue = + newCoverageValue != null + ?
    + + + {formatMeasure(newCoverageValue, 'PERCENT')} + + +
    + : —; + const label = + newLinesToCoverValue != null && newLinesToCoverValue > 0 + ?
    + {translate('overview.coverage_on')} +
    + + + {formatMeasure(newLinesToCoverValue, 'SHORT_INT')} + + + {getMetricName('new_lines_to_cover')} +
    + :
    + {getMetricName('new_coverage')} +
    ; return (
    diff --git a/server/sonar-web/src/main/js/apps/overview/main/Duplications.js b/server/sonar-web/src/main/js/apps/overview/main/Duplications.js index c6e9a8cd18f..2a3813238fa 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Duplications.js +++ b/server/sonar-web/src/main/js/apps/overview/main/Duplications.js @@ -79,32 +79,34 @@ class Duplications extends React.PureComponent { ? getPeriodValue(newLinesMeasure, leakPeriod.index) : null; - const formattedValue = newDuplicationsValue != null - ?
    - - - {formatMeasure(newDuplicationsValue, 'PERCENT')} - - -
    - : —; - const label = newLinesValue != null && newLinesValue > 0 - ?
    - {translate('overview.duplications_on')} -
    - - - {formatMeasure(newLinesValue, 'SHORT_INT')} - - - {getMetricName('new_lines')} -
    - :
    - {getMetricName('new_duplications')} -
    ; + const formattedValue = + newDuplicationsValue != null + ?
    + + + {formatMeasure(newDuplicationsValue, 'PERCENT')} + + +
    + : —; + const label = + newLinesValue != null && newLinesValue > 0 + ?
    + {translate('overview.duplications_on')} +
    + + + {formatMeasure(newLinesValue, 'SHORT_INT')} + + + {getMetricName('new_lines')} +
    + :
    + {getMetricName('new_duplications')} +
    ; return (
    diff --git a/server/sonar-web/src/main/js/apps/overview/main/enhance.js b/server/sonar-web/src/main/js/apps/overview/main/enhance.js index 2bd0e72530b..a884d22332a 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/enhance.js +++ b/server/sonar-web/src/main/js/apps/overview/main/enhance.js @@ -62,7 +62,9 @@ export default function enhance(ComposedComponent) { return (
    - {label} + + {label} +
    ); @@ -99,9 +101,10 @@ export default function enhance(ComposedComponent) { const { measures, leakPeriod } = this.props; const measure = measures.find(measure => measure.metric.key === metricKey); const periodValue = getPeriodValue(measure, leakPeriod.index); - const formatted = periodValue != null - ? formatMeasureVariation(periodValue, getShortType(measure.metric.type)) - : NO_VALUE; + const formatted = + periodValue != null + ? formatMeasureVariation(periodValue, getShortType(measure.metric.type)) + : NO_VALUE; return (
    diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js index 4028e1a6a8a..0367e3a8147 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaSize.js @@ -49,7 +49,9 @@ export default class MetaSize extends React.PureComponent { {formatMeasure(ncloc.value, 'SHORT_INT')} -
    {getMetricName('ncloc')}
    +
    + {getMetricName('ncloc')} +
    diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js index d2ac1128fce..47ff132eadd 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js @@ -53,7 +53,7 @@ export default class QualityGateCondition extends React.PureComponent { const delta = Math.abs(threshold - value); if (delta < 0.1 && delta > 0) { //$FlowFixMe The matching result can't null because of the previous check - return delta.toFixed(20).match('[^0\.]').index - 1; + return delta.toFixed(20).match('[^0.]').index - 1; } } diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js index cd98f13bae9..d3edece78d7 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js @@ -98,13 +98,13 @@ export default class QualityGateConditions extends React.PureComponent {
    - {sortedConditions.map(condition => ( + {sortedConditions.map(condition => - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/overview/styles.css b/server/sonar-web/src/main/js/apps/overview/styles.css index 5de0ceca320..390ca241dea 100644 --- a/server/sonar-web/src/main/js/apps/overview/styles.css +++ b/server/sonar-web/src/main/js/apps/overview/styles.css @@ -42,7 +42,8 @@ background-color: #f3f3f3; } -.overview-quality-gate-conditions-list {} +.overview-quality-gate-conditions-list { +} .overview-quality-gate-condition { float: left; @@ -134,7 +135,6 @@ color: #ed7d20; } - /* * Domain */ @@ -354,7 +354,8 @@ box-sizing: border-box; } -.overview-analysis {} +.overview-analysis { +} .overview-analysis + .overview-analysis { margin-top: 8px; @@ -394,7 +395,8 @@ font-weight: bold; } -.overview-analysis-event {} +.overview-analysis-event { +} .overview-analysis-event.badge { vertical-align: middle; diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js index 782bb4129c3..fca2990dc54 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js @@ -76,9 +76,10 @@ export default class ActionsCell extends React.PureComponent { } getAvailableQualifiers() { - const topQualifiers = this.props.organization && !this.props.organization.isDefault - ? ['TRK'] - : this.props.topQualifiers; + const topQualifiers = + this.props.organization && !this.props.organization.isDefault + ? ['TRK'] + : this.props.topQualifiers; return difference(topQualifiers, this.props.permissionTemplate.defaultFor); } @@ -89,7 +90,11 @@ export default class ActionsCell extends React.PureComponent { marginRight: 4, textAlign: 'center' }; - return
    {icon}
    ; + return ( +
    + {icon} +
    + ); } renderSetDefaultsControl() { @@ -123,7 +128,9 @@ export default class ActionsCell extends React.PureComponent { return availableQualifiers.map(qualifier => this.renderSetDefaultLink( qualifier, - {translate('permission_templates.set_default')} + + {translate('permission_templates.set_default')} + ) ); } @@ -133,11 +140,8 @@ export default class ActionsCell extends React.PureComponent { this.renderSetDefaultLink( qualifier, - {translate('permission_templates.set_default_for')} - {' '} - - {' '} - {translate('qualifiers', qualifier)} + {translate('permission_templates.set_default_for')}{' '} + {translate('qualifiers', qualifier)} ) ); @@ -153,9 +157,7 @@ export default class ActionsCell extends React.PureComponent { return (
      diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js index 0a8e7782061..4a551a419fc 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Defaults.js @@ -29,9 +29,10 @@ export default class Defaults extends React.PureComponent { }; render() { - const qualifiersToDisplay = this.props.organization && !this.props.organization.isDefault - ? ['TRK'] - : this.props.permissionTemplate.defaultFor; + const qualifiersToDisplay = + this.props.organization && !this.props.organization.isDefault + ? ['TRK'] + : this.props.permissionTemplate.defaultFor; const qualifiers = sortBy(qualifiersToDisplay) .map(qualifier => translate('qualifiers', qualifier)) diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/List.js b/server/sonar-web/src/main/js/apps/permission-templates/components/List.js index 275489d3500..200fb7244fb 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/List.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/List.js @@ -32,7 +32,7 @@ export default class List extends React.PureComponent { }; render() { - const permissionTemplates = this.props.permissionTemplates.map(p => ( + const permissionTemplates = this.props.permissionTemplates.map(p => - )); + ); return ( - {permissionTemplates} + + {permissionTemplates} +
      ); } diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js index 327003ebb85..31915dbacdd 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListHeader.js @@ -28,24 +28,24 @@ export default class ListHeader extends React.PureComponent { }; renderTooltip = permission => - (permission.key === 'user' || permission.key === 'codeviewer' + permission.key === 'user' || permission.key === 'codeviewer' ?
      {permission.description}
      {translate('projects_role.public_projects_warning')}
      - : permission.description); + : permission.description; render() { - const cells = this.props.permissions.map(permission => ( + const cells = this.props.permissions.map(permission => {permission.name} - )); + ); return ( diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js index 855783fcb8b..b6dbec1d7b9 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ListItem.js @@ -32,9 +32,9 @@ export default class ListItem extends React.PureComponent { }; render() { - const permissions = this.props.permissionTemplate.permissions.map(p => ( + const permissions = this.props.permissionTemplate.permissions.map(p => - )); + ); return ( diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js index 0cac1b1bac1..5e0d4ea196b 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.js @@ -38,7 +38,9 @@ export default class NameCell extends React.PureComponent { return ( - {t.name} + + {t.name} + {t.defaultFor.length > 0 && diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.js index 326b2f7d68b..ed2554903bd 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/PermissionCell.js @@ -38,10 +38,16 @@ export default class PermissionCell extends React.PureComponent { {translate('permission_templates.project_creators')} }
    • - {p.usersCount}{' user(s)'} + + {p.usersCount} + + {' user(s)'}
    • - {p.groupsCount}{' group(s)'} + + {p.groupsCount} + + {' group(s)'}
    diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js index f36ded96c5b..a0191df28f0 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js @@ -216,14 +216,12 @@ export default class Template extends React.PureComponent { onSelectPermission={this.handleSelectPermission} onToggleUser={this.handleToggleUser} onToggleGroup={this.handleToggleGroup}> - -
    ); diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js index ba49d7fa27b..231992c4b73 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js @@ -71,9 +71,10 @@ class AllHoldersList extends React.PureComponent { } render() { - const order = this.props.organization && !this.props.organization.isDefault - ? PERMISSIONS_FOR_CUSTOM_ORG - : PERMISSIONS_ORDER; + const order = + this.props.organization && !this.props.organization.isDefault + ? PERMISSIONS_FOR_CUSTOM_ORG + : PERMISSIONS_ORDER; const l10nPrefix = this.props.organization ? 'organizations_permissions' : 'global_permissions'; @@ -92,14 +93,12 @@ class AllHoldersList extends React.PureComponent { onSelectPermission={this.props.onSelectPermission} onToggleUser={this.handleToggleUser.bind(this)} onToggleGroup={this.handleToggleGroup.bind(this)}> - - ); } diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js index a75573a643a..933fbb7421e 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js @@ -43,11 +43,15 @@ class PageHeader extends React.PureComponent { return (
    -

    {title}

    +

    + {title} +

    {this.props.loading && } -
    {description}
    +
    + {description} +
    ); } diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js index bbf41cfc88e..f91e5f9c39f 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js @@ -106,14 +106,12 @@ export default class AllHoldersList extends React.PureComponent { onSelectPermission={this.handleSelectPermission} onToggleUser={this.handleToggleUser} onToggleGroup={this.handleToggleGroup}> - - ); } diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/App.js b/server/sonar-web/src/main/js/apps/permissions/project/components/App.js index aba44835c1f..d06a080b3e9 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/App.js +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/App.js @@ -103,23 +103,25 @@ export default class App extends React.PureComponent { const { component } = this.props; const { filter, query, selectedPermission } = this.state; - const getUsers = filter !== 'groups' - ? api.getPermissionsUsersForComponent( - component.key, - query, - selectedPermission, - component.organization - ) - : Promise.resolve([]); + const getUsers = + filter !== 'groups' + ? api.getPermissionsUsersForComponent( + component.key, + query, + selectedPermission, + component.organization + ) + : Promise.resolve([]); - const getGroups = filter !== 'users' - ? api.getPermissionsGroupsForComponent( - component.key, - query, - selectedPermission, - component.organization - ) - : Promise.resolve([]); + const getGroups = + filter !== 'users' + ? api.getPermissionsGroupsForComponent( + component.key, + query, + selectedPermission, + component.organization + ) + : Promise.resolve([]); Promise.all([getUsers, getGroups]).then( responses => { @@ -157,9 +159,8 @@ export default class App extends React.PureComponent { if (this.mounted) { this.setState( (state: State) => ({ - selectedPermission: state.selectedPermission === selectedPermission - ? undefined - : selectedPermission + selectedPermission: + state.selectedPermission === selectedPermission ? undefined : selectedPermission }), this.loadHolders ); @@ -169,33 +170,33 @@ export default class App extends React.PureComponent { addPermissionToGroup = (group: string, permission: string) => this.state.groups.map( candidate => - (candidate.name === group + candidate.name === group ? { ...candidate, permissions: [...candidate.permissions, permission] } - : candidate) + : candidate ); addPermissionToUser = (user: string, permission: string) => this.state.users.map( candidate => - (candidate.login === user + candidate.login === user ? { ...candidate, permissions: [...candidate.permissions, permission] } - : candidate) + : candidate ); removePermissionFromGroup = (group: string, permission: string) => this.state.groups.map( candidate => - (candidate.name === group + candidate.name === group ? { ...candidate, permissions: without(candidate.permissions, permission) } - : candidate) + : candidate ); removePermissionFromUser = (user: string, permission: string) => this.state.users.map( candidate => - (candidate.login === user + candidate.login === user ? { ...candidate, permissions: without(candidate.permissions, permission) } - : candidate) + : candidate ); grantPermissionToGroup = (group: string, permission: string) => { diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js index b746b0ed969..8b968108a19 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js @@ -59,9 +59,10 @@ export default class PageHeader extends React.PureComponent { ? translate('roles.page.description_portfolio') : translate('roles.page.description2'); - const visibilityDescription = component.qualifier === 'TRK' - ? translate('visibility', component.visibility, 'description') - : null; + const visibilityDescription = + component.qualifier === 'TRK' + ? translate('visibility', component.visibility, 'description') + : null; return (
    @@ -79,8 +80,13 @@ export default class PageHeader extends React.PureComponent {
    }
    -

    {description}

    - {visibilityDescription != null &&

    {visibilityDescription}

    } +

    + {description} +

    + {visibilityDescription != null && +

    + {visibilityDescription} +

    }
    ); diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.js b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.js index 498487ae3d4..ed5ee186b7b 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.js +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PublicProjectDisclaimer.js @@ -52,7 +52,6 @@ export default class PublicProjectDisclaimer extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -

    {translateWithParameters('projects_role.turn_x_to_public', this.props.component.name)} @@ -60,7 +59,9 @@ export default class PublicProjectDisclaimer extends React.PureComponent {

    -

    {translate('projects_role.are_you_sure_to_turn_project_to_public')}

    +

    + {translate('projects_role.are_you_sure_to_turn_project_to_public')} +

    {translate('projects_role.are_you_sure_to_turn_project_to_public.2')}

    @@ -70,9 +71,10 @@ export default class PublicProjectDisclaimer extends React.PureComponent { - {translate('cancel')} + + {translate('cancel')} + - ); } diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js index fa051cd0b4c..dc037d86753 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/GroupHolder.js @@ -37,7 +37,7 @@ export default class GroupHolder extends React.PureComponent { render() { const { selectedPermission } = this.props; - const permissionCells = this.props.permissionsOrder.map(p => ( + const permissionCells = this.props.permissionsOrder.map(p => } - )); + ); const { group } = this.props; @@ -60,7 +60,9 @@ export default class GroupHolder extends React.PureComponent {
    - {group.name} + + {group.name} +
    {group.description} diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js index d5c216d865d..d2eee7396c6 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/HoldersList.js @@ -46,19 +46,19 @@ export default class HoldersList extends React.PureComponent { }; renderTooltip = permission => - (this.props.showPublicProjectsWarning && - (permission.key === 'user' || permission.key === 'codeviewer') + this.props.showPublicProjectsWarning && + (permission.key === 'user' || permission.key === 'codeviewer') ?
    {permission.description}
    {translate('projects_role.public_projects_warning')}
    - : permission.description); + : permission.description; renderTableHeader() { const { selectedPermission } = this.props; - const cells = this.props.permissions.map(p => ( + const cells = this.props.permissions.map(p => - )); + ); return ( @@ -99,7 +101,7 @@ export default class HoldersList extends React.PureComponent { } render() { - const users = this.props.users.map(user => ( + const users = this.props.users.map(user => - )); + ); - const groups = this.props.groups.map(group => ( + const groups = this.props.groups.map(group => - )); + ); return ( diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js index 9d370f93081..9687e42732a 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/SearchForm.js @@ -59,7 +59,6 @@ export default class SearchForm extends React.PureComponent { return (
    - ( + const permissionCells = this.props.permissionsOrder.map(p =>
    - )); + ); const { user } = this.props; @@ -67,10 +67,18 @@ export default class UserHolder extends React.PureComponent { />}
    - {user.name} - {!isCreator && {user.login}} + + {user.name} + + {!isCreator && + + {user.login} + }
    - {!isCreator &&
    {user.email}
    } + {!isCreator && +
    + {user.email} +
    } {isCreator &&
    {translate('permission_templates.project_creators.explanation')} diff --git a/server/sonar-web/src/main/js/apps/permissions/styles.css b/server/sonar-web/src/main/js/apps/permissions/styles.css index e57af7a47f4..cf1b4bb5e55 100644 --- a/server/sonar-web/src/main/js/apps/permissions/styles.css +++ b/server/sonar-web/src/main/js/apps/permissions/styles.css @@ -1,4 +1,5 @@ -.permissions-table {} +.permissions-table { +} .permissions-table > tbody > tr > td { border-bottom: 10px solid #fff !important; diff --git a/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js b/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js index ac8ca55598b..06f7189aae5 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js +++ b/server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js @@ -85,7 +85,9 @@ export default class Form extends React.PureComponent { onRequestClose={this.closeModal}>
    -

    {translate('qualifiers.delete.TRK')}

    +

    + {translate('qualifiers.delete.TRK')} +

    diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js index b7beb6b213e..ff202655a41 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js @@ -60,12 +60,16 @@ export default class BulkUpdateResults extends React.PureComponent {
    }
    - - + + - {results.map(result => ( + {results.map(result => - ))} + )}
    {translate('update_key.old_key')}{translate('update_key.new_key')} + {translate('update_key.old_key')} + + {translate('update_key.new_key')} +
    {result.key} @@ -78,7 +82,7 @@ export default class BulkUpdateResults extends React.PureComponent { {result.newKey}
    } diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js b/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js index cc148816e40..2bdd43a5fb3 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/FineGrainedUpdate.js @@ -29,18 +29,16 @@ export default function FineGrainedUpdate(props) {
    - {components.map(component => ( + {components.map(component => - ))} + )}
    - - {' '} - {component.name} + {component.name}
    diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js b/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js index 99ec9764f52..1de387c9721 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/UpdateForm.js @@ -72,8 +72,7 @@ export default class UpdateForm extends React.PureComponent {
    - {' '} + {' '}
    - {translate('event.category', event.category)}: - {' '} - {event.name} + {translate('event.category', event.category)}:{' '} + + {event.name} +
    diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js index b1e03e06656..5e8aa73566b 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js @@ -43,7 +43,7 @@ export default function Events(props: Props) { return (
    - {sortedEvents.map(event => ( + {sortedEvents.map(event => - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.js index 6ce8ad5825b..963128938be 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsHistory.js @@ -147,7 +147,7 @@ export default class GraphsHistory extends React.PureComponent { : }
    - {({ height, width }) => ( + {({ height, width }) =>
    } -
    - )} +
    }
    diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.js index 123bc9548b7..9a8fa09a7da 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsLegendStatic.js @@ -27,7 +27,7 @@ type Props = { export default function GraphsLegendStatic({ series }: Props) { return (
    - {series.map(serie => ( + {series.map(serie => - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContent.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContent.js index f3dae718ad6..5d35236a723 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContent.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContent.js @@ -43,7 +43,9 @@ export default function GraphsTooltipsContent({ serie, translatedName, value }: {value} - {translatedName} + + {translatedName} + ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentCoverage.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentCoverage.js index ca2219e6947..a9be3cdb64b 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentCoverage.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentCoverage.js @@ -38,7 +38,11 @@ export default function GraphsTooltipsContentCoverage({ measuresHistory, tooltip const coverageValue = coverage.history[tooltipIdx].value; return ( -
    + + +
    + + {uncoveredValue && {formatMeasure(uncoveredValue, 'SHORT_INT')} - {translate('metric.uncovered_lines.name')} + + {translate('metric.uncovered_lines.name')} + } {coverageValue && @@ -55,7 +61,9 @@ export default function GraphsTooltipsContentCoverage({ measuresHistory, tooltip className="project-activity-graph-tooltip-value text-right spacer-right thin"> {formatMeasure(coverageValue, 'PERCENT')} - {translate('metric.coverage.name')} + + {translate('metric.coverage.name')} + } ); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentDuplication.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentDuplication.js index cea4d9da585..9a8813fa2f7 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentDuplication.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentDuplication.js @@ -41,14 +41,20 @@ export default function GraphsTooltipsContentDuplication({ measuresHistory, tool } return ( -
    + + +
    + + {formatMeasure(duplicationDensityValue, 'PERCENT')} - {translate('metric.duplicated_lines_density.name')} + + {translate('metric.duplicated_lines_density.name')} + ); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentEvents.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentEvents.js index 4348f21e872..c2759dc7f35 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentEvents.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentEvents.js @@ -30,8 +30,12 @@ type Props = { export default function GraphsTooltipsContentEvents({ events }: Props) { return ( -
    - {events.map(event => ( + + +
    + + + {events.map(event => - ))} + )} ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentOverview.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentOverview.js index f16476bd41e..ecd0f5ac126 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentOverview.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentOverview.js @@ -57,10 +57,14 @@ export default function GraphsTooltipsContentOverview(props: Props) { /> - {props.value} + + {props.value} + {ratingValue && } - {props.serie.translatedName} + + {props.serie.translatedName} + ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js index f6e6bab8dc7..3acdafc99ad 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsZoom.js @@ -44,7 +44,7 @@ export default function GraphsZoom(props: Props) { return (
    - {({ width }) => ( + {({ width }) => - )} + />}
    ); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js index 2706f9d2b14..e6622a72ef7 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js @@ -148,8 +148,12 @@ export default class ProjectActivityAnalysesList extends React.PureComponent { return (
    {this.props.loading - ?
    - : {translate('no_results')}} + ?
    + +
    + : + {translate('no_results')} + }
    ); } @@ -177,7 +181,7 @@ export default class ProjectActivityAnalysesList extends React.PureComponent {
    }
      - {days.map(day => ( + {days.map(day =>
      • {version.byDay[day] != null && - version.byDay[day].map(analysis => ( + version.byDay[day].map(analysis => - ))} + )}
    • - ))} + )}
    ); })} - {this.props.analysesLoading &&
  • } + {this.props.analysesLoading && +
  • + +
  • } ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js index 72490f7d41b..a94b2f6ce26 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js @@ -73,9 +73,7 @@ export default class ProjectActivityAnalysis extends React.PureComponent { className="js-analysis-actions button-small button-compact dropdown-toggle" data-toggle="dropdown" onClick={this.stopPropagation}> - - {' '} - +
      {!hasVersion && @@ -114,7 +112,6 @@ export default class ProjectActivityAnalysis extends React.PureComponent { events={events} isFirst={this.props.isFirst} />} - ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectOption.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectOption.js index 8198162e3c3..a77c653b147 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectOption.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectOption.js @@ -62,7 +62,9 @@ export default class ProjectActivityEventSelectOption extends React.PureComponen onMouseMove={this.handleMouseMove} title={option.label}> - {this.props.children} + + {this.props.children} +
    ); } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectValue.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectValue.js index 3475c1b7e9c..08665bf06e4 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectValue.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectValue.js @@ -33,7 +33,9 @@ export default function ProjectActivityEventSelectValue(props: Props) {
    - {props.children} + + {props.children} +
    ); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js index 028fbc125a1..bcfc6672789 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddEventForm.js @@ -100,15 +100,18 @@ export default class AddEventForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.closeForm}> -
    -

    {translate(this.props.addEventButtonText)}

    +

    + {translate(this.props.addEventButtonText)} +

    - + :
    - + diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js index 69c5a19d918..6d75c964004 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js @@ -105,12 +105,16 @@ export default class AddGraphMetric extends React.PureComponent { overlayClassName="modal-overlay" onRequestClose={this.closeForm}>
    -

    {translate('project_activity.graphs.custom.add_metric')}

    +

    + {translate('project_activity.graphs.custom.add_metric')} +

    - + :
    - + diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js index d96a05f7334..d8a12f791c5 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveAnalysisForm.js @@ -91,9 +91,10 @@ export default class RemoveAnalysisForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.closeForm}> -
    -

    {translate('project_activity.delete_analysis')}

    +

    + {translate('project_activity.delete_analysis')} +

    diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js index b23522db21c..ac50df35dc7 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/forms/RemoveEventForm.js @@ -84,9 +84,10 @@ export default class RemoveEventForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.closeForm}> -
    -

    {translate(this.props.removeEventButtonText)}

    +

    + {translate(this.props.removeEventButtonText)} +

    diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/projectActivity.css b/server/sonar-web/src/main/js/apps/projectActivity/components/projectActivity.css index a42cbc13f2e..7e63c546db9 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/projectActivity.css +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/projectActivity.css @@ -99,11 +99,13 @@ margin-bottom: 8px; } -.project-activity-graph-tooltip-title, .project-activity-graph-tooltip-value { +.project-activity-graph-tooltip-title, +.project-activity-graph-tooltip-value { font-weight: bold; } -.project-activity-days-list {} +.project-activity-days-list { +} .project-activity-day { margin-top: 8px; @@ -120,7 +122,8 @@ font-weight: bold; } -.project-activity-analyses-list {} +.project-activity-analyses-list { +} .project-activity-analysis { position: relative; @@ -238,7 +241,8 @@ background-color: white; } -.project-activity-version-badge.sticky, .project-activity-version-badge.first { +.project-activity-version-badge.sticky, +.project-activity-version-badge.first { position: absolute; top: 0; left: 12px; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/utils.js b/server/sonar-web/src/main/js/apps/projectActivity/utils.js index 83f5960b6e7..cdf5fa75eb7 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/utils.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/utils.js @@ -179,7 +179,7 @@ export const getDisplayedHistoryMetrics = ( ): Array => (isCustomGraph(graph) ? customMetrics : GRAPHS_METRICS_DISPLAYED[graph]); export const getHistoryMetrics = (graph: string, customMetrics: Array): Array => - (isCustomGraph(graph) ? customMetrics : GRAPHS_METRICS[graph]); + isCustomGraph(graph) ? customMetrics : GRAPHS_METRICS[graph]; const parseGraph = (value?: string): string => { const graph = parseAsString(value); diff --git a/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js b/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js index 69f890b5caa..1531bb344dc 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js @@ -66,8 +66,8 @@ class AppContainer extends React.PureComponent { const mapStateToProps = (state, ownProps) => ({ appState: getAppState(state), - organization: ownProps.organization || - getOrganizationByKey(state, getAppState(state).defaultOrganization) + organization: + ownProps.organization || getOrganizationByKey(state, getAppState(state).defaultOrganization) }); const onVisibilityChange = (organization, visibility) => dispatch => { diff --git a/server/sonar-web/src/main/js/apps/projects-admin/ChangeVisibilityForm.js b/server/sonar-web/src/main/js/apps/projects-admin/ChangeVisibilityForm.js index fcb2d35b142..99f70766510 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/ChangeVisibilityForm.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/ChangeVisibilityForm.js @@ -73,13 +73,14 @@ export default class ChangeVisibilityForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {translate('organization.change_visibility_form.header')}

    +

    + {translate('organization.change_visibility_form.header')} +

    - {['public', 'private'].map(visibility => ( + {['public', 'private'].map(visibility =>

    {visibility === 'private' && !canUpdateProjectsVisibilityToPrivate @@ -107,7 +108,7 @@ export default class ChangeVisibilityForm extends React.PureComponent { {translate('visibility', visibility, 'description.short')}

    - ))} + )} {canUpdateProjectsVisibilityToPrivate ?
    @@ -120,9 +121,10 @@ export default class ChangeVisibilityForm extends React.PureComponent { - {translate('cancel')} + + {translate('cancel')} + - ); } diff --git a/server/sonar-web/src/main/js/apps/projects-admin/CreateProjectForm.js b/server/sonar-web/src/main/js/apps/projects-admin/CreateProjectForm.js index 0266656aa8d..adb2353292a 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/CreateProjectForm.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/CreateProjectForm.js @@ -122,19 +122,19 @@ export default class CreateProjectForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> - {createdProject ?
    -

    {translate('qualifiers.create.TRK')}

    +

    + {translate('qualifiers.create.TRK')} +

    - Project - {' '} - {createdProject.name} - {' '} + Project + {createdProject.name} + {' '} has been successfully created.
    @@ -147,7 +147,9 @@ export default class CreateProjectForm extends React.PureComponent {
    :
    -

    {translate('qualifiers.create.TRK')}

    +

    + {translate('qualifiers.create.TRK')} +

    @@ -196,7 +198,9 @@ export default class CreateProjectForm extends React.PureComponent { />
    - + } - ); } diff --git a/server/sonar-web/src/main/js/apps/projects-admin/header.js b/server/sonar-web/src/main/js/apps/projects-admin/header.js index f0b23d0ef61..8538e20cd73 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/header.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/header.js @@ -57,14 +57,13 @@ export default class Header extends React.PureComponent { return (
    -

    {translate('projects_management')}

    +

    + {translate('projects_management')} +

    - {translate('organization.default_visibility_of_new_projects')} - {' '} - - {translate('visibility', organization.projectVisibility)} - + {translate('organization.default_visibility_of_new_projects')}{' '} + {translate('visibility', organization.projectVisibility)} - - {' '} - {project.name} + {project.name} - {project.key} + + {project.key} + {project.visibility === 'private' && } @@ -88,9 +88,7 @@ export default class Projects extends React.PureComponent {
    • @@ -115,7 +113,9 @@ export default class Projects extends React.PureComponent { return ( - {this.props.projects.map(this.renderProject)} + + {this.props.projects.map(this.renderProject)} +
      ); } diff --git a/server/sonar-web/src/main/js/apps/projects-admin/views/BulkApplyTemplateView.js b/server/sonar-web/src/main/js/apps/projects-admin/views/BulkApplyTemplateView.js index 9769576cc53..ee11a8d1eda 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/views/BulkApplyTemplateView.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/views/BulkApplyTemplateView.js @@ -90,9 +90,10 @@ export default ModalForm.extend({ const applyTo = this.$('[name="apply-to"]:checked').val(); this.disableForm(); - const request = applyTo === 'all' - ? this.bulkApplyToAll(permissionTemplate) - : this.bulkApplyToSelected(permissionTemplate); + const request = + applyTo === 'all' + ? this.bulkApplyToAll(permissionTemplate) + : this.bulkApplyToSelected(permissionTemplate); request .then(() => { diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.js b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.js index cc8ebb4af9a..37472169965 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.js +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.js @@ -144,7 +144,7 @@ export default class AllProjects extends React.PureComponent { }); }; - renderSide = () => ( + renderSide = () =>
      -
    - ); +
    ; - renderHeader = () => ( + renderHeader = () =>
    @@ -181,11 +180,10 @@ export default class AllProjects extends React.PureComponent { />
    -
    - ); +
    ; renderMain = () => - (this.getView() === 'visualizations' + this.getView() === 'visualizations' ?
    -
    ); +
    ; render() { return ( diff --git a/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.js b/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.js index 1eb2241cfb1..00d1edf2c22 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.js +++ b/server/sonar-web/src/main/js/apps/projects/components/EmptyInstance.js @@ -23,7 +23,9 @@ import { translate } from '../../../helpers/l10n'; export default function EmptyInstance() { return (
    -

    {translate('projects.no_projects.empty_instance')}

    +

    + {translate('projects.no_projects.empty_instance')} +

    ); } diff --git a/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.js b/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.js index f69fbebc834..86c62bd2a03 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.js +++ b/server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.js @@ -24,8 +24,12 @@ import { translate } from '../../../helpers/l10n'; export default function NoFavoriteProjects() { return (
    -

    {translate('projects.no_favorite_projects')}

    -

    {translate('projects.no_favorite_projects.engagement')}

    +

    + {translate('projects.no_favorite_projects')} +

    +

    + {translate('projects.no_favorite_projects.engagement')} +

    {translate('projects.explore_projects')} diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js index 356690901e6..588920ead76 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/projects/components/PageHeader.js @@ -101,8 +101,7 @@ export default function PageHeader(props: Props) { {props.projectsAppState.total != null && - {props.projectsAppState.total} - {' '} + {props.projectsAppState.total}{' '} {translate('projects._projects')} }

    diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js index 65fa894d22c..ab9dcd4326a 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js +++ b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.js @@ -83,7 +83,9 @@ export default function PageSidebar({
    } -

    {translate('filters')}

    +

    + {translate('filters')} +

    {!isLeakView && [ diff --git a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.js b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.js index 8f6f5f41c0d..6dff8ffa6de 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.js +++ b/server/sonar-web/src/main/js/apps/projects/components/PerspectiveSelect.js @@ -66,7 +66,9 @@ export default class PerspectiveSelect extends React.PureComponent { const perspective = view === 'visualizations' ? visualization : view; return (
    - + {option < 6 ? getCoverageRatingLabel(option) - : {translate('no_data')}} + : + {translate('no_data')} + } ); diff --git a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js index 371da910a82..5b9f30484c0 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/DuplicationsFilter.js @@ -57,7 +57,9 @@ export default class DuplicationsFilter extends React.PureComponent { {option < 6 ? getDuplicationsRatingLabel(option) - : {translate('no_data')}} + : + {translate('no_data')} + } ); diff --git a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js index bdc9fc66948..876eb1e7abf 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/Filter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/Filter.js @@ -113,9 +113,8 @@ export default class Filter extends React.PureComponent { ); const path = this.getPath(option); - const facetValue = facet && getFacetValueForOption - ? getFacetValueForOption(facet, option) - : null; + const facetValue = + facet && getFacetValueForOption ? getFacetValueForOption(facet, option) : null; const isUnderSelectedOption = this.highlightUnder(value) && option > value; diff --git a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js index 52e52bc92a2..69d68a033ff 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/IssuesFilter.js @@ -44,7 +44,9 @@ export default class IssuesFilter extends React.PureComponent { {option > 1 && option < 5 && - {translate('and_worse')}} + + {translate('and_worse')} + } ); } diff --git a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.js index d610b721939..6548c9441e0 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/LanguagesFilter.js @@ -60,12 +60,11 @@ export default class LanguagesFilter extends React.PureComponent { getFacetValueForOption = (facet: {} = {}, option: string) => facet[option]; - renderOption = (option: string) => ( + renderOption = (option: string) => - ); + />; render() { return ( diff --git a/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.js b/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.js index 0dbb948a577..9e42ab27e69 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/NewReliabilityFilter.js @@ -29,7 +29,10 @@ export default function NewReliabilityFilter(props) { className="leak-facet-box" headerDetail={ - {'('}{translate('metric.bugs.name')}{' )'} + {'('} + + {translate('metric.bugs.name')} + {' )'} } name="Reliability" diff --git a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js index ef176a9e45e..ed8877f6df5 100644 --- a/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js +++ b/server/sonar-web/src/main/js/apps/projects/filters/SearchableFilterOption.js @@ -28,6 +28,10 @@ export default class SearchableFilterOption extends React.PureComponent { render() { const optionName = this.props.option ? this.props.option.name : this.props.optionKey; - return {this.props.optionKey !== '' ? optionName : translate('unknown')}; + return ( + + {this.props.optionKey !== '' ? optionName : translate('unknown')} + + ); } } diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/RatingsLegend.js b/server/sonar-web/src/main/js/apps/projects/visualizations/RatingsLegend.js index 246ce40c685..b22d9729157 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/RatingsLegend.js +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/RatingsLegend.js @@ -25,7 +25,7 @@ import { RATING_COLORS } from '../../../helpers/constants'; export default function RatingsLegend() { return (
    - {[1, 2, 3, 4, 5].map(rating => ( + {[1, 2, 3, 4, 5].map(rating =>
    {formatMeasure(rating, 'RATING')}
    - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.js b/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.js index 5a4f0cac15d..fc881790b54 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.js +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Risk.js @@ -63,9 +63,10 @@ export default class Risk extends React.PureComponent { color1: ?number, color2: ?number ) { - const fullProjectName = this.props.displayOrganizations && project.organization - ? `${project.organization.name} / ${project.name}` - : `${project.name}`; + const fullProjectName = + this.props.displayOrganizations && project.organization + ? `${project.organization.name} / ${project.name}` + : `${project.name}`; const inner = [ `
    ${fullProjectName}
    `, this.getMetricTooltip({ key: COLOR_METRIC_1, type: COLOR_METRIC_TYPE }, color1), @@ -81,22 +82,20 @@ export default class Risk extends React.PureComponent { const items = this.props.projects.map(project => { const x = project.measures[X_METRIC] != null ? Number(project.measures[X_METRIC]) : null; const y = project.measures[Y_METRIC] != null ? Number(project.measures[Y_METRIC]) : null; - const size = project.measures[SIZE_METRIC] != null - ? Number(project.measures[SIZE_METRIC]) - : null; - const color1 = project.measures[COLOR_METRIC_1] != null - ? Number(project.measures[COLOR_METRIC_1]) - : null; - const color2 = project.measures[COLOR_METRIC_2] != null - ? Number(project.measures[COLOR_METRIC_2]) - : null; + const size = + project.measures[SIZE_METRIC] != null ? Number(project.measures[SIZE_METRIC]) : null; + const color1 = + project.measures[COLOR_METRIC_1] != null ? Number(project.measures[COLOR_METRIC_1]) : null; + const color2 = + project.measures[COLOR_METRIC_2] != null ? Number(project.measures[COLOR_METRIC_2]) : null; return { x: x || 0, y: y || 0, size: size || 0, - color: color1 != null && color2 != null - ? RATING_COLORS[Math.max(color1, color2) - 1] - : undefined, + color: + color1 != null && color2 != null + ? RATING_COLORS[Math.max(color1, color2) - 1] + : undefined, key: project.key, tooltip: this.getTooltip(project, x, y, size, color1, color2), link: getProjectUrl(project.key) diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.js b/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.js index abf13ea589c..ede73dbf87b 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.js +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/SimpleBubbleChart.js @@ -53,9 +53,10 @@ export default class SimpleBubbleChart extends React.PureComponent { } getTooltip(project: Project, x: ?number, y: ?number, size: ?number, color?: number) { - const fullProjectName = this.props.displayOrganizations && project.organization - ? `${project.organization.name} / ${project.name}` - : `${project.name}`; + const fullProjectName = + this.props.displayOrganizations && project.organization + ? `${project.organization.name} / ${project.name}` + : `${project.name}`; const inner = [ `
    ${fullProjectName}
    `, @@ -78,15 +79,14 @@ export default class SimpleBubbleChart extends React.PureComponent { const items = this.props.projects .filter(project => colorMetric == null || project.measures[colorMetric] !== null) .map(project => { - const x = project.measures[xMetric.key] != null - ? Number(project.measures[xMetric.key]) - : null; - const y = project.measures[yMetric.key] != null - ? Number(project.measures[yMetric.key]) - : null; - const size = project.measures[sizeMetric.key] != null - ? Number(project.measures[sizeMetric.key]) - : null; + const x = + project.measures[xMetric.key] != null ? Number(project.measures[xMetric.key]) : null; + const y = + project.measures[yMetric.key] != null ? Number(project.measures[yMetric.key]) : null; + const size = + project.measures[sizeMetric.key] != null + ? Number(project.measures[sizeMetric.key]) + : null; const color = colorMetric ? Number(project.measures[colorMetric]) : undefined; return { x: x || 0, diff --git a/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.js b/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.js index cc7627f740f..ee32e11c30f 100644 --- a/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.js +++ b/server/sonar-web/src/main/js/apps/projects/visualizations/Visualizations.js @@ -60,7 +60,9 @@ export default class Visualizations extends React.PureComponent { return (
    } } - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js index cfd353cc655..b9e07816788 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.js @@ -100,11 +100,15 @@ export default class Conditions extends React.PureComponent { {uniqDuplicates.length > 0 &&
    -

    {translate('quality_gates.duplicated_conditions')}

    +

    + {translate('quality_gates.duplicated_conditions')} +

      - {uniqDuplicates.map(d => ( -
    • {getLocalizedMetricName(d.metric)}
    • - ))} + {uniqDuplicates.map(d => +
    • + {getLocalizedMetricName(d.metric)} +
    • + )}
    } @@ -131,7 +135,7 @@ export default class Conditions extends React.PureComponent { - {sortedConditions.map((condition, index) => ( + {sortedConditions.map((condition, index) => - ))} + )} :
    diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js index a7d754f2028..334b4d2a397 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionsAlert.js @@ -45,19 +45,13 @@ export default class ConditionsAlert extends Component { {translate('quality_gates.health_icons')}
    • - - {' '} - {translate('alerts.notes.ok')} + {translate('alerts.notes.ok')}
    • - - {' '} - {translate('alerts.notes.warn')} + {translate('alerts.notes.warn')}
    • - - {' '} - {translate('alerts.notes.error')} + {translate('alerts.notes.error')}
    } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.js b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.js index 55cf486fbbd..e7252e1d9be 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.js @@ -50,7 +50,9 @@ export default function DetailsHeader({ return (
    -

    {qualityGate.name}

    +

    + {qualityGate.name} +

    {edit &&
    diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js b/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js index e1c4c262097..e7ccb6c49f3 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Intro.js @@ -24,8 +24,12 @@ export default function Intro() { return (
    -

    {translate('quality_gates.intro.1')}

    -

    {translate('quality_gates.intro.2')}

    +

    + {translate('quality_gates.intro.1')} +

    +

    + {translate('quality_gates.intro.2')} +

    ); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/List.js b/server/sonar-web/src/main/js/apps/quality-gates/components/List.js index 51f4f6b4c7b..9729392a1b8 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/List.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/List.js @@ -24,7 +24,7 @@ import { translate } from '../../../helpers/l10n'; export default function List({ qualityGates }) { return (
    - {qualityGates.map(qualityGate => ( + {qualityGates.map(qualityGate => {qualityGate.isDefault && - {translate('default')}} + + {translate('default')} + } - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js index 2c48ed591a3..e7717e0a40f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ListHeader.js @@ -29,7 +29,9 @@ export default function ListHeader({ canEdit, onAdd }) { return (
    -

    {translate('quality_gates.page')}

    +

    + {translate('quality_gates.page')} +

    {canEdit &&
    diff --git a/server/sonar-web/src/main/js/apps/quality-gates/styles.css b/server/sonar-web/src/main/js/apps/quality-gates/styles.css index f9a40f07de4..76653cb7171 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/styles.css +++ b/server/sonar-web/src/main/js/apps/quality-gates/styles.css @@ -5,4 +5,4 @@ .quality-gate-section + .quality-gate-section { margin-top: 10px; padding-top: 20px; -} \ No newline at end of file +} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.js b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.js index 87b52056f88..01ae2464b8e 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.js @@ -67,7 +67,9 @@ export default class Changelog extends React.PureComponent { {!isBulkChange && (event.authorName - ? {event.authorName} + ? + {event.authorName} + : System)} @@ -93,17 +95,25 @@ export default class Changelog extends React.PureComponent { - {translate('date')} - {' '} - + {translate('date')} + + + {translate('user')} + + + {translate('action')} + + + {translate('rule')} + + + {translate('parameters')} - {translate('user')} - {translate('action')} - {translate('rule')} - {translate('parameters')} - {rows} + + {rows} + ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.js b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.js index 6377b4f3799..f905a86df53 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangesList.js @@ -34,13 +34,13 @@ export default class ChangesList extends React.PureComponent { return (
      - {Object.keys(changes).map(key => ( + {Object.keys(changes).map(key =>
    • {key === 'severity' ? : }
    • - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.js b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.js index d6f03008f15..d1ead07091a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/SeverityChange.js @@ -32,8 +32,7 @@ export default class SeverityChange extends React.PureComponent { render() { return (
    - {translate('quality_profiles.severity_set_to')} - {' '} + {translate('quality_profiles.severity_set_to')}{' '}
    ); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js index 0e5e292b694..208346cc636 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js @@ -42,11 +42,8 @@ export default class ComparisonResults extends React.PureComponent { renderRule(rule: { key: string, name: string }, severity: string) { return (
    - - {' '} - - {rule.name} - + {' '} + {rule.name}
    ); } @@ -57,11 +54,15 @@ export default class ComparisonResults extends React.PureComponent { } return (
      - {Object.keys(params).map(key => ( + {Object.keys(params).map(key =>
    • - {key}{': '}{params[key]} + + {key} + {': '} + {params[key]} +
    • - ))} + )}
    ); } @@ -74,20 +75,24 @@ export default class ComparisonResults extends React.PureComponent {
    - {translateWithParameters('quality_profiles.x_rules_only_in', this.props.inLeft.length)} - {' '} + {translateWithParameters( + 'quality_profiles.x_rules_only_in', + this.props.inLeft.length + )}{' '} {this.props.left.name}
      ); - const rows = this.props.inLeft.map(rule => ( + const rows = this.props.inLeft.map(rule => - {this.renderRule(rule, rule.severity)} + + {this.renderRule(rule, rule.severity)} +   - )); + ); return [header, ...rows]; } @@ -100,19 +105,23 @@ export default class ComparisonResults extends React.PureComponent {  
    - {translateWithParameters('quality_profiles.x_rules_only_in', this.props.inRight.length)} - {' '} + {translateWithParameters( + 'quality_profiles.x_rules_only_in', + this.props.inRight.length + )}{' '} {this.props.right.name}
    ); - const rows = this.props.inRight.map(rule => ( + const rows = this.props.inRight.map(rule =>   - {this.renderRule(rule, rule.severity)} + + {this.renderRule(rule, rule.severity)} + - )); + ); return [header, ...rows]; } @@ -134,11 +143,19 @@ export default class ComparisonResults extends React.PureComponent { ); const secondHeader = ( -
    {this.props.left.name}
    -
    {this.props.right.name}
    + +
    + {this.props.left.name} +
    + + +
    + {this.props.right.name} +
    + ); - const rows = this.props.modified.map(rule => ( + const rows = this.props.modified.map(rule => {this.renderRule(rule, rule.left.severity)} @@ -149,7 +166,7 @@ export default class ComparisonResults extends React.PureComponent { {this.renderParameters(rule.right.params)} - )); + ); return [header, secondHeader, ...rows]; } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInBadge.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInBadge.js index 1703b88767f..8df1be7a80d 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInBadge.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/BuiltInBadge.js @@ -37,13 +37,16 @@ export default function BuiltInBadge(props: Props) { const overlay = ( - {translate('quality_profiles.built_in.description.1')} - {' '} + {translate('quality_profiles.built_in.description.1')}{' '} {translate('quality_profiles.built_in.description.2')} ); - return props.tooltip ? {badge} : badge; + return props.tooltip + ? + {badge} + + : badge; } BuiltInBadge.defaultProps = { diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.js index 3ced39bc3e3..ca7cf6363e3 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/CopyProfileForm.js @@ -94,15 +94,17 @@ export default class CopyProfileForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {header}

    +

    + {header} +

    - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.js index 03ca6da00cd..d83588a3baa 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/DeleteProfileForm.js @@ -75,10 +75,11 @@ export default class DeleteProfileForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {header}

    +

    + {header} +

    @@ -113,7 +114,6 @@ export default class DeleteProfileForm extends React.PureComponent {
    - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js index 7077dd39aaf..67d3ad79a87 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileDate.js @@ -33,7 +33,11 @@ export default class ProfileDate extends React.PureComponent { const { date } = this.props; if (!date) { - return {translate('never')}; + return ( + + {translate('never')} + + ); } return ( diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.js index 9a2af870205..a75ba8197ec 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/RenameProfileForm.js @@ -94,15 +94,17 @@ export default class RenameProfileForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {header}

    +

    + {header} +

    - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.js index ddf97081803..a14e64384b8 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.js @@ -105,10 +105,11 @@ export default class ChangeParentForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {translate('quality_profiles.change_parent')}

    +

    + {translate('quality_profiles.change_parent')} +

    @@ -139,7 +140,6 @@ export default class ChangeParentForm extends React.PureComponent {
    - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.js index 6f46189d3e3..45e2d1fcae2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeProjectsForm.js @@ -84,9 +84,10 @@ export default class ChangeProjectsForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    -

    {header}

    +

    + {header} +

    @@ -94,9 +95,10 @@ export default class ChangeProjectsForm extends React.PureComponent {
    - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.js index be6702dd7ed..2d387eff92c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.js @@ -58,16 +58,18 @@ export default class ProfileExporters extends React.PureComponent { return (
    -

    {translate('quality_profiles.exporters')}

    +

    + {translate('quality_profiles.exporters')} +

      - {exportersForLanguage.map(exporter => ( + {exportersForLanguage.map(exporter =>
    • {exporter.name}
    • - ))} + )}
    ); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js index 2073ecb7c2a..3f802ef13ee 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.js @@ -48,9 +48,7 @@ export default class ProfileHeader extends React.PureComponent { const { profile } = this.props; let inner = ( - {translate('quality_profiles.updated_')} - {' '} - + {translate('quality_profiles.updated_')} ); if (isStagnant(profile)) { @@ -71,9 +69,7 @@ export default class ProfileHeader extends React.PureComponent { const { profile } = this.props; let inner = ( - {translate('quality_profiles.used_')} - {' '} - + {translate('quality_profiles.used_')} ); if (!profile.lastUsed) { @@ -114,7 +110,9 @@ export default class ProfileHeader extends React.PureComponent { language={profile.language} name={profile.name} organization={organization}> - {profile.name} + + {profile.name} + {profile.isBuiltIn && } @@ -133,9 +131,7 @@ export default class ProfileHeader extends React.PureComponent {
  • {ancestors != null && - ancestors.map((ancestor, index) => ( + ancestors.map((ancestor, index) => - ))} + )} {this.state.children != null && - this.state.children.map(child => ( + this.state.children.map(child => - ))} + )} } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.js index e3b08402dd6..0c59dec26be 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.js @@ -119,17 +119,15 @@ export default class ProfileProjects extends React.PureComponent { return (
      - {projects.map(project => ( + {projects.map(project =>
    • - - {' '} - {project.name} + {project.name}
    • - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js index 51bc22ee082..fe68a8385d8 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js @@ -150,10 +150,16 @@ export default class ProfileRules extends React.PureComponent { -

    {translate('rules')}

    +

    + {translate('rules')} +

    + + + {translate('active')} + + + {translate('inactive')} - {translate('active')} - {translate('inactive')} @@ -164,7 +170,7 @@ export default class ProfileRules extends React.PureComponent { qprofile={profile.key} total={this.state.total} /> - {TYPES.map(type => ( + {TYPES.map(type => - ))} + )} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.js b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.js index 4219dbd37f6..895fc4ca6c4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/CreateProfileForm.js @@ -114,22 +114,25 @@ export default class CreateProfileForm extends React.PureComponent { className="modal" overlayClassName="modal-overlay" onRequestClose={this.props.onClose}> -
    (this.form = node)}> -
    -

    {header}

    +

    + {header} +

    {this.state.preloading - ?
    + ?
    + +
    :
    } @@ -150,9 +151,7 @@ export default class RestoreProfileForm extends React.PureComponent { {translate('close')}
    } - - ); } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/styles.css b/server/sonar-web/src/main/js/apps/quality-profiles/styles.css index 2712ddf243e..f00a77c24b1 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/styles.css +++ b/server/sonar-web/src/main/js/apps/quality-profiles/styles.css @@ -11,7 +11,8 @@ padding-bottom: 10px; } -.quality-profiles-table-name {} +.quality-profiles-table-name { +} .quality-profiles-table-inheritance { width: 280px; @@ -104,7 +105,8 @@ margin-top: 20px; } -.quality-profile-inheritance {} +.quality-profile-inheritance { +} .quality-profile-not-found { padding-top: 100px; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/utils.js b/server/sonar-web/src/main/js/apps/quality-profiles/utils.js index c9af9dc3f88..a98b28b9acb 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/utils.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/utils.js @@ -71,7 +71,7 @@ export function isStagnant(profile: Profile) { } export const getProfilesPath = (organization: ?string) => - (organization ? `/organizations/${organization}/quality_profiles` : '/profiles'); + organization ? `/organizations/${organization}/quality_profiles` : '/profiles'; export const getProfilesForLanguagePath = (language: string, organization: ?string) => ({ pathname: getProfilesPath(organization), diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.js b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.js index 3ac61372fdf..dbfca919bae 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.js @@ -64,12 +64,14 @@ export default class LoginForm extends React.PureComponent { render() { return (
    -

    {translate('login.login_to_sonarqube')}

    +

    + {translate('login.login_to_sonarqube')} +

    {this.props.identityProviders.length > 0 &&
    } @@ -101,7 +105,9 @@ export default class LoginForm extends React.PureComponent {
    - +
    - +
    - - {translate('cancel')} + + + {translate('cancel')} +
    } diff --git a/server/sonar-web/src/main/js/apps/sessions/components/SimpleSessionsContainer.js b/server/sonar-web/src/main/js/apps/sessions/components/SimpleSessionsContainer.js index 1973d6fd996..2c6820f55f7 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/SimpleSessionsContainer.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/SimpleSessionsContainer.js @@ -26,5 +26,9 @@ type Props = { }; export default function SimpleSessionsContainer({ children }: Props) { - return {children}; + return ( + + {children} + + ); } diff --git a/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js b/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js index 5be984a1524..52f00e1b8f6 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.js @@ -31,7 +31,7 @@ export default class Unauthorized extends React.PureComponent { return (

    - {'You\'re not authorized to access this page. Please contact the administrator.'} + {"You're not authorized to access this page. Please contact the administrator."}

    {!!message && diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoriesList.js b/server/sonar-web/src/main/js/apps/settings/components/CategoriesList.js index 676f5511174..aee685e3d61 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/CategoriesList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/CategoriesList.js @@ -49,9 +49,8 @@ export default class CategoriesList extends React.PureComponent { query.id = this.props.component.key; } - const className = category.key.toLowerCase() === this.props.selectedCategory.toLowerCase() - ? 'active' - : ''; + const className = + category.key.toLowerCase() === this.props.selectedCategory.toLowerCase() ? 'active' : ''; const pathname = this.props.component ? '/project/settings' : '/settings'; @@ -71,11 +70,11 @@ export default class CategoriesList extends React.PureComponent { return (
      - {sortedCategories.map(category => ( + {sortedCategories.map(category =>
    • {this.renderLink(category)}
    • - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js index 4f156e2a521..d686f9097db 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionDefaults.js @@ -50,9 +50,13 @@ export default class DefinitionDefaults extends React.PureComponent { {isExplicitlySet &&
    - + - {translate('default')}{': '}{getDefaultValue(setting)} + {translate('default')} + {': '} + {getDefaultValue(setting)}
    }
    diff --git a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js index 7a6c4c6d8e5..8a9399e2c8b 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/DefinitionsList.js @@ -30,11 +30,11 @@ export default class DefinitionsList extends React.PureComponent { render() { return (
      - {this.props.settings.map(setting => ( + {this.props.settings.map(setting =>
    • - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js index 2017a265f2c..89e821bc5fb 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js +++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js @@ -50,7 +50,9 @@ class EmailForm extends React.PureComponent { render() { return (
    -

    {translate('email_configuration.test.title')}

    +

    + {translate('email_configuration.test.title')} +

    this.handleFormSubmit(e)}> {this.state.success && diff --git a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js index c4bf4675a9c..44fc1f1976c 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/settings/components/PageHeader.js @@ -27,18 +27,24 @@ export default class PageHeader extends React.PureComponent { }; render() { - const title = this.props.component != null - ? translate('project_settings.page') - : translate('settings.page'); + const title = + this.props.component != null + ? translate('project_settings.page') + : translate('settings.page'); - const description = this.props.component != null - ? translate('project_settings.page.description') - : translate('settings.page.description'); + const description = + this.props.component != null + ? translate('project_settings.page.description') + : translate('settings.page.description'); return (
    -

    {title}

    -
    {description}
    +

    + {title} +

    +
    + {description} +
    ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js index 8aceab77b13..51186fde3b8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/SubCategoryDefinitionsList.js @@ -51,9 +51,11 @@ export default class SubCategoryDefinitionsList extends React.PureComponent { return (
      - {sortedSubCategories.map(subCategory => ( + {sortedSubCategories.map(subCategory =>
    • -

      {subCategory.name}

      +

      + {subCategory.name} +

      {subCategory.description != null &&
      {this.renderEmailForm(subCategory.key)}
    • - ))} + )}
    ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/WildcardsHelp.js b/server/sonar-web/src/main/js/apps/settings/components/WildcardsHelp.js index 071989e672e..c0ee695b2b6 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/WildcardsHelp.js +++ b/server/sonar-web/src/main/js/apps/settings/components/WildcardsHelp.js @@ -99,9 +99,7 @@ export default function WildcardsHelp() { - - **/foo?.js - + **/foo?.js
    • src/foo1.js
    • diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js index 66f02465338..66794971de7 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForBoolean.js @@ -36,7 +36,10 @@ export default class InputForBoolean extends React.PureComponent {
      - {!hasValue && {translate('settings.not_set')}} + {!hasValue && + + {translate('settings.not_set')} + }
      ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js index 9f7a35f3f4e..0d95d4d5c17 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/InputForPassword.js @@ -66,7 +66,9 @@ export default class InputForPassword extends React.PureComponent { onChange={e => this.handleInputChange(e)} /> - + this.handleCancelChangeClick(e)}> {translate('cancel')} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js index 5f807976d4d..8a48eede7f9 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/PropertySetInput.js @@ -58,7 +58,7 @@ export default class PropertySetInput extends React.PureComponent { return ( - {setting.definition.fields.map(field => ( + {setting.definition.fields.map(field => - ))} + )} {!isLast &&