pve-manager/www/manager6/window/BackupConfig.js
Stefan Sterz 056e5aad9b subscription/summary/backup: stop setting the background color
setting the background color in js code adds that property as a style
attribute to the element. that makes it hard to alter later via css
and makes it hard to dynamically change the color e.g. if we want to
add different themes. the background color for these elements are
white already anyway, so just remove them here.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:55:41 +01:00

50 lines
996 B
JavaScript

Ext.define('PVE.window.BackupConfig', {
extend: 'Ext.window.Window',
title: gettext('Configuration'),
width: 600,
height: 400,
layout: 'fit',
modal: true,
items: {
xtype: 'component',
itemId: 'configtext',
autoScroll: true,
style: {
'white-space': 'pre',
'font-family': 'monospace',
padding: '5px',
},
},
initComponent: function() {
var me = this;
if (!me.volume) {
throw "no volume specified";
}
var nodename = me.pveSelNode.data.node;
if (!nodename) {
throw "no node name specified";
}
me.callParent();
Proxmox.Utils.API2Request({
url: "/nodes/" + nodename + "/vzdump/extractconfig",
method: 'GET',
params: {
volume: me.volume,
},
failure: function(response, opts) {
me.close();
Ext.Msg.alert('Error', response.htmlStatus);
},
success: function(response, options) {
me.show();
me.down('#configtext').update(Ext.htmlEncode(response.result.data));
},
});
},
});