Merge pull request #1663 from filecoin-project/feat/compute-state-hashlinks
compute-state: html: Hash links to invocations
This commit is contained in:
commit
80f7492d06
@ -981,13 +981,15 @@ func computeStateHtml(o *api.ComputeStateOutput, getCode func(addr address.Addre
|
|||||||
slow := ir.Duration > 10*time.Millisecond
|
slow := ir.Duration > 10*time.Millisecond
|
||||||
veryslow := ir.Duration > 50*time.Millisecond
|
veryslow := ir.Duration > 50*time.Millisecond
|
||||||
|
|
||||||
fmt.Printf(`<div class="exec">
|
cid := ir.Msg.Cid()
|
||||||
<div><h2 class="call">%s:%s</h2></div>
|
|
||||||
|
fmt.Printf(`<div class="exec" id="%s">
|
||||||
|
<div><a href="#%s"><h2 class="call">%s:%s</h2></a></div>
|
||||||
<div><b>%s</b> -> <b>%s</b> (%s FIL), M%d</div>
|
<div><b>%s</b> -> <b>%s</b> (%s FIL), M%d</div>
|
||||||
<div><small>Msg CID: %s</small></div>
|
<div><small>Msg CID: %s</small></div>
|
||||||
%s
|
%s
|
||||||
<div><span class="slow-%t-%t">Took %s</span>, <span class="exit%d">Exit: <b>%d</b></span>%s
|
<div><span class="slow-%t-%t">Took %s</span>, <span class="exit%d">Exit: <b>%d</b></span>%s
|
||||||
`, codeStr(toCode), methods[toCode][ir.Msg.Method].name, ir.Msg.From, ir.Msg.To, types.FIL(ir.Msg.Value), ir.Msg.Method, ir.Msg.Cid(), params, slow, veryslow, ir.Duration, ir.MsgRct.ExitCode, ir.MsgRct.ExitCode, ret)
|
`, cid, cid, codeStr(toCode), methods[toCode][ir.Msg.Method].name, ir.Msg.From, ir.Msg.To, types.FIL(ir.Msg.Value), ir.Msg.Method, cid, params, slow, veryslow, ir.Duration, ir.MsgRct.ExitCode, ir.MsgRct.ExitCode, ret)
|
||||||
if ir.MsgRct.ExitCode != 0 {
|
if ir.MsgRct.ExitCode != 0 {
|
||||||
fmt.Printf(`<div class="error">Error: <pre>%s</pre></div>`, ir.Error)
|
fmt.Printf(`<div class="error">Error: <pre>%s</pre></div>`, ir.Error)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user