Skip to content

Commit

Permalink
Add phpspy coloring #201 (#209)
Browse files Browse the repository at this point in the history
Co-authored-by: kurylak <adrian.kurylak@nokia.com>
  • Loading branch information
AdrK and AdrianKurylak authored May 24, 2021
1 parent 4f9d51e commit a69794d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions webapp/javascript/util/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,13 @@ export class ObjectsFormatter {
export function getPackageNameFromStackTrace(spyName, stackTrace) {
// TODO: actually make sure these make sense and add tests
const regexpLookup = {
default: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
dotnetspy: /^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/,
ebpfspy: /^(?<packageName>.+)$/,
gospy: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
phpspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/,
pyspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/,
rbspy: /^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/,
gospy: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
ebpfspy: /^(?<packageName>.+)$/,
dotnetspy: /^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/,
default: /^(?<packageName>(.*\/)*)(?<filename>.*)(?<line_info>.*)$/,
};

if (stackTrace.length === 0) {
Expand Down

0 comments on commit a69794d

Please sign in to comment.