| lombardof | a03da5e | 2018-06-02 18:36:44 +0200 | [diff] [blame] | 1 | {% extends "base.html" %} |
| 2 | {% load get %} |
| 3 | {% load staticfiles %} |
| 4 | |
| 5 | |
| 6 | {% block head_block %} |
| 7 | {{ block.super }} |
| 8 | |
| 9 | {% endblock %} |
| 10 | {% block title_header_big %} |
| 11 | {{ block.super }} |
| 12 | {% endblock %} |
| 13 | {% block left_sidebar %} |
| 14 | {% include 'osm/osm_project_left_sidebar.html' %} |
| 15 | {% endblock %} |
| 16 | |
| 17 | |
| 18 | {% block breadcrumb_body %} |
| 19 | {{ block.super }} |
| 20 | <li><a href="{% url 'projects:sdns:list' project_id=project_id %}">SDN Controllers</a></li> |
| 21 | {% endblock %} |
| 22 | |
| 23 | {% block content_body %} |
| 24 | {{ block.super }} |
| 25 | {% include 'modal/sdn_details.html' %} |
| 26 | {% csrf_token %} |
| 27 | <div class="row"> |
| 28 | <div class="col-md-12"> |
| 29 | |
| 30 | <div class="box"> |
| 31 | <div class="box-header with-border"> |
| 32 | <h3 class="box-title">Registered SDN Controllers</h3> |
| 33 | <div class="box-tools"> |
| 34 | <a href='{% url "projects:sdns:create" project_id=project_id %}' class="btn btn-block btn-primary btn-sm"><i |
| 35 | class="fa fa-plus"></i><span> New SDN Controller</span></a> |
| 36 | </div> |
| 37 | </div> |
| 38 | <div class="box-body"> |
| 39 | <table id="projects_table" class="table table-bordered table-striped"> |
| 40 | <thead> |
| 41 | <tr> |
| 42 | <th>Id</th> |
| 43 | <th>Name</th> |
| 44 | <th>Type</th> |
| 45 | <th>Operational State</th> |
| 46 | <th>IP</th> |
| 47 | <th>Port</th> |
| 48 | <th>Actions</th> |
| 49 | |
| 50 | </tr> |
| 51 | </thead> |
| 52 | <tbody> |
| 53 | {% for s in sdns %} |
| 54 | <tr> |
| 55 | <td>{{ s|get:"_id" }}</td> |
| 56 | <td>{{ s|get:"name" }}</td> |
| 57 | <td>{{ s|get:"type" }}</td> |
| 58 | <td>{{ s|get_sub:"_admin,operationalState"}}</td> |
| 59 | <td>{{ s|get:"ip" }}</td> |
| 60 | <td>{{ s|get:"port" }}</td> |
| 61 | <td> |
| 62 | <div class="btn-group"> |
| 63 | <button type="button" class="btn btn-default" |
| 64 | onclick="javascript:showSDN('{{ project_id }}', '{{ s|get:"_id" }}')" data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info"><i |
| 65 | class="fa fa-info"></i></button> |
| 66 | <button type="button" class="btn btn-default" |
| 67 | onclick="javascript:deleteSDN('{{ project_id }}', '{{ s|get:"_id" }}')" data-toggle="tooltip" data-placement="top" data-container="body" title="Delete"><i |
| lombardof | e28478c | 2018-06-07 13:07:27 +0200 | [diff] [blame^] | 68 | class="far fa-trash-alt" ></i></button> |
| lombardof | a03da5e | 2018-06-02 18:36:44 +0200 | [diff] [blame] | 69 | </div> |
| 70 | </td> |
| 71 | |
| 72 | </tr> |
| 73 | {% endfor %} |
| 74 | </tbody> |
| 75 | </table> |
| 76 | </div> |
| 77 | </div> |
| 78 | </div> |
| 79 | |
| 80 | </div> |
| 81 | {% endblock %} |
| 82 | |
| 83 | {% block resource_block %} |
| 84 | {{ block.super }} |
| 85 | <!-- moment JS --> |
| 86 | <script src="/static/bower_components/moment/moment.js"></script> |
| 87 | |
| 88 | <script src="/static/src/sdnctrlhandler/sdn_list.js"></script> |
| 89 | |
| 90 | |
| 91 | {% endblock %} |
| 92 | |
| 93 | {% block footer %} |
| 94 | {% include "footer.html" %} |
| 95 | {% endblock %} |