Skip to content

Commit

Permalink
Merge pull request #755 from marklogic-community/trace-ui-fix
Browse files Browse the repository at this point in the history
fixes for trace-ui
  • Loading branch information
dmcassel authored Feb 21, 2018
2 parents 2430b3d + 7eacefc commit c0e0c76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion marklogic-data-hub/src/server-side/impl/trace-lib.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,9 @@ declare function trace:trace-to-json-legacy($trace)

declare function trace:trace-to-json($trace)
{
if (fn:exists($trace/steps)) then
if (fn:exists($trace/steps) or
xdmp:node-kind($trace) = "object" and
fn:exists($trace/trace/steps)) then
let $o := json:object()
let $walk-me :=
let $n := $trace/node()
Expand Down
4 changes: 4 additions & 0 deletions marklogic-data-hub/src/trace-ui/proxy.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
"/v1/*": {
"target": "http://localhost:8012",
"secure": false
},
"/hub/*": {
"target": "http://localhost:8012",
"secure": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class TraceService {
}

getTrace(traceId: string) {
return this.get(`/v1/documents?transform=ml:traceUISearchResults&uri=/${traceId}`);
return this.get(`/hub/traces/${traceId}`);
}

private extractData = (res: Response) => {
Expand Down

0 comments on commit c0e0c76

Please sign in to comment.