mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
pialert_app_state.json
This commit is contained in:
@@ -83,8 +83,15 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<script>
|
||||
|
||||
function updateState(){
|
||||
getParam("state","Back_App_State", true)
|
||||
setTimeout("updateState()", 5000);
|
||||
$.get('api/pialert_app_state.json?nocache=' + Date.now(), function(appState) {
|
||||
|
||||
console.log(appState)
|
||||
|
||||
document.getElementById('state').innerHTML = appState["currentState"].replaceAll('"', '');
|
||||
|
||||
setTimeout("updateState()", 1000);
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function show_pia_servertime() {
|
||||
@@ -277,26 +284,6 @@ if ($ENABLED_DARKMODE === True) {
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
|
||||
//--------------------------------------------------------------
|
||||
function getParam(targetId, key, skipCache = false) {
|
||||
|
||||
skipCacheQuery = "";
|
||||
|
||||
if(skipCache)
|
||||
{
|
||||
skipCacheQuery = "&skipcache";
|
||||
}
|
||||
|
||||
// get parameter value
|
||||
$.get('php/server/parameters.php?action=get&defaultValue=NULL¶meter='+ key + skipCacheQuery, function(data) {
|
||||
var result = data;
|
||||
|
||||
document.getElementById(targetId).innerHTML = result.replaceAll('"', '');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
||||
function toggleFullscreen() {
|
||||
|
||||
Reference in New Issue
Block a user