summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorJacek Kolasa <jacek.kolasa@gmail.com>2019-09-12 15:35:44 +0200
committerGitHub <noreply@github.com>2019-09-12 15:35:44 +0200
commit788fbb219a3a9bbfe4e2d89a5b503d8360f5ce3d (patch)
treeb716e660a80fdb34b3ac1a84c3cf9994c02adb5d /web
parent4c9d6a37138d95495e2dba20eed1931556d4252d (diff)
sidebar-info update - DB engine (#6744)
* remove "Netdata is using # MB of memory on HOSTNAME for # hour, # minutes, and # seconds of real-time history." * Added "memory_mode" key to the get "charts" API call * don't show db engine tip when user has it already installed * add back hostname information * add oxford comma (only for db-engine users) * update main.js hash * <b> --> <strong> (but only in sidebar info, main.js)
Diffstat (limited to 'web')
-rw-r--r--web/api/formatters/charts2json.c2
-rw-r--r--web/gui/index.html2
-rw-r--r--web/gui/main.js27
3 files changed, 19 insertions, 12 deletions
diff --git a/web/api/formatters/charts2json.c b/web/api/formatters/charts2json.c
index e4e2f4dfa4..db3ef37eaf 100644
--- a/web/api/formatters/charts2json.c
+++ b/web/api/formatters/charts2json.c
@@ -54,6 +54,7 @@ void charts2json(RRDHOST *host, BUFFER *wb) {
",\n\t\"timezone\": \"%s\""
",\n\t\"update_every\": %d"
",\n\t\"history\": %ld"
+ ",\n\t\"memory_mode\": \"%s\""
",\n\t\"custom_info\": \"%s\""
",\n\t\"charts\": {"
, host->hostname
@@ -63,6 +64,7 @@ void charts2json(RRDHOST *host, BUFFER *wb) {
, host->timezone
, host->rrd_update_every
, host->rrd_history_entries
+ , rrd_memory_mode_name(host->rrd_memory_mode)
, custom_dashboard_info_js_filename
);
diff --git a/web/gui/index.html b/web/gui/index.html
index 13478487f1..41017936cb 100644
--- a/web/gui/index.html
+++ b/web/gui/index.html
@@ -33,7 +33,7 @@
<meta name="twitter:description" content="Unparalleled insights, in real-time, of everything happening on your Linux systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms." />
<meta name="twitter:image" content="https://cloud.githubusercontent.com/assets/2662304/14092712/93b039ea-f551-11e5-822c-beadbf2b2a2e.gif" />
- <script src="main.js?v20190902-0"></script>
+ <script src="main.js?v20190905-0"></script>
</head>
<body data-spy="scroll" data-target="#sidebar" data-offset="100">
diff --git a/web/gui/main.js b/web/gui/main.js
index 6aebb8ed36..71af6b59d3 100644
--- a/web/gui/main.js
+++ b/web/gui/main.js
@@ -1786,21 +1786,26 @@ function renderPage(menus, data) {
html += mhead + shtml + '</div></div><hr role="separator"/>';
}
+ const isMemoryModeDbEngine = data.memory_mode === "dbengine";
+
sidebar += '<li class="" style="padding-top:15px;"><a href="https://github.com/netdata/netdata/blob/master/docs/Add-more-charts-to-netdata.md#add-more-charts-to-netdata" target="_blank"><i class="fas fa-plus"></i> add more charts</a></li>';
sidebar += '<li class=""><a href="https://github.com/netdata/netdata/tree/master/health#Health-monitoring" target="_blank"><i class="fas fa-plus"></i> add more alarms</a></li>';
sidebar += '<li class="" style="margin:20px;color:#666;"><small>Every ' +
((data.update_every === 1) ? 'second' : data.update_every.toString() + ' seconds') + ', ' +
- 'Netdata collects <b>' + data.dimensions_count.toLocaleString() + '</b> metrics, presents them in <b>' +
- data.charts_count.toLocaleString() + '</b> charts and monitors them with <b>' +
- data.alarms_count.toLocaleString() + '</b> alarms. Netdata is using ' +
- Math.round(data.rrd_memory_bytes / 1024 / 1024).toLocaleString() + ' MB of memory on <b>' +
- data.hostname.toString() + '</b> for ' +
- NETDATA.seconds4human(data.update_every * data.history, {
- minute: 'minute', minutes: 'minutes', second: 'second', seconds: 'seconds', space: '&nbsp;',
- }) +
- ' of real-time history.<br />&nbsp;<br />' + 'Get more history by ' +
- '<a href="https://docs.netdata.cloud/docs/configuration-guide/#increase-the-metrics-retention-period" target=_blank>configuring Netdata\'s <b>history</b></a> or using the <a href="https://docs.netdata.cloud/database/engine/" target=_blank>DB engine.</a>' +
- '<br/>&nbsp;<br/><b>netdata</b><br/>' + data.version.toString() + '</small></li>';
+ 'Netdata collects <strong>' + data.dimensions_count.toLocaleString() + '</strong> metrics on ' +
+ data.hostname.toString() + ', presents them in <strong>' +
+ data.charts_count.toLocaleString() + '</strong> charts' +
+ (isMemoryModeDbEngine ? '' : ',') + // oxford comma
+ ' and monitors them with <strong>' +
+ data.alarms_count.toLocaleString() + '</strong> alarms.';
+
+ if (!isMemoryModeDbEngine) {
+ sidebar += '<br />&nbsp;<br />Get more history by ' +
+ '<a href="https://docs.netdata.cloud/docs/configuration-guide/#increase-the-metrics-retention-period" target=_blank>configuring Netdata\'s <strong>history</strong></a> or using the <a href="https://docs.netdata.cloud/database/engine/" target=_blank>DB engine.</a>'
+ }
+
+ sidebar += '<br/>&nbsp;<br/><strong>netdata</strong><br/>' + data.version.toString() + '</small></li>';
+
sidebar += '</ul>';
div.innerHTML = html;
document.getElementById('sidebar').innerHTML = sidebar;