@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
[options]
|
[options]
|
||||||
esproposal.decorators=ignore
|
esproposal.decorators=ignore
|
||||||
|
esproposal.optional_chaining=enable
|
||||||
include_warnings=true
|
include_warnings=true
|
||||||
module.use_strict=true
|
module.use_strict=true
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
- Possibility to use a fast clone when creating a VM from a snapshot [#2937](https://github.com/vatesfr/xen-orchestra/issues/2937)
|
- Possibility to use a fast clone when creating a VM from a snapshot [#2937](https://github.com/vatesfr/xen-orchestra/issues/2937)
|
||||||
- Ability to customize cloud config templates [#2984](https://github.com/vatesfr/xen-orchestra/issues/2984)
|
- Ability to customize cloud config templates [#2984](https://github.com/vatesfr/xen-orchestra/issues/2984)
|
||||||
- Add Backup deprecation message and link to Backup NG migration blog post [#3089](https://github.com/vatesfr/xen-orchestra/issues/3089)
|
- Add Backup deprecation message and link to Backup NG migration blog post [#3089](https://github.com/vatesfr/xen-orchestra/issues/3089)
|
||||||
|
- [Backup NG] Ability to cancel a running backup job [#3047](https://github.com/vatesfr/xen-orchestra/issues/3047)
|
||||||
### Bugs
|
### Bugs
|
||||||
|
|
||||||
- update the xentools search item to return the version number of installed xentools [#3015](https://github.com/vatesfr/xen-orchestra/issues/3015)
|
- update the xentools search item to return the version number of installed xentools [#3015](https://github.com/vatesfr/xen-orchestra/issues/3015)
|
||||||
|
|||||||
3
flow-typed/promise-toolbox.js
vendored
3
flow-typed/promise-toolbox.js
vendored
@@ -1,4 +1,7 @@
|
|||||||
declare module 'promise-toolbox' {
|
declare module 'promise-toolbox' {
|
||||||
|
declare export class CancelToken {
|
||||||
|
static source(): { cancel: (message: any) => void, token: CancelToken };
|
||||||
|
}
|
||||||
declare export function cancelable(Function): Function
|
declare export function cancelable(Function): Function
|
||||||
declare export function defer<T>(): {|
|
declare export function defer<T>(): {|
|
||||||
promise: Promise<T>,
|
promise: Promise<T>,
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ const messages = {
|
|||||||
jobTimezone: 'Timezone',
|
jobTimezone: 'Timezone',
|
||||||
jobServerTimezone: 'Server',
|
jobServerTimezone: 'Server',
|
||||||
runJob: 'Run job',
|
runJob: 'Run job',
|
||||||
|
cancelJob: 'Cancel job',
|
||||||
runJobConfirm: 'Are you sure you want to run {backupType} {id} ({tag})?',
|
runJobConfirm: 'Are you sure you want to run {backupType} {id} ({tag})?',
|
||||||
runJobVerbose: 'One shot running started. See overview for logs.',
|
runJobVerbose: 'One shot running started. See overview for logs.',
|
||||||
jobEdit: 'Edit job',
|
jobEdit: 'Edit job',
|
||||||
@@ -369,6 +370,7 @@ const messages = {
|
|||||||
migrateBackupScheduleMessage:
|
migrateBackupScheduleMessage:
|
||||||
'This will migrate this backup to a backup NG. This operation is not reversible. Do you want to continue?',
|
'This will migrate this backup to a backup NG. This operation is not reversible. Do you want to continue?',
|
||||||
runBackupNgJobConfirm: 'Are you sure you want to run {name} ({id})?',
|
runBackupNgJobConfirm: 'Are you sure you want to run {name} ({id})?',
|
||||||
|
cancelJobConfirm: 'Are you sure you want to cancel {name} ({id})?',
|
||||||
|
|
||||||
// ------ New backup -----
|
// ------ New backup -----
|
||||||
newBackupAdvancedSettings: 'Advanced settings',
|
newBackupAdvancedSettings: 'Advanced settings',
|
||||||
|
|||||||
@@ -1679,6 +1679,15 @@ export const runJob = job => {
|
|||||||
return _call('job.runSequence', { idSequence: [resolveId(job)] })
|
return _call('job.runSequence', { idSequence: [resolveId(job)] })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const cancelJob = ({ id, name, runId }) =>
|
||||||
|
confirm({
|
||||||
|
title: _('cancelJob'),
|
||||||
|
body: _('cancelJobConfirm', {
|
||||||
|
id: id.slice(0, 5),
|
||||||
|
name: <strong>{name}</strong>,
|
||||||
|
}),
|
||||||
|
}).then(() => _call('job.cancel', { runId }))
|
||||||
|
|
||||||
// Backup/Schedule ---------------------------------------------------------
|
// Backup/Schedule ---------------------------------------------------------
|
||||||
|
|
||||||
export const createSchedule = (
|
export const createSchedule = (
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { Container, Row, Col } from 'grid'
|
|||||||
import { NavLink, NavTabs } from 'nav'
|
import { NavLink, NavTabs } from 'nav'
|
||||||
import { routes } from 'utils'
|
import { routes } from 'utils'
|
||||||
import {
|
import {
|
||||||
|
cancelJob,
|
||||||
deleteBackupNgJobs,
|
deleteBackupNgJobs,
|
||||||
disableSchedule,
|
disableSchedule,
|
||||||
enableSchedule,
|
enableSchedule,
|
||||||
@@ -68,15 +69,28 @@ const SchedulePreviewBody = ({ item: job, userData: { schedulesByJob } }) => (
|
|||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<ActionButton
|
{job.runId !== undefined ? (
|
||||||
btnStyle='primary'
|
<ActionButton
|
||||||
data-id={job.id}
|
btnStyle='danger'
|
||||||
data-name={job.name}
|
handler={cancelJob}
|
||||||
data-schedule={schedule.id}
|
handlerParam={job}
|
||||||
handler={_runBackupNgJob}
|
icon='cancel'
|
||||||
icon='run-schedule'
|
key='cancel'
|
||||||
size='small'
|
size='small'
|
||||||
/>
|
tooltip={_('formCancel')}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<ActionButton
|
||||||
|
btnStyle='primary'
|
||||||
|
data-id={job.id}
|
||||||
|
data-name={job.name}
|
||||||
|
data-schedule={schedule.id}
|
||||||
|
handler={_runBackupNgJob}
|
||||||
|
icon='run-schedule'
|
||||||
|
key='run'
|
||||||
|
size='small'
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user