more fixing for incorrectly formatted node info
This commit is contained in:
parent
e849a7f970
commit
289008b2a7
@ -139,19 +139,19 @@ angular.module('netStatsApp.filters', [])
|
|||||||
tmp[0] = 'pyeth';
|
tmp[0] = 'pyeth';
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tmp[1][0] !== 'v' && tmp[1][2] !== '.')
|
if(tmp[1] && tmp[1][0] !== 'v' && tmp[1][2] !== '.')
|
||||||
{
|
{
|
||||||
tmp.splice(1,1);
|
tmp.splice(1,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tmp[2] === 'Release'){
|
if(tmp[2] && tmp[2] === 'Release'){
|
||||||
tmp.splice(2,1);
|
tmp.splice(2,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tmp[2].indexOf('Linux') === 0)
|
if(tmp[2] && tmp[2].indexOf('Linux') === 0)
|
||||||
tmp[2] = 'linux';
|
tmp[2] = 'linux';
|
||||||
|
|
||||||
if(tmp[2].indexOf('Darwin') === 0)
|
if(tmp[2] && tmp[2].indexOf('Darwin') === 0)
|
||||||
tmp[2] = 'darwin';
|
tmp[2] = 'darwin';
|
||||||
|
|
||||||
return $sce.trustAsHtml(tmp.join('/'));
|
return $sce.trustAsHtml(tmp.join('/'));
|
||||||
@ -466,6 +466,7 @@ angular.module('netStatsApp.filters', [])
|
|||||||
if(node.info.node) {
|
if(node.info.node) {
|
||||||
var eth_version = node.info.node.split('/');
|
var eth_version = node.info.node.split('/');
|
||||||
|
|
||||||
|
if(eth_version[1]){
|
||||||
if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.')
|
if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.')
|
||||||
{
|
{
|
||||||
eth_version.splice(1,1);
|
eth_version.splice(1,1);
|
||||||
@ -476,6 +477,7 @@ angular.module('netStatsApp.filters', [])
|
|||||||
|
|
||||||
string = "Version: <b>" + (eth_version[1]) + "</b>";
|
string = "Version: <b>" + (eth_version[1]) + "</b>";
|
||||||
tooltip.push(string);
|
tooltip.push(string);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(node.info.net !== '') {
|
if(node.info.net !== '') {
|
||||||
|
Loading…
Reference in New Issue
Block a user