vmui: show tracing in json view (#3316)

* vmui: show tracing in json view

* vmui: refactor tracing view
This commit is contained in:
Michal Kralik 2022-11-09 11:12:28 +01:00 committed by GitHub
parent 10791bf224
commit 7130af7fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,22 +86,16 @@ const CustomPanel: FC = () => {
</Box>
{error && <Alert color="error" severity="error" sx={{whiteSpace: "pre-wrap", mt: 2}}>{error}</Alert>}
{warning && <Alert color="warning" severity="warning" sx={{whiteSpace: "pre-wrap", my: 2}}>{warning}</Alert>}
{isTracingEnabled && <TracingsView
traces={tracesState}
onDeleteClick={handleTraceDelete}
/>}
{graphData && period && (displayType === "chart") && <>
{isTracingEnabled && <TracingsView
traces={tracesState}
onDeleteClick={handleTraceDelete}
/>}
<GraphView data={graphData} period={period} customStep={customStep} query={query} yaxis={yaxis}
setYaxisLimits={setYaxisLimits} setPeriod={setPeriod}/>
</>}
{liveData && (displayType === "code") && <JsonView data={liveData}/>}
{liveData && (displayType === "table") && <>
{isTracingEnabled && <TracingsView
traces={tracesState}
onDeleteClick={handleTraceDelete}
/>}
<TableView data={liveData} displayColumns={displayColumns}/>
</>}
{liveData && (displayType === "table") && <TableView data={liveData} displayColumns={displayColumns}/>}
</Box>}
</Box>
</Box>