| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import i18n from '@/locales'
- export default {
- created () {
- this.singleActions = [
- {
- label: i18n.t('compute.perform_sync_status'),
- permission: 'instancebackups_perform_syncstatus',
- action: obj => {
- this.onManager('performAction', {
- steadyStatus: ['ready'],
- id: obj.id,
- managerArgs: {
- action: 'syncstatus',
- },
- })
- },
- meta: () => ({
- validate: true,
- }),
- },
- {
- label: i18n.t('compute.text_352'),
- actions: obj => {
- return [
- {
- label: i18n.t('compute.text_478'),
- permission: 'instancebackups_perform_recovery',
- action: obj => {
- this.createDialog('InstanceBackupRollbackDialog', {
- 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: this.$t('compute.unpack'),
- action: obj => {
- this.createDialog('UnpackDialog', {
- 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: 'instancebackups_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.instance_backup'),
- alert: i18n.t('compute.instance_backup_delete_alert'),
- 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)
- },
- },
- ]
- },
- },
- ]
- },
- }
|