@shardus/monitor-client
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -15,3 +15,8 @@ let connection | ||
const urlParams = new URLSearchParams(window.location.search) | ||
this.ip = urlParams.get('ip') | ||
let ip = urlParams.get('ip') | ||
if (ip === 'localhost' || ip === '127.0.0.1') { | ||
ip = window.location.href.split('//')[1].split(":")[0] | ||
} | ||
console.log('ip', ip) | ||
this.ip = ip | ||
this.port = urlParams.get('port') | ||
@@ -18,0 +23,0 @@ }, |
@@ -220,3 +220,8 @@ new Vue({ | ||
async getCycleDuration(activeNode) { | ||
const response = await axios.get(`http://${activeNode.nodeIpInfo.externalIp}:${activeNode.nodeIpInfo.externalPort}/sync-newest-cycle`) | ||
let ip = activeNode.nodeIpInfo.externalIp | ||
if (ip === 'localhost' || ip === '127.0.0.1') { | ||
ip = window.location.href.split('//')[1].split(":")[0] | ||
} | ||
console.log('ip', ip) | ||
const response = await axios.get(`http://${ip}:${activeNode.nodeIpInfo.externalPort}/sync-newest-cycle`) | ||
const cycleRecord = response.data.newestCycle | ||
@@ -223,0 +228,0 @@ if (cycleRecord && cycleRecord.duration) this.cycleDuration = cycleRecord.duration |
{ | ||
"name": "@shardus/monitor-client", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "app.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2278808
4174