Skip to content

Commit 26be9bf

Browse files
Mihai Budiuryzhyk
authored andcommitted
Ops with no id use an of 0
Signed-off-by: Mihai Budiu <[email protected]>
1 parent 51a96dc commit 26be9bf

File tree

2 files changed

+17
-13
lines changed
  • rust/template/ddlog_profiler/profiler_ui

2 files changed

+17
-13
lines changed

rust/template/ddlog_profiler/profiler_ui/ui.js

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/template/ddlog_profiler/profiler_ui/ui.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,14 @@ class ProfileTable implements IHtmlElement {
422422
this.tbody = this.table.createTBody();
423423
}
424424

425-
protected getId(row: Partial<ProfileRow>): string | null {
426-
if (row.opid == null)
427-
return null;
428-
return this.name.replace(/[^a-zA-Z0-9]/g, "_").toLowerCase() + "_" + row.opid.toString();
425+
protected getId(row: Partial<ProfileRow>): string {
426+
let id = row.opid;
427+
let ids;
428+
if (id == null)
429+
ids = "0";
430+
else
431+
ids = id.toString();
432+
return this.name.replace(/[^a-zA-Z0-9]/g, "_").toLowerCase() + "_" + ids;
429433
}
430434

431435
protected addDataRow(indent: number, rowIndex: number, row: Partial<ProfileRow>,
@@ -440,7 +444,7 @@ class ProfileTable implements IHtmlElement {
440444
children: row.children === undefined ? [] : row.children,
441445
dd_op: row.dd_op === undefined ? "" : row.dd_op,
442446
invocations: row.invocations === undefined ? -1 : row.invocations,
443-
opid: row.opid === undefined ? -1 : row.opid,
447+
opid: row.opid === undefined ? 0 : row.opid,
444448
short_descr: row.short_descr === undefined ? "" : row.short_descr
445449
};
446450

@@ -651,8 +655,6 @@ class ProfileTable implements IHtmlElement {
651655

652656
protected findPathFromRow(r: Partial<ProfileRow>, id: string): string[] | null {
653657
let thisId = this.getId(r);
654-
if (thisId == null)
655-
return null;
656658
if (thisId == id) {
657659
return [thisId];
658660
}

0 commit comments

Comments
 (0)