From 6a32aa06941ee7f675cdf68a7fc4e9667031cf7a Mon Sep 17 00:00:00 2001
From: Amith Koujalgi <koujalgi.amith@gmail.com>
Date: Wed, 25 Oct 2023 18:50:51 +0530
Subject: [PATCH] UI fixes

---
 sys_stats/static/index.js       | 4 +---
 sys_stats/static/ports/ports.js | 4 +---
 sys_stats/static/stats/stats.js | 2 +-
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/sys_stats/static/index.js b/sys_stats/static/index.js
index 8fba255..c6ea61d 100644
--- a/sys_stats/static/index.js
+++ b/sys_stats/static/index.js
@@ -1,7 +1,5 @@
 // noinspection JSUnresolvedReference
-
-
-let socket = io("ws://0.0.0.0:8070");
+let socket = io(`ws://${window.location.host}`);
 
 $(document).ready(function () {
     let url = window.location.href;
diff --git a/sys_stats/static/ports/ports.js b/sys_stats/static/ports/ports.js
index a4fae4b..786617e 100644
--- a/sys_stats/static/ports/ports.js
+++ b/sys_stats/static/ports/ports.js
@@ -1,7 +1,5 @@
 // noinspection JSUnresolvedReference
-
-
-let socket = io("ws://0.0.0.0:8070");
+let socket = io(`ws://${window.location.host}`);
 
 $(document).ready(function () {
     let url = window.location.href;
diff --git a/sys_stats/static/stats/stats.js b/sys_stats/static/stats/stats.js
index 6cfb1d5..72548df 100644
--- a/sys_stats/static/stats/stats.js
+++ b/sys_stats/static/stats/stats.js
@@ -1,5 +1,5 @@
 // noinspection JSUnresolvedReference
-let socket = io("ws://0.0.0.0:8070");
+let socket = io(`ws://${window.location.host}`);
 
 function plotMemoryChart(percentage, total, used) {
     let data = [