mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-15 14:36:47 +00:00
(feature)(webapp) modify view to dataSet
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
import { AGG_TYPE_MAP, PREFIX_CLS } from '../../common/constants';
|
||||
import { ChatContextType, DateInfoType, EntityInfoType, FilterItemType } from '../../common/type';
|
||||
import { Button, DatePicker, Tag } from 'antd';
|
||||
import { Button, DatePicker } from 'antd';
|
||||
import { CheckCircleFilled, ReloadOutlined } from '@ant-design/icons';
|
||||
import Loading from './Loading';
|
||||
import FilterItem from './FilterItem';
|
||||
@@ -89,7 +89,7 @@ const ParseTip: React.FC<Props> = ({
|
||||
|
||||
const {
|
||||
modelId,
|
||||
view,
|
||||
dataSet,
|
||||
dimensions,
|
||||
metrics,
|
||||
aggType,
|
||||
@@ -148,8 +148,8 @@ const ParseTip: React.FC<Props> = ({
|
||||
</div>
|
||||
) : (
|
||||
<div className={`${prefixCls}-tip-item`}>
|
||||
<div className={`${prefixCls}-tip-item-name`}>数据视图:</div>
|
||||
<div className={itemValueClass}>{view?.name}</div>
|
||||
<div className={`${prefixCls}-tip-item-name`}>数据集:</div>
|
||||
<div className={itemValueClass}>{dataSet?.name}</div>
|
||||
</div>
|
||||
)}
|
||||
{(queryType === 'METRIC' || queryType === 'METRIC_TAG' || queryType === 'TAG') && (
|
||||
@@ -167,7 +167,7 @@ const ParseTip: React.FC<Props> = ({
|
||||
<div className={`${prefixCls}-tip-item`}>
|
||||
<div className={`${prefixCls}-tip-item-name`}>指标:</div>
|
||||
<div className={itemValueClass}>
|
||||
{queryType === 'METRIC' || queryType === 'METRIC_TAG'
|
||||
{queryType === 'METRIC' || queryType === 'ID'
|
||||
? metrics[0].name
|
||||
: metrics.map(metric => metric.name).join('、')}
|
||||
</div>
|
||||
|
||||
@@ -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}
|
||||
/>
|
||||
|
||||
@@ -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`}>
|
||||
|
||||
@@ -109,7 +109,7 @@ const MetricTrend: React.FC<Props> = ({
|
||||
/>
|
||||
) : (
|
||||
<MetricTrendChart
|
||||
model={entityInfo?.viewInfo.name}
|
||||
model={entityInfo?.dataSetInfo.name}
|
||||
dateColumnName={dateColumnName}
|
||||
categoryColumnName={categoryColumnName}
|
||||
metricField={currentMetricField}
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createFromIconfontCN } from '@ant-design/icons';
|
||||
|
||||
const IconFont = createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/c/font_4120566_8i352njvpoi.js',
|
||||
scriptUrl: '//at.alicdn.com/t/c/font_4120566_7rwv3aw6wep.js',
|
||||
});
|
||||
|
||||
export default IconFont;
|
||||
|
||||
Reference in New Issue
Block a user