Skip to content

Commit

Permalink
[INLONG-11539][Dashboard] Dirty data query date format modification (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
wohainilaodou authored Nov 26, 2024
1 parent 83ef6a5 commit 63a1173
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions inlong-dashboard/src/ui/pages/common/DirtyModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ const Comp: React.FC<Props> = ({ ...modalProps }) => {
dataCount: 10,
dirtyType: '',
serverType: '',
startTime: dayjs().format('YYYYMMDD'),
endTime: dayjs().format('YYYYMMDD'),
startTime: dayjs().format('YYYYMMDDHH'),
endTime: dayjs().format('YYYYMMDDHH'),
};
const defaultTrendOptions = {
dataTimeUnit: 'D',
Expand Down Expand Up @@ -172,8 +172,8 @@ const Comp: React.FC<Props> = ({ ...modalProps }) => {
method: 'POST',
data: {
...options,
startTime: options.startTime ? dayjs(options.startTime).format('YYYYMMDD') : '',
endTime: options.endTime ? dayjs(options.endTime).format('YYYYMMDD') : '',
startTime: options.startTime ? dayjs(options.startTime).format('YYYYMMDDHH') : '',
endTime: options.endTime ? dayjs(options.endTime).format('YYYYMMDDHH') : '',
dataCount: form1.getFieldValue('dataCount') || 10,
keyword: form1.getFieldValue('keyword') || '',
sinkIdList: [modalProps.id],
Expand Down Expand Up @@ -286,7 +286,8 @@ const Comp: React.FC<Props> = ({ ...modalProps }) => {
initialValue: dayjs(options.startTime),
props: {
allowClear: true,
format: 'YYYYMMDD',
showTime: true,
format: 'YYYY-MM-DD HH',
},
rules: [
{ required: true },
Expand All @@ -310,7 +311,8 @@ const Comp: React.FC<Props> = ({ ...modalProps }) => {
props: values => {
return {
allowClear: true,
format: 'YYYYMMDD',
showTime: true,
format: 'YYYY-MM-DD HH',
};
},
rules: [
Expand Down Expand Up @@ -408,7 +410,7 @@ const Comp: React.FC<Props> = ({ ...modalProps }) => {
return {
allowClear: true,
showTime: values.dataTimeUnit === 'H',
format: values.dataTimeUnit === 'D' ? 'YYYYMMDD' : 'YYYYMMDDHH',
format: values.dataTimeUnit === 'D' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH',
};
},
initialValue: dayjs(trendOptions.startTime),
Expand All @@ -435,7 +437,7 @@ const Comp: React.FC<Props> = ({ ...modalProps }) => {
return {
allowClear: true,
showTime: values.dataTimeUnit === 'H',
format: values.dataTimeUnit === 'D' ? 'YYYYMMDD' : 'YYYYMMDDHH',
format: values.dataTimeUnit === 'D' ? 'YYYY-MM-DD' : 'YYYY-MM-DD HH',
};
},
rules: [
Expand Down

0 comments on commit 63a1173

Please sign in to comment.