show alert if recent_log_events > 0
This commit is contained in:
parent
51de0ce807
commit
7e5c999146
|
@ -741,6 +741,9 @@ body.ttrss_main #toolbar-frame #toolbar .net-alert i,
|
||||||
body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
|
body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
body.ttrss_main #toolbar-frame #toolbar .log-alert i {
|
||||||
|
color: #ddba1c;
|
||||||
|
}
|
||||||
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
|
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
|
||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -870,6 +870,10 @@ body.ttrss_main {
|
||||||
color : red;
|
color : red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.log-alert i {
|
||||||
|
color : #ddba1c;
|
||||||
|
}
|
||||||
|
|
||||||
#toolbar-headlines {
|
#toolbar-headlines {
|
||||||
padding-right : 4px;
|
padding-right : 4px;
|
||||||
flex-grow : 2;
|
flex-grow : 2;
|
||||||
|
|
|
@ -1311,7 +1311,7 @@
|
||||||
|
|
||||||
$data["labels"] = Labels::get_all_labels($_SESSION["uid"]);
|
$data["labels"] = Labels::get_all_labels($_SESSION["uid"]);
|
||||||
|
|
||||||
if (LOG_DESTINATION == 'sql') {
|
if (LOG_DESTINATION == 'sql' && $_SESSION['access_level'] >= 10) {
|
||||||
if (DB_TYPE == 'pgsql') {
|
if (DB_TYPE == 'pgsql') {
|
||||||
$log_interval = "created_at > NOW() - interval '1 hour'";
|
$log_interval = "created_at > NOW() - interval '1 hour'";
|
||||||
} else {
|
} else {
|
||||||
|
@ -1322,7 +1322,7 @@
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
|
|
||||||
if ($row = $sth->fetch()) {
|
if ($row = $sth->fetch()) {
|
||||||
$data['recent_eventlog_entries'] = $row['cid'];
|
$data['recent_log_events'] = $row['cid'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,11 @@
|
||||||
<i class="material-icons">error_outline</i>
|
<i class="material-icons">error_outline</i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="log-alert" style="display : none"
|
||||||
|
title="<?php echo __("Recent entries found in event log.") ?>">
|
||||||
|
<i class="material-icons">warning</i>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) {
|
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_MAIN_TOOLBAR_BUTTON) as $p) {
|
||||||
echo $p->hook_main_toolbar_button();
|
echo $p->hook_main_toolbar_button();
|
||||||
|
|
|
@ -272,6 +272,14 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (k == "recent_log_events") {
|
||||||
|
const alert = $$(".log-alert")[0];
|
||||||
|
|
||||||
|
if (alert) {
|
||||||
|
v > 0 ? alert.show() : alert.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (k == "daemon_stamp_ok" && v != 1) {
|
if (k == "daemon_stamp_ok" && v != 1) {
|
||||||
Notify.error("<span onclick=\"App.explainError(3)\">Update daemon is not updating feeds.</span>", true);
|
Notify.error("<span onclick=\"App.explainError(3)\">Update daemon is not updating feeds.</span>", true);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -741,6 +741,9 @@ body.ttrss_main #toolbar-frame #toolbar .net-alert i,
|
||||||
body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
|
body.ttrss_main #toolbar-frame #toolbar .left i.icon-error {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
body.ttrss_main #toolbar-frame #toolbar .log-alert i {
|
||||||
|
color: #ddba1c;
|
||||||
|
}
|
||||||
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
|
body.ttrss_main #toolbar-frame #toolbar #toolbar-headlines {
|
||||||
padding-right: 4px;
|
padding-right: 4px;
|
||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue