|
|
@ -23,6 +23,7 @@ type AnvilJobs = { |
|
|
|
|
|
|
|
|
|
|
|
type JobSummaryOptionalPropsWithDefault = { |
|
|
|
type JobSummaryOptionalPropsWithDefault = { |
|
|
|
openInitially?: boolean; |
|
|
|
openInitially?: boolean; |
|
|
|
|
|
|
|
refreshInterval?: number; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
type JobSummaryOptionalPropsWithoutDefault = { |
|
|
|
type JobSummaryOptionalPropsWithoutDefault = { |
|
|
@ -44,6 +45,7 @@ const JOB_SUMMARY_DEFAULT_PROPS: Required<JobSummaryOptionalPropsWithDefault> & |
|
|
|
JobSummaryOptionalPropsWithoutDefault = { |
|
|
|
JobSummaryOptionalPropsWithoutDefault = { |
|
|
|
onFetchSuccessAppend: undefined, |
|
|
|
onFetchSuccessAppend: undefined, |
|
|
|
openInitially: false, |
|
|
|
openInitially: false, |
|
|
|
|
|
|
|
refreshInterval: 10000, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const JobSummary = forwardRef<JobSummaryForwardedRefContent, JobSummaryProps>( |
|
|
|
const JobSummary = forwardRef<JobSummaryForwardedRefContent, JobSummaryProps>( |
|
|
@ -51,6 +53,7 @@ const JobSummary = forwardRef<JobSummaryForwardedRefContent, JobSummaryProps>( |
|
|
|
{ |
|
|
|
{ |
|
|
|
onFetchSuccessAppend, |
|
|
|
onFetchSuccessAppend, |
|
|
|
openInitially = JOB_SUMMARY_DEFAULT_PROPS.openInitially, |
|
|
|
openInitially = JOB_SUMMARY_DEFAULT_PROPS.openInitially, |
|
|
|
|
|
|
|
refreshInterval = JOB_SUMMARY_DEFAULT_PROPS.refreshInterval, |
|
|
|
}, |
|
|
|
}, |
|
|
|
ref, |
|
|
|
ref, |
|
|
|
) => { |
|
|
|
) => { |
|
|
@ -74,6 +77,7 @@ const JobSummary = forwardRef<JobSummaryForwardedRefContent, JobSummaryProps>( |
|
|
|
|
|
|
|
|
|
|
|
onFetchSuccessAppend?.call(null, rawAnvilJobs); |
|
|
|
onFetchSuccessAppend?.call(null, rawAnvilJobs); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
refreshInterval, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
useImperativeHandle( |
|
|
|
useImperativeHandle( |
|
|
|