1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

F OpenNebula/One#6323: fix schedule actions backupjobs (#2836)

This commit is contained in:
Jorge Miguel Lobo Escalona 2023-11-24 14:56:59 +01:00 committed by GitHub
parent f72d2437ef
commit 58ef2b4c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 4 deletions

View File

@ -56,7 +56,8 @@ const ScheduleActionCard = memo(({ schedule, actions }) => {
const time = timeIsRelative ? getPeriodicityByTimeInSeconds(TIME) : TIME
const formatTime =
!timeIsRelative && timeFromMilliseconds(+TIME).toFormat('ff')
const formatDoneTime = DONE && timeFromMilliseconds(+DONE).toFormat('ff')
const formatDoneTime =
DONE && timeFromMilliseconds(DONE === '-1' ? +TIME : +DONE).toFormat('ff')
const { repeat, end } = getRepeatInformation(schedule)
@ -91,7 +92,10 @@ const ScheduleActionCard = memo(({ schedule, actions }) => {
{end && <StyledTypography variant="caption">{end}</StyledTypography>}
{DONE && (
<StyledTypography variant="caption" title={formatDoneTime}>
<Timer initial={DONE} translateWord={T.DoneAgo} />
<Timer
initial={DONE === '-1' ? +TIME : +DONE}
translateWord={T.DoneAgo}
/>
</StyledTypography>
)}
{!noMore && (

View File

@ -42,6 +42,7 @@ const TableController = memo(
tooltip,
Table,
singleSelect = true,
displaySelectedRows = true,
getRowId = defaultGetRowId,
readOnly = false,
onConditionChange,
@ -104,7 +105,7 @@ const TableController = memo(
<Table
pageSize={5}
disableGlobalSort
displaySelectedRows
displaySelectedRows={displaySelectedRows}
disableRowSelect={readOnly}
singleSelect={singleSelect}
getRowId={getRowId}
@ -131,6 +132,7 @@ TableController.propTypes = {
type: PropTypes.string,
zoneId: PropTypes.string,
singleSelect: PropTypes.bool,
displaySelectedRows: PropTypes.bool,
Table: PropTypes.any,
getRowId: PropTypes.func,
name: PropTypes.string.isRequired,

View File

@ -28,6 +28,7 @@ const VMS = {
type: INPUT_TYPES.TABLE,
Table: () => VmsTable,
singleSelect: false,
displaySelectedRows: false,
validation: array(string().trim())
.required()
.default(() => undefined),

View File

@ -488,7 +488,9 @@ const END_VALUE_FIELD = {
}
),
fieldProps: ([_, endType] = []) =>
endType === END_TYPE_VALUES.DATE && { defaultValue: getNextWeek() },
endType === END_TYPE_VALUES.DATE
? { defaultValue: getNextWeek() }
: { min: 1 },
}
// --------------------------------------------------------