aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectActivity/components
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectActivity/components')
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.js26
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js6
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsHistory-test.js.snap3
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendCustom-test.js.snap3
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendStatic-test.js.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap6
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContent-test.js.snap1
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentEvents-test.js.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentIssues-test.js.snap2
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityAnalysesList-test.js.snap27
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.js.snap1
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap3
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/forms/AddGraphMetric.js20
15 files changed, 74 insertions, 32 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.js
index 29fe837acfa..3bc95c78ff9 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.js
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphHistory.js
@@ -107,19 +107,19 @@ export default class GraphHistory extends React.PureComponent {
updateZoom={this.props.updateGraphZoom}
/>
{selectedDate != null &&
- tooltipXPos != null && (
- <GraphsTooltips
- events={this.props.events}
- formatValue={this.formatTooltipValue}
- graph={graph}
- graphWidth={width}
- measuresHistory={this.props.measuresHistory}
- selectedDate={selectedDate}
- series={series}
- tooltipIdx={tooltipIdx}
- tooltipPos={tooltipXPos}
- />
- )}
+ tooltipXPos != null && (
+ <GraphsTooltips
+ events={this.props.events}
+ formatValue={this.formatTooltipValue}
+ graph={graph}
+ graphWidth={width}
+ measuresHistory={this.props.measuresHistory}
+ selectedDate={selectedDate}
+ series={series}
+ tooltipIdx={tooltipIdx}
+ tooltipPos={tooltipXPos}
+ />
+ )}
</div>
)}
</AutoSizer>
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 69065f1b708..2aa4137cc1d 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
@@ -117,9 +117,9 @@ export default class GraphsTooltips extends React.PureComponent {
/>
)}
{events &&
- events.length > 0 && (
- <GraphsTooltipsContentEvents addSeparator={addSeparator} events={events} />
- )}
+ events.length > 0 && (
+ <GraphsTooltipsContentEvents addSeparator={addSeparator} events={events} />
+ )}
</table>
</div>
</BubblePopup>
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 88bf5483c11..517e60cc26f 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
@@ -105,7 +105,7 @@ export default class ProjectActivityAnalysis extends React.PureComponent {
</li>
)}
{(canAddVersion || canAddEvent) &&
- canDeleteAnalyses && <li role="separator" className="divider" />}
+ canDeleteAnalyses && <li role="separator" className="divider" />}
{canDeleteAnalyses && (
<li>
<RemoveAnalysisForm
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap
index 2b9e964ae1d..b83cc033e28 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphHistory-test.js.snap
@@ -32,6 +32,8 @@ exports[`should correctly render a graph 1`] = `
className="project-activity-graph"
>
<AutoSizer
+ disableHeight={false}
+ disableWidth={false}
onResize={[Function]}
/>
</div>
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsHistory-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsHistory-test.js.snap
index fb809d1f599..b7de2ea3cfe 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsHistory-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsHistory-test.js.snap
@@ -35,6 +35,7 @@ exports[`should correctly render a graph 1`] = `
graphEndDate={null}
graphStartDate={null}
isCustom={false}
+ key="0"
leakPeriodDate="2017-05-16T13:50:02+0200"
measuresHistory={Array []}
removeCustomMetric={[Function]}
@@ -79,6 +80,7 @@ exports[`should correctly render multiple graphs 1`] = `
graphEndDate={null}
graphStartDate={null}
isCustom={false}
+ key="0"
leakPeriodDate="2017-05-16T13:50:02+0200"
measuresHistory={Array []}
removeCustomMetric={[Function]}
@@ -116,6 +118,7 @@ exports[`should correctly render multiple graphs 1`] = `
graphEndDate={null}
graphStartDate={null}
isCustom={false}
+ key="1"
leakPeriodDate="2017-05-16T13:50:02+0200"
measuresHistory={Array []}
removeCustomMetric={[Function]}
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendCustom-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendCustom-test.js.snap
index cd8ec0cc2f4..b50a253ae4c 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendCustom-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendCustom-test.js.snap
@@ -6,6 +6,7 @@ exports[`should render correctly the list of series 1`] = `
>
<span
className="spacer-left spacer-right"
+ key="bugs"
>
<GraphsLegendItem
metric="bugs"
@@ -17,6 +18,7 @@ exports[`should render correctly the list of series 1`] = `
</span>
<span
className="spacer-left spacer-right"
+ key="my_metric"
>
<GraphsLegendItem
metric="my_metric"
@@ -27,6 +29,7 @@ exports[`should render correctly the list of series 1`] = `
/>
</span>
<Tooltip
+ key="foo"
overlay="project_activity.graphs.custom.metric_no_history"
placement="bottom"
>
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendStatic-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendStatic-test.js.snap
index 47cc682d03f..c8d7df8f28a 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendStatic-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsLegendStatic-test.js.snap
@@ -6,12 +6,14 @@ exports[`should render correctly the list of series 1`] = `
>
<GraphsLegendItem
className="big-spacer-left big-spacer-right"
+ key="bugs"
metric="bugs"
name="Bugs"
style="0"
/>
<GraphsLegendItem
className="big-spacer-left big-spacer-right"
+ key="code_smells"
metric="code_smells"
name="Code Smells"
style="1"
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 e2ab4b039a8..96758777f80 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
@@ -61,6 +61,7 @@ exports[`should render correctly for issues graphs 1`] = `
>
<tbody>
<GraphsTooltipsContentIssues
+ key="bugs"
measuresHistory={Array []}
name="bugs"
style="0"
@@ -69,6 +70,7 @@ exports[`should render correctly for issues graphs 1`] = `
value="Formated.3"
/>
<GraphsTooltipsContentIssues
+ key="code_smells"
measuresHistory={Array []}
name="code_smells"
style="1"
@@ -77,6 +79,7 @@ exports[`should render correctly for issues graphs 1`] = `
value="Formated.18"
/>
<GraphsTooltipsContentIssues
+ key="vulnerabilities"
measuresHistory={Array []}
name="vulnerabilities"
style="2"
@@ -116,18 +119,21 @@ exports[`should render correctly for random graphs 1`] = `
>
<tbody>
<GraphsTooltipsContent
+ key="bugs"
name="bugs"
style="0"
translatedName="Bugs"
value="Formated.0"
/>
<GraphsTooltipsContent
+ key="code_smells"
name="code_smells"
style="1"
translatedName="Code Smells"
value="Formated.15"
/>
<GraphsTooltipsContent
+ key="vulnerabilities"
name="vulnerabilities"
style="2"
translatedName="Vulnerabilities"
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContent-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContent-test.js.snap
index 353f07cdac3..7f818adb4c6 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContent-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContent-test.js.snap
@@ -3,6 +3,7 @@
exports[`should render correctly 1`] = `
<tr
className="project-activity-graph-tooltip-line"
+ key="code_smells"
>
<td
className="thin"
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentEvents-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentEvents-test.js.snap
index 95e4c4b18a1..29401d4397d 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentEvents-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentEvents-test.js.snap
@@ -22,6 +22,7 @@ exports[`should render correctly 1`] = `
</span>
<span
className="spacer-left"
+ key="1"
>
<ProjectEventIcon
className="project-activity-event-icon VERSION"
@@ -29,6 +30,7 @@ exports[`should render correctly 1`] = `
</span>
<span
className="spacer-left"
+ key="2"
>
<ProjectEventIcon
className="project-activity-event-icon OTHER"
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentIssues-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentIssues-test.js.snap
index 91f9b47f6f5..f5712ca5b76 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentIssues-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltipsContentIssues-test.js.snap
@@ -3,6 +3,7 @@
exports[`should render correctly 1`] = `
<tr
className="project-activity-graph-tooltip-issues-line"
+ key="bugs"
>
<td
className="thin"
@@ -34,6 +35,7 @@ exports[`should render correctly 1`] = `
exports[`should render correctly when rating data is missing 1`] = `
<tr
className="project-activity-graph-tooltip-issues-line"
+ key="bugs"
>
<td
className="thin"
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityAnalysesList-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityAnalysesList-test.js.snap
index f2a64234ead..468f7b7ddec 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityAnalysesList-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityAnalysesList-test.js.snap
@@ -10,7 +10,9 @@ exports[`should correctly filter analyses by category 1`] = `
}
}
>
- <li>
+ <li
+ key="E2"
+ >
<div
className="project-activity-version-badge first"
>
@@ -32,6 +34,7 @@ exports[`should correctly filter analyses by category 1`] = `
<li
className="project-activity-day"
data-day="ISO.1477267200000"
+ key="1477267200000"
>
<div
className="project-activity-date"
@@ -66,6 +69,7 @@ exports[`should correctly filter analyses by category 1`] = `
deleteAnalysis={[Function]}
deleteEvent={[Function]}
isFirst={false}
+ key="A4"
selected={false}
updateSelectedDate={[Function]}
/>
@@ -86,7 +90,9 @@ exports[`should correctly filter analyses by date range 1`] = `
}
}
>
- <li>
+ <li
+ key="E1"
+ >
<div
className="project-activity-version-badge first"
>
@@ -108,6 +114,7 @@ exports[`should correctly filter analyses by date range 1`] = `
<li
className="project-activity-day"
data-day="ISO.1477526400000"
+ key="1477526400000"
>
<div
className="project-activity-date"
@@ -142,6 +149,7 @@ exports[`should correctly filter analyses by date range 1`] = `
deleteAnalysis={[Function]}
deleteEvent={[Function]}
isFirst={true}
+ key="A1"
selected={false}
updateSelectedDate={[Function]}
/>
@@ -162,7 +170,9 @@ exports[`should render correctly 1`] = `
}
}
>
- <li>
+ <li
+ key="E1"
+ >
<div
className="project-activity-version-badge first"
>
@@ -184,6 +194,7 @@ exports[`should render correctly 1`] = `
<li
className="project-activity-day"
data-day="ISO.1477526400000"
+ key="1477526400000"
>
<div
className="project-activity-date"
@@ -218,6 +229,7 @@ exports[`should render correctly 1`] = `
deleteAnalysis={[Function]}
deleteEvent={[Function]}
isFirst={true}
+ key="A1"
selected={false}
updateSelectedDate={[Function]}
/>
@@ -237,6 +249,7 @@ exports[`should render correctly 1`] = `
deleteAnalysis={[Function]}
deleteEvent={[Function]}
isFirst={false}
+ key="A2"
selected={false}
updateSelectedDate={[Function]}
/>
@@ -244,7 +257,9 @@ exports[`should render correctly 1`] = `
</li>
</ul>
</li>
- <li>
+ <li
+ key="E2"
+ >
<div
className="project-activity-version-badge"
>
@@ -266,6 +281,7 @@ exports[`should render correctly 1`] = `
<li
className="project-activity-day"
data-day="ISO.1477440000000"
+ key="1477440000000"
>
<div
className="project-activity-date"
@@ -305,6 +321,7 @@ exports[`should render correctly 1`] = `
deleteAnalysis={[Function]}
deleteEvent={[Function]}
isFirst={false}
+ key="A3"
selected={false}
updateSelectedDate={[Function]}
/>
@@ -313,6 +330,7 @@ exports[`should render correctly 1`] = `
<li
className="project-activity-day"
data-day="ISO.1477267200000"
+ key="1477267200000"
>
<div
className="project-activity-date"
@@ -347,6 +365,7 @@ exports[`should render correctly 1`] = `
deleteAnalysis={[Function]}
deleteEvent={[Function]}
isFirst={false}
+ key="A4"
selected={false}
updateSelectedDate={[Function]}
/>
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 0e51a64862b..71e18479081 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
@@ -6,6 +6,7 @@ exports[`should render correctly 1`] = `
id="project-activity"
>
<HelmetWrapper
+ defer={true}
encodeSpecialCharacters={true}
title="project_activity.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap
index 1112cfa4ea8..12ff75c5342 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityPageHeader-test.js.snap
@@ -15,6 +15,7 @@ exports[`should render correctly the list of series 1`] = `
clearRenderer={[Function]}
clearValueText="Clear value"
clearable={true}
+ closeOnSelect={true}
deleteRemoves={true}
delimiter=","
disabled={false}
@@ -35,6 +36,8 @@ exports[`should render correctly the list of series 1`] = `
onBlurResetsInput={true}
onChange={[Function]}
onCloseResetsInput={true}
+ onSelectResetsInput={true}
+ openOnClick={true}
optionComponent={[Function]}
options={
Array [
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 ece4bdad6d7..bf9c646b599 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
@@ -128,17 +128,15 @@ export default class AddGraphMetric extends React.PureComponent {
value={this.state.selectedMetric}
/>
<span className="alert alert-info">
- {metricsTypeFilter != null && metricsTypeFilter.length > 0 ? (
- translateWithParameters(
- 'project_activity.graphs.custom.type_x_message',
- metricsTypeFilter
- .map(type => translate('metric.type', type))
- .sort()
- .join(', ')
- )
- ) : (
- translate('project_activity.graphs.custom.add_metric_info')
- )}
+ {metricsTypeFilter != null && metricsTypeFilter.length > 0
+ ? translateWithParameters(
+ 'project_activity.graphs.custom.type_x_message',
+ metricsTypeFilter
+ .map(type => translate('metric.type', type))
+ .sort()
+ .join(', ')
+ )
+ : translate('project_activity.graphs.custom.add_metric_info')}
</span>
</div>
</div>