diff options
-rw-r--r-- | bitbake/lib/toaster/orm/models.py | 8 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/builddashboard.html | 22 | ||||
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 7 |
3 files changed, 25 insertions, 12 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index ab6940feaf..93b5df3d4e 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py | |||
@@ -550,6 +550,8 @@ class BuildArtifact(models.Model): | |||
550 | 550 | ||
551 | return self.file_name | 551 | return self.file_name |
552 | 552 | ||
553 | def get_basename(self): | ||
554 | return os.path.basename(self.file_name) | ||
553 | 555 | ||
554 | def is_available(self): | 556 | def is_available(self): |
555 | return self.build.buildrequest.environment.has_artifact(self.file_name) | 557 | return self.build.buildrequest.environment.has_artifact(self.file_name) |
@@ -588,6 +590,12 @@ class Target_Image_File(models.Model): | |||
588 | file_name = models.FilePathField(max_length=254) | 590 | file_name = models.FilePathField(max_length=254) |
589 | file_size = models.IntegerField() | 591 | file_size = models.IntegerField() |
590 | 592 | ||
593 | @property | ||
594 | def suffix(self): | ||
595 | filename, suffix = os.path.splitext(self.file_name) | ||
596 | suffix = suffix.lstrip('.') | ||
597 | return suffix | ||
598 | |||
591 | class Target_File(models.Model): | 599 | class Target_File(models.Model): |
592 | ITYPE_REGULAR = 1 | 600 | ITYPE_REGULAR = 1 |
593 | ITYPE_DIRECTORY = 2 | 601 | ITYPE_DIRECTORY = 2 |
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 @@ | |||
110 | </p> | 110 | </p> |
111 | </div> | 111 | </div> |
112 | </div> | 112 | </div> |
113 | {% else %} | 113 | {% else %} |
114 | <dt> | 114 | <dt> |
115 | <i class="icon-question-sign get-help" title="The location in disk of the license manifest, a document listing all packages installed in your image and their licenses"></i> | 115 | <i class="icon-question-sign get-help" title="The location in disk of the license manifest, a document listing all packages installed in your image and their licenses"></i> |
116 | 116 | ||
@@ -125,18 +125,18 @@ | |||
125 | </dt> | 125 | </dt> |
126 | <dd> | 126 | <dd> |
127 | <ul> | 127 | <ul> |
128 | {% for i in target.imageFiles %} | 128 | {% for i in target.imageFiles %} |
129 | {% if build.project %} | 129 | <li> |
130 | <li><a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}">{{i.path}}</a> | 130 | <a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}"> |
131 | {% else %} | 131 | {{i.suffix}} |
132 | <li>{{i.path}} | 132 | </a> |
133 | {% endif %} | 133 | ({{i.size|filtered_filesizeformat}}) |
134 | ({{i.size|filtered_filesizeformat}})</li> | 134 | </li> |
135 | {% endfor %} | 135 | {% endfor %} |
136 | </ul> | 136 | </ul> |
137 | </dd> | 137 | </dd> |
138 | </dl> | 138 | </dl> |
139 | {% endif %} | 139 | {% endif %} |
140 | </div> | 140 | </div> |
141 | {% endif %} | 141 | {% endif %} |
142 | {% endfor %} | 142 | {% endfor %} |
@@ -160,7 +160,7 @@ | |||
160 | <dd><div> | 160 | <dd><div> |
161 | {% for ba in build.buildartifact_set.all|dictsort:"file_name" %} | 161 | {% for ba in build.buildartifact_set.all|dictsort:"file_name" %} |
162 | <a href="{%url 'build_artifact' build.id 'buildartifact' ba.id %}"> | 162 | <a href="{%url 'build_artifact' build.id 'buildartifact' ba.id %}"> |
163 | {{ba.get_local_file_name}} | 163 | {{ba.get_basename}} |
164 | </a> | 164 | </a> |
165 | 165 | ||
166 | ({{ba.file_size|filtered_filesizeformat}}) <br/> | 166 | ({{ba.file_size|filtered_filesizeformat}}) <br/> |
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 ): | |||
480 | if ( ndx < 0 ): | 480 | if ( ndx < 0 ): |
481 | ndx = 0; | 481 | ndx = 0; |
482 | f = i.file_name[ ndx + 1: ] | 482 | f = i.file_name[ ndx + 1: ] |
483 | imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size }) | 483 | imageFiles.append({ |
484 | 'id': i.id, | ||
485 | 'path': f, | ||
486 | 'size': i.file_size, | ||
487 | 'suffix': i.suffix | ||
488 | }) | ||
484 | if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0): | 489 | if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0): |
485 | targetHasNoImages = True | 490 | targetHasNoImages = True |
486 | elem[ 'imageFiles' ] = imageFiles | 491 | elem[ 'imageFiles' ] = imageFiles |