Unverified Commit 13214ce0 authored by Zzm0809's avatar Zzm0809 Committed by GitHub

[Optimization] Optimization Env of Select options (#3262)

parent cb81b4d1
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
*/ */
import { TagAlignLeft } from '@/components/StyledComponents'; import { TagAlignLeft } from '@/components/StyledComponents';
import { getTabIcon } from '@/pages/DataStudio/MiddleContainer/function';
import { getAlertIcon } from '@/pages/RegCenter/Alert/AlertInstance/function'; import { getAlertIcon } from '@/pages/RegCenter/Alert/AlertInstance/function';
import { RUN_MODE } from '@/services/constants'; import { RUN_MODE } from '@/services/constants';
import { Alert, ALERT_TYPE, Cluster } from '@/types/RegCenter/data.d'; import { Alert, ALERT_TYPE, Cluster } from '@/types/RegCenter/data.d';
...@@ -147,7 +148,12 @@ export const buildClusterConfigOptions = ( ...@@ -147,7 +148,12 @@ export const buildClusterConfigOptions = (
export const buildEnvOptions = (env: TaskInfo[] = []) => { export const buildEnvOptions = (env: TaskInfo[] = []) => {
const envList: DefaultOptionType[] = [ const envList: DefaultOptionType[] = [
{ {
label: l('button.disable'), label: (
<Space>
<Badge status='error' />
{l('button.disable')}
</Space>
),
value: -1, value: -1,
key: -1 key: -1
} }
...@@ -156,9 +162,12 @@ export const buildEnvOptions = (env: TaskInfo[] = []) => { ...@@ -156,9 +162,12 @@ export const buildEnvOptions = (env: TaskInfo[] = []) => {
for (const item of env) { for (const item of env) {
const tag = ( const tag = (
<TagAlignLeft> <TagAlignLeft>
{item.enabled ? <Badge status='success' /> : <Badge status='error' />} <Space size={'small'}>
{item.fragment ? <PaperClipOutlined /> : undefined} {item.enabled ? <Badge status='success' /> : <Badge status='error' />}
{item.name} {getTabIcon(item.dialect, 20)}
{item.name}
{item.fragment ? <PaperClipOutlined /> : undefined}
</Space>
</TagAlignLeft> </TagAlignLeft>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment