diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-07-12 15:54:58 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-19 08:56:45 +0100 |
commit | 3d5090af4475b1d0bb56911a8e30abf9097c1b3c (patch) | |
tree | 99ade77d5f7880ebc5778a432e69d75fda753175 /lib/toaster/toastergui/templates/builddashboard.html | |
parent | 9bc014d89434400c1493fa9f07ce3a51d37dab51 (diff) | |
download | bitbake-contrib-3d5090af4475b1d0bb56911a8e30abf9097c1b3c.tar.gz |
toaster-tests: package count/size shouldn't show for non-image builds
If a build doesn't produce any image files, the package count
and size shouldn't be shown.
Also add some metadata to build dashboard elements so it is clear
what they're for, and so they can be queried by the tests.
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/toastergui/templates/builddashboard.html')
-rw-r--r-- | lib/toaster/toastergui/templates/builddashboard.html | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/lib/toaster/toastergui/templates/builddashboard.html b/lib/toaster/toastergui/templates/builddashboard.html index bc41e2362..07fc26c6d 100644 --- a/lib/toaster/toastergui/templates/builddashboard.html +++ b/lib/toaster/toastergui/templates/builddashboard.html @@ -74,13 +74,28 @@ {% for target in targets %} {% if target.target.is_image %} <div class="well well-transparent dashboard-section" data-artifacts-for-target="{{target.target.pk}}"> - <h3><a href="{% url 'target' build.pk target.target.pk %}">{{target.target.target}}</a></h3> - <dl class="dl-horizontal"> - <dt>Packages included</dt> - <dd><a href="{% url 'target' build.pk target.target.pk %}">{{target.npkg}}</a></dd> - <dt>Total package size</dt> - <dd>{{target.pkgsz|filtered_filesizeformat}}</dd> - </dl> + {% if target.npkg > 0 %} + <h3> + <a href="{% url 'target' build.pk target.target.pk %}" data-link="target-packages"> + {{target.target.target}} + </a> + </h3> + <dl class="dl-horizontal"> + <dt>Packages included</dt> + <dd> + <a href="{% url 'target' build.pk target.target.pk %}"> + <span data-value="target-package-count">{{target.npkg}}</span> + </a> + </dd> + <dt>Total package size</dt> + <dd> + <span data-value="target-package-size">{{target.pkgsz|filtered_filesizeformat}}</span> + </dd> + </dl> + {% else %} + <h3>{{target.target.target}}</h3> + {% endif %} + {% if target.targetHasImages %} <dl class="dl-horizontal"> <dt> |