From patchwork Tue Mar 20 21:24:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael-Doyle Hudson X-Patchwork-Id: 7375 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 231B123E12 for ; Tue, 20 Mar 2012 21:24:12 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id D5B10A18182 for ; Tue, 20 Mar 2012 21:24:11 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so760162iag.11 for ; Tue, 20 Mar 2012 14:24:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :content-type:mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state; bh=0Nz7j6llGN5i9Y+a2DvfeRlerN+SaaKA5xQEXDZXKoc=; b=ejC1m11u7b4Kovu+5i09xttXq4AN3vePEMQ+lhI7QlFWqZIEuHy/Cbo+mzuFu/hpsj ur3/Dp8Wp6FbwtrYAf/wTnPGfR8txpYPPm/bZ5QOlUHVBfL3M+SRr6ZzO8JCyVpAsQFn N2/iSbmeFLIQd7yO8+9XRhawNEGLVh6ZnY4LrZN8uL3k2DU2kjsIOvDb2ehF/p5EPU+z 70a/giajzhlxsTXnq2vHvgzDtwseKfLK6H9IELl4lg7C66S0PGABevrfX3IQmV9vNWuQ u7REf4hNcYkwgMkxUyjJ4+G0xNsGTSYnV0kG0UqXNpeAdEt/bX+YTiIkDeKRhz06deyv uNOg== Received: by 10.50.47.231 with SMTP id g7mr9921020ign.12.1332278651630; Tue, 20 Mar 2012 14:24:11 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.203.79 with SMTP id fh15csp13254ibb; Tue, 20 Mar 2012 14:24:11 -0700 (PDT) Received: by 10.180.83.42 with SMTP id n10mr3195395wiy.9.1332278650555; Tue, 20 Mar 2012 14:24:10 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id de10si7279892wib.0.2012.03.20.14.24.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Mar 2012 14:24:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1SA6XK-0007h9-1q for ; Tue, 20 Mar 2012 21:24:10 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 03661E012C for ; Tue, 20 Mar 2012 21:24:10 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-scheduler X-Launchpad-Branch: ~linaro-validation/lava-scheduler/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 156 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-scheduler/trunk] Rev 156: If the job log view is scrolled to the bottom when new output Message-Id: <20120320212410.11186.3716.launchpad@ackee.canonical.com> Date: Tue, 20 Mar 2012 21:24:10 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14969"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: b83ba7fa9aabb828280c0a3ed0e6e6d57a36e678 X-Gm-Message-State: ALoCoQlbPfLufnWE4D6whbqjPlbuXPuI9I4YnQ1fQfImFYEPFSydVut0yz0/u0y6LjAGCRBJKqf4 Merge authors: Michael Hudson-Doyle (mwhudson) Related merge proposals: https://code.launchpad.net/~mwhudson/lava-scheduler/restore-pinning-js-bug-927981/+merge/98141 proposed by: Michael Hudson-Doyle (mwhudson) review: Approve - Zygmunt Krynicki (zkrynicki) ------------------------------------------------------------ revno: 156 [merge] committer: Michael Hudson-Doyle branch nick: trunk timestamp: Wed 2012-03-21 10:21:40 +1300 message: If the job log view is scrolled to the bottom when new output arrives, keep the view at the bottom. modified: doc/changes.rst fake-dispatcher lava_scheduler_app/management/commands/scheduler.py lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html --- lp:lava-scheduler https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk You are subscribed to branch lp:lava-scheduler. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-scheduler/trunk/+edit-subscription === modified file 'doc/changes.rst' --- doc/changes.rst 2012-03-15 21:27:02 +0000 +++ doc/changes.rst 2012-03-19 23:46:57 +0000 @@ -1,18 +1,20 @@ Version History *************** -* Show all dispatcher logs. -* Highlight action lines. -* Download log file in summary page .. _version_0_12: Version 0.12 (UNRELEASED) ========================= * Two fixes around job privacy: - * Display ValueErrors raised by from_json_and_user nicely to API - users. + * Display ValueErrors raised by from_json_and_user nicely to API users. * Allow submission to anonymous streams again. +* Job view improvements: + * Show all dispatcher logs. + * Highlight action lines. + * Add link to download log file in summary page. + * If the job log view is scrolled to the bottom when new output arrives, keep + the view at the bottom. .. _version_0_11: === modified file 'fake-dispatcher' --- fake-dispatcher 2011-08-24 10:33:21 +0000 +++ fake-dispatcher 2012-03-19 04:32:52 +0000 @@ -1,8 +1,13 @@ #!/bin/sh echo starting processing $1 echo error >&2 -for i in `seq 3`; do -sleep 2 +for i in `seq 100`; do +echo p $i +cat $1 +echo +done +for i in `seq 300`; do +sleep 1 echo $i cat $1 echo === modified file 'lava_scheduler_app/management/commands/scheduler.py' --- lava_scheduler_app/management/commands/scheduler.py 2012-02-16 01:39:54 +0000 +++ lava_scheduler_app/management/commands/scheduler.py 2012-03-19 04:31:48 +0000 @@ -59,8 +59,10 @@ source = DatabaseJobSource() if options['use_fake']: + import lava_scheduler_app + opd = os.path.dirname dispatcher = os.path.join( - os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + opd(opd(os.path.abspath(lava_scheduler_app.__file__))), 'fake-dispatcher') else: dispatcher = options['dispatcher'] === modified file 'lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html' --- lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html 2011-12-13 04:22:40 +0000 +++ lava_scheduler_app/templates/lava_scheduler_app/job_log_file.html 2012-03-19 23:44:40 +0000 @@ -37,6 +37,9 @@ var d = data[i]; var cls = 'log_' + d[0]; var last_pre = $("#logfile_content pre:last"); + var s = $("html"), w = $(window); + var atBottom = w.attr('innerHeight') + w.scrollTop() >= s.attr('scrollHeight') + && w.attr('innerHeight') > progressNode.attr('offsetHeight'); if (last_pre.attr('class') == cls) { last_pre.append(document.createTextNode(d[2])); } else { @@ -45,6 +48,9 @@ newNode.text(d[2]); newNode.insertBefore(progressNode); } + if (atBottom) { + w.scrollTop(s.attr('scrollHeight')) + } } logLenth = xhr.getResponseHeader('X-Current-Size'); if (xhr.getResponseHeader('X-Is-Finished')) {