]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/window/BackupConfig.js
ui: backup restore: add hint to window title on overwrite restore
[pve-manager.git] / www / manager6 / window / BackupConfig.js
CommitLineData
6da4aea8
DC
1Ext.define('PVE.window.BackupConfig', {
2 extend: 'Ext.window.Window',
3 title: gettext('Configuration'),
4 width: 600,
5 height: 400,
6 layout: 'fit',
7 modal: true,
8 items: {
9 xtype: 'component',
10 itemId: 'configtext',
11 autoScroll: true,
12 style: {
13 'background-color': 'white',
14 'white-space': 'pre',
15 'font-family': 'monospace',
f6710aac
TL
16 padding: '5px',
17 },
6da4aea8
DC
18 },
19
20 initComponent: function() {
21 var me = this;
22
23 if (!me.volume) {
24 throw "no volume specified";
25 }
26
27 var nodename = me.pveSelNode.data.node;
28 if (!nodename) {
29 throw "no node name specified";
30 }
31
32 me.callParent();
33
e7ade592 34 Proxmox.Utils.API2Request({
6da4aea8
DC
35 url: "/nodes/" + nodename + "/vzdump/extractconfig",
36 method: 'GET',
37 params: {
f6710aac 38 volume: me.volume,
6da4aea8
DC
39 },
40 failure: function(response, opts) {
41 me.close();
42 Ext.Msg.alert('Error', response.htmlStatus);
43 },
f6710aac 44 success: function(response, options) {
6da4aea8
DC
45 me.show();
46 me.down('#configtext').update(Ext.htmlEncode(response.result.data));
f6710aac 47 },
6da4aea8 48 });
f6710aac 49 },
6da4aea8 50});