blob: 66c1f7bcd028187a5b150ba5141b7499c69f580a [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001{% extends "base.html" %}
2{% load projecttags %}
3{% load humanize %}
4{% load static %}
5{% block pagecontent %}
6
Patrick Williamsc0f7c042017-02-23 20:41:17 -06007<ul class="breadcrumb">
8 <li>
9 <a href="{% url 'project' project.id %}">{{project.name}}</a>
10 <span class="divider">&rarr;</span>
11 </li>
12 <li>
13 {% if recipe.is_image %}
14 <a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a>
15 {% else %}
16 <a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a>
17 {% endif %}
18 <span class="divider">&rarr;</span>
19 </li>
20 <li class="active">
21 {{recipe.name}} ({{recipe.layer_version.layer.name}})
22 </li>
23</ul>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050024
25<script src="{% static 'js/recipedetails.js' %}"></script>
26<script>
27 $(document).ready(function (){
28 var ctx = {
29 recipe : {
30 id: {{recipe.pk}},
31 name: "{{recipe.name}}",
32 totalPackages: {{packages.count}},
33 layer_version : {
34 id: {{recipe.layer_version.pk}},
35 name: "{{recipe.layer_version.layer.name}}",
36 layerdetailurl: "{% url 'layerdetails' project.pk recipe.layer_version.pk %}"
37 }
38 }
39 };
40
41 try {
42 recipeDetailsPageInit(ctx);
43 } catch (e) {
44 document.write("Sorry, An error has occurred loading this page");
45 console.warn(e);
46 }
47 });
48</script>
49
50{% include 'newcustomimage_modal.html' %}
51
Patrick Williamsc0f7c042017-02-23 20:41:17 -060052<div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none">
53 <button type="button" data-dismiss="alert" class="close">x</button>
54 Your custom image <strong>{{recipe.name}}</strong> has been created. You can now add or remove packages as needed.
55</div>
56<div class="page-header">
57 <h1>
58 {{recipe.name}}
59 <small>({{recipe.layer_version.layer.name}})</small>
60 </h1>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050061</div>
62
Patrick Williamsc0f7c042017-02-23 20:41:17 -060063<div class="row">
64 <div class="col-md-8">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065 <div class="button-place btn-group" id="customise-build-btns"
66 style="width: 100%;
67 {% if not in_project %}
68 display:none;
69 {% endif %}">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060070 <button class="btn btn-default btn-lg build-recipe-btn" style="width: 50%">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050071 Build {{recipe.name}}
72 </button>
73 {% if recipe.is_image %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060074 <button class="btn btn-default btn-lg customise-btn" data-recipe="{{recipe.pk}}" style="width: 50%">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050075 Customise {{recipe.name}}
76 </button>
77 {% endif %}
78 </div>
79 <div class="button-place">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060080 <button class="btn btn-default btn-block btn-lg" id="add-layer-btn"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050081 style="width:100%;
82 {% if in_project %}
83 display:none;
84 {% endif %}">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060085 <i class="glyphicon glyphicon-plus"></i>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050086 Add the {{recipe.layer_version.layer.name}} layer to your project to build or customise this image recipe
87 </button>
88 </div>
89
90 <div id="packages-table">
91 {% if packages.count %}
92 {% url 'recipepackages' project.id recipe.id as xhr_table_url %}
93 <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
94 {% include "toastertable.html" %}
95 {% else %}
96 <h2>{{title}}</h2>
97 {% endif %}
98
99 <div class="alert alert-info air" id="build-to-get-packages-msg"
100 {# if there are packages and it's in the project don't show this msg #}
101 {% if packages.count or not packages.count and not in_project %}
102 style="display:none"
103 {% endif %} >
104 <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600105 <button class="btn btn-info btn-lg build-recipe-btn" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500106 </div>
107
108 <div class="alert alert-info air" id="packages-alert"
109 {% if packages.count or in_project %}
110 style="display:none"
111 {% endif %}
112 >
113 <p class="lead">Toaster has no package information for {{recipe.name}}
114 </p>
115 </div>
116 </div>
117 </div>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600118 <div class="col-md-4">
119 <div class="well">
120 <h2>About {{recipe.name}}</h2>
121 <dl class="item-info">
122 <dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500123 Approx. packages included
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600124 <span class="glyphicon glyphicon-question-sign get-help" 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"></span>
125 </dt>
126 <dd class="no-packages">{{packages.count}}</dd>
127 <dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500128 Approx. package size
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600129 <span class="glyphicon glyphicon-question-sign get-help" title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></span>
130 </dt>
131 <dd>{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
132 {% if last_build %}
133 <dt>Last build</dt>
134 <dd>
135 <span class="glyphicon glyphicon-ok-circle"></span>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500136 <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600137 </dd>
138 {% endif %}
139 <dt>Recipe file</dt>
140 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500141 <code>{{recipe.file_path|cut_path_prefix:recipe.layer_version.local_path}}</code>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600142 <a href="{{recipe.get_vcs_recipe_file_link_url}}"><span class="glyphicon glyphicon-new-window" title="View recipe file" data-toggle="tooltip"></span></a>
143 </dd>
144 <dt>Layer</dt>
145 <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
146 <dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500147 Summary
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600148 </dt>
149 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500150 {{recipe.summary}}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600151 </dd>
152 <dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500153 Description
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600154 </dt>
155 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500156 {{recipe.description}}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600157 </dd>
158 <dt>Version</dt>
159 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500160 {{recipe.version}}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600161 </dd>
162 <dt>Section</dt>
163 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500164 {{recipe.section}}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600165 </dd>
166 <dt>License</dt>
167 <dd>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500168 {{recipe.license}}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600169 </dd>
170 </dl>
171 </div>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500172 </div>
173</div>
174
175{% endblock %}