From: Stas Vilchik Date: Tue, 8 May 2018 09:08:43 +0000 (+0200) Subject: do not reload analyses list when component tags change X-Git-Tag: 7.5~1241 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e17a524905b6b0408172841c0aa8423532afd9ba;p=sonarqube.git do not reload analyses list when component tags change --- diff --git a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx index d405662ace4..dc59bbb8365 100644 --- a/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx +++ b/server/sonar-web/src/main/js/apps/overview/events/AnalysesList.tsx @@ -25,7 +25,7 @@ import PreviewGraph from '../../../components/preview-graph/PreviewGraph'; import { translate } from '../../../helpers/l10n'; import { Metric, Component, BranchLike } from '../../../app/types'; import { History } from '../../../api/time-machine'; -import { getBranchLikeQuery } from '../../../helpers/branches'; +import { getBranchLikeQuery, isSameBranchLike } from '../../../helpers/branches'; import { getActivityUrl } from '../../../helpers/urls'; interface Props { @@ -53,7 +53,10 @@ export default class AnalysesList extends React.PureComponent { } componentDidUpdate(prevProps: Props) { - if (prevProps.component !== this.props.component) { + if ( + prevProps.component.key !== this.props.component.key || + !isSameBranchLike(prevProps.branchLike, this.props.branchLike) + ) { this.fetchData(); } }