From d94bbf132eb7a3f0240da83892ac288680b6fb20 Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Sat, 3 Sep 2016 06:13:48 +0300 Subject: [PATCH] added icons to shorten menu descriptions (especially container related); forced max name length on submenus to 30 --- web/index.html | 74 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 25 deletions(-) diff --git a/web/index.html b/web/index.html index 40c16725..1dd90fea 100644 --- a/web/index.html +++ b/web/index.html @@ -1445,27 +1445,27 @@ var menuData = { }, 'ap': { - title: 'Access Points', + title: ' Access Points', info: undefined }, 'tc': { - title: 'Quality of Service', + title: ' Quality of Service', info: 'Netdata collects and visualizes tc class utilization using its tc-helper plugin. If you also use FireQOS for setting up QoS, netdata automatically collects interface and class names. If your QoS configuration includes overheads calculation, the values shown here will include these overheads (the total bandwidth for the same interface as reported in the Network Interfaces section, will be lower than the total bandwidth reported here). Also, data collection may have a slight time difference compared to the interface (QoS data collection is implemented with a BASH script, so a shift in data collection of a few milliseconds should be justified).' }, 'net': { - title: 'Network Interfaces', + title: ' Network Interfaces', info: 'Per network interface statistics collected from /proc/net/dev.' }, 'ipv4': { - title: 'IPv4 Networking', + title: ' IPv4 Networking', info: undefined }, 'ipv6': { - title: 'IPv6 Networking', + title: ' IPv6 Networking', info: undefined }, @@ -1475,7 +1475,7 @@ var menuData = { }, 'netfilter': { - title: 'Firewall (netfilter)', + title: ' Firewall (netfilter)', info: undefined }, @@ -1490,7 +1490,7 @@ var menuData = { }, 'disk': { - title: 'Disks', + title: ' Disks', info: 'Charts with performance information for all the system disks. Special care has been given to present disk performance metrics in a way compatible with iostat -x. netdata by default prevents rendering performance charts for individual partitions and unmounted virtual disks. Disabled charts can still be enabled by altering the relative settings in the netdata configuration file.' }, @@ -1500,30 +1500,30 @@ var menuData = { }, 'nfsd': { - title: 'File Server (nfsd)', + title: ' File Server (nfsd)', info: undefined }, 'apps': { - title: 'Applications', + title: ' Applications', info: 'Per application statistics are collected using netdata\'s apps.plugin. This plugin walks through the entire /proc filesystem and aggregates statistics for applications of interest, defined in /etc/netdata/apps_groups.conf (the default is here). The plugin internally builds a process tree (much like ps fax does), and groups processes together (evaluating both child and parent processes) so that the result is always a chart with a predefined set of dimensions (of course, only application groups found running are reported). The reported values are compatible with top, although the netdata plugin counts also the resources of exited children (unlike top which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.', height: 1.5 }, 'users': { - title: 'Users', + title: ' Users', info: 'Per user statistics are collected using netdata\'s apps.plugin. This plugin walks through the entire /proc filesystem and aggregates statistics per user. The reported values are compatible with top, although the netdata plugin counts also the resources of exited children (unlike top which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.', height: 1.5 }, 'groups': { - title: 'User Groups', + title: ' User Groups', info: 'Per user group statistics are collected using netdata\'s apps.plugin. This plugin walks through the entire /proc filesystem and aggregates statistics per user group. The reported values are compatible with top, although the netdata plugin counts also the resources of exited children (unlike top which shows only the resources of the currently running processes). So for processes like shell scripts, the reported values include the resources used by the commands these scripts run within each timeframe.', height: 1.5 }, 'netdata': { - title: 'Netdata Monitoring', + title: ' Netdata Monitoring', info: undefined }, @@ -1533,32 +1533,32 @@ var menuData = { }, 'cgroup': { - title: 'Container', + title: '', info: undefined }, 'cgqemu': { - title: 'VM', + title: '', info: undefined }, 'memcached': { - title: 'memcached', + title: ' memcached', info: undefined }, 'mysql': { - title: 'MySQL', + title: ' MySQL', info: undefined }, 'redis': { - title: 'Redis', + title: ' Redis', info: undefined }, 'ipfs': { - title: 'IPFS', + title: ' IPFS', info: undefined }, @@ -1567,18 +1567,33 @@ var menuData = { info: undefined, }, + 'postfix': { + title: ' postfix', + info: undefined, + }, + 'nginx': { - title: 'nginx', + title: ' nginx', info: undefined, }, 'apache': { - title: 'Apache', + title: ' Apache', info: undefined, }, 'named': { - title: 'named', + title: ' named', + info: undefined + }, + + 'squid': { + title: ' squid', + info: undefined + }, + + 'nut': { + title: ' UPS', info: undefined } }; @@ -2008,7 +2023,7 @@ function anyAttribute(obj, attr, key, def) { function menuTitle(chart) { if(typeof chart.menu_pattern !== 'undefined') { return anyAttribute(menuData, 'title', chart.menu_pattern, chart.menu_pattern).toString() - + ': ' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString(); + + ' ' + chart.type.slice(-(chart.type.length - chart.menu_pattern.length - 1)).toString(); } return anyAttribute(menuData, 'title', chart.menu, chart.menu); @@ -2024,7 +2039,13 @@ function menuHeight(menu, relative) { function submenuTitle(menu, submenu) { var key = menu + '.' + submenu; - return anyAttribute(submenuData, 'title', key, submenu); + var title = anyAttribute(submenuData, 'title', key, submenu); + if(title.length > 30) { + var a = title.substring(0, 13); + var b = title.substring(title.length - 13, title.length); + return a + '...' + b; + } + return title; } function submenuInfo(menu, submenu) { @@ -2081,6 +2102,7 @@ function enrichChartData(chart) { case 'mysql': case 'named': case 'nginx': + case 'nut': case 'phpfpm': case 'postfix': case 'redis': @@ -2409,6 +2431,8 @@ function renderChartsAndMenu(data) { renderPage(menus, data); } +// ---------------------------------------------------------------------------- + function alarmsUpdateModal() { var active = '

Raised Alarms

'; var all = '

All Running Alarms

'; @@ -2491,7 +2515,7 @@ function alarmsUpdateModal() { function alarm_to_html(alarm, full) { var chart = options.data.charts[alarm.chart]; - var html = '
' + var html = '' + '
' + alarm.chart + '
 

 
' + alarm.info + '
' + alarm.chart + '
 

 
' + alarm.info + '
 
role: ' + alarm.recipient + '
' + ((typeof alarm.warn !== 'undefined')?(''):'') + ((typeof alarm.crit !== 'undefined')?(''):''); @@ -2603,7 +2627,7 @@ function alarmsUpdateModal() { if(alarm.status === 'WARNING' || alarm.status === 'CRITICAL') { if(!active_family_added) { active_family_added = true; - active += ''; + active += ''; } count_active++; active += alarm_to_html(alarm, false); -- 2.39.2
warning when' + alarm.warn + '
critical when' + alarm.crit + '

' + family + '

' + family + '