summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-09-29 20:20:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-30 13:39:50 +0000
commit1b109c7908a87bfc20c058116b6b72cc16155399 (patch)
tree520bec43876febd6e311ef8aa34ef4866db1b7ab /bitbake/lib/toaster/orm
parent960580cb70ab1c775b49f8a40d41632c080b3cbb (diff)
downloadpoky-1b109c7908a87bfc20c058116b6b72cc16155399.tar.gz
bitbake: toastergui: project edit capabilities in all layers page
This patch definitivates the all layers page, providing interactivity for adding and removing layers inside the project from this page. [YOCTO #6590] (Bitbake rev: e690080f83ad53c5e4a31e8c0fba2cc744eea1eb) 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.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 1521717482..3c7f6611dc 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -737,6 +737,15 @@ class Layer_Version(models.Model):
737 dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir 737 dirpath = models.CharField(max_length=255, null = True, default = None) # LayerBranch.vcs_subdir
738 priority = models.IntegerField(default = 0) # if -1, this is a default layer 738 priority = models.IntegerField(default = 0) # if -1, this is a default layer
739 739
740 def get_vcs_link_url(self, file_path="/"):
741 if self.layer.vcs_web_file_base_url is None:
742 return None
743 return self.layer.vcs_web_file_base_url.replace('%path%', file_path).replace('%branch%', self.up_branch.name)
744
745 def get_vcs_link_url_dirpath(self):
746 return self.get_vcs_link_url(self.dirpath)
747
748
740 def __unicode__(self): 749 def __unicode__(self):
741 return "LV " + str(self.layer) + " " + self.commit 750 return "LV " + str(self.layer) + " " + self.commit
742 751