feat: improve error handling in system info page

This commit is contained in:
Yang Luo
2025-04-11 01:41:27 +08:00
parent fc618b9bd5
commit 493ceddcd9
2 changed files with 41 additions and 11 deletions

View File

@ -66,14 +66,14 @@ class PrometheusInfoTable extends React.Component {
if (this.state.table === "latency") {
return (
<div style={{height: "300px", overflow: "auto"}}>
<Table columns={latencyColumns} dataSource={this.props.prometheusInfo.apiLatency} pagination={false} />
<Table columns={latencyColumns} dataSource={this.props.prometheusInfo?.apiLatency} pagination={false} />
</div>
);
} else if (this.state.table === "throughput") {
return (
<div style={{height: "300px", overflow: "auto"}}>
{i18next.t("system:Total Throughput")}: {this.props.prometheusInfo.totalThroughput}
<Table columns={throughputColumns} dataSource={this.props.prometheusInfo.apiThroughput} pagination={false} />
{i18next.t("system:Total Throughput")}: {this.props.prometheusInfo?.totalThroughput}
<Table columns={throughputColumns} dataSource={this.props.prometheusInfo?.apiThroughput} pagination={false} />
</div>
);
}