| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import i18n from '@/locales'
- export default {
- created () {
- this.singleActions = [
- {
- label: i18n.t('compute.perform_sync_status'),
- permission: 'diskbackups_perform_syncstatus',
- action: obj => {
- this.onManager('performAction', {
- steadyStatus: ['running', 'ready'],
- id: obj.id,
- managerArgs: {
- action: 'syncstatus',
- },
- })
- },
- meta: () => ({
- validate: true,
- }),
- },
- {
- label: i18n.t('compute.text_478'),
- permission: 'diskbackups_perform_recovery',
- action: obj => {
- this.createDialog('DiskBackupRollbackDialog', {
- data: [obj],
- columns: this.columns,
- onManager: this.onManager,
- refresh: this.refresh,
- })
- },
- meta: obj => ({
- validate: obj.status === 'ready',
- tooltip: obj.status === 'ready' ? '' : i18n.t('compute.instance_backup_not_ready_alert'),
- }),
- },
- {
- label: i18n.t('compute.perform_delete'),
- permission: 'diskbackups_delete',
- action: obj => {
- this.createDialog('DeleteResDialog', {
- vm: this,
- data: [obj],
- columns: this.columns,
- title: i18n.t('compute.perform_delete'),
- onManager: this.onManager,
- name: i18n.t('compute.disk_backup'),
- content: () => {
- const change = (bool) => {
- this.deleteResProps.force = bool
- }
- return <a-checkbox onInput={ change }>{ this.$t('compute.text_655') }</a-checkbox>
- },
- requestParams: this.deleteResProps,
- })
- },
- meta: obj => {
- return this.$getDeleteResult(obj)
- },
- },
- ]
- },
- }
|