<div dir="ltr">Forgot to add that the only problem with this addition is that when the value of max_workers is configured, you cannot return to the default anymore (schema check only allows integers).<div><br></div><div>So when you don't have max_workers in datacenter.cfg the default is to use the number of CPUs as max_workers.</div><div>If max_workers is set in datacenter.cfg (value 1-64) you cannot 'clear' the value and use the default again, i'm not really sure how to achieve that.</div><div><br></div><div>Caspar</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">Met vriendelijke groet,<br><br>Caspar Smit<br>Systemengineer<br>SuperNAS<br>Dorsvlegelstraat 13<br>1445 PA Purmerend<br><br>t: (+31) 299 410 414<br>e: <a href="mailto:casparsmit@supernas.eu" target="_blank">casparsmit@supernas.eu</a><br>w: <a href="http://www.supernas.eu" target="_blank">www.supernas.eu</a><br></div></div></div>
<br><div class="gmail_quote">2016-03-17 16:44 GMT+01:00 Caspar Smit <span dir="ltr"><<a href="mailto:casparsmit@supernas.eu" target="_blank">casparsmit@supernas.eu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Caspar Smit <<a href="mailto:casparsmit@supernas.eu">casparsmit@supernas.eu</a>><br>
---<br>
www/manager/dc/OptionView.js | 38 ++++++++++++++++++++++++++++++++++++++<br>
1 file changed, 38 insertions(+)<br>
<br>
diff --git a/www/manager/dc/OptionView.js b/www/manager/dc/OptionView.js<br>
index 1a94be7..d09434a 100644<br>
--- a/www/manager/dc/OptionView.js<br>
+++ b/www/manager/dc/OptionView.js<br>
@@ -99,6 +99,33 @@ Ext.define('PVE.dc.EmailFromEdit', {<br>
}<br>
});<br>
<br>
+Ext.define('PVE.dc.MaxWorkersEdit', {<br>
+ extend: 'PVE.window.Edit',<br>
+<br>
+ initComponent : function() {<br>
+ var me = this;<br>
+<br>
+ Ext.applyIf(me, {<br>
+ subject: gettext('Maximum Workers'),<br>
+ items: {<br>
+ xtype: 'numberfield',<br>
+ name: 'max_workers',<br>
+ minValue: 1,<br>
+ maxValue: 64,<br>
+ step: 1,<br>
+ fieldLabel: gettext('Max Workers'),<br>
+ allowBlank: true,<br>
+ emptyText: gettext('Number of CPUs'),<br>
+ value: ''<br>
+ }<br>
+ });<br>
+<br>
+ me.callParent();<br>
+<br>
+ me.load();<br>
+ }<br>
+});<br>
+<br>
Ext.define('PVE.dc.OptionView', {<br>
extend: 'PVE.grid.ObjectGrid',<br>
alias: ['widget.pveDcOptionView'],<br>
@@ -147,6 +174,17 @@ Ext.define('PVE.dc.OptionView', {<br>
}<br>
return value;<br>
}<br>
+ },<br>
+ max_workers: {<br>
+ header: gettext('Maximum Workers'),<br>
+ editor: 'PVE.dc.MaxWorkersEdit',<br>
+ required: true,<br>
+ renderer: function(value) {<br>
+ if (!value) {<br>
+ return PVE.Utils.defaultText + ' (Number of CPUs)';<br>
+ }<br>
+ return value;<br>
+ }<br>
}<br>
};<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.1.4<br>
<br>
</font></span></blockquote></div><br></div>