summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
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
parente94f0b4e8c2cbea92688975b1a45a061af48911e (diff)
downloadpoky-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')
-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 93506d7c1b..c5fe69b883 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -58,6 +58,9 @@ class Target(models.Model):
58 image_size = models.IntegerField(default=0) 58 image_size = models.IntegerField(default=0)
59 license_manifest_path = models.CharField(max_length=500, null=True) 59 license_manifest_path = models.CharField(max_length=500, null=True)
60 60
61 def package_count(self):
62 return Target_Installed_Package.objects.filter(target_id__exact=self.id).count()
63
61 def __str__(self): 64 def __str__(self):
62 return self.target 65 return self.target
63 66
@@ -194,7 +197,7 @@ class Task_Dependency(models.Model):
194 depends_on = models.ForeignKey(Task, related_name='task_dependencies_depends') 197 depends_on = models.ForeignKey(Task, related_name='task_dependencies_depends')
195 198
196class Package(models.Model): 199class Package(models.Model):
197 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'] 200 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']
198 build = models.ForeignKey('Build') 201 build = models.ForeignKey('Build')
199 recipe = models.ForeignKey('Recipe', null=True) 202 recipe = models.ForeignKey('Recipe', null=True)
200 name = models.CharField(max_length=100) 203 name = models.CharField(max_length=100)