]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/window/Snapshot.js
ui: backup: add 'notification-mode' param for one-shot backup jobs.
[pve-manager.git] / www / manager6 / window / Snapshot.js
index 88f7248e43a313175bb4ec3690937271d19d32c4..426be7cc8efafaf6504a9fd82a369c188843f623 100644 (file)
@@ -24,7 +24,7 @@ Ext.define('PVE.window.Snapshot', {
        return values;
     },
 
-    initComponent : function() {
+    initComponent: function() {
        var me = this;
        var vm = me.getViewModel();
 
@@ -53,28 +53,18 @@ Ext.define('PVE.window.Snapshot', {
                    let res = response.result.data;
                    let enabled = PVE.Parser.parsePropertyString(res.agent, 'enabled');
                    vm.set('guestAgentEnabled', !!PVE.Parser.parseBoolean(enabled.enabled));
-               }
+               },
            });
        }
 
        me.items = [
-           {
-               xtype: 'displayfield',
-               userCls: 'pmx-hint',
-               name: 'fswarning',
-               hidden: true,
-               value: gettext('It is recommended to either include the RAM or enable the QEMU Guest Agent when taking a snapshot of a running VM. Otherwise the file system might be in an inconsistent state when the snapshot is taken.'),
-               bind: {
-                   hidden: '{!shouldWarnAboutFS}',
-               },
-           },
            {
                xtype: me.isCreate ? 'textfield' : 'displayfield',
                name: 'snapname',
                value: me.snapname,
                fieldLabel: gettext('Name'),
                vtype: 'ConfigId',
-               allowBlank: false
+               allowBlank: false,
            },
            {
                xtype: 'displayfield',
@@ -82,7 +72,7 @@ Ext.define('PVE.window.Snapshot', {
                disabled: me.isCreate,
                name: 'snaptime',
                renderer: PVE.Utils.render_timestamp_human_readable,
-               fieldLabel: gettext('Timestamp')
+               fieldLabel: gettext('Timestamp'),
            },
            {
                xtype: 'proxmoxcheckbox',
@@ -93,14 +83,24 @@ Ext.define('PVE.window.Snapshot', {
                uncheckedValue: 0,
                defaultValue: 0,
                checked: 1,
-               fieldLabel: gettext('Include RAM')
+               fieldLabel: gettext('Include RAM'),
            },
            {
                xtype: 'textareafield',
                grow: true,
                editable: !me.viewonly,
                name: 'description',
-               fieldLabel: gettext('Description')
+               fieldLabel: gettext('Description'),
+           },
+           {
+               xtype: 'displayfield',
+               userCls: 'pmx-hint',
+               name: 'fswarning',
+               hidden: true,
+               value: gettext('It is recommended to either include the RAM or use the QEMU Guest Agent when taking a snapshot of a running VM to avoid inconsistencies.'),
+               bind: {
+                   hidden: '{!shouldWarnAboutFS}',
+               },
            },
            {
                title: gettext('Settings'),
@@ -113,10 +113,10 @@ Ext.define('PVE.window.Snapshot', {
                    model: 'KeyValue',
                    sorters: [
                        {
-                           property : 'key',
-                           direction: 'ASC'
-                       }
-                   ]
+                           property: 'key',
+                           direction: 'ASC',
+                       },
+                   ],
                },
                columns: [
                    {
@@ -128,9 +128,9 @@ Ext.define('PVE.window.Snapshot', {
                        header: gettext('Value'),
                        flex: 1,
                        dataIndex: 'value',
-                   }
-               ]
-           }
+                   },
+               ],
+           },
        ];
 
        me.url = `/nodes/${me.nodename}/${me.type}/${me.vmid}/snapshot`;
@@ -139,7 +139,7 @@ Ext.define('PVE.window.Snapshot', {
        if (me.isCreate) {
            subject = (me.type === 'qemu' ? 'VM' : 'CT') + me.vmid + ' ' + gettext('Snapshot');
            me.method = 'POST';
-           me.showProgress = true;
+           me.showTaskViewer = true;
        } else {
            subject = `${gettext('Snapshot')} ${me.snapname}`;
            me.url += `/${me.snapname}/config`;
@@ -175,7 +175,7 @@ Ext.define('PVE.window.Snapshot', {
                summarystore.fireEvent('refresh', summarystore);
 
                me.setValues(response.result.data);
-           }
+           },
        });
-    }
+    },
 });