function print_runtime_info($link) {
print "<runtime-info>";
- print "<param key=\"daemon_is_running\" value=\"".
- sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";
+ if (ENABLE_UPDATE_DAEMON) {
+ print "<param key=\"daemon_is_running\" value=\"".
+ sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";
+ }
print "</runtime-info>";
}
?>
font-weight : normal;
}
-div.noDaemonWarning {
+#noDaemonWarning {
position : absolute;
background-color : #ecf4ff;
border : 1px solid #88b0f0;
padding : 10px;
margin : 5px;
z-index : 2;
+ display : none;
}
#qafInput {
parse_counters(counters, true);
+ var runtime_info = counters.nextSibling;
+
+ parse_runtime_info(runtime_info);
+
debug("refetch_callback: done");
if (!daemon_enabled) {
}
}
+function parse_runtime_info(elem) {
+ var param = elem.firstChild;
+
+ while (param) {
+ var k = param.getAttribute("key");
+ var v = param.getAttribute("value");
+ var w = document.getElementById("noDaemonWarning");
+
+ if (w) {
+ if (k == "daemon_is_running" && v != 1) {
+ w.style.display = "block";
+ } else {
+ w.style.display = "none";
+ }
+ }
+ param = param.nextSibling;
+ }
+}
window.onload = init;
</script>
-<? if (ENABLE_UPDATE_DAEMON && !file_is_locked("update_daemon.lock")) { ?>
- <div class="noDaemonWarning">
- <b>Warning:</b> Update daemon is enabled in configuration, but daemon
- process is not running, which prevents all feeds from updating. Please
- start the daemon process or contact instance owner.
- </div>
-<? } ?>
+<div id="noDaemonWarning">
+ <b>Warning:</b> Update daemon is enabled in configuration, but daemon
+ process is not running, which prevents all feeds from updating. Please
+ start the daemon process or contact instance owner.
+</div>
<ul id="debug_output"></ul>