@@ -55,11 +55,11 @@ export const markerSchemaFrontEndOnly: MarkerSchema[] = [
5555 chartLabel : '{marker.data.messageType}' ,
5656 display : [ 'marker-chart' , 'marker-table' , 'timeline-ipc' ] ,
5757 fields : [
58- { key : 'messageType' , label : 'Type' , format : 'string' , searchable : true } ,
58+ { key : 'messageType' , label : 'Type' , format : 'string' } ,
5959 { key : 'sync' , label : 'Sync' , format : 'string' } ,
6060 { key : 'sendThreadName' , label : 'From' , format : 'string' } ,
6161 { key : 'recvThreadName' , label : 'To' , format : 'string' } ,
62- { key : 'otherPid' , label : 'Other Pid' , format : 'pid' , searchable : true } ,
62+ { key : 'otherPid' , label : 'Other Pid' , format : 'pid' } ,
6363 ] ,
6464 } ,
6565 {
@@ -74,14 +74,12 @@ export const markerSchemaFrontEndOnly: MarkerSchema[] = [
7474 format : 'string' ,
7575 key : 'contentType' ,
7676 label : 'Content Type' ,
77- searchable : true ,
7877 hidden : true ,
7978 } ,
8079 {
8180 format : 'integer' ,
8281 key : 'responseStatus' ,
8382 label : 'Response Status' ,
84- searchable : true ,
8583 hidden : true ,
8684 } ,
8785 ] ,
@@ -615,7 +613,7 @@ export function formatMarkupFromMarkerSchema(
615613}
616614
617615/**
618- * Takes a marker and a RegExp and checks if any of its `searchable` marker
616+ * Takes a marker and a RegExp and checks if any of its marker
619617 * payload fields match the search regular expression.
620618 */
621619export function markerPayloadMatchesSearch (
@@ -629,39 +627,37 @@ export function markerPayloadMatchesSearch(
629627 return false ;
630628 }
631629
632- // Check if searchable fields match the search regular expression.
630+ // Check if fields match the search regular expression.
633631 for ( const payloadField of markerSchema . fields ) {
634- if ( payloadField . searchable ) {
635- let value = data [ payloadField . key ] ;
636- if ( value === undefined || value === null ) {
637- // The value is missing, but this is OK, values are optional.
632+ let value = data [ payloadField . key ] ;
633+ if ( value === undefined || value === null ) {
634+ // The value is missing, but this is OK, values are optional.
635+ continue ;
636+ }
637+
638+ if (
639+ payloadField . format === 'unique-string' ||
640+ payloadField . format === 'flow-id' ||
641+ payloadField . format === 'terminating-flow-id'
642+ ) {
643+ if ( typeof value !== 'number' ) {
644+ console . warn (
645+ `In marker ${ marker . name } , the key ${ payloadField . key } has an invalid value "${ value } " as a unique string, it isn't a number.`
646+ ) ;
638647 continue ;
639648 }
640649
641- if (
642- payloadField . format === 'unique-string' ||
643- payloadField . format === 'flow-id' ||
644- payloadField . format === 'terminating-flow-id'
645- ) {
646- if ( typeof value !== 'number' ) {
647- console . warn (
648- `In marker ${ marker . name } , the key ${ payloadField . key } has an invalid value "${ value } " as a unique string, it isn't a number.`
649- ) ;
650- continue ;
651- }
652-
653- if ( ! stringTable . hasIndex ( value ) ) {
654- console . warn (
655- `In marker ${ marker . name } , the key ${ payloadField . key } has an invalid index "${ value } " as a unique string, as it's missing from the string table.`
656- ) ;
657- continue ;
658- }
659- value = stringTable . getString ( value ) ;
650+ if ( ! stringTable . hasIndex ( value ) ) {
651+ console . warn (
652+ `In marker ${ marker . name } , the key ${ payloadField . key } has an invalid index "${ value } " as a unique string, as it's missing from the string table.`
653+ ) ;
654+ continue ;
660655 }
656+ value = stringTable . getString ( value ) ;
657+ }
661658
662- if ( value !== '' && testFun ( value , payloadField . key ) ) {
663- return true ;
664- }
659+ if ( value !== '' && testFun ( value , payloadField . key ) ) {
660+ return true ;
665661 }
666662 }
667663
0 commit comments