trace
This commit is contained in:
@@ -399,8 +399,10 @@ func ParseRawMsg2Html(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Trace("traceData:", traceData)
|
log.Trace("traceData:", traceData)
|
||||||
|
pathFile := traceData.DecMsg
|
||||||
|
if traceData.DecMsg == "" {
|
||||||
htmlFile := fmt.Sprintf("traceDecMessage-%d-%d.html", traceData.TaskID, traceData.ID)
|
htmlFile := fmt.Sprintf("traceDecMessage-%d-%d.html", traceData.TaskID, traceData.ID)
|
||||||
pathFile := config.GetYamlConfig().OMC.FrontTraceDir + "/" + htmlFile
|
pathFile = config.GetYamlConfig().OMC.FrontTraceDir + "/" + htmlFile
|
||||||
command := fmt.Sprintf("ipdata2html -f %s -t %d -i N%d -d %x", pathFile, traceData.Timestamp, traceData.IfType, traceData.RawMsg)
|
command := fmt.Sprintf("ipdata2html -f %s -t %d -i N%d -d %x", pathFile, traceData.Timestamp, traceData.IfType, traceData.RawMsg)
|
||||||
out, err := run.ExecCmd(command, "/")
|
out, err := run.ExecCmd(command, "/")
|
||||||
log.Tracef("Exec output: %v", string(out))
|
log.Tracef("Exec output: %v", string(out))
|
||||||
@@ -416,6 +418,6 @@ func ParseRawMsg2Html(w http.ResponseWriter, r *http.Request) {
|
|||||||
services.ResponseInternalServerError500ProcessError(w, err)
|
services.ResponseInternalServerError500ProcessError(w, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
services.ResponseHtmlContent(w, http.StatusOK, pathFile)
|
services.ResponseHtmlContent(w, http.StatusOK, pathFile)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user