summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-02-03 15:40:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-10 23:07:49 +0000
commit479338cc7b43b55740ba2396d94dd88c3d8fc445 (patch)
tree2f8771620a1a66c646e29e91575abe0f8616ae80 /bitbake/lib/toaster/orm
parent87074af8ceb712a0c31af05d3ec7a607cb186d6c (diff)
downloadpoky-479338cc7b43b55740ba2396d94dd88c3d8fc445.tar.gz
bitbake: toaster: All machines add a column to link back to machine conf
Add a column with the "path" to the machine file and add a link back to the vcs web to view the machine configuration file. (Bitbake rev: c1462c0530fe6c34ffef87bcde7a363995b503c9) Signed-off-by: Michael Wood <michael.g.wood@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.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 454f3692be..ad7a8569f2 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -538,6 +538,11 @@ class Machine(models.Model):
538 name = models.CharField(max_length=255) 538 name = models.CharField(max_length=255)
539 description = models.CharField(max_length=255) 539 description = models.CharField(max_length=255)
540 540
541 def get_vcs_machine_file_link_url(self):
542 path = 'conf/machine/'+self.name+'.conf'
543
544 return self.layer_version.get_vcs_file_link_url(path)
545
541 def __unicode__(self): 546 def __unicode__(self):
542 return "Machine " + self.name + "(" + self.description + ")" 547 return "Machine " + self.name + "(" + self.description + ")"
543 548
@@ -901,7 +906,7 @@ class Layer_Version(models.Model):
901 906
902 # code lifted, with adaptations, from the layerindex-web application https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/ 907 # code lifted, with adaptations, from the layerindex-web application https://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/
903 def _handle_url_path(self, base_url, path): 908 def _handle_url_path(self, base_url, path):
904 import re 909 import re, posixpath
905 if base_url: 910 if base_url:
906 if self.dirpath: 911 if self.dirpath:
907 if path: 912 if path: