From: Michael Wood <michael.g.wood@intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 16/23] toasterui: fixes after html5 compliance testing
Date: Mon, 29 Jun 2015 15:22:12 +0100 [thread overview]
Message-ID: <55915494.9030206@intel.com> (raw)
In-Reply-To: <7aecb974d44d9bc711ffba5cc65e770811397fba.1435228176.git.alexandru.damian@intel.com>
On 25/06/15 11:33, Alex DAMIAN wrote:
> From: Alexandru DAMIAN <alexandru.damian@intel.com>
>
> This patch brings fixes for issues highlighted by
> HTML5 compliance testing.
>
> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
> ---
> lib/toaster/orm/models.py | 4 +++-
> lib/toaster/toastergui/static/js/base.js | 2 +-
> lib/toaster/toastergui/templates/configvars.html | 2 +-
> .../toastergui/templates/detail_search_header.html | 2 +-
> .../toastergui/templates/detail_sorted_header.html | 2 +-
> .../toastergui/templates/generic-toastertable-page.html | 2 ++
> lib/toaster/toastergui/templates/importlayer.html | 15 +++++++++++++--
> lib/toaster/toastergui/templates/target.html | 2 +-
> lib/toaster/toastergui/templates/toastertable-simple.html | 4 ++--
> lib/toaster/toastergui/templates/toastertable.html | 4 ++--
> lib/toaster/toastergui/views.py | 11 ++++++-----
> 11 files changed, 33 insertions(+), 17 deletions(-)
>
> diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py
> index 8488aa4..7e8ab16 100644
> --- a/lib/toaster/orm/models.py
> +++ b/lib/toaster/orm/models.py
> @@ -180,7 +180,9 @@ class Project(models.Model):
> if release == None:
> release = self.release
> # layers on the same branch or layers specifically set for this project
> - queryset = Layer_Version.objects.filter((Q(up_branch__name = release.branch_name) & Q(project = None)) | Q(project = self) | Q(build__project = self))
> + queryset = Layer_Version.objects.filter(Q(project = self) | Q(build__project = self))
> + if release is not None:
> + queryset = queryset.filter(Q(up_branch__name = release.branch_name) & Q(project = None))
> if layer_name is not None:
> # we select only a layer name
> queryset = queryset.filter(layer__name = layer_name)
> diff --git a/lib/toaster/toastergui/static/js/base.js b/lib/toaster/toastergui/static/js/base.js
> index d079f23..f1711c1 100644
> --- a/lib/toaster/toastergui/static/js/base.js
> +++ b/lib/toaster/toastergui/static/js/base.js
> @@ -39,7 +39,7 @@ function basePageInit(ctx) {
>
> libtoaster.getProjectInfo(selectedProject.projectPageUrl,
> function (data) {
> - if (data.machine.name === undefined || data.layers.length === 0) {
> + if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) {
> /* we can't build anything with out a machine and some layers */
> $("#new-build-button #targets-form").hide();
> $("#new-build-button .alert").show();
> diff --git a/lib/toaster/toastergui/templates/configvars.html b/lib/toaster/toastergui/templates/configvars.html
> index 8957673..8a572ae 100644
> --- a/lib/toaster/toastergui/templates/configvars.html
> +++ b/lib/toaster/toastergui/templates/configvars.html
> @@ -39,7 +39,7 @@
> <div class="row-fluid">
> <div class="alert">
> <form class="no-results input-append" id="searchform">
> - <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
> + <input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
> <button class="btn" type="submit" value="Search">Search</button>
> <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
> </form>
> diff --git a/lib/toaster/toastergui/templates/detail_search_header.html b/lib/toaster/toastergui/templates/detail_search_header.html
> index ca8e158..7bea3f4 100644
> --- a/lib/toaster/toastergui/templates/detail_search_header.html
> +++ b/lib/toaster/toastergui/templates/detail_search_header.html
> @@ -28,7 +28,7 @@ $(document).ready(function() {
> <form id="searchform" class="navbar-search input-append pull-left">
> {% endif %}
>
> - <input id="search" class="input-xlarge" type="text" placeholder="Search {{search_what}}" name="search" value="{{request.GET.search}}">
> + <input id="search" class="input-xlarge" type="text" placeholder="Search {{search_what}}" name="search" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}">
> <input type="hidden" value="name:+" name="orderby">
> <input type="hidden" value="l" name="page">
> {% if request.GET.search %}
> diff --git a/lib/toaster/toastergui/templates/detail_sorted_header.html b/lib/toaster/toastergui/templates/detail_sorted_header.html
> index 5214444..6ce292e 100644
> --- a/lib/toaster/toastergui/templates/detail_sorted_header.html
> +++ b/lib/toaster/toastergui/templates/detail_sorted_header.html
> @@ -9,7 +9,7 @@
> <thead>
> <!-- Table header row; generated from "tablecols" entry in the context dict -->
> <tr>
> - {% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
> + {% for tc in tablecols %}<th class="{%if tc.dclass%}{{tc.dclass}}{% endif %} {%if tc.class %}{{tc.clclass}}{% endif %}">
> {%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
> {%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
> {%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}
> diff --git a/lib/toaster/toastergui/templates/generic-toastertable-page.html b/lib/toaster/toastergui/templates/generic-toastertable-page.html
> index d7ad2e7..78e942c 100644
> --- a/lib/toaster/toastergui/templates/generic-toastertable-page.html
> +++ b/lib/toaster/toastergui/templates/generic-toastertable-page.html
> @@ -11,7 +11,9 @@
> {% block projectinfomain %}
> <div class="page-header">
> <h1>{{title}} (<span class="table-count-{{table_name}}"></span>)
> + {% if project.release %}
> <i class="icon-question-sign get-help heading-help" title="This page lists {{title}} compatible with the release selected for this project, which is {{project.release.description}}"></i>
> + {% endif %}
> </h1>
> </div>
> <div id="zone1alerts" style="display:none">
> diff --git a/lib/toaster/toastergui/templates/importlayer.html b/lib/toaster/toastergui/templates/importlayer.html
> index 498a204..6a5d412d 100644
> --- a/lib/toaster/toastergui/templates/importlayer.html
> +++ b/lib/toaster/toastergui/templates/importlayer.html
> @@ -9,6 +9,7 @@
>
> {% block projectinfomain %}
>
> + {% if project and project.release %}
> <script src="{% static 'js/layerDepsModal.js' %}"></script>
> <script src="{% static 'js/importlayer.js' %}"></script>
> <script>
> @@ -31,9 +32,7 @@
> </div>
>
> <form>
> - {% if project %}
> <span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span>
> - {% endif %}
> <fieldset class="air">
> <legend>Layer repository information</legend>
> <div class="alert alert-error" id="import-error" style="display:none">
> @@ -131,4 +130,16 @@
> </div>
> </form>
>
> + {% else %} {#project and project release#}
> + <div class="page-header">
> + <h1>Import layer</h1>
> + </div>
> + <div class="alert alert-info" id="import-error" >
> + <h3>Unsupported project type</h3>
> + <p>This project does not support importing layers.</p>
> + <ul></ul>
> + </div>
> +
> + {% endif %}
> +
> {% endblock %}
> diff --git a/lib/toaster/toastergui/templates/target.html b/lib/toaster/toastergui/templates/target.html
> index fa59f4e..65e6c4a 100644
> --- a/lib/toaster/toastergui/templates/target.html
> +++ b/lib/toaster/toastergui/templates/target.html
> @@ -53,7 +53,7 @@
> <div class="row-fluid">
> <div class="alert">
> <form class="no-results input-append" id="searchform">
> - <input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
> + <input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
> <button class="btn" type="submit" value="Search">Search</button>
> <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button>
> </form>
> diff --git a/lib/toaster/toastergui/templates/toastertable-simple.html b/lib/toaster/toastergui/templates/toastertable-simple.html
> index ea7b38e..212318b 100644
> --- a/lib/toaster/toastergui/templates/toastertable-simple.html
> +++ b/lib/toaster/toastergui/templates/toastertable-simple.html
> @@ -29,7 +29,7 @@
> <div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
> <div class="alert">
> <form class="no-results input-append">
> - <input class="input-xlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
> + <input class="input-xlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
> <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
> <i class="icon-remove"></i>
> </a>
> @@ -44,7 +44,7 @@
> <div class="row-fluid" id="table-chrome-{{table_name}}">
> <div class="navbar-search input-append pull-left">
>
> - <input class="input-xlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
> + <input class="input-xlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
> <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
> <i class="icon-remove"></i>
> </a>
> diff --git a/lib/toaster/toastergui/templates/toastertable.html b/lib/toaster/toastergui/templates/toastertable.html
> index c7c7a84..0473116 100644
> --- a/lib/toaster/toastergui/templates/toastertable.html
> +++ b/lib/toaster/toastergui/templates/toastertable.html
> @@ -29,7 +29,7 @@
> <div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
> <div class="alert">
> <form class="no-results input-append">
> - <input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
> + <input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search %}{{request.GET.search}}{%endif%}"/>
> <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
> <i class="icon-remove"></i>
> </a>
> @@ -46,7 +46,7 @@
> <div class="navbar-inner">
> <div class="navbar-search input-append pull-left">
>
> - <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
> + <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
> <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
> <i class="icon-remove"></i>
> </a>
> diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
> index ec65903..82650d0 100755
> --- a/lib/toaster/toastergui/views.py
> +++ b/lib/toaster/toastergui/views.py
> @@ -165,8 +165,8 @@ def _lv_to_dict(prj, x = None):
>
> return {"id": x.pk,
> "name": x.layer.name,
> - "tooltip": x.layer.vcs_url+" | "+x.get_vcs_reference(),
> - "detail": "(" + x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"),
> + "tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()),
> + "detail": "(%s" % x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"),
> "giturl": x.layer.vcs_url,
> "layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)),
> "revision" : x.get_vcs_reference(),
> @@ -559,10 +559,10 @@ def task( request, build_id, task_id ):
> uri_list= [ ]
> variables = Variable.objects.filter(build=build_id)
> v=variables.filter(variable_name='SSTATE_DIR')
> - if v.count > 0:
> + if v.count() > 0:
> uri_list.append(v[0].variable_value)
> v=variables.filter(variable_name='SSTATE_MIRRORS')
> - if (v.count > 0):
> + if (v.count() > 0):
> for mirror in v[0].variable_value.split('\\n'):
> s=re.sub('.* ','',mirror.strip(' \t\n\r'))
> if len(s): uri_list.append(s)
> @@ -2124,9 +2124,10 @@ if True:
> login(request, user)
>
> # save the project
> - release = Release.objects.get(pk = request.POST.get('projectversion', None ))
> if ptype == "analysis":
> release = None
> + else:
> + release = Release.objects.get(pk = request.POST.get('projectversion', None ))
>
> prj = Project.objects.create_project(name = request.POST['projectname'], release = release)
> prj.user_id = request.user.pk
Note: This patch as far as I can see wasn't submitted for review on the
Toaster mailing list. It currently breaks Toaster.
As this touches things which should not have been in this patch; js,
template changes, views and orm/models.py we can't revert it as it will
break other things. I will try to roll a patch which reverts part of
this patch.
next prev parent reply other threads:[~2015-06-29 14:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 10:33 [PATCH 00/23] toaster patchset Alex DAMIAN
2015-06-25 10:33 ` [PATCH 01/23] toastergui: fix angular error Alex DAMIAN
2015-06-25 10:33 ` [PATCH 02/23] toaster: improve the buildenvironment API Alex DAMIAN
2015-06-25 10:33 ` [PATCH 03/23] toastergui: enable strict variable checking Alex DAMIAN
2015-06-25 10:33 ` [PATCH 04/23] toaster: fixing undefined variables Alex DAMIAN
2015-06-25 10:33 ` [PATCH 05/23] toaster: remove MANAGED references Alex DAMIAN
2015-06-25 10:33 ` [PATCH 06/23] toaster: remove BuildRequest references Alex DAMIAN
2015-06-25 10:33 ` [PATCH 07/23] toaster: refactor the builds pages Alex DAMIAN
2015-06-25 10:33 ` [PATCH 08/23] toaster: fill in build data from buildrequest Alex DAMIAN
2015-06-25 10:33 ` [PATCH 09/23] toaster: fixes after replacing BuildRequest with Build Alex DAMIAN
2015-06-25 10:33 ` [PATCH 10/23] toaster: add django-aggregate-if Alex DAMIAN
2015-06-25 10:33 ` [PATCH 11/23] toaster: bring django-aggregate-if into the project Alex DAMIAN
2015-06-25 10:33 ` [PATCH 12/23] toaster: refactor build model Alex DAMIAN
2015-06-25 10:33 ` [PATCH 13/23] toastergui: select project types Alex DAMIAN
2015-06-25 10:33 ` [PATCH 14/23] toaster: delete multiple builds Alex DAMIAN
2015-06-25 10:33 ` [PATCH 15/23] toasterui: verify variable before usage Alex DAMIAN
2015-06-25 10:33 ` [PATCH 16/23] toasterui: fixes after html5 compliance testing Alex DAMIAN
2015-06-29 14:22 ` Michael Wood [this message]
2015-06-25 10:33 ` [PATCH 17/23] toaster: Enable toastertable cache Alex DAMIAN
2015-06-25 10:33 ` [PATCH 18/23] toaster: toastertable Pass up the kwargs for setup_filter Alex DAMIAN
2015-06-25 10:33 ` [PATCH 19/23] toaster: table.js fix filter visual indicator and interaction Alex DAMIAN
2015-06-25 10:33 ` [PATCH 20/23] toaster: Restore 'in project' filters to main tables Alex DAMIAN
2015-06-25 10:33 ` [PATCH 21/23] toaster: bldcontrol Ignore toasterconf files in own directories Alex DAMIAN
2015-06-25 10:33 ` [PATCH 22/23] toaster: split orm app into it's own module and app Alex DAMIAN
2015-06-25 10:34 ` [PATCH 23/23] toaster: Add url pattern for backward compatibility Alex DAMIAN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55915494.9030206@intel.com \
--to=michael.g.wood@intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.