Skip to content

Commit

Permalink
Merge pull request #5 from amuniz/JENKINS-33110
Browse files Browse the repository at this point in the history
[JENKINS-33110] Log details not shown
  • Loading branch information
svanoort committed Apr 1, 2016
2 parents e99d804 + 91497d5 commit 44ef3e5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
14 changes: 3 additions & 11 deletions ui/src/main/js/view/stage-logs.js
Expand Up @@ -54,20 +54,12 @@ exports.render = function (stageDescription, onElement) {
var nodeLogFrame = nodeNameBar.parent();
var active = nodeLogFrame.hasClass('active');

// remove active state from all log frames
nodeLogFrames.removeClass('active');
nodeLogFrames.removeClass('inactive');

// add active state to the clicked log frame if was previously inactive
if (!active) {
nodeLogFrames.addClass('inactive');
nodeLogFrame.removeClass('inactive');
// Hide any other log box
nodeLogFrames.removeClass('active');
// Show this one
nodeLogFrame.addClass('active');

// set the height of the log-details window so it scrolls properly
var logDetails = $('.log-details', nodeLogFrame);
var position = logDetails.position();
logDetails.height(dialogHeight - header.outerHeight() - position.top - (parseFloat(stageLogsDom.css("border-bottom-width")) * 2));
}
});

Expand Down
2 changes: 1 addition & 1 deletion ui/src/main/js/view/templates/stage-logs.hbs
Expand Up @@ -2,7 +2,7 @@
{{#each stageFlowNodes}}
{{#if this._links.log.href}}
<div class="node-log-frame {{this.status}}" cbwf-controller="node-log" objectUrl="{{this._links.log.href}}">
<div class="node-name"><span class="glyphicon glyphicon-collapse-down" title="Expand"></span><span class="glyphicon glyphicon-collapse-up" title="Collapse"></span> {{this.name}} <a class="show-all" href="#">(show all steps)</a></div>
<div class="node-name"><span class="glyphicon glyphicon-collapse-down" title="Expand"></span><span class="glyphicon glyphicon-collapse-up" title="Collapse"></span> {{this.name}}</div>
<div class="log-details"></div>
</div>
{{/if}}
Expand Down
5 changes: 4 additions & 1 deletion ui/src/main/js/view/templates/stage-logs.less
Expand Up @@ -19,6 +19,7 @@
}

.log-details {
max-height: 400px;
overflow: auto;
display: none;
color:rgba(0,0,0,.67);
Expand All @@ -27,7 +28,9 @@
box-shadow:inset rgba(0,0,0,.2) 0 1px 2px,inset rgba(0,0,0,.2) 0 0 0 1px, inset rgba(255,255,255,.2) 0 0 0 99em;

.console-output{
padding:15px;
padding: 20px 15px;
margin: 0;
border-radius: 0;
line-height:20px;
box-shadow:inset rgba(0,0,0,.1) -1px 0 0;
background:repeating-linear-gradient(
Expand Down
1 change: 1 addition & 0 deletions ui/src/test/js/view/stage-logs-spec.js
Expand Up @@ -76,6 +76,7 @@ describe("view/stage-logs", function () {

// logDetails of that log should be filled in...
expect($('.log-details .console-output', firstLogNode).text()).toBe('build');
expect($('.log-details .console-output', firstLogNode).is(':visible')).toBe(true);

// console.log($('body').html());

Expand Down

0 comments on commit 44ef3e5

Please sign in to comment.