aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-07-28 18:40:07 +0100
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-05 00:31:22 +0100
commitc3a8eb4d825e6a2f2acfeb0ee9e0ae8b1fa532f7 (patch)
tree7df61f818228017c9a43a66f5d547151994a86a4 /templates
parente8d734a3773f7cf6b21510fa86d53782e321d0a7 (diff)
downloadopenembedded-core-contrib-c3a8eb4d825e6a2f2acfeb0ee9e0ae8b1fa532f7.tar.gz
Add support for importing OE-Classic recipes
Add a script for doing a one-time import of OE-Classic recipe information, so comparisons against OE-Core can be performed; this is stored using a new ClassicRecipe model supporting additional fields for tracking migration status. The migration status fields can be updated as well as viewed and summarised in graph format. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html3
-rw-r--r--templates/layerindex/about.html2
-rw-r--r--templates/layerindex/classic_base.html61
-rw-r--r--templates/layerindex/classicrecipedetail.html165
-rw-r--r--templates/layerindex/classicrecipes.html115
-rw-r--r--templates/layerindex/classicstats.html56
6 files changed, 402 insertions, 0 deletions
diff --git a/templates/base.html b/templates/base.html
index 2d54e2df79..525327c2aa 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -48,6 +48,9 @@
{% if branch.name = current_branch %}</b>{% endif %}
</a></li>
{% endfor %}
+ {% if oe_classic %}
+ <li><a href="{% url classic %}">OE-Classic</a></li>
+ {% endif %}
</ul>
</li>
{% endblock %}
diff --git a/templates/layerindex/about.html b/templates/layerindex/about.html
index 5d9b2d2ec1..aed689d387 100644
--- a/templates/layerindex/about.html
+++ b/templates/layerindex/about.html
@@ -24,11 +24,13 @@
<li><a href="http://github.com/etianen/django-reversion">django-reversion</a></li>
<li><a href="http://pypi.python.org/pypi/django-reversion-compare/">django-reversion-compare</a></li>
<li><a href="http://github.com/mbi/django-simple-captcha">django-simple-captcha</a></li>
+ <li><a href="http://github.com/areski/django-nvd3">django-nvd3</a></li>
</ul>
</li>
<li><a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a></li>
<li><a href="http://glyphicons.com/">Glyphicons</a> (via Bootstrap)</li>
<li><a href="http://jquery.com/">jQuery</a> (via Bootstrap)</li>
+<li><a href="http://nvd3.org/">NVD3</a></li>
<li><a href="http://www.openembedded.org/wiki/BitBake_%28user%29">BitBake</a></li>
</ul>
diff --git a/templates/layerindex/classic_base.html b/templates/layerindex/classic_base.html
new file mode 100644
index 0000000000..eab56f2645
--- /dev/null
+++ b/templates/layerindex/classic_base.html
@@ -0,0 +1,61 @@
+{% extends "base_toplevel.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - OE-Classic index page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title_append %} - OE-Classic{% endblock %}
+-->
+
+{% block branch_selector %}
+{% autoescape on %}
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ Branch: <b>OE-Classic</b>
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ {% for branch in all_branches %}
+ <li><a href="{% url layer_list branch.name %}">
+ {{ branch.name }}
+ {% if branch.short_description %}
+ ({{ branch.short_description }})
+ {% endif %}
+ </a></li>
+ {% endfor %}
+ <li class="divider"></li>
+ <li><a href="{% url classic %}"><b>OE-Classic</b></a></li>
+ </ul>
+ </li>
+{% endautoescape %}
+{% endblock %}
+
+{% block content_inner %}
+{% autoescape on %}
+
+ <div class="container-fluid">
+ <div class="row-fluid">
+
+ <h2>OE-Classic</h2>
+
+ <p>OpenEmbedded-Classic (OE-Classic) is the name for the old monolithic version of OpenEmbedded. It contained a number of recipes some of which have not yet been migrated on top of OE-Core. To help people to find and migrate these recipes we provide an index here as well as some statistics to get an idea of the migration.</p>
+
+ <a class="btn btn-large btn-primary" href="{% url classic_recipe_search %}">Recipes</a>
+ <a class="btn btn-large" href="{% url classic_recipe_search %}?q=&cover_status=!">Unmigrated Recipes</a>
+ <a class="btn btn-large btn-primary" href="{% url classic_recipe_stats %}">Stats</a>
+ </div>
+
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
+
diff --git a/templates/layerindex/classicrecipedetail.html b/templates/layerindex/classicrecipedetail.html
new file mode 100644
index 0000000000..f37db37c8d
--- /dev/null
+++ b/templates/layerindex/classicrecipedetail.html
@@ -0,0 +1,165 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - recipe detail page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% autoescape on %}
+{% block title_append %} - OE-Classic - {{ recipe.pn }}{% endblock %}
+{% endautoescape %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+ <ul class="breadcrumb">
+ <li><a href="{% url classic_recipe_search %}">OE-Classic</a> <span class="divider">&rarr;</span></li>
+ <li class="active">{{ recipe.name }}</li>
+ </ul>
+
+ <div class="container-fluid">
+
+ <div class="row-fluid">
+
+ <div class="page-header">
+ <h1>{{ recipe.name }} {{ recipe.pv }}</h1>
+ </div>
+
+ <div class="alert alert-warning">
+ <b>NOTE:</b> This recipe is for OE-Classic, the older monolithic version of OpenEmbedded which is no longer actively developed. See below for migration information. If no replacement is available in current OpenEmbedded layers, you may be able to <a href="http://www.openembedded.org/wiki/Migrating_metadata_to_OE-Core">migrate the recipe</a> yourself.
+ </div>
+
+ <table class="table table-striped table-bordered">
+ <tbody>
+ <tr>
+ <th>Name</th>
+ <td>{{ recipe.name }}</td>
+ </tr>
+ <tr>
+ <th>Version</th>
+ <td>{{ recipe.pv }}</td>
+ </tr>
+ <tr>
+ <th>Summary</th>
+ <td>{{ recipe.summary }}</td>
+ </tr>
+ <tr>
+ <th>Description</th>
+ <td>{{ recipe.description }}</td>
+ </tr>
+ <tr>
+ <th>Section</th>
+ <td>{{ recipe.section }}</td>
+ </tr>
+ <tr>
+ <th>License</th>
+ <td>{{ recipe.license }}*</td>
+ </tr>
+ <tr>
+ <th>Homepage</th>
+ <td>{% if recipe.homepage %}<a href="{{ recipe.homepage }}">{{ recipe.homepage }}</a>{% endif %}</td>
+ </tr>
+ {% if recipe.bugtracker %}
+ <tr>
+ <th>Bug tracker</th>
+ <td><a href="{{ recipe.bugtracker }}">{{ recipe.bugtracker }}</a></td>
+ </tr>
+ {% endif %}
+ <tr>
+ <th>Recipe file</th>
+ <td>
+ {% if recipe.vcs_web_url %}
+ <a href="{{ recipe.vcs_web_url }}">{{ recipe.full_path }}</a>
+ {% else %}
+ {{ recipe.full_path }}
+ {% endif %}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>* - in OE-Classic, some of the license values were not accurate. Please refer to current recipes (if available) for this information.</p>
+
+ <h2>Migration information</h2>
+
+ {% if can_edit %}
+ <form id="migration_form" class="form-inline" method="post">
+ {% csrf_token %}
+ {% for hidden in form.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+
+ Coverage {{ form.cover_status }} <span id="id_span_cover_opts">by {{ form.cover_pn }} in {{ form.cover_layerbranch }}</span>
+ <label class="checkbox" id="id_label_cover_verified">
+ {{ form.cover_verified }} verified
+ </label>
+ <p>
+ <label>
+ Comment
+ {{ form.cover_comment }}
+ </label>
+ </p>
+ <p>
+ <label>
+ Category
+ {{ form.classic_category }}
+ </p>
+ </label>
+ <input type="submit" value="Save" class='btn' />
+ </form>
+ {% else %}
+ <table class="table table-striped table-bordered">
+ <tbody>
+ <tr>
+ <th class="span2">Coverage</th>
+ <td>{{ recipe.get_cover_desc }}</td>
+ </tr>
+ <tr>
+ <th>Categories</th>
+ <td>{{ recipe.classic_category }}</td>
+ </tr>
+ </tbody>
+ </table>
+ {% endif %}
+
+ </div>
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
+
+{% block scripts %}
+<script>
+ enable_value_field = function() {
+ cover_status = $('#id_cover_status').val()
+ if( cover_status == 'U' || cover_status == 'N' ) {
+ $('#id_cover_pn').prop('disabled', true);
+ $('#id_cover_layerbranch').prop('disabled', true);
+ $('#id_cover_verified').prop('disabled', true);
+ $('#id_label_cover_verified').addClass('muted');
+ $('#id_span_cover_opts').addClass('muted');
+ }
+ else {
+ $('#id_cover_pn').prop('disabled', false);
+ $('#id_cover_layerbranch').prop('disabled', false);
+ $('#id_cover_verified').prop('disabled', false);
+ $('#id_label_cover_verified').removeClass('muted');
+ $('#id_span_cover_opts').removeClass('muted');
+ }
+ }
+
+ $(document).ready(function() {
+ $('#id_cover_status').change(enable_value_field)
+ enable_value_field()
+ });
+</script>
+{% endblock %}
diff --git a/templates/layerindex/classicrecipes.html b/templates/layerindex/classicrecipes.html
new file mode 100644
index 0000000000..7fb62be6cf
--- /dev/null
+++ b/templates/layerindex/classicrecipes.html
@@ -0,0 +1,115 @@
+{% extends "layerindex/classic_base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - OE-Classic recipe search page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title_append %} - OE-Classic recipes{% endblock %}
+-->
+
+{% block navs %}
+{% autoescape on %}
+ <li class="active"><a href="{% url classic_recipe_search %}">Recipes</a></li>
+ <li><a href="{% url classic_recipe_stats %}">Stats</a></li>
+{% endautoescape %}
+{% endblock %}
+
+{% block content_inner %}
+{% autoescape on %}
+
+ <div class="row-fluid">
+
+ <div class="span12">
+ <h2>OE-Classic recipes</h2>
+
+ <div class="alert alert-warning">
+ <b>NOTE:</b> This is the recipe search for OE-Classic, the older monolithic version of OpenEmbedded which is no longer actively developed. <a href="{% url recipe_search 'master' %}">Click here</a> to search current recipes.
+ </div>
+
+ <div class="row-fluid">
+ <form id="search-form" class="form-inline" method="GET">
+ <table class="search-form-table">
+ <tbody>
+ {% for field in search_form.visible_fields %}
+ <tr>
+ <td>
+ {{ field.label }}
+ </td>
+ <td>
+ {{ field }}
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ <button class="btn" type="submit">Search</button>
+ </form>
+ </div>
+
+{% if recipe_list %}
+ <table class="table table-striped table-bordered recipestable">
+ <thead>
+ <tr>
+ <th>Recipe name</th>
+ <th>Version</th>
+ <th class="span7">Description</th>
+ <th class="span5">Status</th>
+ <th>Categories</th>
+ {% if multi_classic_layers %}
+ <th>Layer</th>
+ {% endif %}
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for recipe in recipe_list %}
+ <tr {% if recipe.preferred_count > 0 %}class="muted"{% endif %}>
+ <td><a href="{% url classic_recipe recipe.id %}">{{ recipe.name }}</a></td>
+ <td>{{ recipe.pv }}</td>
+ <td>{{ recipe.short_desc }}</td>
+ <td>{{ recipe.get_cover_desc }}</td>
+ <td>{{ recipe.classic_category }}</td>
+ {% if multi_classic_layers %}
+ <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ {% if is_paginated %}
+ {% load pagination %}
+ {% pagination page_obj %}
+ {% endif %}
+{% else %}
+ {% if searched %}
+ <p>No matching OE-Classic recipes in database.</p>
+ {% endif %}
+{% endif %}
+
+ </div>
+
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
+
+
+{% block scripts %}
+<script>
+ $(document).ready(function() {
+ firstfield = $("#search-form input:text").first()
+ if( ! firstfield.val() )
+ firstfield.focus()
+ });
+</script>
+{% endblock %}
diff --git a/templates/layerindex/classicstats.html b/templates/layerindex/classicstats.html
new file mode 100644
index 0000000000..62d3409332
--- /dev/null
+++ b/templates/layerindex/classicstats.html
@@ -0,0 +1,56 @@
+{% extends "layerindex/classic_base.html" %}
+{% load i18n %}
+{% load nvd3_tags %}
+{% load staticfiles %}
+
+{% comment %}
+
+ layerindex-web - OE-Classic recipe migration stats template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title_append %} - OE-Classic recipe statistics{% endblock %}
+-->
+
+{% block navs %}
+{% autoescape on %}
+ <li><a href="{% url classic_recipe_search %}">Recipes</a></li>
+ <li class="active"><a href="{% url classic_recipe_stats %}">Stats</a></li>
+{% endautoescape %}
+{% endblock %}
+
+
+
+{% block content_inner %}
+{% autoescape on %}
+
+ <div class="row-fluid">
+
+ <h2>OE-Classic statistics</h2>
+
+ <h3>Migration status</h3>
+ {% include_container "chart_status" 400 600 %}
+
+ <h3>Unmigrated recipes by category</h3>
+ {% include_container "chart_category" 400 600 %}
+
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
+
+{% block scripts %}
+
+ <link media="all" href="{% static "css/nv.d3.css" %}" type="text/css" rel="stylesheet" />
+ <script src="{% static "js/d3.v2.js" %}" type="text/javascript"></script>
+ <script src="{% static "js/nv.d3.js" %}" type="text/javascript"></script>
+
+{% load_chart charttype_status chartdata_status "chart_status" %}
+{% load_chart charttype_category chartdata_category "chart_category" %}
+{% endblock %}