Hi Ed, Thanks for the patch set - impressive work :). I would appreciate if, in the future, you could put all patches on a branch on poky-contrib and mail in the branch name in the subject, such as: [review-request] branch/name This would trigger the yocto automated tester which doesn't currently process individual patches. Thank you, Alex On Wed, May 6, 2015 at 10:03 PM, Ed Bartosh wrote: > Stripped topdir and its parent directory from paths to > config files in configvars view. > > [YOCTO #7463] > > Signed-off-by: Ed Bartosh > --- > bitbake/lib/toaster/toastergui/templates/configvars.html | 4 ++-- > bitbake/lib/toaster/toastergui/templatetags/projecttags.py | 9 +++++++++ > bitbake/lib/toaster/toastergui/views.py | 2 ++ > 3 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html > b/bitbake/lib/toaster/toastergui/templates/configvars.html > index 3e4c7e8..99ffe8b 100644 > --- a/bitbake/lib/toaster/toastergui/templates/configvars.html > +++ b/bitbake/lib/toaster/toastergui/templates/configvars.html > @@ -55,7 +55,7 @@ > href="#variable-{{variable.pk > }}">{{variable.variable_value|truncatechars:153}} > > {% if variable.vhistory.all %} {% autoescape off %} > - {{variable.vhistory.all | filter_setin_files:file_filter > | cut_layer_path_prefix:layer_names}} > + {{variable.vhistory.all | filter_setin_files:file_filter > | cut_layer_path_prefix:layer_names | cut_topdir_path_prefix:topdir}} > {% endautoescape %} {% endif %} > > > @@ -115,7 +115,7 @@ > > {% for vh in variable.vhistory.all %} > > - > {{forloop.counter}}{{vh.file_name|cut_layer_path_prefix:layer_names}}{{vh.operation}}{{vh.line_number}} > + > {{forloop.counter}}{{vh.file_name|cut_layer_path_prefix:layer_names|cut_topdir_path_prefix:topdir}}{{vh.operation}}{{vh.line_number}} > > {%endfor%} > > diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py > b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py > index 54700e3..f77e42e 100644 > --- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py > +++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py > @@ -20,6 +20,7 @@ > # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. > > from datetime import datetime, timedelta > +from os.path import relpath, dirname > import re > from django import template > from django.utils import timezone > @@ -326,3 +327,11 @@ def cut_layer_path_prefix(fullpath,layer_names): > parts = re.split(lname, fullpath, 1) > return lname + parts[1] > return fullpath > + > +@register.filter > +def cut_topdir_path_prefix(fullpath, topdir): > + """Cut topdir and its parent directory from the fullpath.""" > + for prefix in (topdir, dirname(topdir)): > + if fullpath.startswith(prefix): > + return relpath(fullpath, prefix) > + return fullpath > diff --git a/bitbake/lib/toaster/toastergui/views.py > b/bitbake/lib/toaster/toastergui/views.py > index 7849b50..d2cd367 100755 > --- a/bitbake/lib/toaster/toastergui/views.py > +++ b/bitbake/lib/toaster/toastergui/views.py > @@ -39,6 +39,7 @@ from datetime import timedelta, datetime, date > from django.utils import formats > from toastergui.templatetags.projecttags import json as jsonfilter > import json > +from os.path import dirname > > # all new sessions should come through the landing page; > # determine in which mode we are running in, and redirect appropriately > @@ -1326,6 +1327,7 @@ def configvars(request, build_id): > 'default_orderby' : 'variable_name:+', > 'search_term':search_term, > 'layer_names' : layer_names, > + 'topdir': dirname(build_dir), > # Specifies the display of columns for the table, appearance > in "Edit columns" box, toggling default show/hide, and specifying filters > for columns > 'tablecols' : [ > {'name': 'Variable', > -- > 2.1.4 > > -- > _______________________________________________ > toaster mailing list > toaster@yoctoproject.org > https://lists.yoctoproject.org/listinfo/toaster > -- Alex Damian Yocto Project SSG / OTC