]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17285 Fix order of data and execution flow in issue page
authorMathieu Suen <mathieu.suen@sonarsource.com>
Thu, 6 Oct 2022 15:31:28 +0000 (17:31 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 11 Oct 2022 20:03:59 +0000 (20:03 +0000)
server/sonar-web/src/main/js/app/styles/components/boxed-group.css
server/sonar-web/src/main/js/components/locations/FlowsList.tsx

index ac963312e427c49bf7902f7d43a1fe12ee06970c..4818518942729312853d13257c4ac2d44c9e4ff8 100644 (file)
   vertical-align: middle;
   font-weight: bold;
   transition: color 0.3s ease;
+  text-align: left;
 }
index 6e2600da40d931ad3ad2955cfcf086a86e23fe56..40646365fb86eecd6b135e913e12ae18ac207f34 100644 (file)
@@ -25,6 +25,10 @@ import { Flow, FlowType } from '../../types/types';
 import BoxedGroupAccordion from '../controls/BoxedGroupAccordion';
 import SingleFileLocationNavigator from './SingleFileLocationNavigator';
 
+const FLOW_ORDER_MAP = {
+  [FlowType.DATA]: 0,
+  [FlowType.EXECUTION]: 1
+};
 export interface Props {
   flows: Flow[];
   selectedLocationIndex?: number;
@@ -36,6 +40,8 @@ export interface Props {
 export default function FlowsList(props: Props) {
   const { flows, selectedLocationIndex, selectedFlowIndex } = props;
 
+  flows.sort((f1, f2) => FLOW_ORDER_MAP[f1.type] - FLOW_ORDER_MAP[f2.type]);
+
   return (
     <div className="issue-flows little-padded-top" role="list">
       {flows.map((flow, index) => {