08a64a0eaa6578749495bb373d8ca57085a1c36c
[osm/LW-UI.git] / vimhandler / template / vim_list.html
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
15 {% include 'left_sidebar_base.html' %}
16
17 {% endblock %}
18
19
20 {% block breadcrumb_body %}
21 {{ block.super }}
22 <li><a href="{% url 'vim:list' %}">VIMS</a></li>
23 {% endblock %}
24
25 {% block content_body %}
26 {{ block.super }}
27 {% include 'modal/vim_details.html' %}
28 {% csrf_token %}
29 <div class="row">
30 <div class="col-md-12">
31
32 <div class="box">
33 <div class="box-header with-border">
34 <h3 class="box-title">Registered VIM</h3>
35 <div class="box-tools">
36 <a href='{% url "vim:create" %}' class="btn btn-block btn-primary btn-sm"><i
37 class="fa fa-plus"></i><span> New VIM</span></a>
38 </div>
39 </div>
40 <div class="box-body">
41 <table id="projects_table" class="table table-bordered table-striped">
42 <thead>
43 <tr>
44 <th>Id</th>
45 <th>Name</th>
46 <th>Type</th>
47 <th>Operational State</th>
48 <th>Description</th>
49 <th>Actions</th>
50 </tr>
51 </thead>
52 <tbody>
53 {% for p in datacenters %}
54
55 <tr>
56
57 <td>{{ p|get:"_id" }}</td>
58 <td>{{ p|get:"name" }}</td>
59 <td>{{ p|get:"vim_type" }}</td>
60 <td>{{ p|get_sub:"_admin,operationalState"}}</td>
61 <td>{{ p|get_sub:"_admin,description" }}</td>
62
63
64 <td>
65 <div class="btn-group">
66 <button type="button" class="btn btn-default"
67 onclick="location.href='{% url "vim:show" vim_id=p|get:"_id" %}'" data-toggle="tooltip" data-placement="top" data-container="body" title="Show Info"><i
68 class="fa fa-info"></i></button>
69 <button type="button" class="btn btn-default"
70 onclick="javascript:deleteVim('{{ p|get:"_id" }}')" data-toggle="tooltip" data-placement="top" data-container="body" title="Delete"><i
71 class="fa fa-trash-o" ></i></button>
72 </div>
73 </td>
74
75 </tr>
76 {% endfor %}
77 </tbody>
78 </table>
79 </div>
80 </div>
81 </div>
82
83 </div>
84 {% endblock %}
85
86 {% block resource_block %}
87 {{ block.super }}
88 <!-- Utility JS -->
89
90 <script>
91
92 function deleteVim(vim_uuid) {
93 bootbox.confirm("Are you sure want to delete?", function (result) {
94 if (result) {
95 location.href = '/vims/' + vim_uuid + '/delete'
96 }
97 })
98 }
99 </script>
100
101 {% endblock %}
102
103 {% block footer %}
104 {% include "footer.html" %}
105 {% endblock %}