aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-06-30 17:27:18 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-04 14:15:34 +0200
commit2641578935496d001cb243a6e7f588622e5d1484 (patch)
treeb14236f8450b0859430f0fed092ee94d5f4de13c /server/sonar-web/src/main/js/apps
parentb4471625600d167c1a043b38011b56c2699dba63 (diff)
downloadsonarqube-2641578935496d001cb243a6e7f588622e5d1484.tar.gz
sonarqube-2641578935496d001cb243a6e7f588622e5d1484.zip
SONAR-8550 Fix a regression that prevent from creating new versions on project activity page
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js1
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js6
2 files changed, 3 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js
index 368ecf5abe9..9644ad770e1 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js
@@ -142,7 +142,6 @@ export default class ProjectActivityAnalysesList extends React.PureComponent {
deleteEvent={this.props.deleteEvent}
isFirst={analysis.key === firstAnalysisKey}
key={analysis.key}
- version={version.version}
/>
))}
</ul>
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 5fbdb2bdf41..1cd17b22bb9 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
@@ -34,14 +34,14 @@ type Props = {
changeEvent: (event: string, name: string) => Promise<*>,
deleteAnalysis: (analysis: string) => Promise<*>,
deleteEvent: (analysis: string, event: string) => Promise<*>,
- isFirst: boolean,
- version: ?string
+ isFirst: boolean
};
export default function ProjectActivityAnalysis(props: Props) {
const { date, events } = props.analysis;
const { isFirst, canAdmin } = props;
const analysisTitle = translate('project_activity.analysis');
+ const hasVersion = events.find(event => event.category === 'VERSION') != null;
return (
<li className="project-activity-analysis clearfix">
<div className="project-activity-time spacer-right">
@@ -63,7 +63,7 @@ export default function ProjectActivityAnalysis(props: Props) {
<i className="icon-dropdown" />
</button>
<ul className="dropdown-menu dropdown-menu-right">
- {props.version == null &&
+ {!hasVersion &&
<li>
<AddEventForm
addEvent={props.addVersion}