]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/window/BackupConfig.js
ui: guest import: allow setting mac addresses to unique
[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: {
6da4aea8
DC
13 'white-space': 'pre',
14 'font-family': 'monospace',
f6710aac
TL
15 padding: '5px',
16 },
6da4aea8
DC
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
e7ade592 33 Proxmox.Utils.API2Request({
6da4aea8
DC
34 url: "/nodes/" + nodename + "/vzdump/extractconfig",
35 method: 'GET',
36 params: {
f6710aac 37 volume: me.volume,
6da4aea8
DC
38 },
39 failure: function(response, opts) {
40 me.close();
41 Ext.Msg.alert('Error', response.htmlStatus);
42 },
f6710aac 43 success: function(response, options) {
6da4aea8
DC
44 me.show();
45 me.down('#configtext').update(Ext.htmlEncode(response.result.data));
f6710aac 46 },
6da4aea8 47 });
f6710aac 48 },
6da4aea8 49});