Feat: optimize dashboard UI and fix sql highlight (#1329)

Co-authored-by: hzh97 <2976151305@qq.com>
Co-authored-by: aries_ckt <916701291@qq.com>
This commit is contained in:
lcxadml
2024-04-10 22:50:47 +08:00
committed by GitHub
parent df80bc2079
commit d55c51a6b7
171 changed files with 2306 additions and 979 deletions

View File

@@ -45,7 +45,7 @@ function Chart({ chartsData }: Props) {
{chartRows?.map((chartRow, index) => (
<div key={`chart_row_${index}`} className={`${chartRow?.type !== 'IndicatorValue' ? 'flex gap-3' : ''}`}>
{chartRow.charts.map((chart) => {
if (chart.chart_type === 'IndicatorValue') {
if (chart.chart_type === 'IndicatorValue' || chart.type === 'IndicatorValue') {
return (
<div key={chart.chart_uid} className="flex flex-row gap-3">
{chart.values.map((item) => (
@@ -62,11 +62,11 @@ function Chart({ chartsData }: Props) {
))}
</div>
);
} else if (chart.chart_type === 'LineChart') {
} else if (chart.chart_type === 'LineChart' || chart.type === 'LineChart') {
return <LineChart key={chart.chart_uid} chart={chart} />;
} else if (chart.chart_type === 'BarChart') {
} else if (chart.chart_type === 'BarChart' || chart.type === 'BarChart') {
return <BarChart key={chart.chart_uid} chart={chart} />;
} else if (chart.chart_type === 'Table') {
} else if (chart.chart_type === 'Table' || chart.type === 'Table') {
return <TableChart key={chart.chart_uid} chart={chart} />;
}
})}