diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-12 14:05:53 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-12 14:05:53 +0200 |
commit | 7647a12b03d31e90cc2edd1546132bc0be973766 (patch) | |
tree | 6e52ac4f4f0f08119f670a314106c9b7b2649c3d /web | |
parent | 51b6f39da5a5ded1042b627909a87e5b7681a54e (diff) |
when version.txt and internal version differ, use the internal one
Diffstat (limited to 'web')
-rw-r--r-- | web/index.html | 12 |
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); |