toggle no daemon warning @ runtime on refetch
This commit is contained in:
parent
f54f515f44
commit
71ad883b28
|
@ -1721,8 +1721,10 @@
|
||||||
|
|
||||||
function print_runtime_info($link) {
|
function print_runtime_info($link) {
|
||||||
print "<runtime-info>";
|
print "<runtime-info>";
|
||||||
|
if (ENABLE_UPDATE_DAEMON) {
|
||||||
print "<param key=\"daemon_is_running\" value=\"".
|
print "<param key=\"daemon_is_running\" value=\"".
|
||||||
sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";
|
sprintf("%d", file_is_locked("update_daemon.lock")) . "\"/>";
|
||||||
|
}
|
||||||
print "</runtime-info>";
|
print "</runtime-info>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -1090,13 +1090,14 @@ a.cdmToggleLink:hover {
|
||||||
font-weight : normal;
|
font-weight : normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.noDaemonWarning {
|
#noDaemonWarning {
|
||||||
position : absolute;
|
position : absolute;
|
||||||
background-color : #ecf4ff;
|
background-color : #ecf4ff;
|
||||||
border : 1px solid #88b0f0;
|
border : 1px solid #88b0f0;
|
||||||
padding : 10px;
|
padding : 10px;
|
||||||
margin : 5px;
|
margin : 5px;
|
||||||
z-index : 2;
|
z-index : 2;
|
||||||
|
display : none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#qafInput {
|
#qafInput {
|
||||||
|
|
22
tt-rss.js
22
tt-rss.js
|
@ -75,6 +75,10 @@ function refetch_callback() {
|
||||||
|
|
||||||
parse_counters(counters, true);
|
parse_counters(counters, true);
|
||||||
|
|
||||||
|
var runtime_info = counters.nextSibling;
|
||||||
|
|
||||||
|
parse_runtime_info(runtime_info);
|
||||||
|
|
||||||
debug("refetch_callback: done");
|
debug("refetch_callback: done");
|
||||||
|
|
||||||
if (!daemon_enabled) {
|
if (!daemon_enabled) {
|
||||||
|
@ -513,4 +517,22 @@ function toggleDispRead() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -79,13 +79,11 @@ if (document.addEventListener) {
|
||||||
window.onload = init;
|
window.onload = init;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<? if (ENABLE_UPDATE_DAEMON && !file_is_locked("update_daemon.lock")) { ?>
|
<div id="noDaemonWarning">
|
||||||
<div class="noDaemonWarning">
|
|
||||||
<b>Warning:</b> Update daemon is enabled in configuration, but daemon
|
<b>Warning:</b> Update daemon is enabled in configuration, but daemon
|
||||||
process is not running, which prevents all feeds from updating. Please
|
process is not running, which prevents all feeds from updating. Please
|
||||||
start the daemon process or contact instance owner.
|
start the daemon process or contact instance owner.
|
||||||
</div>
|
</div>
|
||||||
<? } ?>
|
|
||||||
|
|
||||||
<ul id="debug_output"></ul>
|
<ul id="debug_output"></ul>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue