me.add_text_row('dbmirror', gettext('Database Mirror'),
{ deleteEmpty: true, defaultValue: 'database.clamav.net' });
+ /*jslint confusion: true*/
+ /*defaultValue is a string above*/
me.add_boolean_row('safebrowsing', gettext('Google Safe Browsing'),
{ defaultValue: 1 });
+ /*jslint confusion: false*/
var baseurl = '/config/clamav';
me.callParent();
+ /*jslint confusion: true*/
+ /*monStoreErrors is a bool above*/
Proxmox.Utils.monStoreErrors(me.getView(), me.store, true);
+ /*jslint confusion: false*/
}
});
{
xtype: 'component',
border: false,
- padding: 10,
+ padding: '10 10 10 10',
html: gettext("Please use the 'Join' button on the node you want to add, using the following IP address and fingerprint.")
},
{
]
});
+/*jslint confusion: true*/
+/* bind is a function and object */
Ext.define('PMG.ClusterAdministration', {
extend: 'Ext.tab.Panel',
xtype: 'pmgClusterAdministration',
if (Ext.isArray(value)) {
return value[0];
}
- return value;
+ return value.toString();
},
dataIndex: 'loadavg'
},
/*global Proxmox*/
+/*jslint confusion: true*/
+/* filter is a function and object */
Ext.define('PMG.ContactDetails', {
extend: 'Ext.grid.GridPanel',
xtype: 'pmgContactDetails',
/*global Proxmox*/
+/*jslint confusion: true*/
+/* load is a function and string
+ * hours is a number and string
+ * timespan is a number and string
+ * bind is a function and object
+ * handler is a function and string
+ */
Ext.define('PMG.Dashboard', {
extend: 'Ext.panel.Panel',
xtype: 'pmgDashboard',
},
items: [{
xtype: 'form',
- bodyPadding: 10,
+ bodyPadding: '10 10 10 10',
defaultButton: 'savebutton',
items: [{
xtype: 'proxmoxintegerfield',
var bytes_in = 0;
var bytes_out = 0;
var ptime = 0;
- var avg_ptime = 0;
+ var avg_ptime;
records.forEach(function(item) {
bytes_in += item.data.bytes_in;
Ext.String.format(gettext('{0} hours'), '{hours}') + ')'
},
- layout: 'column',
+ layout: {
+ type: 'column'
+ },
border: false,
bodyPadding: '20 0 0 20',
iconCls: 'fa fa-list',
title: gettext('Top Receivers'),
- bodyPadding: 20,
+ bodyPadding: '20 20 20 20',
layout: {
type: 'vbox',
pack: 'center',
return v === '' ? '--- EMPTY ADDRESS ---' : Ext.htmlEncode(v);
};
- me.items = {
+ me.items = [{
xtype: 'tabpanel',
border: false,
items: [
]
}
]
- };
+ }];
me.callParent();
+/*jslint confusion: true*/
+/*value is string and number*/
Ext.define('PMG.FetchmailEdit', {
extend: 'Proxmox.window.Edit',
xtype: 'pmgFetchmailEdit',
renderer: function(tooltip, record, item) {
var start = record.get('index');
var end = start+1;
- tooltip.setHtml('Time: ' + start + ' - ' + end + '<br>' +
+ tooltip.setHtml('Time: ' + start.toString() +
+ ' - ' + end.toString() + '<br>' +
'Count: ' + record.get(item.field));
}
}
/*global Proxmox*/
+/*jslint confusion: true*/
+/*create is function and bool,
+ * reload is function and string,
+ * height is number and string,
+ * hidden is bool and string,
+ * bind is function and object,
+ * callback is function and string
+ */
Ext.define('pmg-ldap-config', {
extend: 'Ext.data.Model',
fields: [ 'profile', 'server1', 'server2', 'comment',
}
},
- layout: {
- type: 'border',
- },
+ layout: 'border',
items: [
{
store: {
model: 'pmg-ldap-config',
- sorters: {
+ sorters: [{
property: 'profile',
order: 'DESC'
- }
+ }]
},
tbar: [
return Proxmox.Utils.yesText + ' (' + value + ')';
};
+ /*jslint confusion: true*/
+ /*defaultValue is string and number*/
me.add_combobox_row('verifyreceivers', gettext('Verify Receivers'), {
renderer: render_verifyreceivers,
defaultValue: '__default__',
['450', render_verifyreceivers('450') ],
['550', render_verifyreceivers('550') ]]
});
+ /*jslint confusion: false*/
me.add_boolean_row('greylist', gettext('Use Greylisting'),
{ defaultValue: 1 });
me.add_integer_row('message_rate_limit', gettext('Client Message Rate Limit'),
{ defaultValue: 0, minValue: 0 });
+ /*jslint confusion: true*/
+ /*defaultValue is string and number*/
me.add_text_row('banner', gettext('SMTPD Banner'),
{ deleteEmpty: true, defaultValue: 'ESMTP Proxmox' });
+ /*jslint confusion: false*/
var baseurl = '/config/mail';
xtype: 'promxoxDateTimeField'
},
{
- layout: 'hbox',
+ layout: {
+ type: 'hbox'
+ },
border: false,
items: [
{
height: 400,
scrollable: true,
- layout: 'auto',
+ layout: {
+ type: 'auto'
+ },
modal: true,
bodyPadding: 5,
{
text: gettext('Create'),
handler: function() {
+ /*jslint confusion: true*/
+ /* create is function and bool */
var config = {
method: 'POST',
url: "/api2/extjs/config/mynetworks",
}
]
};
+ /*jslint confusion: false*/
var win = Ext.createWidget('proxmoxWindowEdit', config);
plugins: 'viewport',
- layout: 'border',
+ layout: {
+ type: 'border'
+ },
items: [
{
},
{
xtype: 'panel',
- layout: 'card',
+ layout: {
+ type: 'card'
+ },
region: 'center',
border: false,
reference: 'contentpanel'
/*global Proxmox*/
+/*jslint confusion: true*/
+/* filter is a function and object */
Ext.define('PMG.ReceiverDetails', {
extend: 'Ext.grid.GridPanel',
xtype: 'pmgReceiverDetails',
{
text: gettext('Create'),
handler: function() {
+ /*jslint confusion: true*/
+ /* create is a function and boolean */
var config = {
method: 'POST',
url: "/api2/extjs/config/domains",
}
]
};
+ /*jslint confusion: false*/
var win = Ext.createWidget('proxmoxWindowEdit', config);
/*global Proxmox*/
+/*jslint confusion: true*/
+/* create is a function and boolean,
+ * bind is a function and object,
+ * callback is a function and string
+ */
Ext.define('pmg-rule-list', {
extend: 'Ext.data.Model',
fields: [
selectedRuleChange: function(grid, selected, eOpts) {
var me = this;
var infoPanel = me.lookupReference('infopanel');
- var baseurl = undefined;
+ var baseurl;
if (selected.length > 0) {
baseurl = '/config/ruledb/rules/' + selected[0].data.id;
/*global Proxmox*/
+/*jslint confusion: true*/
+/* filter is a function and object */
Ext.define('PMG.SenderDetails', {
extend: 'Ext.grid.GridPanel',
xtype: 'pmgSenderDetails',
if (!values.languages) {
values['delete'] = 'languages';
} else if (Ext.isArray(values.languages)) {
- values.languages = values.languages.join(' ')
+ /*jslint confusion: true*/
+ /*languages is an array and string here*/
+ values.languages = values.languages.join(' ');
+ /*jslint confusion: false*/
}
return values;
return me.authmodeTextHash[value] || value;
};
+ /*jslint confusion: true*/
+ /* defaultValue is a string and a number*/
me.add_combobox_row('authmode', gettext('Authentication mode'), {
defaultValue: 'ticket',
renderer: render_authmode,
['outlook', render_reportstyle('outlook') ],
['custom', render_reportstyle('custom') ]]
});
+ /*jslint confusion: false*/
me.add_text_row('hostname', gettext('Quarantine Host'),
{ deleteEmpty: true, defaultValue: Proxmox.Utils.noneText });
if (rec.data.level >= 10) {
return PMG.Utils.scoreText + ' >= 10';
} else {
- return PMG.Utils.scoreText + ' ' + rec.data.level;
+ return PMG.Utils.scoreText + ' ' + rec.data.level.toString();
}
}
}
win.show();
};
+ /*jslint confusion: true*/
+ /*create is a function and boolean */
var tbar = [
{
xtype: 'proxmoxButton',
},
remove_btn
];
+ /*jslint confusion: false*/
Proxmox.Utils.monStoreErrors(me, store, true);
});
});
+ /*jslint confusion: true*/
+ /* create is an function */
var config = {
method: 'POST',
url: url,
isAdd: true,
items: items
};
+ /*jslint confusion: false*/
if (me.listname === 'blacklist') {
config.subject = gettext("Blacklist");
/*global Proxmox*/
+/*jslint confusion: true*/
+/* submitvalue is string and bool */
Ext.define('PMG.UserEdit', {
extend: 'Proxmox.window.Edit',
alias: 'widget.pmgUserEdit',
/*global Proxmox*/
+/*jslint confusion: true*/
+/*renderer is string and function*/
Ext.define('pmg-users', {
extend: 'Ext.data.Model',
fields: [
var from = Ext.htmlEncode(rec.data.from);
var sender = Ext.htmlEncode(rec.data.sender);
if (sender) {
+ /*jslint confusion: true*/
+ /*format is a string above*/
from = Ext.String.format(gettext("{0} on behalf of {1}"),
sender, from);
+ /*jslint confusion: false*/
}
return '<small>' + from + '</small><br>' + subject;
},