diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-12-13 13:44:12 +0100 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2018-01-02 10:38:10 +0100 |
commit | 027514e6f94607fcd7df8e69e668fe32aeb2873e (patch) | |
tree | b73db22c100713df85f1a790c4a772300b41a7f5 /server/sonar-web/src/main/js/apps/issues | |
parent | 492cd3de03d14aaf91b54e96531d77079c0db7f1 (diff) | |
download | sonarqube-027514e6f94607fcd7df8e69e668fe32aeb2873e.tar.gz sonarqube-027514e6f94607fcd7df8e69e668fe32aeb2873e.zip |
SONAR-10182 Users should be able to choose their homepage
Diffstat (limited to 'server/sonar-web/src/main/js/apps/issues')
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/App.js | 8 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/components/PageActions.js | 8 |
2 files changed, 15 insertions, 1 deletions
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 a7121ced22d..cc68fbb41c9 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 @@ -56,6 +56,7 @@ import { CurrentUser } from '../utils'; */ import handleRequiredAuthentication from '../../../app/utils/handleRequiredAuthentication'; +import { isLoggedIn } from '../../../app/types'; import ListFooter from '../../../components/controls/ListFooter'; import EmptySearch from '../../../components/common/EmptySearch'; import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper'; @@ -923,6 +924,13 @@ export default class App extends React.PureComponent { </div> ) : ( <PageActions + canSetHome={ + this.props.onSonarCloud && + isLoggedIn(this.props.currentUser) && + this.props.myIssues && + !this.props.organization && + !this.props.component + } loading={this.state.loading} onReload={this.handleReload} paging={paging} diff --git a/server/sonar-web/src/main/js/apps/issues/components/PageActions.js b/server/sonar-web/src/main/js/apps/issues/components/PageActions.js index e939e60869f..2aaca8517e8 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/PageActions.js +++ b/server/sonar-web/src/main/js/apps/issues/components/PageActions.js @@ -19,14 +19,16 @@ */ // @flow import React from 'react'; -import DeferredSpinner from '../../../components/common/DeferredSpinner'; import IssuesCounter from './IssuesCounter'; import ReloadButton from './ReloadButton'; /*:: import type { Paging } from '../utils'; */ +import DeferredSpinner from '../../../components/common/DeferredSpinner'; +import HomePageSelect from '../../../components/controls/HomePageSelect'; import { translate } from '../../../helpers/l10n'; /*:: type Props = {| + canSetHome: bool, loading: boolean, onReload: () => void, paging: ?Paging, @@ -70,6 +72,10 @@ export default class PageActions extends React.PureComponent { <IssuesCounter className="spacer-left" current={selectedIndex} total={paging.total} /> )} </div> + + {this.props.canSetHome && ( + <HomePageSelect className="huge-spacer-left" currentPage={{ type: 'my-issues' }} /> + )} </div> ); } |