"func-names": "off",
// "func-style": ["error", "declaration"],
"id-length": ["error", { "min": 1 }],
+ "indent": ["error", 4, { "SwitchCase": 1 }],
// "max-len": ["error", { "code": 120 }],
"max-params": ["warn", 6],
"max-statements": ["warn", 28],
"callback-return": "off",
"consistent-return": "off",
"consistent-this": "off",
- "default-case": "off",
"func-style": "off",
"function-paren-newline": "off",
- "global-require": "off",
"guard-for-in": "off",
"key-spacing": "off",
"line-comment-position": "off",
function preprocess_item(item) {
for (var prop in item) {
switch (prop) {
- case "rcpt_mime":
- case "rcpt_smtp":
- escape_HTML_array(item[prop]);
- break;
- case "symbols":
- Object.keys(item.symbols).map(function (key) {
- var sym = item.symbols[key];
- if (!sym.name) {
- sym.name = key;
- }
- sym.name = escapeHTML(sym.name);
- if (sym.description) {
- sym.description = escapeHTML(sym.description);
- }
+ case "rcpt_mime":
+ case "rcpt_smtp":
+ escape_HTML_array(item[prop]);
+ break;
+ case "symbols":
+ Object.keys(item.symbols).map(function (key) {
+ var sym = item.symbols[key];
+ if (!sym.name) {
+ sym.name = key;
+ }
+ sym.name = escapeHTML(sym.name);
+ if (sym.description) {
+ sym.description = escapeHTML(sym.description);
+ }
- if (sym.options) {
- escape_HTML_array(sym.options);
+ if (sym.options) {
+ escape_HTML_array(sym.options);
+ }
+ });
+ break;
+ default:
+ if (typeof (item[prop]) === "string") {
+ item[prop] = escapeHTML(item[prop]);
}
- });
- break;
- default:
- if (typeof (item[prop]) === "string") {
- item[prop] = escapeHTML(item[prop]);
- }
}
}
}
switch (tab_id) {
- case "#status_nav":
- tab_stat.statWidgets(ui, graphs, checked_server);
- timer_id.status = Visibility.every(10000, function () {
+ case "#status_nav":
tab_stat.statWidgets(ui, graphs, checked_server);
- });
- break;
- case "#throughput_nav":
- tab_graph.draw(ui, graphs, tables, neighbours, checked_server, selData);
-
- var autoRefresh = {
- hourly: 60000,
- daily: 300000
- };
- timer_id.throughput = Visibility.every(autoRefresh[selData] || 3600000, function () {
+ timer_id.status = Visibility.every(10000, function () {
+ tab_stat.statWidgets(ui, graphs, checked_server);
+ });
+ break;
+ case "#throughput_nav":
tab_graph.draw(ui, graphs, tables, neighbours, checked_server, selData);
- });
- break;
- case "#configuration_nav":
- tab_config.getActions(ui, checked_server);
- tab_config.getMaps(ui, checked_server);
- break;
- case "#symbols_nav":
- tab_symbols.getSymbols(ui, tables, checked_server);
- break;
- case "#history_nav":
- tab_history.getHistory(ui, tables);
- tab_history.getErrors(ui, tables);
- break;
- case "#disconnect":
- disconnect();
- break;
+
+ var autoRefresh = {
+ hourly: 60000,
+ daily: 300000
+ };
+ timer_id.throughput = Visibility.every(autoRefresh[selData] || 3600000, function () {
+ tab_graph.draw(ui, graphs, tables, neighbours, checked_server, selData);
+ });
+ break;
+ case "#configuration_nav":
+ tab_config.getActions(ui, checked_server);
+ tab_config.getMaps(ui, checked_server);
+ break;
+ case "#symbols_nav":
+ tab_symbols.getSymbols(ui, tables, checked_server);
+ break;
+ case "#history_nav":
+ tab_history.getHistory(ui, tables);
+ tab_history.getErrors(ui, tables);
+ break;
+ case "#disconnect":
+ disconnect();
+ break;
+ default:
}
setTimeout(function () {