[pve-devel] [PATCH widget-toolkit 02/11] Toolkit: set download url for draw containers to '-'

Dominik Csapak d.csapak at proxmox.com
Wed May 26 10:58:30 CEST 2021


so that there can be no privacy leak, since the default points
to senchas server

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/Toolkit.js           | 3 +++
 src/panel/GaugeWidget.js | 2 ++
 src/panel/RRDChart.js    | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index ffbd47a..6787173 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -659,6 +659,9 @@ Ext.define('Proxmox.selection.CheckboxModel', {
     },
 });
 
+// override the download server url globally, for privacy reasons
+Ext.draw.Container.prototype.defaultDownloadServerUrl = "-";
+
 // force alert boxes to be rendered with an Error Icon
 // since Ext.Msg is an object and not a prototype, we need to override it
 // after the framework has been initiated
diff --git a/src/panel/GaugeWidget.js b/src/panel/GaugeWidget.js
index 6cd6b60..0cc2079 100644
--- a/src/panel/GaugeWidget.js
+++ b/src/panel/GaugeWidget.js
@@ -20,6 +20,8 @@ Ext.define('Proxmox.panel.GaugeWidget', {
 	    xtype: 'polar',
 	    height: 120,
 	    border: false,
+	    // set to '-' to suppress warning in debug mode
+	    downloadServerUrl: '-',
 	    itemId: 'chart',
 	    series: [{
 		type: 'gauge',
diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js
index 41c839e..49b3ad2 100644
--- a/src/panel/RRDChart.js
+++ b/src/panel/RRDChart.js
@@ -61,6 +61,9 @@ Ext.define('Proxmox.widget.RRDChart', {
 
     powerOfTwo: false,
 
+    // set to empty string to suppress warning in debug mode
+    downloadServerUrl: '-',
+
     controller: {
 	xclass: 'Ext.app.ViewController',
 
-- 
2.20.1






More information about the pve-devel mailing list