mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Add a message for progressive logs with no data
This commit is contained in:
@@ -37,6 +37,7 @@ view_header=Last $1 lines of $2
|
||||
view_header2=Last $1 lines
|
||||
view_header3=Lines of $1
|
||||
view_empty=Log file is empty
|
||||
view_loading=Log file is being watched .. No new lines yet.
|
||||
view_filter=Filter lines with text $1
|
||||
view_filter_btn=Filter
|
||||
|
||||
|
||||
@@ -232,13 +232,14 @@ if (!$follow) {
|
||||
$got = undef;
|
||||
}
|
||||
}
|
||||
print "<i>$text{'view_empty'}</i>\n"
|
||||
print "<i data-empty>$text{'view_empty'}</i>\n"
|
||||
if (!$got || $safe_proc_out =~ /-- No entries --/m);
|
||||
print "</pre>\n";
|
||||
}
|
||||
# Progressive output
|
||||
else {
|
||||
print "<pre id='logdata' data-reversed='$reverse'>";
|
||||
print "<i data-loading>$text{'view_loading'}</i>\n";
|
||||
print "</pre>\n";
|
||||
my %tinfo = &get_theme_info($current_theme);
|
||||
my $spa_theme = $tinfo{'spa'} ? 1 : 0;
|
||||
@@ -261,6 +262,13 @@ else {
|
||||
while (!done) {
|
||||
const chunk = decoder.decode(value, { stream: true }).trim(),
|
||||
dataReversed = logDataElement.getAttribute("data-reversed");
|
||||
if (!processText.started) {
|
||||
processText.started = true;
|
||||
const loadingElement = logDataElement.querySelector("i[data-loading]");
|
||||
if (loadingElement) {
|
||||
loadingElement.remove();
|
||||
}
|
||||
}
|
||||
let lines = chunk.split("\\n");
|
||||
if (dataReversed === "1") {
|
||||
lines = lines.reverse();
|
||||
|
||||
Reference in New Issue
Block a user