From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: yocto@yoctoproject.org
Cc: belen.barros.pena@linux.intel.com
Subject: [[PATCH][error-report-web] 7/8] views/templates: Add support for display different type of errors
Date: Mon, 13 Jun 2016 18:32:15 -0500 [thread overview]
Message-ID: <1465860736-26581-8-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1465860736-26581-1-git-send-email-anibal.limon@linux.intel.com>
Now we have a set of different type of errors not only Recipe ones
this change enable support for display it based on design did by
Belen Barros [1].
[YOCTO #7583]
[1] https://bugzilla.yoctoproject.org/attachment.cgi?id=3214
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
Post/views.py | 16 +++++-----------
templates/error-details.html | 13 ++++++++++++-
templates/latest-errors.html | 19 +++++++++++--------
3 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/Post/views.py b/Post/views.py
index 0455baa..6b57977 100644
--- a/Post/views.py
+++ b/Post/views.py
@@ -134,18 +134,13 @@ def search(request, mode=results_mode.LATEST, **kwargs):
'field' : 'BUILD__DATE',
'disable_toggle' : True,
},
- {'name': 'Recipe',
- 'clclass' : 'recipe',
- 'field' : 'RECIPE',
+ {'name': 'Error type',
+ 'clclass' : 'error_type',
+ 'field' : 'BUILD__ERROR_TYPE',
'disable_toggle' : True,
},
- {'name': 'Recipe version',
- 'clclass': 'recipe_version',
- 'field' : 'RECIPE_VERSION',
- },
- {'name': 'Task',
- 'clclass': 'task',
- 'field' : 'TASK',
+ {'name': 'Failure',
+ 'clclass': 'failure',
'disable_toggle' : True,
},
{'name': 'Machine',
@@ -156,7 +151,6 @@ def search(request, mode=results_mode.LATEST, **kwargs):
{'name': 'Distro',
'clclass': 'distro',
'field': 'BUILD__DISTRO',
- 'disable_toggle' : True,
},
{'name': 'Build system',
'clclass': 'build_sys',
diff --git a/templates/error-details.html b/templates/error-details.html
index 62ec75f..e5bf758 100644
--- a/templates/error-details.html
+++ b/templates/error-details.html
@@ -9,7 +9,11 @@
<a class="btn pull-left back-btn" style="margin-top:7px;" href="#">
<i class="icon-arrow-left"></i>
</a>
- <h1 style="margin-left:60px;">{{detail.RECIPE}}-{{detail.RECIPE_VERSION}} {{detail.TASK}} </h1>
+ <h1 style="margin-left:60px;">
+ {% if detail.BUILD.ERROR_TYPE == "Recipe" %}
+ {{detail.RECIPE}}-{{detail.RECIPE_VERSION}}
+ {% endif %}
+ {{detail.TASK}} </h1>
</div>
<div class="row span8">
<pre>{{detail.ERROR_DETAILS}}</pre>
@@ -20,12 +24,19 @@
<dl class="dl-vertical">
<dt>Submitted on:</dt>
<dd>{{ detail.BUILD.DATE|date:"d/m/y H:i"}}</dd>
+ <dt>Error type:</dt>
+ <dd>{{ detail.BUILD.ERROR_TYPE }}</dd>
+ {% if detail.BUILD.ERROR_TYPE == "Recipe" %}
<dt>Task:</dt>
<dd>{{ detail.TASK }}</dd>
<dt>Recipe:</dt>
<dd>{{detail.RECIPE }} </dd>
<dt>Recipe version:</dt>
<dd>{{ detail.RECIPE_VERSION }}</dd>
+ {% else %}
+ <dt>Command:</dt>
+ <dd>{{ detail.TASK }}</dd>
+ {% endif %}
<dt>Machine:</dt>
<dd>{{ detail.BUILD.MACHINE }}</dd>
<dt>Distro:</dt>
diff --git a/templates/latest-errors.html b/templates/latest-errors.html
index 56f612a..77a54af 100644
--- a/templates/latest-errors.html
+++ b/templates/latest-errors.html
@@ -127,18 +127,21 @@
{% url "details" build_fail.id as details_url %}
<tr class="data">
<td class="submitted_on"> <a href="{{details_url}}">{{ build_fail.BUILD.DATE|date:"d/m/y H:i"}}</a></td>
- <td class="recipe"><a href="{{details_url}}">{{ build_fail.RECIPE }}</a>
- <a class="filter" href="#" data-filter="{{build_fail.RECIPE}}" data-type="recipe">
- <i class="icon-filter hover" title="Filter by {{build_fail.RECIPE}}"></i>
+
+ <td class="error_type"><a href="{{details_url}}">{{ build_fail.BUILD.ERROR_TYPE }}</a>
+ <a class="filter" href="#" data-filter="{{build_fail.BUILD.ERROR_TYPE}}" data-type="error_type">
+ <i class="icon-filter hover" title="Filter by {{build_fail.BUILD.ERROR_TYPE}}"></i>
</a>
</td>
- <td class="recipe_version"><a href="{{details_url}}" {% if build_fail.RECIPE_VERSION|length > 13 %}class="tooltip-me" data-toggle="tooltip" title="{{ build_fail.RECIPE_VERSION }}"{%endif%}>{{ build_fail.RECIPE_VERSION|truncatechars:13 }}</a></td>
- <td class="task"><a href="{{details_url}}">{{ build_fail.TASK }}</a>
- <a class="filter" href="#" data-filter="{{build_fail.TASK}}" data-type="task">
- <i class="icon-filter hover" title="Filter by {{build_fail.TASK}}"></i>
- </a>
+ <td class="failure">
+ <a href="{{details_url}}">
+ {% if build_fail.BUILD.ERROR_TYPE == "Recipe" %}
+ {{ build_fail.RECIPE }}:
+ {% endif %}
+ {{ build_fail.TASK }}</a>
</td>
+
<td class="machine"><a href="{{details_url}}">{{ build_fail.BUILD.MACHINE }}</a>
<a class="filter" href="#" data-filter="{{build_fail.BUILD.MACHINE}}" data-type="machine">
<i class="icon-filter hover" title="Filter by {{build_fail.BUILD.MACHINE}}"></i>
--
2.1.4
next prev parent reply other threads:[~2016-06-13 23:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 23:32 [[PATCH][error-report-web] 0/8] Allow other type of errors and django 1.8 Aníbal Limón
2016-06-13 23:32 ` [[PATCH][error-report-web] 1/8] requirements.txt: Update requeriments for use 1.8 LTS Django version Aníbal Limón
2016-06-13 23:32 ` [[PATCH][error-report-web] 2/8] urls.py: RedirectView, fix warnings about change of default value in django 1.9 Aníbal Limón
2016-06-13 23:32 ` [[PATCH][error-report-web] 3/8] Post/models.py: Increase the TASK field length Aníbal Limón
2016-06-13 23:32 ` [[PATCH][error-report-web] 4/8] Post/migrations/0003_auto_20150603_0913.py: Replace tabs for spaces Aníbal Limón
2016-06-13 23:32 ` [[PATCH][error-report-web] 5/8] Post/models.py: Build model add support for Error type Aníbal Limón
2016-06-14 13:30 ` Michael Wood
2016-06-14 16:44 ` Aníbal Limón
2016-06-14 19:23 ` Aníbal Limón
2016-06-13 23:32 ` [[PATCH][error-report-web] 6/8] Post/{models, parser}.py: Add support for receive/store error_type Aníbal Limón
2016-06-13 23:32 ` Aníbal Limón [this message]
2016-06-13 23:32 ` [[PATCH][error-report-web] 8/8] Post/{models, views}.py: Add FAILURE field on BuildFailure model Aníbal Limón
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=1465860736-26581-8-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=belen.barros.pena@linux.intel.com \
--cc=yocto@yoctoproject.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.