From 164ab730ccb504b823f43b48de282de702ccf71b Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 11 Oct 2013 13:46:23 +0100 Subject: bitbake: toaster: add toaster code to bitbake This patch adds the Toaster component to Bitbake. Toaster is a module designed to record the progress of a Bitbake build, and data about the resultant artifacts. It contains a web-based interface and a REST API allowing post-facto inspection of the build process and artifacts. Features present in this build: * toaster start script * relational data model * Django boilerplate code * the REST API * the Simple UI web interface This patch has all the development history squashed together. Code portions contributed by Calin Dragomir . (Bitbake rev: d24334a5e83d09b3ab227af485971bb768bf5412) Signed-off-by: Alexandru DAMIAN Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- .../toaster/bldviewer/templatetags/projecttags.py | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 bitbake/lib/toaster/bldviewer/templatetags/projecttags.py (limited to 'bitbake/lib/toaster/bldviewer/templatetags/projecttags.py') diff --git a/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py b/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py new file mode 100644 index 0000000000..0c0d804c0c --- /dev/null +++ b/bitbake/lib/toaster/bldviewer/templatetags/projecttags.py @@ -0,0 +1,26 @@ +# +# BitBake Toaster Implementation +# +# Copyright (C) 2013 Intel Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +from datetime import datetime +from django import template + +register = template.Library() + +@register.simple_tag +def time_difference(start_time, end_time): + return end_time - start_time -- cgit v1.2.3-54-g00ecf