Merge fixes and improvements (#1910)

Co-authored-by: tristanliu <tristanliu@tencent.com>
This commit is contained in:
Jun Zhang
2024-11-16 13:57:54 +08:00
committed by GitHub
parent 5e22b412c6
commit ba1938f04b
40 changed files with 1382 additions and 2784 deletions

View File

@@ -172,6 +172,7 @@ const ClassDimensionTable: React.FC<Props> = ({}) => {
dataIndex: 'isTag',
title: '是否标签',
// width: 90,
hideInTable: !!!process.env.SHOW_TAG,
render: (isTag) => {
switch (isTag) {
case 0:
@@ -324,66 +325,69 @@ const ClassDimensionTable: React.FC<Props> = ({}) => {
headerTitle={
<div style={{ marginLeft: 15 }}>
<TableHeaderFilter
components={[
{
label: '维度搜索',
component: (
<Input.Search
style={{ width: 280 }}
placeholder="请输入ID/维度名称/英文名称"
onSearch={(value) => {
setFilterParams((preState) => {
return {
...preState,
key: value,
};
});
}}
/>
),
},
{
label: '敏感度',
component: (
<Select
style={{ width: 140 }}
options={SENSITIVE_LEVEL_OPTIONS}
placeholder="请选择敏感度"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
sensitiveLevel: value,
};
});
}}
/>
),
},
{
label: '是否为标签',
component: (
<Select
style={{ width: 145 }}
placeholder="请选择标签状态"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
isTag: value,
};
});
}}
options={[
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]}
/>
),
},
]}
components={
[
{
label: '维度搜索',
component: (
<Input.Search
style={{ width: 280 }}
placeholder="请输入ID/维度名称/英文名称"
onSearch={(value) => {
setFilterParams((preState) => {
return {
...preState,
key: value,
};
});
}}
/>
),
},
{
label: '敏感度',
component: (
<Select
style={{ width: 140 }}
options={SENSITIVE_LEVEL_OPTIONS}
placeholder="请选择敏感度"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
sensitiveLevel: value,
};
});
}}
/>
),
},
{
label: '是否为标签',
hidden: !!!process.env.SHOW_TAG,
component: (
<Select
style={{ width: 145 }}
placeholder="请选择标签状态"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
isTag: value,
};
});
}}
options={[
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]}
/>
),
},
].filter((item) => !!!item.hidden) as any
}
/>
</div>
}

View File

@@ -177,7 +177,7 @@ const ClassMetricTable: React.FC<Props> = ({ onEmptyMetricData }) => {
{
dataIndex: 'isTag',
title: '是否标签',
// width: 90,
hideInTable: !!!process.env.SHOW_TAG,
render: (isTag) => {
switch (isTag) {
case 0:
@@ -353,66 +353,69 @@ const ClassMetricTable: React.FC<Props> = ({ onEmptyMetricData }) => {
headerTitle={
<div style={{ marginLeft: 15 }}>
<TableHeaderFilter
components={[
{
label: '指标搜索',
component: (
<Input.Search
style={{ width: 280 }}
placeholder="请输入ID/指标名称/英文名称/标签"
onSearch={(value) => {
setFilterParams((preState) => {
return {
...preState,
key: value,
};
});
}}
/>
),
},
{
label: '敏感度',
component: (
<Select
style={{ width: 140 }}
options={SENSITIVE_LEVEL_OPTIONS}
placeholder="请选择敏感度"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
sensitiveLevel: value,
};
});
}}
/>
),
},
{
label: '是否为标签',
component: (
<Select
style={{ width: 145 }}
placeholder="请选择标签状态"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
isTag: value,
};
});
}}
options={[
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]}
/>
),
},
]}
components={
[
{
label: '指标搜索',
component: (
<Input.Search
style={{ width: 280 }}
placeholder="请输入ID/指标名称/英文名称"
onSearch={(value) => {
setFilterParams((preState) => {
return {
...preState,
key: value,
};
});
}}
/>
),
},
{
label: '敏感度',
component: (
<Select
style={{ width: 140 }}
options={SENSITIVE_LEVEL_OPTIONS}
placeholder="请选择敏感度"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
sensitiveLevel: value,
};
});
}}
/>
),
},
{
label: '是否为标签',
hidden: !!!process.env.SHOW_TAG,
component: (
<Select
style={{ width: 145 }}
placeholder="请选择标签状态"
allowClear
onChange={(value) => {
setFilterParams((preState) => {
return {
...preState,
isTag: value,
};
});
}}
options={[
{ value: 1, label: '是' },
{ value: 0, label: '否' },
]}
/>
),
},
].filter((item) => !!!item.hidden) as any
}
/>
</div>
}

View File

@@ -305,6 +305,7 @@ const DimensionInfoModal: React.FC<CreateFormProps> = ({
<InfoTagList />
</FormItem> */}
<Form.Item
hidden={!!!process.env.SHOW_TAG}
label={
<FormItemTitle
title={`设为标签`}

View File

@@ -73,7 +73,7 @@ const DomainManagerTab: React.FC<Props> = ({
{
label: '标签对象管理',
key: 'tagObjectManage',
hidden: !!domainData?.parentId,
hidden: !!!process.env.SHOW_TAG ? true : !!domainData?.parentId,
children: <TagObjectTable />,
},
{

View File

@@ -53,7 +53,7 @@ const DimensionMetricVisibleTableTransfer: React.FC<Props> = ({
{
dataIndex: 'isTag',
title: '是否标签',
// hidden: true,
hidden: true,
render: (isTag) => {
if (isTag) {
return <span style={{ color: '#0958d9' }}></span>;

View File

@@ -213,7 +213,7 @@ const DimensionValueSettingForm: React.FC<Props> = ({
>
{dimensionVisible && (
<Space size={20} style={{ marginBottom: 20 }}>
<Tooltip title={`立即将${KnowledgeConfigTypeWordingMap[type]}值导入字典`}>
<Tooltip title={`维度值可见后将定期启动导入任务,如果想立即启动可手动触发`}>
<Button
type="link"
size="small"

View File

@@ -713,6 +713,7 @@ const MetricInfoCreateForm: React.FC<CreateFormProps> = ({
</FormItem>
<Form.Item
hidden={!!!process.env.SHOW_TAG}
label={
<FormItemTitle
title={`设为标签`}