From 7353468fe5f8d47b8af0bee8c711784397b767c5 Mon Sep 17 00:00:00 2001 From: Pascal Mugnier Date: Wed, 11 Apr 2018 08:00:27 +0200 Subject: [PATCH] SONAR-10049 New 0 issue message for short lived branches --- .../main/js/apps/issues/components/App.tsx | 4 +-- .../js/apps/issues/components/NoIssues.tsx | 30 +++++++++++++++++++ .../resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index f6ba42afa59..37e354aca8d 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -28,6 +28,7 @@ import ComponentBreadcrumbs from './ComponentBreadcrumbs'; import IssuesList from './IssuesList'; import IssuesSourceViewer from './IssuesSourceViewer'; import MyIssuesFilter from './MyIssuesFilter'; +import NoIssues from './NoIssues'; import NoMyIssues from './NoMyIssues'; import PageActions from './PageActions'; import ConciseIssuesList from '../conciseIssuesList/ConciseIssuesList'; @@ -54,7 +55,6 @@ import { Component, CurrentUser, Issue, Paging, BranchLike } from '../../../app/ import handleRequiredAuthentication from '../../../app/utils/handleRequiredAuthentication'; import Dropdown from '../../../components/controls/Dropdown'; import ListFooter from '../../../components/controls/ListFooter'; -import EmptySearch from '../../../components/common/EmptySearch'; import FiltersHeader from '../../../components/common/FiltersHeader'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; import { Button } from '../../../components/ui/buttons'; @@ -950,7 +950,7 @@ export default class App extends React.PureComponent { )} {paging.total === 0 && - (this.state.myIssues && !this.isFiltered() ? : )} + (this.state.myIssues && !this.isFiltered() ? : )} ); } diff --git a/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx b/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx new file mode 100644 index 00000000000..c6e60fff484 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/issues/components/NoIssues.tsx @@ -0,0 +1,30 @@ +/* + * SonarQube + * Copyright (C) 2009-2018 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +import * as React from 'react'; +import { translate } from '../../../helpers/l10n'; +import '../../../components/common/EmptySearch.css'; + +export default function NoIssues() { + return ( +
+

{translate('issues.no_issues')}

+
+ ); +} diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index aba9c50be01..c27b6630b33 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -620,6 +620,7 @@ issues.to_switch_flows=to switch flows issues.leak_period=Leak Period issues.my_issues=My Issues issues.no_my_issues=There are no issues assigned to you. +issues.no_issues=No Issues. Hooray! issues.x_more_locations=+ {0} more location(s) -- 2.39.5