@shardus/monitor-client
Advanced tools
Comparing version 2.1.8 to 2.1.9
{ | ||
"name": "@shardus/monitor-client", | ||
"version": "2.1.8", | ||
"version": "2.1.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "entry.js", |
@@ -6,2 +6,3 @@ function redirectToSignIn() { | ||
async function requestWithToken(url) { | ||
console.log('requesting with token', url) | ||
let token = loadToken() | ||
@@ -8,0 +9,0 @@ const options = { |
; (function main() { | ||
const url = new URL(window.location.href) | ||
// const monitorServerUrl = 'http://208.110.82.50:3000/api' | ||
const monitorServerUrl = window.origin + '/api' | ||
@@ -5,0 +4,0 @@ console.log('Monitor server', monitorServerUrl) |
@@ -37,2 +37,3 @@ | ||
mounted: function () { | ||
console.log('Sync page loaded!') | ||
let data = [this.trace] | ||
@@ -69,4 +70,4 @@ this.layout = { | ||
async getReport() { | ||
const response = await axios.get(`/api/sync-report`) | ||
const heartbeatResponse = await axios.get(`/api/report`) | ||
const response = await requestWithToken(`${monitorServerUrl}/sync-report`) | ||
const heartbeatResponse = await requestWithToken(`${monitorServerUrl}/report`) | ||
const report = response.data | ||
@@ -73,0 +74,0 @@ if (Object.keys(report).length === 0) return |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2290569
4268