From 98d462c8e67e292188f2614a3cc9db6136320351 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 23 Feb 2016 12:17:04 +0000 Subject: bitbake: toaster: show suffix for image files and basename for artifact files The build dashboard doesn't show image and artifact files correctly, as it shows the full filename for images and the filename plus path relative to DEPLOY_DIR for artifacts. Instead, show just the suffix for image files, and the basename for artifact files. (Bitbake rev: 8084dcdc283b4dc170f066c202f89d56ce1abbef) Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- .../toastergui/templates/builddashboard.html | 22 +++++++++++----------- bitbake/lib/toaster/toastergui/views.py | 7 ++++++- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'bitbake/lib/toaster/toastergui') diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html index 7857abaaac..a0da71ea4c 100644 --- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html +++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html @@ -110,7 +110,7 @@

- {% else %} + {% else %}
@@ -125,18 +125,18 @@
    - {% for i in target.imageFiles %} - {% if build.project %} -
  • {{i.path}} - {% else %} -
  • {{i.path}} - {% endif %} - ({{i.size|filtered_filesizeformat}})
  • - {% endfor %} + {% for i in target.imageFiles %} +
  • + + {{i.suffix}} + +  ({{i.size|filtered_filesizeformat}}) +
  • + {% endfor %}
- {% endif %} + {% endif %} {% endif %} {% endfor %} @@ -160,7 +160,7 @@
{% for ba in build.buildartifact_set.all|dictsort:"file_name" %} - {{ba.get_local_file_name}} + {{ba.get_basename}} ({{ba.file_size|filtered_filesizeformat}})
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 13489af6fd..28b03d30b2 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -480,7 +480,12 @@ def builddashboard( request, build_id ): if ( ndx < 0 ): ndx = 0; f = i.file_name[ ndx + 1: ] - imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size }) + imageFiles.append({ + 'id': i.id, + 'path': f, + 'size': i.file_size, + 'suffix': i.suffix + }) if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0): targetHasNoImages = True elem[ 'imageFiles' ] = imageFiles -- cgit v1.2.3-54-g00ecf