Skip to content

Commit

Permalink
Reloading dat
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBenes3 committed Nov 30, 2023
1 parent 32cd869 commit 79e7ef2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CDP.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
app = FastAPI()
router = APIRouter()

#express_base_url = "http://localhost:4000"
express_base_url = "https://fik.crreat.eu"
express_base_url = "http://localhost:4000"
#express_base_url = "https://fik.crreat.eu"

car_dict = {}

Expand Down
Binary file modified __pycache__/CDP.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion data/cdp_hb.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"cdp_heartbeat_value": "2023-11-30 17:38:42.398304"
"cdp_heartbeat_value": "2023-11-30 17:59:17.901750"
}
15 changes: 15 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@

<body>


<div id="lastReloadTime">Last Reload Time: </div>
<button id="reloadButton">Reload Data</button>
<h1>Json data:</h1>

<table>
Expand Down Expand Up @@ -129,8 +131,21 @@
</tr>
</table>





<script>
var reloadButton = document.getElementById('reloadButton');
function reloadData() {
loadDataFromServer();
}
reloadButton.addEventListener('click', reloadData);
setInterval(reloadData, 3000);
var fik8b;
Expand Down

0 comments on commit 79e7ef2

Please sign in to comment.