Display Console Output on the build page (behind an experimental flag) (#10115)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
This commit is contained in:
parent
b6e58331ed
commit
331c7685ca
@ -143,6 +143,7 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
@ -158,6 +159,7 @@ import java.util.logging.SimpleFormatter;
|
|||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import jenkins.console.ConsoleUrlProvider;
|
import jenkins.console.ConsoleUrlProvider;
|
||||||
|
import jenkins.console.DefaultConsoleUrlProvider;
|
||||||
import jenkins.console.WithConsoleUrl;
|
import jenkins.console.WithConsoleUrl;
|
||||||
import jenkins.model.GlobalConfiguration;
|
import jenkins.model.GlobalConfiguration;
|
||||||
import jenkins.model.GlobalConfigurationCategory;
|
import jenkins.model.GlobalConfigurationCategory;
|
||||||
@ -1993,6 +1995,14 @@ public class Functions {
|
|||||||
return consoleUrl != null ? Stapler.getCurrentRequest().getContextPath() + '/' + consoleUrl : null;
|
return consoleUrl != null ? Stapler.getCurrentRequest().getContextPath() + '/' + consoleUrl : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param run the run
|
||||||
|
* @return the Console Provider for the given run, if null, the default Console Provider
|
||||||
|
*/
|
||||||
|
public static ConsoleUrlProvider getConsoleProviderFor(Run<?, ?> run) {
|
||||||
|
return Optional.ofNullable(ConsoleUrlProvider.getProvider(run)).orElse(new DefaultConsoleUrlProvider());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Escapes the character unsafe for e-mail address.
|
* Escapes the character unsafe for e-mail address.
|
||||||
* See <a href="https://en.wikipedia.org/wiki/Email_address">the Wikipedia page</a> for the details,
|
* See <a href="https://en.wikipedia.org/wiki/Email_address">the Wikipedia page</a> for the details,
|
||||||
|
@ -83,11 +83,7 @@ public interface ConsoleUrlProvider extends Describable<ConsoleUrlProvider> {
|
|||||||
return Stapler.getCurrentRequest().getContextPath() + '/' + run.getConsoleUrl();
|
return Stapler.getCurrentRequest().getContextPath() + '/' + run.getConsoleUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
static List<ConsoleUrlProvider> all() {
|
||||||
* Looks up the {@link #getConsoleUrl} value from the first provider to offer one.
|
|
||||||
* @since 2.476
|
|
||||||
*/
|
|
||||||
static @NonNull String consoleUrlOf(Run<?, ?> run) {
|
|
||||||
final List<ConsoleUrlProvider> providers = new ArrayList<>();
|
final List<ConsoleUrlProvider> providers = new ArrayList<>();
|
||||||
User currentUser = User.current();
|
User currentUser = User.current();
|
||||||
if (currentUser != null) {
|
if (currentUser != null) {
|
||||||
@ -105,8 +101,20 @@ public interface ConsoleUrlProvider extends Describable<ConsoleUrlProvider> {
|
|||||||
if (globalProviders != null) {
|
if (globalProviders != null) {
|
||||||
providers.addAll(globalProviders);
|
providers.addAll(globalProviders);
|
||||||
}
|
}
|
||||||
|
return providers;
|
||||||
|
}
|
||||||
|
|
||||||
|
static ConsoleUrlProvider getProvider(Run<?, ?> run) {
|
||||||
|
return all().stream().filter(provider -> provider.getConsoleUrl(run) != null).findFirst().orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Looks up the {@link #getConsoleUrl} value from the first provider to offer one.
|
||||||
|
* @since 2.476
|
||||||
|
*/
|
||||||
|
static @NonNull String consoleUrlOf(Run<?, ?> run) {
|
||||||
String url = null;
|
String url = null;
|
||||||
for (ConsoleUrlProvider provider : providers) {
|
for (ConsoleUrlProvider provider : all()) {
|
||||||
try {
|
try {
|
||||||
String tempUrl = provider.getConsoleUrl(run);
|
String tempUrl = provider.getConsoleUrl(run);
|
||||||
if (tempUrl != null) {
|
if (tempUrl != null) {
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* The MIT License
|
||||||
|
*
|
||||||
|
* Copyright (c) 2025, Jan Faracik
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package jenkins.model.experimentalflags;
|
||||||
|
|
||||||
|
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||||
|
import hudson.Extension;
|
||||||
|
import org.kohsuke.accmod.Restricted;
|
||||||
|
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||||
|
|
||||||
|
@Extension
|
||||||
|
@Restricted(NoExternalUse.class)
|
||||||
|
public class NewBuildPageUserExperimentalFlag extends BooleanUserExperimentalFlag {
|
||||||
|
public NewBuildPageUserExperimentalFlag() {
|
||||||
|
super("new-build-page.flag");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDisplayName() {
|
||||||
|
return "New build page";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public String getShortDescription() {
|
||||||
|
return "Enables a revamped build page. This feature is still a work in progress, so some things might not work perfectly yet.";
|
||||||
|
}
|
||||||
|
}
|
38
core/src/main/resources/hudson/model/Run/console-log.jelly
Normal file
38
core/src/main/resources/hudson/model/Run/console-log.jelly
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?jelly escape-by-default='true'?>
|
||||||
|
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson">
|
||||||
|
<j:set var="threshold" value="${h.getSystemProperty('hudson.consoleTailKB')?:'150'}" />
|
||||||
|
<!-- Show at most last 150KB (can override with system property) unless consoleFull is set -->
|
||||||
|
<j:set var="offset" value="${empty(consoleFull) ? it.logText.length()-threshold*1024 : 0}" />
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${offset > 0}">
|
||||||
|
<a class="jenkins-button jenkins-!-accent-color jenkins-!-padding-2 jenkins-!-margin-bottom-2" style="width: 100%; justify-content: start" href="consoleFull">
|
||||||
|
<l:icon src="symbol-help-circle" />
|
||||||
|
${%skipSome(offset / 1024)}
|
||||||
|
</a>
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<j:set var="offset" value="${0}" />
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
|
||||||
|
<j:out value="${h.generateConsoleAnnotationScriptAndStylesheet()}"/>
|
||||||
|
|
||||||
|
<j:choose>
|
||||||
|
<!-- Do progressive console output -->
|
||||||
|
<j:when test="${it.isLogUpdated()}">
|
||||||
|
<pre id="out" class="console-output" />
|
||||||
|
<div id="spinner">
|
||||||
|
<l:progressAnimation/>
|
||||||
|
</div>
|
||||||
|
<t:progressiveText href="logText/progressiveHtml" idref="out" spinner="spinner"
|
||||||
|
startOffset="${offset}" onFinishEvent="jenkins:consoleFinished"/>
|
||||||
|
</j:when>
|
||||||
|
<!-- output is completed now. -->
|
||||||
|
<j:otherwise>
|
||||||
|
<pre class="console-output">
|
||||||
|
<st:getOutput var="output" />
|
||||||
|
<j:whitespace>${it.writeLogTo(offset,output)}</j:whitespace>
|
||||||
|
</pre>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
</j:jelly>
|
@ -0,0 +1 @@
|
|||||||
|
skipSome=This log is too long to show here, {0,number,integer} KB has been skipped — click to see the complete log
|
@ -50,38 +50,7 @@ THE SOFTWARE.
|
|||||||
${%Console Output}
|
${%Console Output}
|
||||||
</t:buildCaption>
|
</t:buildCaption>
|
||||||
|
|
||||||
<j:set var="threshold" value="${h.getSystemProperty('hudson.consoleTailKB')?:'150'}" />
|
<st:include page="console-log.jelly" />
|
||||||
<!-- Show at most last 150KB (can override with system property) unless consoleFull is set -->
|
|
||||||
<j:set var="offset" value="${empty(consoleFull) ? it.logText.length()-threshold*1024 : 0}" />
|
|
||||||
<j:choose>
|
|
||||||
<j:when test="${offset > 0}">
|
|
||||||
${%skipSome(offset/1024,"consoleFull")}
|
|
||||||
</j:when>
|
|
||||||
<j:otherwise>
|
|
||||||
<j:set var="offset" value="${0}" />
|
|
||||||
</j:otherwise>
|
|
||||||
</j:choose>
|
|
||||||
|
|
||||||
<j:out value="${h.generateConsoleAnnotationScriptAndStylesheet()}"/>
|
|
||||||
|
|
||||||
<j:choose>
|
|
||||||
<!-- Do progressive console output -->
|
|
||||||
<j:when test="${it.isLogUpdated()}">
|
|
||||||
<pre id="out" class="console-output" />
|
|
||||||
<div id="spinner">
|
|
||||||
<l:progressAnimation/>
|
|
||||||
</div>
|
|
||||||
<t:progressiveText href="logText/progressiveHtml" idref="out" spinner="spinner"
|
|
||||||
startOffset="${offset}" onFinishEvent="jenkins:consoleFinished"/>
|
|
||||||
</j:when>
|
|
||||||
<!-- output is completed now. -->
|
|
||||||
<j:otherwise>
|
|
||||||
<pre class="console-output" id="out">
|
|
||||||
<st:getOutput var="output" />
|
|
||||||
<j:whitespace>${it.writeLogTo(offset,output)}</j:whitespace>
|
|
||||||
</pre>
|
|
||||||
</j:otherwise>
|
|
||||||
</j:choose>
|
|
||||||
</l:main-panel>
|
</l:main-panel>
|
||||||
</l:layout>
|
</l:layout>
|
||||||
</j:jelly>
|
</j:jelly>
|
||||||
|
@ -25,53 +25,62 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
<?jelly escape-by-default='true'?>
|
<?jelly escape-by-default='true'?>
|
||||||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:i="jelly:fmt">
|
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:i="jelly:fmt">
|
||||||
<l:layout title="${it.fullDisplayName}">
|
<l:userExperimentalFlag var="newBuildPage" flagClassName="jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag" />
|
||||||
<st:include page="sidepanel.jelly" />
|
|
||||||
|
|
||||||
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
|
<j:choose>
|
||||||
<l:main-panel>
|
<j:when test="${newBuildPage}">
|
||||||
<j:set var="controls">
|
<st:include page="new-build-page.jelly" />
|
||||||
<t:editDescriptionButton permission="${it.UPDATE}"/>
|
</j:when>
|
||||||
<l:hasPermission permission="${it.UPDATE}">
|
<j:otherwise>
|
||||||
<st:include page="logKeep.jelly" />
|
<l:layout title="${it.fullDisplayName}">
|
||||||
</l:hasPermission>
|
<st:include page="sidepanel.jelly" />
|
||||||
</j:set>
|
|
||||||
|
|
||||||
<t:buildCaption controls="${controls}">${it.displayName} (<i:formatDate value="${it.timestamp.time}" type="both" dateStyle="medium" timeStyle="medium"/>)</t:buildCaption>
|
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
|
||||||
|
<l:main-panel>
|
||||||
|
<j:set var="controls">
|
||||||
|
<t:editDescriptionButton permission="${it.UPDATE}"/>
|
||||||
|
<l:hasPermission permission="${it.UPDATE}">
|
||||||
|
<st:include page="logKeep.jelly" />
|
||||||
|
</l:hasPermission>
|
||||||
|
</j:set>
|
||||||
|
|
||||||
<div>
|
<t:buildCaption controls="${controls}">${it.displayName} (<i:formatDate value="${it.timestamp.time}" type="both" dateStyle="medium" timeStyle="medium"/>)</t:buildCaption>
|
||||||
<t:editableDescription permission="${it.UPDATE}" hideButton="true"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="float:right; z-index: 1; position:relative; margin-left: 1em">
|
<div>
|
||||||
<div style="margin-top:1em">
|
<t:editableDescription permission="${it.UPDATE}" hideButton="true"/>
|
||||||
${%startedAgo(it.timestampString)}
|
</div>
|
||||||
</div>
|
|
||||||
<div>
|
<div style="float:right; z-index: 1; position:relative; margin-left: 1em">
|
||||||
<j:if test="${it.building}">
|
<div style="margin-top:1em">
|
||||||
${%beingExecuted(it.executor.timestampString)}
|
${%startedAgo(it.timestampString)}
|
||||||
</j:if>
|
</div>
|
||||||
<j:if test="${!it.building}">
|
<div>
|
||||||
${%Took} <a href="${rootURL}/${it.parent.url}buildTimeTrend">${it.durationString}</a>
|
<j:if test="${it.building}">
|
||||||
</j:if>
|
${%beingExecuted(it.executor.timestampString)}
|
||||||
<st:include page="details.jelly" optional="true" />
|
</j:if>
|
||||||
</div>
|
<j:if test="${!it.building}">
|
||||||
</div>
|
${%Took} <a href="${rootURL}/${it.parent.url}buildTimeTrend">${it.durationString}</a>
|
||||||
|
</j:if>
|
||||||
|
<st:include page="details.jelly" optional="true" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<t:artifactList build="${it}" caption="${%Build Artifacts}"
|
<t:artifactList build="${it}" caption="${%Build Artifacts}"
|
||||||
permission="${it.ARTIFACTS}" />
|
permission="${it.ARTIFACTS}" />
|
||||||
|
|
||||||
<!-- give actions a chance to contribute summary item -->
|
<!-- give actions a chance to contribute summary item -->
|
||||||
<j:forEach var="a" items="${it.allActions}">
|
<j:forEach var="a" items="${it.allActions}">
|
||||||
<st:include page="summary.jelly" from="${a}" optional="true" it="${a}" />
|
<st:include page="summary.jelly" from="${a}" optional="true" it="${a}" />
|
||||||
</j:forEach>
|
</j:forEach>
|
||||||
|
|
||||||
<st:include page="summary.jelly" optional="true" />
|
<st:include page="summary.jelly" optional="true" />
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<st:include page="main.jelly" optional="true" />
|
<st:include page="main.jelly" optional="true" />
|
||||||
</l:main-panel>
|
</l:main-panel>
|
||||||
</l:layout>
|
</l:layout>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
</j:jelly>
|
</j:jelly>
|
||||||
|
@ -0,0 +1,78 @@
|
|||||||
|
<!--
|
||||||
|
The MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Matthew R. Harrah,
|
||||||
|
Tom Huybrechts, id:cactusman, Romain Seguy
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<?jelly escape-by-default='true'?>
|
||||||
|
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:i="jelly:fmt">
|
||||||
|
<l:layout title="${it.fullDisplayName}">
|
||||||
|
<st:include page="sidepanel.jelly" />
|
||||||
|
|
||||||
|
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->
|
||||||
|
<l:main-panel>
|
||||||
|
<j:set var="controls">
|
||||||
|
<t:editDescriptionButton permission="${it.UPDATE}"/>
|
||||||
|
<l:hasPermission permission="${it.UPDATE}">
|
||||||
|
<st:include page="logKeep.jelly" />
|
||||||
|
</l:hasPermission>
|
||||||
|
</j:set>
|
||||||
|
|
||||||
|
<t:buildCaption controls="${controls}">${it.displayName} (<i:formatDate value="${it.timestamp.time}" type="both" dateStyle="medium" timeStyle="medium"/>)</t:buildCaption>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<t:editableDescription permission="${it.UPDATE}" hideButton="true"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<st:include page="console.jelly" from="${h.getConsoleProviderFor(it)}" optional="true" />
|
||||||
|
|
||||||
|
<div style="float:right; z-index: 1; position:relative; margin-left: 1em">
|
||||||
|
<div style="margin-top:1em">
|
||||||
|
${%startedAgo(it.timestampString)}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<j:if test="${it.building}">
|
||||||
|
${%beingExecuted(it.executor.timestampString)}
|
||||||
|
</j:if>
|
||||||
|
<j:if test="${!it.building}">
|
||||||
|
${%Took} <a href="${rootURL}/${it.parent.url}buildTimeTrend">${it.durationString}</a>
|
||||||
|
</j:if>
|
||||||
|
<st:include page="details.jelly" optional="true" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<t:artifactList build="${it}" caption="${%Build Artifacts}"
|
||||||
|
permission="${it.ARTIFACTS}" />
|
||||||
|
|
||||||
|
<!-- give actions a chance to contribute summary item -->
|
||||||
|
<j:forEach var="a" items="${it.allActions}">
|
||||||
|
<st:include page="summary.jelly" from="${a}" optional="true" it="${a}" />
|
||||||
|
</j:forEach>
|
||||||
|
|
||||||
|
<st:include page="summary.jelly" optional="true" />
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<st:include page="main.jelly" optional="true" />
|
||||||
|
</l:main-panel>
|
||||||
|
</l:layout>
|
||||||
|
</j:jelly>
|
@ -0,0 +1,2 @@
|
|||||||
|
startedAgo=Started {0} ago
|
||||||
|
beingExecuted=Build has been executing for {0}
|
@ -0,0 +1,14 @@
|
|||||||
|
<?jelly escape-by-default='true'?>
|
||||||
|
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
|
||||||
|
<j:set var="controls">
|
||||||
|
<a href="consoleText" download="${it.displayName}.txt" tooltip="${%Download}" class="jenkins-card__reveal">
|
||||||
|
<l:icon src="symbol-download" />
|
||||||
|
</a>
|
||||||
|
</j:set>
|
||||||
|
|
||||||
|
<l:card title="${%Console Output}" expandable="console" controls="${controls}">
|
||||||
|
<div class="app-console-output-widget progressive-text-container">
|
||||||
|
<st:include page="console-log.jelly" />
|
||||||
|
</div>
|
||||||
|
</l:card>
|
||||||
|
</j:jelly>
|
@ -10,7 +10,9 @@ Behaviour.specify(
|
|||||||
let onFinishEvent = holder.getAttribute("data-on-finish-event");
|
let onFinishEvent = holder.getAttribute("data-on-finish-event");
|
||||||
let errorMessage = holder.getAttribute("data-error-message");
|
let errorMessage = holder.getAttribute("data-error-message");
|
||||||
|
|
||||||
var scroller = new AutoScroller(document.body);
|
var scroller = new AutoScroller(
|
||||||
|
holder.closest(".progressive-text-container") || document.body,
|
||||||
|
);
|
||||||
/*
|
/*
|
||||||
fetches the latest update from the server
|
fetches the latest update from the server
|
||||||
@param e
|
@param e
|
||||||
|
@ -5,3 +5,19 @@
|
|||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.app-console-output-widget {
|
||||||
|
min-height: 340px;
|
||||||
|
max-height: 340px;
|
||||||
|
overflow-y: auto;
|
||||||
|
margin: 0 -1rem -1rem;
|
||||||
|
padding: 0 1rem 1rem;
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background: transparent;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
line-height: 1.75;
|
||||||
|
font-size: var(--font-size-sm);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -2030,10 +2030,14 @@ function AutoScroller(scrollContainer) {
|
|||||||
scrollToBottom: function () {
|
scrollToBottom: function () {
|
||||||
var scrollDiv = this.scrollContainer;
|
var scrollDiv = this.scrollContainer;
|
||||||
var currentHeight = this.getCurrentHeight();
|
var currentHeight = this.getCurrentHeight();
|
||||||
if (document.documentElement) {
|
|
||||||
document.documentElement.scrollTop = currentHeight;
|
if (scrollDiv === document.body) {
|
||||||
|
window.scrollTo({
|
||||||
|
top: currentHeight,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
scrollDiv.scrollTop = currentHeight;
|
||||||
}
|
}
|
||||||
scrollDiv.scrollTop = currentHeight;
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user