diff --git a/viewer/src/TestCase.tsx b/viewer/src/TestCase.tsx index 3bc59b4..67855b5 100644 --- a/viewer/src/TestCase.tsx +++ b/viewer/src/TestCase.tsx @@ -43,18 +43,6 @@ const TestCase = () => { "method" : "GET", "body" : "", }, - { - "title" : "测试参数采集", - "url" : "http://localhost:8080/profile/1", - "method" : "GET", - "body" : "", - }, - { - "title" : "测试参数采集", - "url" : "http://localhost:8080/profile/1", - "method" : "GET", - "body" : "", - }, ]) const runTestCase = function (item,idx) { @@ -63,12 +51,18 @@ const TestCase = () => { console.log(resp.headers) item.res = { resp: JSON.stringify(resp.data), - gid: resp.headers['X-Ellyn-Gid'], + gid: resp.headers['x-ellyn-gid'], } setCases(cases.map(item=>item)) }) } + const onClick = (e, target) => { + console.log("click to " + target) + navigate('/traffic/query?id=' + target) + }; + + return ( <> @@ -84,7 +78,7 @@ const TestCase = () => { { item.res && ( <> - Graph:{item.res.gid} + Graph: onClick(e,item.res.gid)} target="_blank">{item.res.gid} Response: {item.res.resp}