summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/models.py
diff options
context:
space:
mode:
authorDave Lerner <dave.lerner@windriver.com>2014-03-12 16:54:09 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-21 14:47:53 +0000
commit4cdd56fff3471669ff2372f0d8bf15f9a287374a (patch)
tree76b81b2cb87e3b3df9751d8487351b5dfb2c59a3 /bitbake/lib/toaster/orm/models.py
parente94f0b4e8c2cbea92688975b1a45a061af48911e (diff)
downloadast2050-yocto-poky-4cdd56fff3471669ff2372f0d8bf15f9a287374a.zip
ast2050-yocto-poky-4cdd56fff3471669ff2372f0d8bf15f9a287374a.tar.gz
bitbake: toaster: image information views
[YOCTO # 4346] When a target image is selected, this commit adds to the toaster project a two-tabbed page that shows 1) 'packages included' a table of packages included in the image (see target.html), and 2) 'directory structure', the target image's file system directory and detailed information showing the source of each file in the directory table (see dirinfo.html). The directory structure tab relies on the open source jQuery plugin jtreetable which provides hierarchical table expansions and contractions of the directory entry tables as the user drills down into directories. A file of jtreetable styles that are compatible with other toaster styles is provided included as css/jquery.treetable.theme.toaster.css. The complete unaltered jtreetable plugin is added via a separate commit. This work was developed base on the bugzilla specification number 4346 and the document "Design 1.1 Image information" attached to that report. Whitespace and typo fixes from Alex Damian. (Bitbake rev: 1ba9f310a8b4fd0952a95be86ab43ae27fe6d983) Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/orm/models.py')
-rw-r--r--bitbake/lib/toaster/orm/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 93506d7..c5fe69b 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -58,6 +58,9 @@ class Target(models.Model):
image_size = models.IntegerField(default=0)
license_manifest_path = models.CharField(max_length=500, null=True)
+ def package_count(self):
+ return Target_Installed_Package.objects.filter(target_id__exact=self.id).count()
+
def __str__(self):
return self.target
@@ -194,7 +197,7 @@ class Task_Dependency(models.Model):
depends_on = models.ForeignKey(Task, related_name='task_dependencies_depends')
class Package(models.Model):
- search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__layer__local_path']
+ search_allowed_fields = ['name', 'version', 'revision', 'recipe__name', 'recipe__version', 'recipe__license', 'recipe__layer_version__layer__name', 'recipe__layer_version__branch', 'recipe__layer_version__commit', 'recipe__layer_version__layer__local_path', 'installed_name']
build = models.ForeignKey('Build')
recipe = models.ForeignKey('Recipe', null=True)
name = models.CharField(max_length=100)
OpenPOWER on IntegriCloud