mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +00:00
(improvement)(Chat) Fixed the issue of ineffective filtering in mapper detectDataSetIds, resolved the autocomplete feature, and changed METRIC_TAG to METRIC_ID. (#819)
This commit is contained in:
@@ -93,7 +93,7 @@ export type ChatContextType = {
|
||||
elementMatches: any[];
|
||||
nativeQuery: boolean;
|
||||
queryMode: string;
|
||||
queryType: 'METRIC' | 'METRIC_TAG' | 'ID' | 'TAG' | 'OTHER';
|
||||
queryType: 'METRIC' | 'METRIC_ID' | 'ID' | 'TAG' | 'OTHER';
|
||||
dimensionFilters: FilterItemType[];
|
||||
properties: any;
|
||||
sqlInfo: SqlInfoType;
|
||||
|
||||
@@ -152,11 +152,11 @@ const ParseTip: React.FC<Props> = ({
|
||||
<div className={itemValueClass}>{dataSet?.name}</div>
|
||||
</div>
|
||||
)}
|
||||
{(queryType === 'METRIC' || queryType === 'METRIC_TAG' || queryType === 'TAG') && (
|
||||
{(queryType === 'METRIC' || queryType === 'METRIC_ID' || queryType === 'TAG') && (
|
||||
<div className={`${prefixCls}-tip-item`}>
|
||||
<div className={`${prefixCls}-tip-item-name`}>查询模式:</div>
|
||||
<div className={itemValueClass}>
|
||||
{queryType === 'METRIC' || queryType === 'METRIC_TAG' ? '指标模式' : '标签模式'}
|
||||
{queryType === 'METRIC' || queryType === 'METRIC_ID' ? '指标模式' : '标签模式'}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -45,7 +45,7 @@ const Message: React.FC<Props> = ({
|
||||
e.stopPropagation();
|
||||
}}
|
||||
>
|
||||
{(queryMode === 'METRIC_TAG' || queryMode === 'TAG_DETAIL') &&
|
||||
{(queryMode === 'METRIC_ID' || queryMode === 'TAG_DETAIL') &&
|
||||
entityInfoList.length > 0 && (
|
||||
<div className={`${prefixCls}-info-bar`}>
|
||||
<div className={`${prefixCls}-main-entity-info`}>
|
||||
|
||||
@@ -233,7 +233,7 @@ const ChatMsg: React.FC<Props> = ({ queryId, data, chartIndex, triggerResize })
|
||||
?.name;
|
||||
|
||||
const isEntityMode =
|
||||
(queryMode === 'TAG_LIST_FILTER' || queryMode === 'METRIC_TAG') &&
|
||||
(queryMode === 'TAG_LIST_FILTER' || queryMode === 'METRIC_ID') &&
|
||||
typeof entityId === 'string' &&
|
||||
entityName !== undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user