From 15ed3abf008b93923fe37457c57913b40989d788 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 21 Jul 2017 10:59:32 +0200 Subject: Rename project activity graph Overview to Issues --- .../js/apps/overview/components/OverviewApp.js | 4 +- .../main/js/apps/overview/events/PreviewGraph.js | 13 ++-- .../events/__tests__/PreviewGraphTooltips-test.js | 7 ++- .../__tests__/__snapshots__/utils-test.js.snap | 10 +-- .../apps/projectActivity/__tests__/utils-test.js | 16 ++--- .../projectActivity/components/GraphsTooltips.js | 7 ++- .../components/GraphsTooltipsContentIssues.js | 70 +++++++++++++++++++++ .../components/GraphsTooltipsContentOverview.js | 66 -------------------- .../components/ProjectActivityAppContainer.js | 3 +- .../components/__tests__/GraphsHistory-test.js | 3 +- .../components/__tests__/GraphsTooltips-test.js | 8 +-- .../__tests__/GraphsTooltipsContentIssues-test.js | 71 ++++++++++++++++++++++ .../GraphsTooltipsContentOverview-test.js | 71 ---------------------- .../__tests__/ProjectActivityAnalysesList-test.js | 3 +- .../__tests__/ProjectActivityApp-test.js | 3 +- .../__tests__/ProjectActivityGraphs-test.js | 3 +- .../__snapshots__/GraphsTooltips-test.js.snap | 8 +-- .../GraphsTooltipsContentIssues-test.js.snap | 59 ++++++++++++++++++ .../GraphsTooltipsContentOverview-test.js.snap | 59 ------------------ .../__snapshots__/ProjectActivityApp-test.js.snap | 4 +- .../ProjectActivityGraphs-test.js.snap | 4 +- .../projectActivity/components/projectActivity.css | 2 +- .../src/main/js/apps/projectActivity/utils.js | 11 ++-- server/sonar-web/src/main/js/helpers/storage.js | 2 +- 24 files changed, 261 insertions(+), 246 deletions(-) create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentIssues.js delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentOverview.js create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.js delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentOverview-test.js create mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentIssues-test.js.snap delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentOverview-test.js.snap (limited to 'server') diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js index 8ca0ce8f45c..bbde489216a 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js +++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js @@ -35,7 +35,7 @@ import { getLeakPeriod } from '../../../helpers/periods'; import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; import { getCustomGraph, getGraph } from '../../../helpers/storage'; import { METRICS, HISTORY_METRICS_LIST } from '../utils'; -import { getDisplayedHistoryMetrics } from '../../projectActivity/utils'; +import { DEFAULT_GRAPH, getDisplayedHistoryMetrics } from '../../projectActivity/utils'; import type { Component, History, MeasuresList, Period } from '../types'; import '../styles.css'; @@ -103,7 +103,7 @@ export default class OverviewApp extends React.PureComponent { loadHistory(component: Component) { let graphMetrics = getDisplayedHistoryMetrics(getGraph(), getCustomGraph()); if (!graphMetrics || graphMetrics.length <= 0) { - graphMetrics = getDisplayedHistoryMetrics('overview', []); + graphMetrics = getDisplayedHistoryMetrics(DEFAULT_GRAPH, []); } const metrics = uniq(HISTORY_METRICS_LIST.concat(graphMetrics)); 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 73eba033873..00592d7b346 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 @@ -23,7 +23,11 @@ import { minBy } from 'lodash'; import { AutoSizer } from 'react-virtualized'; import AdvancedTimeline from '../../../components/charts/AdvancedTimeline'; import PreviewGraphTooltips from './PreviewGraphTooltips'; -import { generateSeries, getDisplayedHistoryMetrics } from '../../projectActivity/utils'; +import { + DEFAULT_GRAPH, + generateSeries, + getDisplayedHistoryMetrics +} from '../../projectActivity/utils'; import { getCustomGraph, getGraph } from '../../../helpers/storage'; import { formatMeasure, getShortType } from '../../../helpers/measures'; import type { Serie } from '../../../components/charts/AdvancedTimeline'; @@ -88,7 +92,7 @@ export default class PreviewGraph extends React.PureComponent { getDisplayedMetrics = (graph: string, customMetrics: Array): Array => { const metrics: Array = getDisplayedHistoryMetrics(graph, customMetrics); if (!metrics || metrics.length <= 0) { - return getDisplayedHistoryMetrics('overview', customMetrics); + return getDisplayedHistoryMetrics(DEFAULT_GRAPH, customMetrics); } return metrics; }; @@ -139,7 +143,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/__tests__/PreviewGraphTooltips-test.js b/server/sonar-web/src/main/js/apps/overview/events/__tests__/PreviewGraphTooltips-test.js index 1b37aaf3691..03f95631867 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/PreviewGraphTooltips-test.js +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/PreviewGraphTooltips-test.js @@ -20,8 +20,9 @@ import React from 'react'; import { shallow } from 'enzyme'; import PreviewGraphTooltips from '../PreviewGraphTooltips'; +import { DEFAULT_GRAPH } from '../../../projectActivity/utils'; -const SERIES_OVERVIEW = [ +const SERIES_ISSUES = [ { name: 'code_smells', style: 1, @@ -74,11 +75,11 @@ const METRICS = [ const DEFAULT_PROPS = { formatValue: val => 'Formated.' + val, - graph: 'overview', + graph: DEFAULT_GRAPH, graphWidth: 150, metrics: METRICS, selectedDate: new Date('2011-10-01T22:01:00.000Z'), - series: SERIES_OVERVIEW, + series: SERIES_ISSUES, tooltipIdx: 0, tooltipPos: 25 }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/__snapshots__/utils-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/__snapshots__/utils-test.js.snap index 14647a21294..52f54d40c25 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/__snapshots__/utils-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/__snapshots__/utils-test.js.snap @@ -69,7 +69,7 @@ Array [ Object { "category": "QUALITY_PROFILE", "key": "AVwQF7zXl-nNFgFWOJ3W", - "name": "Changes in 'Default - SonarSource conventions' (Java)", + "name": "Changes in \\"Default - SonarSource conventions\\" (Java)", }, ], "key": "AVwQF7kwl-nNFgFWOJ3V", @@ -82,7 +82,7 @@ Array [ Object { "category": "QUALITY_PROFILE", "key": "AVxZtC-N7841nF4RNEMJ", - "name": "Changes in 'Default - SonarSource conventions' (Java)", + "name": "Changes in \\"Default - SonarSource conventions\\" (Java)", }, ], "key": "AVxZtCpH7841nF4RNEMI", @@ -130,7 +130,7 @@ Array [ Object { "category": "QUALITY_PROFILE", "key": "AVxZtC-N7841nF4RNEMJ", - "name": "Changes in 'Default - SonarSource conventions' (Java)", + "name": "Changes in \\"Default - SonarSource conventions\\" (Java)", }, ], "key": "AVxZtCpH7841nF4RNEMI", @@ -195,7 +195,7 @@ Array [ Object { "category": "QUALITY_PROFILE", "key": "AVwQF7zXl-nNFgFWOJ3W", - "name": "Changes in 'Default - SonarSource conventions' (Java)", + "name": "Changes in \\"Default - SonarSource conventions\\" (Java)", }, ], "key": "AVwQF7kwl-nNFgFWOJ3V", @@ -208,7 +208,7 @@ Array [ Object { "category": "QUALITY_PROFILE", "key": "AVxZtC-N7841nF4RNEMJ", - "name": "Changes in 'Default - SonarSource conventions' (Java)", + "name": "Changes in \\"Default - SonarSource conventions\\" (Java)", }, ], "key": "AVxZtCpH7841nF4RNEMI", diff --git a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js index b3e4f2b28cf..087184f52b2 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/__tests__/utils-test.js @@ -35,7 +35,7 @@ const ANALYSES = [ { key: 'AVxZtC-N7841nF4RNEMJ', category: 'QUALITY_PROFILE', - name: 'Changes in \'Default - SonarSource conventions\' (Java)' + name: 'Changes in "Default - SonarSource conventions" (Java)' } ] }, @@ -48,7 +48,7 @@ const ANALYSES = [ { key: 'AVwQF7zXl-nNFgFWOJ3W', category: 'QUALITY_PROFILE', - name: 'Changes in \'Default - SonarSource conventions\' (Java)' + name: 'Changes in "Default - SonarSource conventions" (Java)' } ] }, @@ -75,7 +75,7 @@ const HISTORY = [ const QUERY = { category: '', from: new Date('2017-04-27T08:21:32+0200'), - graph: 'overview', + graph: utils.DEFAULT_GRAPH, project: 'foo', to: undefined, selectedDate: undefined, @@ -112,7 +112,7 @@ describe('getAnalysesByVersionByDay', () => { utils.getAnalysesByVersionByDay(ANALYSES, { category: '', customMetrics: [], - graph: 'overview', + graph: utils.DEFAULT_GRAPH, project: 'foo' }) ).toMatchSnapshot(); @@ -122,7 +122,7 @@ describe('getAnalysesByVersionByDay', () => { utils.getAnalysesByVersionByDay(ANALYSES, { category: 'QUALITY_PROFILE', customMetrics: [], - graph: 'overview', + graph: utils.DEFAULT_GRAPH, project: 'foo' }) ).toMatchSnapshot(); @@ -130,7 +130,7 @@ describe('getAnalysesByVersionByDay', () => { utils.getAnalysesByVersionByDay(ANALYSES, { category: '', customMetrics: [], - graph: 'overview', + graph: utils.DEFAULT_GRAPH, project: 'foo', to: new Date('2017-06-09T11:12:27+0200'), from: new Date('2017-05-18T14:13:07+0200') @@ -142,7 +142,7 @@ describe('getAnalysesByVersionByDay', () => { describe('getDisplayedHistoryMetrics', () => { const customMetrics = ['foo', 'bar']; it('should return only displayed metrics on the graph', () => { - expect(utils.getDisplayedHistoryMetrics('overview', [])).toEqual([ + expect(utils.getDisplayedHistoryMetrics(utils.DEFAULT_GRAPH, [])).toEqual([ 'bugs', 'code_smells', 'vulnerabilities' @@ -160,7 +160,7 @@ describe('getDisplayedHistoryMetrics', () => { describe('getHistoryMetrics', () => { const customMetrics = ['foo', 'bar']; it('should return all metrics', () => { - expect(utils.getHistoryMetrics('overview', [])).toEqual([ + expect(utils.getHistoryMetrics(utils.DEFAULT_GRAPH, [])).toEqual([ 'bugs', 'code_smells', 'vulnerabilities', diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js index 43dd36a2323..985961a300c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js @@ -25,7 +25,8 @@ import GraphsTooltipsContent from './GraphsTooltipsContent'; import GraphsTooltipsContentEvents from './GraphsTooltipsContentEvents'; import GraphsTooltipsContentCoverage from './GraphsTooltipsContentCoverage'; import GraphsTooltipsContentDuplication from './GraphsTooltipsContentDuplication'; -import GraphsTooltipsContentOverview from './GraphsTooltipsContentOverview'; +import GraphsTooltipsContentIssues from './GraphsTooltipsContentIssues'; +import { DEFAULT_GRAPH } from '../utils'; import { getLocalizedMetricName } from '../../../helpers/l10n'; import type { Event, MeasureHistory, Metric } from '../types'; import type { Serie } from '../../../components/charts/AdvancedTimeline'; @@ -70,9 +71,9 @@ export default class GraphsTooltips extends React.PureComponent { if (!point || (!point.y && point.y !== 0)) { return null; } - if (this.props.graph === 'overview') { + if (this.props.graph === DEFAULT_GRAPH) { return ( - , + serie: Serie & { translatedName: string }, + tooltipIdx: number, + value: string +}; + +const METRIC_RATING = { + bugs: 'reliability_rating', + vulnerabilities: 'security_rating', + code_smells: 'sqale_rating' +}; + +export default function GraphsTooltipsContentIssues(props: Props) { + const rating = props.measuresHistory.find( + measure => measure.metric === METRIC_RATING[props.serie.name] + ); + if (!rating || !rating.history[props.tooltipIdx]) { + return null; + } + const ratingValue = rating.history[props.tooltipIdx].value; + return ( + + + + + + + {props.value} + + {ratingValue && } + + + {props.serie.translatedName} + + + ); +} 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 deleted file mode 100644 index f16476bd41e..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltipsContentOverview.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 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. - */ -// @flow -import React from 'react'; -import classNames from 'classnames'; -import ChartLegendIcon from '../../../components/icons-components/ChartLegendIcon'; -import Rating from '../../../components/ui/Rating'; -import type { Serie } from '../../../components/charts/AdvancedTimeline'; -import type { MeasureHistory } from '../types'; - -type Props = { - measuresHistory: Array, - serie: Serie & { translatedName: string }, - tooltipIdx: number, - value: string -}; - -const METRIC_RATING = { - bugs: 'reliability_rating', - vulnerabilities: 'security_rating', - code_smells: 'sqale_rating' -}; - -export default function GraphsTooltipsContentOverview(props: Props) { - const rating = props.measuresHistory.find( - measure => measure.metric === METRIC_RATING[props.serie.name] - ); - if (!rating || !rating.history[props.tooltipIdx]) { - return null; - } - const ratingValue = rating.history[props.tooltipIdx].value; - return ( - - - - - - {props.value} - {ratingValue && } - - {props.serie.translatedName} - - ); -} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js index 035693ad599..01a3a09af36 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js @@ -32,6 +32,7 @@ import * as actions from '../actions'; import { getCustomGraph, getGraph } from '../../../helpers/storage'; import { customMetricsChanged, + DEFAULT_GRAPH, getHistoryMetrics, isCustomGraph, parseQuery, @@ -274,7 +275,7 @@ class ProjectActivityAppContainer extends React.PureComponent { // if there is no filter, but there are saved preferences in the localStorage const graph = getGraph(); - return !filtered && graph != null && graph !== 'overview'; + return !filtered && graph != null && graph !== DEFAULT_GRAPH; } }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.js index f13577ae571..20ea2bdcc10 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsHistory-test.js @@ -20,6 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import GraphsHistory from '../GraphsHistory'; +import { DEFAULT_GRAPH } from '../../utils'; const ANALYSES = [ { @@ -81,7 +82,7 @@ const EMPTY_SERIES = [ const DEFAULT_PROPS = { analyses: ANALYSES, eventFilter: '', - graph: 'overview', + graph: DEFAULT_GRAPH, graphEndDate: null, graphStartDate: null, leakPeriodDate: '2017-05-16T13:50:02+0200', diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.js index cebdb8265a7..f80776b6630 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltips-test.js @@ -21,7 +21,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import GraphsTooltips from '../GraphsTooltips'; -const SERIES_OVERVIEW = [ +const SERIES_ISSUES = [ { name: 'code_smells', translatedName: 'metric.code_smells.name', @@ -76,17 +76,17 @@ const METRICS = [ const DEFAULT_PROPS = { formatValue: val => 'Formated.' + val, - graph: 'overview', + graph: 'issues', graphWidth: 500, measuresHistory: [], metrics: METRICS, selectedDate: new Date('2011-10-01T22:01:00.000Z'), - series: SERIES_OVERVIEW, + series: SERIES_ISSUES, tooltipIdx: 0, tooltipPos: 666 }; -it('should render correctly for overview graphs', () => { +it('should render correctly for issues graphs', () => { expect(shallow()).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.js new file mode 100644 index 00000000000..5d5dfaf6e0a --- /dev/null +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentIssues-test.js @@ -0,0 +1,71 @@ +/* + * SonarQube + * Copyright (C) 2009-2017 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 React from 'react'; +import { shallow } from 'enzyme'; +import GraphsTooltipsContentIssues from '../GraphsTooltipsContentIssues'; + +const MEASURES_ISSUES = [ + { + metric: 'bugs', + history: [ + { + date: '2011-10-01T22:01:00.000Z', + value: '500' + }, + { + date: '2011-10-25T10:27:41.000Z', + value: '1.2k' + } + ] + }, + { + metric: 'reliability_rating', + history: [ + { + date: '2011-10-01T22:01:00.000Z' + }, + { + date: '2011-10-25T10:27:41.000Z', + value: '5.0' + } + ] + } +]; + +const DEFAULT_PROPS = { + measuresHistory: MEASURES_ISSUES, + serie: { + name: 'bugs', + translatedName: 'Bugs', + style: 2 + }, + tooltipIdx: 1, + value: '1.2k' +}; + +it('should render correctly', () => { + expect(shallow()).toMatchSnapshot(); +}); + +it('should render correctly when rating data is missing', () => { + expect( + shallow() + ).toMatchSnapshot(); +}); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentOverview-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentOverview-test.js deleted file mode 100644 index cae7b7bcec4..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/GraphsTooltipsContentOverview-test.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2017 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 React from 'react'; -import { shallow } from 'enzyme'; -import GraphsTooltipsContentOverview from '../GraphsTooltipsContentOverview'; - -const MEASURES_OVERVIEW = [ - { - metric: 'bugs', - history: [ - { - date: '2011-10-01T22:01:00.000Z', - value: '500' - }, - { - date: '2011-10-25T10:27:41.000Z', - value: '1.2k' - } - ] - }, - { - metric: 'reliability_rating', - history: [ - { - date: '2011-10-01T22:01:00.000Z' - }, - { - date: '2011-10-25T10:27:41.000Z', - value: '5.0' - } - ] - } -]; - -const DEFAULT_PROPS = { - measuresHistory: MEASURES_OVERVIEW, - serie: { - name: 'bugs', - translatedName: 'Bugs', - style: 2 - }, - tooltipIdx: 1, - value: '1.2k' -}; - -it('should render correctly', () => { - expect(shallow()).toMatchSnapshot(); -}); - -it('should render correctly when rating data is missing', () => { - expect( - shallow() - ).toMatchSnapshot(); -}); diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.js index 762c2d5efe3..147fdeca7d6 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityAnalysesList-test.js @@ -20,6 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import ProjectActivityAnalysesList from '../ProjectActivityAnalysesList'; +import { DEFAULT_GRAPH } from '../../utils'; const ANALYSES = [ { @@ -77,7 +78,7 @@ const DEFAULT_PROPS = { deleteAnalysis: () => {}, deleteEvent: () => {}, loading: false, - query: { category: '', graph: 'overview', project: 'org.sonarsource.sonarqube:sonarqube' }, + query: { category: '', graph: DEFAULT_GRAPH, project: 'org.sonarsource.sonarqube:sonarqube' }, updateQuery: () => {} }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.js index 21c0a40d10c..6f3655c42ec 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityApp-test.js @@ -20,6 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import ProjectActivityApp from '../ProjectActivityApp'; +import { DEFAULT_GRAPH } from '../../utils'; const ANALYSES = [ { @@ -80,7 +81,7 @@ const DEFAULT_PROPS = { ] } ], - query: { category: '', graph: 'overview', project: 'org.sonarsource.sonarqube:sonarqube' }, + query: { category: '', graph: DEFAULT_GRAPH, project: 'org.sonarsource.sonarqube:sonarqube' }, updateQuery: () => {} }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.js b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.js index 07930d40463..7cff6fd832a 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/ProjectActivityGraphs-test.js @@ -20,6 +20,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import ProjectActivityGraphs from '../ProjectActivityGraphs'; +import { DEFAULT_GRAPH } from '../../utils'; const ANALYSES = [ { @@ -71,7 +72,7 @@ const DEFAULT_PROPS = { } ], metricsType: 'INT', - query: { category: '', graph: 'overview', project: 'org.sonarsource.sonarqube:sonarqube' }, + query: { category: '', graph: DEFAULT_GRAPH, project: 'org.sonarsource.sonarqube:sonarqube' }, updateQuery: () => {} }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap index ca571b58091..d0963afa545 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`should render correctly for overview graphs 1`] = ` +exports[`should render correctly for issues graphs 1`] = ` - - - + + + + + + 1.2k + + + + + Bugs + + +`; + +exports[`should render correctly when rating data is missing 1`] = ` + + + + + + + 500 + + + + Bugs + + +`; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentOverview-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentOverview-test.js.snap deleted file mode 100644 index e7f3e105fca..00000000000 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentOverview-test.js.snap +++ /dev/null @@ -1,59 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`should render correctly 1`] = ` - - - - - - - 1.2k - - - - - Bugs - - -`; - -exports[`should render correctly when rating data is missing 1`] = ` - - - - - - - 500 - - - - Bugs - - -`; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap index f966955c248..4c5a46b26a2 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap @@ -67,7 +67,7 @@ exports[`should render correctly 1`] = ` query={ Object { "category": "", - "graph": "overview", + "graph": "issues", "project": "org.sonarsource.sonarqube:sonarqube", } } @@ -146,7 +146,7 @@ exports[`should render correctly 1`] = ` query={ Object { "category": "", - "graph": "overview", + "graph": "issues", "project": "org.sonarsource.sonarqube:sonarqube", } } diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityGraphs-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityGraphs-test.js.snap index 7aaf0a0268d..ecbb6ae98fe 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityGraphs-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityGraphs-test.js.snap @@ -6,7 +6,7 @@ exports[`should render correctly the graph and legends 1`] = ` > ): const parseGraph = (value?: string): string => { const graph = parseAsString(value); - return GRAPH_TYPES.includes(graph) ? graph : 'overview'; + return GRAPH_TYPES.includes(graph) ? graph : DEFAULT_GRAPH; }; -const serializeGraph = (value: string): ?string => (value === 'overview' ? undefined : value); +const serializeGraph = (value: string): ?string => (value === DEFAULT_GRAPH ? undefined : value); export const parseQuery = (urlQuery: RawQuery): Query => ({ category: parseAsString(urlQuery['category']), diff --git a/server/sonar-web/src/main/js/helpers/storage.js b/server/sonar-web/src/main/js/helpers/storage.js index d9bee866b8b..977f184443e 100644 --- a/server/sonar-web/src/main/js/helpers/storage.js +++ b/server/sonar-web/src/main/js/helpers/storage.js @@ -71,4 +71,4 @@ export const getCustomGraph = (): Array => export const saveGraph = (graph: ?string) => save(PROJECT_ACTIVITY_GRAPH, graph); export const getGraph = (): string => - window.localStorage.getItem(PROJECT_ACTIVITY_GRAPH) || 'overview'; + window.localStorage.getItem(PROJECT_ACTIVITY_GRAPH) || 'issues'; -- cgit v1.2.3 From cbd59575a5e66f5d4421bf5625c454db526fc584 Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 21 Jul 2017 13:32:19 +0200 Subject: Correctly display Issues graph as default if no custom metrics are selected. --- .../apps/projectActivity/components/ProjectActivityAppContainer.js | 7 +++++-- server/sonar-web/src/main/js/helpers/storage.js | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js index 01a3a09af36..d5ea86bad0c 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAppContainer.js @@ -273,9 +273,12 @@ class ProjectActivityAppContainer extends React.PureComponent { key => key !== 'id' && locationQuery[key] !== '' ); - // if there is no filter, but there are saved preferences in the localStorage const graph = getGraph(); - return !filtered && graph != null && graph !== DEFAULT_GRAPH; + const emptyCustomGraph = isCustomGraph(graph) && getCustomGraph().length <= 0; + + // if there is no filter, but there are saved preferences in the localStorage + // also don't redirect to custom if there is no metrics selected for it + return !filtered && graph != null && graph !== DEFAULT_GRAPH && !emptyCustomGraph; } }; diff --git a/server/sonar-web/src/main/js/helpers/storage.js b/server/sonar-web/src/main/js/helpers/storage.js index 977f184443e..763aa3d64b1 100644 --- a/server/sonar-web/src/main/js/helpers/storage.js +++ b/server/sonar-web/src/main/js/helpers/storage.js @@ -66,8 +66,10 @@ export const getSort = () => window.localStorage.getItem(PROJECTS_SORT); export const saveCustomGraph = (metrics: ?Array) => save(PROJECT_ACTIVITY_GRAPH_CUSTOM, metrics ? metrics.join(',') : ''); -export const getCustomGraph = (): Array => - (window.localStorage.getItem(PROJECT_ACTIVITY_GRAPH_CUSTOM) || '').split(','); +export const getCustomGraph = (): Array => { + const customGraphs = window.localStorage.getItem(PROJECT_ACTIVITY_GRAPH_CUSTOM); + return customGraphs ? customGraphs.split(',') : []; +}; export const saveGraph = (graph: ?string) => save(PROJECT_ACTIVITY_GRAPH, graph); export const getGraph = (): string => -- cgit v1.2.3 From a5c10797e35669c5372014f6a95c750c1f24372a Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 21 Jul 2017 14:16:38 +0200 Subject: Display tooltips on measures on top instead of bottom on the dashboard page --- .../apps/overview/components/LeakPeriodLegend.js | 6 +- .../js/apps/overview/components/OverviewApp.js | 3 - .../src/main/js/apps/overview/events/Analysis.js | 29 +++++---- .../src/main/js/apps/overview/events/Event.js | 21 ++++--- .../__tests__/__snapshots__/Analysis-test.js.snap | 68 +++++++++++----------- .../__tests__/__snapshots__/Event-test.js.snap | 30 +++++----- .../src/main/js/apps/overview/main/CodeSmells.js | 12 ++-- .../src/main/js/apps/overview/main/enhance.js | 35 ++++++----- .../js/apps/overview/meta/MetaQualityProfiles.js | 34 +++++------ 9 files changed, 120 insertions(+), 118 deletions(-) (limited to 'server') 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..6d3f53657ef 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 @@ -81,11 +81,13 @@ export default function LeakPeriodLegend({ period }: { period: Period }) { : translateWithParameters('overview.started_on_x', momentDate.format('LL')); return ( - +
{translateWithParameters('overview.leak_period_x', leakPeriodLabel)}
- {note} + + {note} +
); diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js index bbde489216a..ad498dbdaf5 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js +++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js @@ -32,7 +32,6 @@ import { getMeasuresAndMeta } from '../../../api/measures'; import { getAllTimeMachineData } from '../../../api/time-machine'; import { enhanceMeasuresWithMetrics } from '../../../helpers/measures'; import { getLeakPeriod } from '../../../helpers/periods'; -import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; import { getCustomGraph, getGraph } from '../../../helpers/storage'; import { METRICS, HISTORY_METRICS_LIST } from '../utils'; import { DEFAULT_GRAPH, getDisplayedHistoryMetrics } from '../../projectActivity/utils'; @@ -148,14 +147,12 @@ export default class OverviewApp extends React.PureComponent {
-
-
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..ba7fc7715d1 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 @@ -22,7 +22,6 @@ import React from 'react'; import { sortBy } from 'lodash'; import Event from './Event'; import FormattedDate from '../../../components/ui/FormattedDate'; -import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; import { translate } from '../../../helpers/l10n'; import type { Analysis as AnalysisType, Event as EventType } from '../../projectActivity/types'; @@ -37,20 +36,20 @@ export default function Analysis(props: { analysis: AnalysisType }) { ); return ( - -
  • -
    - - - -
    +
  • +
    + + + +
    - {sortedEvents.length > 0 - ?
    - {sortedEvents.map(event => )} -
    - : {translate('project_activity.project_analyzed')}} -
  • -
    + {sortedEvents.length > 0 + ?
    + {sortedEvents.map(event => )} +
    + : + {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..13dd7b0d23f 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 @@ -19,7 +19,7 @@ */ // @flow import React from 'react'; -import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; +import Tooltip from '../../../components/controls/Tooltip'; import type { Event as EventType } from '../../projectActivity/types'; import { translate } from '../../../helpers/l10n'; @@ -27,18 +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/__tests__/__snapshots__/Analysis-test.js.snap b/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Analysis-test.js.snap index d7a40d0bf71..e37d21f47d9 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Analysis-test.js.snap +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Analysis-test.js.snap @@ -1,42 +1,40 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should sort the events with version first 1`] = ` - -
  • +
    -
    - - - -
    -
    - + - +
    +
    + -
    -
  • -
    + } + /> + +
    + `; diff --git a/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap b/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap index b04b1393fc8..6ff6f67c30d 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap +++ b/server/sonar-web/src/main/js/apps/overview/events/__tests__/__snapshots__/Event-test.js.snap @@ -12,21 +12,19 @@ exports[`should render an event correctly 1`] = `
    - - - - event.category.OTHER - : - - - - test - - - + + event.category.OTHER + : + + + + + test + +
    `; 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..2c5a5e9289c 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 @@ -20,6 +20,7 @@ import moment from 'moment'; import React from 'react'; import { Link } from 'react-router'; +import Tooltip from '../../../components/controls/Tooltip'; import enhance from './enhance'; import { getMetricName } from '../helpers/metrics'; import { translate, translateWithParameters } from '../../../helpers/l10n'; @@ -46,11 +47,11 @@ class CodeSmells extends React.PureComponent { const tooltip = translateWithParameters('widget.as_calculated_on_x', formattedAnalysisDate); return ( - - + + {formatMeasure(value, 'SHORT_WORK_DUR')} - - + +
    ); } @@ -114,7 +115,6 @@ class CodeSmells extends React.PureComponent { return (
    -
    @@ -123,7 +123,7 @@ class CodeSmells extends React.PureComponent {
    {getMetricName('effort')} - {this.props.renderHistoryLink('sqale_rating')} + {this.props.renderHistoryLink('sqale_index')}
    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..7c465b46c27 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 @@ -24,6 +24,7 @@ import { DrilldownLink } from '../../../components/shared/drilldown-link'; import HistoryIcon from '../../../components/icons-components/HistoryIcon'; import Rating from './../../../components/ui/Rating'; import Timeline from '../components/Timeline'; +import Tooltip from '../../../components/controls/Tooltip'; import { formatMeasure, formatMeasureVariation, @@ -62,7 +63,9 @@ export default function enhance(ComposedComponent) { return (
    - {label} + + {label} +
    ); @@ -99,9 +102,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 (
    @@ -123,11 +127,16 @@ export default function enhance(ComposedComponent) { const value = this.getValue(measure); const title = getRatingTooltip(metricKey, value); return ( -
    - - - -
    + +
    + + + +
    +
    ); }; renderIssues = (metric, type) => { @@ -144,11 +153,11 @@ export default function enhance(ComposedComponent) { const formattedAnalysisDate = moment(component.analysisDate).format('LLL'); const tooltip = translateWithParameters('widget.as_calculated_on_x', formattedAnalysisDate); return ( - - + + {formatMeasure(value, 'SHORT_INT')} - - + + ); }; renderHistoryLink = metricKey => { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js index a6e95459670..d5762751007 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/MetaQualityProfiles.js @@ -21,7 +21,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; -import { TooltipsContainer } from '../../../components/mixins/tooltips-mixin'; +import Tooltip from '../../../components/controls/Tooltip'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { getQualityProfileUrl } from '../../../helpers/urls'; import { searchRules } from '../../../api/rules'; @@ -105,13 +105,11 @@ class MetaQualityProfiles extends React.PureComponent { if (count > 0) { const tooltip = translateWithParameters('overview.deprecated_profile', count); return ( -
  • - {inner} -
  • + +
  • + {inner} +
  • +
    ); } @@ -126,17 +124,15 @@ class MetaQualityProfiles extends React.PureComponent { const { profiles } = this.props; return ( - -
    -

    - {translate('overview.quality_profiles')} -

    - -
      - {profiles.map(profile => this.renderProfile(profile))} -
    -
    -
    +
    +

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

    + +
      + {profiles.map(profile => this.renderProfile(profile))} +
    +
    ); } } -- cgit v1.2.3 From e3e531c2383b6c7207afd2bb269ec67487dfa16b Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 21 Jul 2017 14:34:33 +0200 Subject: Move 'Analyse' section just after tags on the project dashboard sidebar --- server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js | 2 +- server/sonar-web/src/main/js/apps/overview/meta/Meta.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'server') diff --git a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js index cf8aa197c0a..c1b78936fce 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js +++ b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.js @@ -40,7 +40,7 @@ type State = { metrics: Array }; -const PAGE_SIZE = 5; +const PAGE_SIZE = 3; export default class AnalysesList extends React.PureComponent { mounted: boolean; diff --git a/server/sonar-web/src/main/js/apps/overview/meta/Meta.js b/server/sonar-web/src/main/js/apps/overview/meta/Meta.js index db9b0cb523c..1a57590524f 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/Meta.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/Meta.js @@ -56,6 +56,8 @@ const Meta = ({ component, history, measures, areThereCustomOrganizations, route {isProject && } + {isProject && } + {shouldShowQualityGate && } {shouldShowQualityProfiles && @@ -70,8 +72,6 @@ const Meta = ({ component, history, measures, areThereCustomOrganizations, route {shouldShowOrganizationKey && } - - {isProject && }
    ); }; -- cgit v1.2.3 From 1b9c1f105c34d97090bbd4966105ea132b17c3dc Mon Sep 17 00:00:00 2001 From: Grégoire Aubert Date: Fri, 21 Jul 2017 16:42:35 +0200 Subject: SONAR-9572 Fix bulk apply permission template --- .../src/main/js/apps/projects-admin/search.js | 4 ++- .../projects-admin/views/BulkApplyTemplateView.js | 4 +-- .../pageobjects/ProjectsManagementPage.java | 12 +++++++++ .../ProjectAdministrationTest.java | 30 +++++++++++++++++++--- 4 files changed, 43 insertions(+), 7 deletions(-) (limited to 'server') diff --git a/server/sonar-web/src/main/js/apps/projects-admin/search.js b/server/sonar-web/src/main/js/apps/projects-admin/search.js index 65e6e0fb9d3..8cc13cdf404 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/search.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/search.js @@ -156,7 +156,9 @@ export default class Search extends React.PureComponent { -