summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/customrecipe.html
blob: 2f3aee368667e551af6f59cd52b1392aa27fbbf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{% extends "base.html" %}
{% load projecttags %}
{% load humanize %}
{% load static %}
{% block pagecontent %}

<div class="section">
  <ul class="breadcrumb">
    <li>
      <a href="{% url 'project' project.id %}">{{project.name}}</a>
      <span class="divider">&rarr;</span>
    </li>
    <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a>
      <span class="divider">&rarr;</span>
    </li>
    <li class="active">
      {{recipe.name}} ({{recipe.layer_version.layer.name}})
    </li>
  </ul>
</div>

<script src="{% static 'js/customrecipe.js' %}"></script>
<script>
  $(document).ready(function (){
    var ctx = {
      recipe : {
        id: {{recipe.pk}},
        name: "{{recipe.name}}",
      }
    };

    try {
      customRecipePageInit(ctx);
    } catch (e) {
      document.write("Sorry, An error has occurred loading this page");
      console.warn(e);
    }
  });
</script>

<div class="row-fluid span11">
  <div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none">
    <button type="button" data-dismiss="alert" class="close">x</button>
    Your custom image <strong>{{recipe.name}}</strong> has been created. You can now add or remove packages as needed.
  </div>
  <div class="page-header air">
    <h1>
      {{recipe.name}}
      <small>({{recipe.layer_version.layer.name}})</small>
    </h1>
  </div>
</div>

<div class="row-fluid span11">
  <div class="span8">
    <div class="button-place btn-group" style="width: 100%">
      <a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%">
        Build {{recipe.name}}
      </a>
      <a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%">
        Download recipe file
      </a>
    </div>
    <div id="no-package-results" class="air" style="display:none;">
      <div class="alert">
        <h3>No packages found</h3>
        <p>You might consider <a href="all-software-recipes.html">searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p>
        <ol>
          <li>Add the layer providing the recipe to your project</li>
          <li>Build the recipe</li>
          <li>Once the build completes, come back to this page and search for the package</li>
        </ol>
        <form class="input-append no-results">
          <input type="text" class="input-xlarge" value="search query">
            <a href="#" class="add-on btn">
              <i class="icon-remove"></i>
            </a>
            <button class="btn">Search</button>
            <button class="btn btn-link" id="show-all">Show all packages</button>
          </form>
        </div>
      </div>
      <div id="packages-table">
        {% if recipe.package_set.count == 0 and last_build == None %}
        <h2> Add | Remove packages </h2>
        <div class="alert alert-info air">
          <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p>
          <button class="btn btn-info btn-large build-custom-recipe" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button>
        </div>
        {% else %}
        {# ToasterTable for Adding remove packages #}
        {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %}
        <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
        {% include "toastertable.html" %}
        {% endif %}
      </div>
    </div>
    <div class="span4 well">
      <h2 style="margin-bottom:20px;">About {{recipe.name}}</h2>

      <dl>
        <dt>
          Approx. packages included
          <i class="icon-question-sign get-help" title="" data-original-title="The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate"></i>
        </dt>
        <dd class="no-packages">{{recipe.package_set.all.count}}</dd>
        <dt>
          Approx. package size
          <i class="icon-question-sign get-help" title="" data-original-title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></i>
        </dt>
        <dd>{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
        {% if last_build %}
        <dt>Last build</dt>
        <dd>
          <i class="icon-ok-sign success"></i>
          <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
        </dd>
        {% endif %}
        <dt>Layer</dt>
        <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
        <dt>Based on</dt>
        <dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd>
        {% if last_build %}
        <dt>Last build</dt>
        <dd>
          <i class="icon-ok-sign success"></i>
          <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
        </dd>
        {% endif %}
        <dt>Recipe file</dt>
        <dd>
          <code>{{recipe.name}}_{{recipe.version}}.bb</code>
          <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
        </dd>
        <dt>Layer</dt>
        <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
        <dt>
          Summary
        </dt>
        <dd>
          {{recipe.summary}}
        </dd>
        <dt>
          Description
        </dt>
        <dd>
          {{recipe.description}}
        </dd>
        <dt>Version</dt>
        <dd>
          {{recipe.version}}
        </dd>
        <dt>Section</dt>
        <dd>
          {{recipe.section}}
        </dd>
        <dt>License</dt>
        <dd>
          {{recipe.license}}
          <i class="icon-question-sign get-help" title="" data-original-title="All custom images have their license set to MIT. This is because the license applies only to the recipe (.bb) file, and not to the image itself. To see which licenses apply to the image you must check the license manifest generated with each build"></i>
          </dd>
      </dl>
      <!--
      <i class="icon-trash no-tooltip"></i>
      <a href="#" class="error" id="delete">Delete custom image</a>
        -->
    </div>
  </div>

  {% endblock %}