aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projectActivity
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2022-10-11 17:29:13 +0200
committersonartech <sonartech@sonarsource.com>2022-10-13 20:03:19 +0000
commitabdd938102b2ec0e80c0b23abbc9fa029255c416 (patch)
treedc6a20db354376da0e431c0389ebea905861999d /server/sonar-web/src/main/js/apps/projectActivity
parent1a4d4ee96aef0362cc70361a4cf0359411674fcb (diff)
downloadsonarqube-abdd938102b2ec0e80c0b23abbc9fa029255c416.tar.gz
sonarqube-abdd938102b2ec0e80c0b23abbc9fa029255c416.zip
[NO JIRA] Fix Code Smells
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectActivity')
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx22
1 files changed, 1 insertions, 21 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
index 59bb31c2d52..9d92b92c38a 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
@@ -192,7 +192,7 @@ export class ProjectActivityApp extends React.PureComponent<Props, State> {
metric: measure.metric,
history: measure.history.map(analysis => ({
date: parseDate(analysis.date),
- value: analysis.value!
+ value: analysis.value
}))
}))
);
@@ -334,26 +334,6 @@ export class ProjectActivityApp extends React.PureComponent<Props, State> {
});
};
- shouldRedirect = () => {
- const locationQuery = this.props.location.query;
- if (!locationQuery) {
- return false;
- }
- const filtered = Object.keys(locationQuery).some(
- key => key !== 'id' && locationQuery[key] !== ''
- );
-
- const { graph, customGraphs } = getActivityGraph(
- PROJECT_ACTIVITY_GRAPH,
- this.props.component.key
- );
- const emptyCustomGraph = isCustomGraph(graph) && customGraphs.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;
- };
-
render() {
return (
<ProjectActivityAppRenderer