]> source.dussan.org Git - sonarqube.git/commitdiff
open projects page by default (#1358)
authorStas Vilchik <vilchiks@gmail.com>
Fri, 4 Nov 2016 13:31:27 +0000 (14:31 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Nov 2016 13:31:27 +0000 (14:31 +0100)
21 files changed:
it/it-tests/src/test/java/it/user/MyAccountPageTest.java
it/it-tests/src/test/java/pageobjects/MyActivityPage.java [deleted file]
it/it-tests/src/test/java/pageobjects/Navigation.java
it/it-tests/src/test/resources/user/BaseIdentityProviderTest/authenticate_user.html
it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details.html
it/it-tests/src/test/resources/user/ExternalAuthenticationTest/external-user-details2.html
it/it-tests/src/test/resources/user/MyAccountPageTest/should_display_user_details.html
server/sonar-web/src/main/js/app/index.js
server/sonar-web/src/main/js/app/store/rootReducer.js
server/sonar-web/src/main/js/apps/account/account.css
server/sonar-web/src/main/js/apps/account/components/Nav.js
server/sonar-web/src/main/js/apps/account/components/UserCard.js
server/sonar-web/src/main/js/apps/account/home/components/FavoriteProjects.js [deleted file]
server/sonar-web/src/main/js/apps/account/home/components/IssuesActivity.js [deleted file]
server/sonar-web/src/main/js/apps/account/home/components/MyActivity.js [deleted file]
server/sonar-web/src/main/js/apps/account/home/components/MyActivityContainer.js [deleted file]
server/sonar-web/src/main/js/apps/account/home/store/actions.js [deleted file]
server/sonar-web/src/main/js/apps/account/home/store/reducer.js [deleted file]
server/sonar-web/src/main/js/apps/account/routes.js
server/sonar-web/src/main/js/main/nav/global/global-nav-branding.js
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb

index 63c11f9549df2ca59c12fc07889953490e424d24..d21ea961fb5a4cdf3d2e4735e388fb96d82a5ca7 100644 (file)
@@ -31,13 +31,9 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.sonarqube.ws.client.PostRequest;
 import org.sonarqube.ws.client.WsClient;
-import pageobjects.MyActivityPage;
 import pageobjects.Navigation;
 import util.selenium.SeleneseTest;
 
-import static com.codeborne.selenide.Condition.visible;
-import static com.codeborne.selenide.WebDriverRunner.url;
-import static org.assertj.core.api.Assertions.assertThat;
 import static util.ItUtils.newAdminWsClient;
 import static util.ItUtils.projectDir;
 
@@ -66,20 +62,6 @@ public class MyAccountPageTest {
     deactivateUser("account-user");
   }
 
-  @Test
-  public void should_open_by_default() {
-    nav.logIn().asAdmin().openHomepage();
-    assertThat(url()).contains("/account");
-  }
-
-  @Test
-  public void should_display_activity () {
-    MyActivityPage page = nav.logIn().asAdmin().openMyActivity();
-    page.getAllIssues().shouldBe(visible);
-    page.getRecentIssues().shouldBe(visible);
-    page.assertNoFavoriteProjects();
-  }
-
   @Test
   public void should_display_user_details() throws Exception {
     Selenese selenese = Selenese.builder().setHtmlTestsInClasspath("should_display_user_details",
diff --git a/it/it-tests/src/test/java/pageobjects/MyActivityPage.java b/it/it-tests/src/test/java/pageobjects/MyActivityPage.java
deleted file mode 100644 (file)
index 8bcb376..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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.
- */
-package pageobjects;
-
-import com.codeborne.selenide.SelenideElement;
-
-import static com.codeborne.selenide.Condition.visible;
-import static com.codeborne.selenide.Selenide.$;
-
-public class MyActivityPage {
-
-  public MyActivityPage() {
-    $("#my-activity-page").shouldBe(visible);
-  }
-
-  public SelenideElement getRecentIssues() {
-    return $("#recent-issues");
-  }
-
-  public SelenideElement getAllIssues() {
-    return $("#all-issues");
-  }
-
-  public SelenideElement getFavoriteProjects() {
-    return $("#favorite-projects");
-  }
-
-  public void assertNoFavoriteProjects() {
-    $("#no-favorite-projects").shouldBe(visible);
-  }
-}
index 8342474a41796b5aa180482b0240b2ff467c7acd..071df520c6eefde7bace198f6ec99e257421371f 100644 (file)
@@ -108,10 +108,6 @@ public class Navigation extends ExternalResource {
     return open("/settings/server_id", ServerIdPage.class);
   }
 
-  public MyActivityPage openMyActivity() {
-    return open("/account", MyActivityPage.class);
-  }
-
   public void open(String relativeUrl) {
     Selenide.open(relativeUrl);
   }
index 809e73272c41a62d60a7a1d23f6c169fa114708b..adb819dd425f253f3675beb1a9d2c86ac460a7f5 100644 (file)
     <td>css=.oauth-providers a</td>
     <td></td>
   </tr>
-  <tr>
-    <td>waitForVisible</td>
-    <td>id=my-activity-page</td>
-    <td></td>
-  </tr>
   <tr>
     <td>waitForText</td>
     <td>id=global-navigation</td>
index f073c8718fb98b95929105c368885112f2050f75..a3e02770e4067d0b19e98872b6e139d6786f8c25 100644 (file)
@@ -40,7 +40,7 @@
   </tr>
   <tr>
     <td>open</td>
-    <td>/account/profile</td>
+    <td>/account/</td>
     <td></td>
   </tr>
   <tr>
index ca5bd80f9c9c5c4ed9569fb60d5adc21d5d0b799..03da75e66ed26b08e1871213a55289521761650b 100644 (file)
@@ -40,7 +40,7 @@
   </tr>
   <tr>
     <td>open</td>
-    <td>/account/profile</td>
+    <td>/account</td>
     <td></td>
   </tr>
   <tr>
index 71efda227c6dbc4447f92965a4b07f509fc85f88..fbe3a925bb5c5f3bfbe6cb60f2ff93edc443b156 100644 (file)
@@ -41,7 +41,7 @@
 </tr>
 <tr>
        <td>open</td>
-       <td>/sonar/account/profile/</td>
+       <td>/sonar/account/</td>
        <td></td>
 </tr>
 <tr>
index 107dc2ae53c7c670417cfe7d70bb71ff8b5b9af5..84268cf48618c9bc8f8bebf238e78562930c191c 100644 (file)
@@ -44,7 +44,7 @@ window.sonarqube.appStarted.then(options => {
       <Provider store={store}>
         <Router history={history}>
           <Route path="/" component={App}>
-            {accountRoutes}
+            <Route path="account">{accountRoutes}</Route>
             {projectsRoutes}
             {qualityGatesRoutes}
             {qualityProfilesRoutes}
index a317c982af6cd049a322b4a436f8118ed88f58cb..3c2ac6abb2b37059d7a19bc3b41c70bc6ae7dad4 100644 (file)
@@ -25,7 +25,6 @@ import languages, * as fromLanguages from './languages/reducer';
 import measures, * as fromMeasures from './measures/reducer';
 import globalMessages, * as fromGlobalMessages from '../../components/store/globalMessages';
 
-import issuesActivity, * as fromIssuesActivity from '../../apps/account/home/store/reducer';
 import projectsApp, * as fromProjectsApp from '../../apps/projects/store/reducer';
 import qualityGatesApp from '../../apps/quality-gates/store/rootReducer';
 
@@ -38,7 +37,6 @@ export default combineReducers({
   users,
 
   // apps
-  issuesActivity,
   projectsApp,
   qualityGatesApp
 });
@@ -63,10 +61,6 @@ export const getFavorites = state => (
     fromFavorites.getFavorites(state.favorites)
 );
 
-export const getIssuesActivity = state => (
-    fromIssuesActivity.getIssuesActivity(state.issuesActivity)
-);
-
 export const getComponentMeasure = (state, componentKey, metricKey) => (
     fromMeasures.getComponentMeasure(state.measures, componentKey, metricKey)
 );
index 130a53eabf35d27d473cd24b9fc8e228c7effd57..10410996517086bcac9c7519c0dd9a40b9344a46 100644 (file)
   float: left;
 }
 
-.account-user > a {
-  display: block;
-  float: left;
-  margin: -10px -15px -10px -10px;
-  padding: 10px 15px 10px 10px;
-  border-bottom: none;
-  border-radius: 3px;
-}
-
-.account-user > a:hover,
-.account-user > a:active {
-  background-color: rgba(0, 0, 0, 0.075);
-}
-
 .account-user h1 {
   line-height: 60px;
 }
index d7e4b1215deb48610fcb75bb8a611292d6823036..f1c94137e749d52d51fbac2d353a1143f113f1bb 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import React from 'react';
-import { Link } from 'react-router';
+import { Link, IndexLink } from 'react-router';
 import { translate } from '../../../helpers/l10n';
 
 const Nav = () => (
     <nav className="account-nav clearfix">
       <ul className="nav navbar-nav nav-tabs">
         <li>
-          <Link to="/account/profile/" activeClassName="active">
+          <IndexLink to="/account/" activeClassName="active">
             {translate('my_account.profile')}
-          </Link>
+          </IndexLink>
         </li>
         <li>
           <Link to="/account/security/" activeClassName="active">
index c9fc96741737e47cec3110437196b263de4dfdb8..da25ea529d770ca72c4b68a73f795130b44ab592 100644 (file)
@@ -18,7 +18,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import React from 'react';
-import { IndexLink } from 'react-router';
 import Avatar from '../../../components/ui/Avatar';
 
 export default class UserCard extends React.Component {
@@ -31,12 +30,10 @@ export default class UserCard extends React.Component {
 
     return (
         <div className="account-user">
-          <IndexLink to="/account/">
-            <div id="avatar" className="pull-left account-user-avatar">
-              <Avatar email={user.email} size={60}/>
-            </div>
-            <h1 id="name" className="pull-left">{user.name}</h1>
-          </IndexLink>
+          <div id="avatar" className="pull-left account-user-avatar">
+            <Avatar email={user.email} size={60}/>
+          </div>
+          <h1 id="name" className="pull-left">{user.name}</h1>
         </div>
     );
   }
diff --git a/server/sonar-web/src/main/js/apps/account/home/components/FavoriteProjects.js b/server/sonar-web/src/main/js/apps/account/home/components/FavoriteProjects.js
deleted file mode 100644 (file)
index c8cf522..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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 React from 'react';
-import { connect } from 'react-redux';
-import sortBy from 'lodash/sortBy';
-import Favorite from '../../../../components/controls/Favorite';
-import Level from '../../../../components/ui/Level';
-import { TooltipsContainer } from '../../../../components/mixins/tooltips-mixin';
-import { getFavorites, getComponentMeasure } from '../../../../app/store/rootReducer';
-import { getComponentUrl, getProjectsUrl } from '../../../../helpers/urls';
-import { fetchFavoriteProjects } from '../store/actions';
-import { translate } from '../../../../helpers/l10n';
-
-class FavoriteProjects extends React.Component {
-  static propTypes = {
-    favorites: React.PropTypes.array,
-    fetchFavoriteProjects: React.PropTypes.func.isRequired
-  };
-
-  componentDidMount () {
-    this.props.fetchFavoriteProjects();
-  }
-
-  renderList () {
-    const { favorites } = this.props;
-
-    if (!favorites) {
-      return null;
-    }
-
-    if (favorites.length === 0) {
-      return (
-          <div id="no-favorite-projects" className="boxed-group boxed-group-inner markdown text-center">
-            <p className="note">{translate('my_activity.no_favorite_projects')}</p>
-            <p>{translate('my_activity.no_favorite_projects.engagement')}</p>
-          </div>
-      );
-    }
-
-    const sorted = sortBy(favorites, project => project.name.toLowerCase());
-
-    return (
-        <ul id="favorite-projects">
-          {sorted.map(project => (
-              <li key={project.key}>
-                <div className="pull-left" style={{ padding: '15px 15px 15px 10px' }}>
-                  <Favorite favorite={true} component={project.key}/>
-                </div>
-
-                <a href={getComponentUrl(project.key)}>
-                  {project.qualityGate != null && (
-                      <span className="pull-right">
-                        <Level level={project.qualityGate}/>
-                      </span>
-                  )}
-                  <strong>{project.name}</strong>
-                </a>
-              </li>
-          ))}
-        </ul>
-    );
-  }
-
-  renderQualityGateTitle () {
-    const { favorites } = this.props;
-
-    const shouldBeRendered = favorites != null && favorites.some(f => f.qualityGate != null);
-
-    if (!shouldBeRendered) {
-      return null;
-    }
-
-    return (
-        <TooltipsContainer>
-          <div className="pull-right note">
-            {translate('overview.quality_gate')}
-            <i className="little-spacer-left icon-help"
-               title={translate('quality_gates.intro.1')}
-               data-toggle="tooltip"/>
-          </div>
-        </TooltipsContainer>
-    );
-  }
-
-  render () {
-    const { favorites } = this.props;
-
-    return (
-        <div className="my-activity-projects">
-          <div className="my-activity-projects-header">
-            {this.renderQualityGateTitle()}
-            <h2>{translate('my_activity.my_favorite_projects')}</h2>
-          </div>
-
-          {favorites == null && (
-              <div className="text-center">
-                <i className="spinner"/>
-              </div>
-          )}
-
-          {this.renderList()}
-
-          <div className="more">
-            <a className="button" href={getProjectsUrl()}>
-              {translate('my_activity.explore_projects')}
-            </a>
-          </div>
-        </div>
-    );
-  }
-}
-
-const mapStateToProps = state => {
-  const fromState = getFavorites(state);
-  const favorites = fromState == null ? null : fromState
-      .filter(component => component.qualifier === 'TRK')
-      .map(component => ({
-        ...component,
-        qualityGate: getComponentMeasure(state, component.key, 'alert_status')
-      }));
-
-  return { favorites };
-};
-
-export default connect(
-    mapStateToProps,
-    { fetchFavoriteProjects }
-)(FavoriteProjects);
diff --git a/server/sonar-web/src/main/js/apps/account/home/components/IssuesActivity.js b/server/sonar-web/src/main/js/apps/account/home/components/IssuesActivity.js
deleted file mode 100644 (file)
index 26200df..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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 React from 'react';
-import { connect } from 'react-redux';
-import { fetchIssuesActivity } from '../store/actions';
-import { getIssuesActivity } from '../../../../app/store/rootReducer';
-import { getIssuesUrl } from '../../../../helpers/urls';
-import { translate } from '../../../../helpers/l10n';
-
-class IssuesActivity extends React.Component {
-  componentDidMount () {
-    this.props.fetchIssuesActivity();
-  }
-
-  getColorClass (number) {
-    if (number == null) {
-      return '';
-    }
-    return number > 0 ? 'text-danger' : 'text-success';
-  }
-
-  renderRecentIssues () {
-    const number = this.props.issuesActivity && this.props.issuesActivity.recent;
-    const url = getIssuesUrl({ resolved: 'false', assignees: '__me__', createdInLast: '1w' });
-
-    return (
-        <a className="my-activity-recent-issues" href={url}>
-          <div id="recent-issues" className={'my-activity-issues-number ' + this.getColorClass(number)}>
-            {number != null ? number : ' ' }
-          </div>
-          <div className="my-activity-issues-note">
-            {translate('my_activity.my_issues')}<br/>{translate('my_activity.last_week')}
-          </div>
-        </a>
-    );
-  }
-
-  renderAllIssues () {
-    const number = this.props.issuesActivity && this.props.issuesActivity.all;
-    const url = getIssuesUrl({ resolved: 'false', assignees: '__me__' });
-
-    return (
-        <a className="my-activity-all-issues" href={url}>
-          <div id="all-issues" className={'my-activity-issues-number ' + this.getColorClass(number)}>
-            {number != null ? number : ' ' }
-          </div>
-          <div className="my-activity-issues-note">
-            {translate('my_activity.my_issues')}<br/>{translate('my_activity.all_time')}
-          </div>
-        </a>
-    );
-  }
-
-  render () {
-    return (
-        <div className="my-activity-issues">
-          {this.renderRecentIssues()}
-          {this.renderAllIssues()}
-        </div>
-    );
-  }
-}
-
-export default connect(
-    state => ({ issuesActivity: getIssuesActivity(state) }),
-    { fetchIssuesActivity }
-)(IssuesActivity);
diff --git a/server/sonar-web/src/main/js/apps/account/home/components/MyActivity.js b/server/sonar-web/src/main/js/apps/account/home/components/MyActivity.js
deleted file mode 100644 (file)
index 43d13d0..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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 React from 'react';
-import IssuesActivity from './IssuesActivity';
-import FavoriteProjects from './FavoriteProjects';
-
-export default class MyActivity extends React.Component {
-  static propTypes = {
-    currentUser: React.PropTypes.object
-  };
-
-  render () {
-    const { currentUser } = this.props;
-
-    return (
-        <div id="my-activity-page">
-
-          {currentUser == null ? (
-
-              <div className="account-body text-center">
-                <i className="spinner"/>
-              </div>
-
-          ) : (
-
-              <div className="account-body">
-                <IssuesActivity/>
-                <FavoriteProjects/>
-              </div>
-
-          )}
-
-        </div>
-    );
-  }
-}
diff --git a/server/sonar-web/src/main/js/apps/account/home/components/MyActivityContainer.js b/server/sonar-web/src/main/js/apps/account/home/components/MyActivityContainer.js
deleted file mode 100644 (file)
index 2e1b986..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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 { connect } from 'react-redux';
-import MyActivity from './MyActivity';
-import { getCurrentUser } from '../../../../app/store/rootReducer';
-
-const mapStateToProps = state => ({
-  currentUser: getCurrentUser(state)
-});
-
-export default connect(mapStateToProps)(MyActivity);
diff --git a/server/sonar-web/src/main/js/apps/account/home/store/actions.js b/server/sonar-web/src/main/js/apps/account/home/store/actions.js
deleted file mode 100644 (file)
index 3bb645a..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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 { getIssuesCount } from '../../../../api/issues';
-import { getFavorites } from '../../../../api/favorites';
-import { receiveFavorites } from '../../../../app/store/favorites/actions';
-import { getMeasures } from '../../../../api/measures';
-import { receiveComponentMeasure } from '../../../../app/store/measures/actions';
-
-export const RECEIVE_ISSUES_ACTIVITY = 'myActivity/RECEIVE_ISSUES_ACTIVITY';
-
-const receiveIssuesActivity = (recent, all) => ({
-  type: RECEIVE_ISSUES_ACTIVITY,
-  recent,
-  all
-});
-
-export const fetchIssuesActivity = () => dispatch => {
-  const query = { resolved: 'false', assignees: '__me__' };
-  Promise.all([
-    getIssuesCount(query),
-    getIssuesCount({ ...query, createdInLast: '1w' })
-  ]).then(responses => dispatch(receiveIssuesActivity(responses[1].issues, responses[0].issues)));
-};
-
-export const fetchFavoriteProjects = () => dispatch => {
-  getFavorites().then(favorites => {
-    dispatch(receiveFavorites(favorites));
-
-    const projects = favorites.filter(component => component.qualifier === 'TRK');
-    Promise.all(projects.map(project => getMeasures(project.key, ['alert_status'])))
-        .then(responses => {
-          responses.forEach((measures, index) => {
-            measures.forEach(measure => {
-              dispatch(receiveComponentMeasure(projects[index].key, measure.metric, measure.value));
-            });
-          });
-        });
-  });
-};
diff --git a/server/sonar-web/src/main/js/apps/account/home/store/reducer.js b/server/sonar-web/src/main/js/apps/account/home/store/reducer.js
deleted file mode 100644 (file)
index 3cf1b34..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2016 SonarSource SA
- * mailto:contact 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 { RECEIVE_ISSUES_ACTIVITY } from './actions';
-
-const reducer = (state = null, action = {}) => {
-  if (action.type === RECEIVE_ISSUES_ACTIVITY) {
-    return { all: action.all, recent: action.recent };
-  }
-
-  return state;
-};
-
-export default reducer;
-
-export const getIssuesActivity = state => state;
index e16ea776ae42ae0e7eb9239c9824a440d1e8521a..212a2f821088ceb6320b64946f8b5a8598f71c4b 100644 (file)
@@ -19,7 +19,6 @@
  */
 import React from 'react';
 import { Route, IndexRoute } from 'react-router';
-import MyActivityContainer from './home/components/MyActivityContainer';
 import Account from './components/Account';
 import ProjectsContainer from './projects/ProjectsContainer';
 import NotificationsContainer from './notifications/NotificationsContainer';
@@ -27,9 +26,8 @@ import Security from './components/Security';
 import Profile from './profile/Profile';
 
 export default (
-    <Route path="account" component={Account}>
-      <IndexRoute component={MyActivityContainer}/>
-      <Route path="profile" component={Profile}/>
+    <Route component={Account}>
+      <IndexRoute component={Profile}/>
       <Route path="security" component={Security}/>
       <Route path="notifications" component={NotificationsContainer}/>
       <Route path="projects" component={ProjectsContainer}/>
index d012ae232bbfabe022a9a3d09ac7fbcf711cf45a..2c33fea9724533a5d1069eb1e4f128d1dee115e7 100644 (file)
@@ -34,7 +34,7 @@ export default React.createClass({
   },
 
   render() {
-    const homeController = window.SS.user ? '/account' : '/';
+    const homeController = window.SS.user ? '/projects/favorite' : '/projects';
     const homeUrl = window.baseUrl + homeController;
     const homeLinkClassName = 'navbar-brand' + (this.props.logoUrl ? ' navbar-brand-custom' : '');
     return (
index 4fb0a3fc1e68417b4c06d7224699931be87a68de..867b7cc97929396f095b02131bbc69ce852b24bf 100644 (file)
@@ -54,7 +54,7 @@ class DashboardController < ApplicationController
       end
     else
       if logged_in?
-        return redirect_to :controller => 'account'
+        return redirect_to :controller => 'projects', :action => 'favorite'
       else
         return redirect_to :controller => 'projects'
       end