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