]> git.proxmox.com Git - pve-manager.git/blob - www/manager6/window/BackupConfig.js
ui: guest import: rework to tab panels
[pve-manager.git] / www / manager6 / window / BackupConfig.js
1 Ext.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 'white-space': 'pre',
14 'font-family': 'monospace',
15 padding: '5px',
16 },
17 },
18
19 initComponent: function() {
20 var me = this;
21
22 if (!me.volume) {
23 throw "no volume specified";
24 }
25
26 var nodename = me.pveSelNode.data.node;
27 if (!nodename) {
28 throw "no node name specified";
29 }
30
31 me.callParent();
32
33 Proxmox.Utils.API2Request({
34 url: "/nodes/" + nodename + "/vzdump/extractconfig",
35 method: 'GET',
36 params: {
37 volume: me.volume,
38 },
39 failure: function(response, opts) {
40 me.close();
41 Ext.Msg.alert('Error', response.htmlStatus);
42 },
43 success: function(response, options) {
44 me.show();
45 me.down('#configtext').update(Ext.htmlEncode(response.result.data));
46 },
47 });
48 },
49 });