summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templates/machines.html
blob: 1057bdda3f56ff021099ef50095173e8cf5a07f1 (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
{% extends "baseprojectpage.html" %}
{% load projecttags %}
{% load humanize %}
{% load static %}
{% block localbreadcrumb %}
<li>All compatible machines</li>
{% endblock %}

{% block projectinfomain %}
<script src="{% static 'js/machines.js' %}"></script>
<script>

  $(document).ready(function (){
    var ctx = {
      projectPageUrl : "{% url 'project' project.id %}",
      projectName : "{{project.name}}",
      xhrEditProjectUrl : "{% url 'xhr_projectedit' project.id %}",
      projectId : {{project.id}},
      xhrDataTypeaheadUrl : "{% url 'xhr_datatypeahead' %}",
    };

    try {
      machinesPageInit(ctx);
    } catch (e) {
      document.write("Sorry, An error has occurred loading this page");
      console.warn(e);
    }
  });
</script>
{% include "layers_dep_modal.html" %}
<div class="page-header">
  <h1>
    {% if request.GET.search or request.GET.filter %}
      {% if objects.paginator.count != 0 %}
        {{objects.paginator.count}} machines found
       {% else %}
        No machines found
       {% endif %}
    {% else %}

    All machines
    <i class="icon-question-sign get-help heading-help" title="This page lists all the machines compatible with the current project that Toaster knows about. They include community-created targets suitable for use on top of OpenEmbedded Core and any targets you have imported"></i>
    {% endif %}
  </h1>
</div>
<div class="alert alert-info lead" id="alert-area" style="display:none">
  <button type="button" class="close" id="dismiss-alert">&times;</button>
  <span id="alert-msg"></span>
</div>
{% if objects.paginator.count == 0 %}
    {% if request.GET.search %}
          <div class="alert row-fluid">
            <form class="navbar-search input-append pull-left" id="searchform">
              <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search machines" value="{{request.GET.search}}"><a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>
              <input type="hidden" name="orderby" value="">
              <input type="hidden" name="page" value="1">
              <button class="btn" type="submit" value="Search">Search</button>
              <button type="submit" class="btn btn-link" id="show-all-btn">Show all machines</button>
            </form>
          </div>
    {% else %}
            <div class="alert alert-info">
              <p class="lead">
               Toaster has no machine information. To fetch machine information you should <a href="https://wiki.yoctoproject.org/wiki/Setting_up_a_hosted_managed_mode_for_Toaster#LayerSources">configure a layer source</a>
              </p>
            </div>
    {% endif %}

{% else %}
  {% include "basetable_top.html" %}
  {% for o in objects %}
  <tr class="data">
    <td class="machine">{{o.name}}</td>
    <td class="description">{{o.description}}</td>
    <td class="layer"><a href="{%url "layerdetails" o.layer_version.id %}">{{o.layer_version.layer.name}}</a></td>
    <td class="branch">{{o.layer_version.get_vcs_reference}}</td>
    <td class="machinefile"><code>/machine/conf/{{o.name}}.conf</code><a href="{{o.get_vcs_machine_file_link_url}}" target="_blank"><i class="icon-share get-info"></i></a></td>
    <td class="select-or-add">
      <a href="#" class="btn btn-block select-machine-btn" data-machine-name="{{o.name}}" data-layer-version-id="{{o.layer_version.id}}"
          {%if o.layer_version.id not in project_layers %}style="display:none" {%endif%}  >Select machine</a>
      <a  href="#" class="btn btn-block nopop add-layer" data-layer-version-id="{{o.layer_version.id}}" data-layer-name="{{o.layer_version.layer.name}}" {%if o.layer_version.id in project_layers %}style="display:none" {%endif%}
          >
        <i class="icon-plus"></i>
        Add layer
        <i class="icon-question-sign get-help" title="To build this machine, you must first add the {{o.layer_version.layer.name}} layer to your project"></i>
      </a>
    </td>
  </tr>
  {% endfor %}

  {% include "basetable_bottom.html" %}
{% endif %}

{% endblock %}