(feature)(webapp) modify view to dataSet

This commit is contained in:
williamhliu
2024-03-04 10:30:13 +08:00
parent 32338070cc
commit b29e429271
15 changed files with 35 additions and 92 deletions

View File

@@ -163,7 +163,7 @@ const BarChart: React.FC<Props> = ({ data, triggerResize, loading, metricField,
if (metricColumn && !metricColumn?.authorized) {
return (
<NoPermissionChart
model={entityInfo?.viewInfo.name || ''}
model={entityInfo?.dataSetInfo.name || ''}
chartType="barChart"
onApplyAuth={onApplyAuth}
/>

View File

@@ -48,7 +48,7 @@ const MetricCard: React.FC<Props> = ({ data, loading, onApplyAuth }) => {
<Spin spinning={loading}>
<div className={`${prefixCls}-indicator`}>
{indicatorColumn && !indicatorColumn?.authorized ? (
<ApplyAuth model={entityInfo?.viewInfo.name || ''} onApplyAuth={onApplyAuth} />
<ApplyAuth model={entityInfo?.dataSetInfo.name || ''} onApplyAuth={onApplyAuth} />
) : (
<div style={{ display: 'flex', alignItems: 'flex-end' }}>
<div className={`${prefixCls}-indicator-value`}>

View File

@@ -109,7 +109,7 @@ const MetricTrend: React.FC<Props> = ({
/>
) : (
<MetricTrendChart
model={entityInfo?.viewInfo.name}
model={entityInfo?.dataSetInfo.name}
dateColumnName={dateColumnName}
categoryColumnName={categoryColumnName}
metricField={currentMetricField}

View File

@@ -26,7 +26,9 @@ const Table: React.FC<Props> = ({ data, size, loading, onApplyAuth }) => {
title: name || nameEn,
render: (value: string | number) => {
if (!authorized) {
return <ApplyAuth model={entityInfo?.viewInfo.name || ''} onApplyAuth={onApplyAuth} />;
return (
<ApplyAuth model={entityInfo?.dataSetInfo.name || ''} onApplyAuth={onApplyAuth} />
);
}
if (dataFormatType === 'percent') {
return (