@@ -14,7 +14,7 @@ import {
14
14
import { styled , css } from '../../styles' ;
15
15
import { Icon } from '../../icons' ;
16
16
17
- import { getMethodColor } from '../../model/events/categorization' ;
17
+ import { getMethodColor , getSummaryColour } from '../../model/events/categorization' ;
18
18
import {
19
19
HtkMockRule ,
20
20
Matcher ,
@@ -306,19 +306,19 @@ export class RuleRow extends React.Component<{
306
306
} = this . props . accountStore ! ;
307
307
308
308
const ruleType = rule . type ;
309
-
310
- // Hide non-HTTP rules (...for now)
311
- if ( ruleType !== 'http' ) return null ;
312
-
313
309
const initialMatcher = rule . matchers . length ? rule . matchers [ 0 ] : undefined ;
314
310
315
- let method : string | undefined ;
316
- if ( initialMatcher instanceof matchers . MethodMatcher ) {
317
- method = Method [ initialMatcher . method ] ;
318
- } else if ( initialMatcher !== undefined ) {
319
- method = 'unknown' ;
311
+ let ruleColour : string ;
312
+ if ( ruleType === 'http' ) {
313
+ if ( initialMatcher instanceof matchers . MethodMatcher ) {
314
+ ruleColour = getMethodColor ( Method [ initialMatcher . method ] ) ;
315
+ } else if ( initialMatcher !== undefined ) {
316
+ ruleColour = getMethodColor ( 'unknown' ) ;
317
+ } else {
318
+ ruleColour = 'transparent' ;
319
+ }
320
320
} else {
321
- method = undefined ;
321
+ ruleColour = getSummaryColour ( ruleType ) ;
322
322
}
323
323
324
324
const serverVersion = serverVersionObservable . state === 'fulfilled'
@@ -343,10 +343,7 @@ export class RuleRow extends React.Component<{
343
343
> { ( provided , snapshot ) => < Observer > { ( ) =>
344
344
< RowContainer
345
345
{ ...provided . draggableProps }
346
- borderColor = { method
347
- ? getMethodColor ( method )
348
- : 'transparent'
349
- }
346
+ borderColor = { ruleColour }
350
347
ref = { ( ref : HTMLElement | null ) => {
351
348
provided . innerRef ( ref ) ;
352
349
this . containerRef = ref ;
0 commit comments