Skip to content

Commit

Permalink
Add a field serviceType
Browse files Browse the repository at this point in the history
  • Loading branch information
yang1666204 committed Jun 19, 2024
1 parent 1bae321 commit 324b2b6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
6 changes: 5 additions & 1 deletion ui/src/constants/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ const RULER_ZONE = [
const LABEL_NAME_RULE = {
validator: (_: RuleObject, value: AlarmMatcher[] | CommonKVPair[]) => {
if (
value.some((item) => !LABELNAME_REG.test(item?.name || item?.key || ''))
value.some(
(item) =>
(item?.name || item?.key) &&
!LABELNAME_REG.test(item?.name || item?.key || ''),
)
) {
return Promise.reject(
intl.formatMessage({
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/Alert/Shield/ShieldDrawerForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { intl } from '@/utils/intl';
import { useModel } from '@umijs/max';
import { useRequest } from 'ahooks';
import type { DrawerProps } from 'antd';
import { Button, Col, DatePicker, Form, Input, Radio, Row, Select } from 'antd';
import { Button, Col, DatePicker, Form, Input, Radio, Row, Select, message } from 'antd';
import dayjs from 'dayjs';
import { useEffect } from 'react';
import {
Expand Down
9 changes: 9 additions & 0 deletions ui/src/pages/OBProxy/ClusterList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ const columns: ColumnsType<ObproxyOBProxyOverview> = [
key: 'replicas',
render: (value) => <Text>{value || '-'}</Text>,
},
{
title: intl.formatMessage({
id: 'src.pages.OBProxy.New.88D0BC94',
defaultMessage: '服务类型',
}),
dataIndex: 'serviceType',
key: 'serviceType',
render: (value) => <Text>{value || '-'}</Text>,
},
{
title: intl.formatMessage({
id: 'src.pages.OBProxy.4172D3BD',
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/OBProxy/Detail/Overview/DetailConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function DetailConfig({ style, ...props }: DetailConfigProps) {
})}

{service.ports
?.map((portItem) => `${portItem.port}:${portItem.targetPort}`)
?.map((portItem) => `${portItem.port}:${portItem.nodePort}`)
.join(',')}
</span>
) : null}
Expand Down

0 comments on commit 324b2b6

Please sign in to comment.