11import * as React from "react" ;
22import * as Sarif from "sarif" ;
33import * as Keys from "./result-keys" ;
4- import { info , listUnordered } from "./octicons" ;
4+ import { info } from "./octicons" ;
55import {
66 className ,
77 ResultTableProps ,
@@ -21,10 +21,10 @@ import { sendTelemetry } from "../common/telemetry";
2121import { AlertTableHeader } from "./AlertTableHeader" ;
2222import { SarifMessageWithLocations } from "./locations/SarifMessageWithLocations" ;
2323import { SarifLocation } from "./locations/SarifLocation" ;
24- import { AlertTableDropdownIndicatorCell } from "./AlertTableDropdownIndicatorCell" ;
2524import { AlertTableNoResults } from "./AlertTableNoResults" ;
2625import { AlertTableTruncatedMessage } from "./AlertTableTruncatedMessage" ;
2726import { AlertTablePathRow } from "./AlertTablePathRow" ;
27+ import { AlertTableResultRow } from "./AlertTableResultRow" ;
2828
2929type AlertTableProps = ResultTableProps & {
3030 resultSet : InterpretedResultSet < SarifInterpretationData > ;
@@ -153,27 +153,17 @@ export class AlertTable extends React.Component<
153153 } else {
154154 const paths : Sarif . ThreadFlow [ ] = Keys . getAllPaths ( result ) ;
155155
156- const indices =
157- paths . length === 1
158- ? [ resultKey , { ...resultKey , pathIndex : 0 } ]
159- : /* if there's exactly one path, auto-expand
160- * the path when expanding the result */
161- [ resultKey ] ;
162-
163156 const resultRow = (
164- < tr
165- ref = { this . scroller . ref ( resultRowIsSelected ) }
166- { ...selectableZebraStripe ( resultRowIsSelected , resultIndex ) }
167- key = { resultIndex }
168- >
169- < AlertTableDropdownIndicatorCell
170- expanded = { currentResultExpanded }
171- onClick = { toggler ( indices ) }
172- />
173- < td className = "vscode-codeql__icon-cell" > { listUnordered } </ td >
174- < td colSpan = { 2 } > { msg } </ td >
175- { locationCells }
176- </ tr >
157+ < AlertTableResultRow
158+ result = { result }
159+ resultIndex = { resultIndex }
160+ currentResultExpanded = { currentResultExpanded }
161+ selectedItem = { selectedItem }
162+ toggler = { toggler }
163+ scroller = { this . scroller }
164+ msg = { msg }
165+ locationCells = { locationCells }
166+ />
177167 ) ;
178168
179169 const pathRows =
0 commit comments