(feature)(webapp) add query mode in parse tip and change query modes query to METRIC and TAG (#425)

This commit is contained in:
williamhliu
2023-11-27 16:12:10 +08:00
committed by GitHub
parent 49ebb70cb3
commit 23d01c4f83
7 changed files with 28 additions and 44 deletions

View File

@@ -126,10 +126,10 @@ export const layout: RunTimeLayoutConfig = (params) => {
rightContentRender: () => <RightContent />,
disableContentMargin: true,
menuHeaderRender: undefined,
childrenRender: (dom) => {
childrenRender: (dom: any) => {
return (
<div
style={{ height: location.pathname.includes('chat') ? 'calc(100vh - 48px)' : undefined }}
style={{ height: location.pathname.includes('chat') ? 'calc(100vh - 56px)' : undefined }}
>
{dom}
{history.location.pathname !== '/chat' && !isMobile && (

View File

@@ -241,7 +241,7 @@ const ToolModal: React.FC<Props> = ({ editTool, onSaveTool, onCancel }) => {
</FormItem>
)}
{toolType === AgentToolTypeEnum.RULE && (
<FormItem name="queryModes" label="查询模式">
<FormItem name="queryTypes" label="查询模式">
<Select
placeholder="请选择查询模式"
options={QUERY_MODE_LIST}

View File

@@ -1,11 +1,11 @@
.agent {
height: calc(100vh - 48px);
height: calc(100vh - 56px);
}
.agentsSection {
padding: 20px 40px;
background: #fff;
height: calc(100vh - 48px);
height: calc(100vh - 56px);
.sectionTitle {
font-size: 24px;

View File

@@ -11,17 +11,6 @@ export enum AgentToolTypeEnum {
INTERPRET = 'INTERPRET'
}
export enum QueryModeEnum {
ENTITY_DETAIL = 'ENTITY_DETAIL',
ENTITY_LIST_FILTER = 'ENTITY_LIST_FILTER',
ENTITY_ID = 'ENTITY_ID',
METRIC_ENTITY = 'METRIC_ENTITY',
METRIC_FILTER = 'METRIC_FILTER',
METRIC_GROUPBY = 'METRIC_GROUPBY',
METRIC_MODEL = 'METRIC_MODEL',
METRIC_ORDERBY = 'METRIC_ORDERBY'
}
export const AGENT_TOOL_TYPE_LIST = [
{
label: '规则语义解析',
@@ -41,38 +30,19 @@ export const AGENT_TOOL_TYPE_LIST = [
},
]
export enum QueryModeEnum {
METRIC = 'METRIC',
TAG = 'TAG'
}
export const QUERY_MODE_LIST = [
{
label: '实体明细(查询维度信息)',
value: QueryModeEnum.ENTITY_DETAIL
label: '指标模式',
value: QueryModeEnum.METRIC
},
{
label: '实体圈选',
value: QueryModeEnum.ENTITY_LIST_FILTER
},
{
label: '实体查询(按ID查询)',
value: QueryModeEnum.ENTITY_ID
},
{
label: '指标查询(带实体)',
value: QueryModeEnum.METRIC_ENTITY
},
{
label: '指标查询(带条件)',
value: QueryModeEnum.METRIC_FILTER
},
{
label: '指标查询(按维度分组)',
value: QueryModeEnum.METRIC_GROUPBY
},
{
label: '指标查询(不带条件)',
value: QueryModeEnum.METRIC_MODEL
},
{
label: '按指标排序',
value: QueryModeEnum.METRIC_ORDERBY
label: '标签模式',
value: QueryModeEnum.TAG
}
];