summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/index.html12
1 files changed, 7 insertions, 5 deletions
diff --git a/web/index.html b/web/index.html
index 13aa53c6e4..7bba3f4d5e 100644
--- a/web/index.html
+++ b/web/index.html
@@ -2317,12 +2317,14 @@
})
.done(function(data) {
data = data.replace(/(\r\n|\n|\r| |\t)/gm,"");
- if(data.length !== 40) {
- var c = getNetdataCommitIdFromVersion();
- if(c === null) versionLog('Cannot find the git commit id of netdata.');
- callback(c);
+
+ var c = getNetdataCommitIdFromVersion();
+ if(c !== null && data.length === 40 && data.substring(0, 7) !== c) {
+ versionLog('Installed files commit id and internal netdata git commit id do not match');
+ data = c;
}
- else {
+
+ if(data.length >= 7) {
versionLog('Installed git commit id of netdata is ' + data);
document.getElementById('netdataCommitId').innerHTML = data.substring(0, 7);
callback(data);