catapult-project / catapult

Deprecated Catapult GitHub. Please instead use http://crbug.com "Speed>Benchmarks" component for bugs and https://chromium.googlesource.com/catapult for downloading and editing source code..
https://chromium.googlesource.com/catapult
BSD 3-Clause "New" or "Revised" License
1.91k stars 562 forks source link

NetLog Viewer filter does not search ID unless specified manually #4652

Closed ericlaw1979 closed 4 years ago

ericlaw1979 commented 4 years ago

Video @ https://twitter.com/ericlaw/status/1194409878934245376

ericlaw1979 commented 4 years ago

Maybe fixing is as simple as adding a sourceEntry.getSourceId() search to the existing code in source_filter_parser.js here:

  // The description is often not contained in one of the log entries.
  // The source type almost never is, so check for them directly.
  var description = sourceEntry.getDescription().toLowerCase();
  var type = sourceEntry.getSourceTypeString().toLowerCase();
  if (description.indexOf(text) != -1 || type.indexOf(text) != -1) {
    match = true;
ericlaw1979 commented 4 years ago

Yup, this works.

  // The description is often not contained in one of the log entries.
  // The source type almost never is, so check for them directly.
  var description = sourceEntry.getDescription().toLowerCase();
  var type = sourceEntry.getSourceTypeString().toLowerCase();
  var sid = sourceEntry.getSourceId()+'';
  if (description.indexOf(text) != -1 || type.indexOf(text) != -1 ||  sid.indexOf(text) != -1) {
    match = true;
  } 
ericlaw1979 commented 4 years ago

fixed by https://chromium-review.googlesource.com/c/catapult/+/1918051/