mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
(feature)(webapp) add query mode in parse tip and change query modes query to METRIC and TAG (#425)
This commit is contained in:
@@ -91,6 +91,7 @@ export type ChatContextType = {
|
||||
elementMatches: any[];
|
||||
nativeQuery: boolean;
|
||||
queryMode: string;
|
||||
queryType: 'METRIC' | 'TAG' | 'OTHER';
|
||||
dimensionFilters: FilterItemType[];
|
||||
properties: any;
|
||||
sqlInfo: SqlInfoType;
|
||||
|
||||
@@ -94,6 +94,7 @@ const ParseTip: React.FC<Props> = ({
|
||||
metrics,
|
||||
aggType,
|
||||
queryMode,
|
||||
queryType,
|
||||
properties,
|
||||
entity,
|
||||
elementMatches,
|
||||
@@ -151,6 +152,14 @@ const ParseTip: React.FC<Props> = ({
|
||||
<div className={itemValueClass}>{modelName}</div>
|
||||
</div>
|
||||
)}
|
||||
{(queryType === 'METRIC' || queryType === 'TAG') && (
|
||||
<div className={`${prefixCls}-tip-item`}>
|
||||
<div className={`${prefixCls}-tip-item-name`}>查询模式:</div>
|
||||
<div className={itemValueClass}>
|
||||
{queryType === 'METRIC' ? '指标模式' : '标签模式'}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!queryMode?.includes('ENTITY') &&
|
||||
metrics &&
|
||||
metrics.length > 0 &&
|
||||
|
||||
@@ -25,6 +25,10 @@ const DimensionSection: React.FC<Props> = ({
|
||||
|
||||
const defaultDimensions = dimensions.slice(0, DEFAULT_DIMENSION_COUNT);
|
||||
|
||||
if (defaultDimensions.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={`${prefixCls}-section`}>
|
||||
<div className={`${prefixCls}-title`}>{isSecondDrillDown ? '二级' : '推荐'}下钻维度:</div>
|
||||
|
||||
Reference in New Issue
Block a user