mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-17 16:02:14 +00:00
add chat plugin and split query to parse and execute (#25)
* [feature](webapp) add drill down dimensions and metric period compare and modify layout * [feature](webapp) add drill down dimensions and metric period compare and modify layout * [feature](webapp) gitignore add supersonic-webapp * [feature](webapp) gitignore add supersonic-webapp * [feature](webapp) add chat plugin and split query to parse and execute * [feature](webapp) add chat plugin and split query to parse and execute * [feature](webapp) add chat plugin and split query to parse and execute --------- Co-authored-by: williamhliu <williamhliu@tencent.com>
This commit is contained in:
@@ -42,9 +42,18 @@ export const THEME_COLOR_LIST = [
|
||||
|
||||
export const PARSE_ERROR_TIP = '小Q不太懂您说什么呐,回去一定补充知识';
|
||||
|
||||
export const SEARCH_EXCEPTION_TIP = '查询出错啦,智能小Q还不够聪明,请您换个表达再试试';
|
||||
|
||||
export const MSG_VALID_TIP = {
|
||||
[MsgValidTypeEnum.SEARCH_EXCEPTION]: '数据查询异常',
|
||||
[MsgValidTypeEnum.INVALID]: '小Q不太懂您说什么呐,回去一定补充知识',
|
||||
};
|
||||
|
||||
export const PREFIX_CLS = 'ss-chat';
|
||||
export const PREFIX_CLS = 'ss-chat';
|
||||
|
||||
export const AGG_TYPE_MAP = {
|
||||
SUM: '总计',
|
||||
AVG: '平均值',
|
||||
MAX: '最大值',
|
||||
MIN: '最小值',
|
||||
}
|
||||
@@ -12,6 +12,8 @@ export type FieldType = {
|
||||
id: number;
|
||||
name: string;
|
||||
status: number;
|
||||
domain: number;
|
||||
type: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
@@ -33,7 +35,7 @@ export type EntityInfoType = {
|
||||
|
||||
export type DateInfoType = {
|
||||
dateList: any[];
|
||||
dateMode: number;
|
||||
dateMode: string;
|
||||
period: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
@@ -56,8 +58,11 @@ export type ChatContextType = {
|
||||
dateInfo: DateInfoType;
|
||||
dimensions: FieldType[];
|
||||
metrics: FieldType[];
|
||||
entity: number;
|
||||
entity: { alias: string[] };
|
||||
elementMatches: any[];
|
||||
queryMode: string;
|
||||
dimensionFilters: FilterItemType[];
|
||||
properties: any;
|
||||
};
|
||||
|
||||
export enum MsgValidTypeEnum {
|
||||
@@ -67,16 +72,11 @@ export enum MsgValidTypeEnum {
|
||||
INVALID = 3,
|
||||
};
|
||||
|
||||
export type InstructionResonseType = {
|
||||
export type PluginResonseType = {
|
||||
description: string;
|
||||
instructionConfig: {
|
||||
showElements: { elementId: string, params: any }[];
|
||||
showType: string;
|
||||
relaShowElements: { elementId: string, params: any }[];
|
||||
relaShowType: string;
|
||||
};
|
||||
instructionId: number;
|
||||
instructionType: string;
|
||||
webPage: { url: string, paramOptions: any, params: any, valueParams: any };
|
||||
pluginId: number;
|
||||
pluginType: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
@@ -103,9 +103,23 @@ export type MsgDataType = {
|
||||
queryId: number;
|
||||
queryMode: string;
|
||||
queryState: string;
|
||||
response: InstructionResonseType;
|
||||
response: PluginResonseType;
|
||||
};
|
||||
|
||||
export enum ParseStateEnum {
|
||||
COMPLETED = 'COMPLETED',
|
||||
PENDING = 'PENDING',
|
||||
FAILED = 'FAILED',
|
||||
}
|
||||
|
||||
export type ParseDataType = {
|
||||
chatId: number;
|
||||
queryText: string;
|
||||
state: ParseStateEnum;
|
||||
selectedParses: ChatContextType[];
|
||||
candidateParses: ChatContextType[];
|
||||
}
|
||||
|
||||
export type QueryDataType = {
|
||||
queryColumns: ColumnType[];
|
||||
queryResults: any[];
|
||||
@@ -120,7 +134,7 @@ export type ColumnType = {
|
||||
dataFormatType: string;
|
||||
dataFormat: {
|
||||
decimalPlaces: number;
|
||||
needmultiply100: boolean;
|
||||
needMultiply100: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user