major updates to slice reservation page and plugins
[myslice.git] / plugins / scheduler2 / templates / scheduler.html
1 <div id="plugin-{{ domid }}-loader" style="text-align:center;">\r
2     <img src="../../static/img/loading-7b6dc55620a355b55b835f6b4c300f9b.gif" alt="loading" style="width:100px;" />\r
3     <h3>Loading Data...</h3>\r
4 </div>\r
5 <div id="plugin-{{ domid }}-empty" style="text-align: center; display: none;">\r
6     <img src="../../static/img/no-data.png" alt="no data found" style="width:100px;" />\r
7     <h3>no data found...</h3>\r
8 </div>\r
9 <div id="plugin-{{ domid }}" class="">\r
10     <div class="row m-b">\r
11         <div class="col-md-1">\r
12             <label for="inputEmail3" class="col-sm-2 control-label">Date</label>\r
13         </div>\r
14         <div class="col-md-9">\r
15             <input id="DateToRes" type="text" placeholder="Reservation Date">\r
16             <!-- <input id="DateToRes" type="text" class="form-control" placeholder="Reservation Date"> -->\r
17             <span class="glyphicon glyphicon-calendar"></span>\r
18                         <div class="sliderContainer">\r
19                                 <div id="tblSlider"></div>\r
20                         </div>\r
21         </div>\r
22     </div>\r
23     <div id="SchedulerCtrl" ng-controller="SchedulerCtrl" class='query-editor-spacer'>\r
24         <div class="table-responsive">\r
25 \r
26             <table id="scheduler-reservation-table" class="table table-bordered table-condensed">\r
27                 <thead>\r
28                     <tr>\r
29                         <th>Resource name</th>\r
30                         <th ng-repeat="slot in slots | offset: from | limitTo: num_visible_cells ">\r
31                             {[{ slot.time }]}\r
32                         </th>\r
33                     </tr>\r
34                 </thead>\r
35                 <tbody>\r
36                     <tr ng-repeat="resource in resources | filter: filter_visible | offset: (current_page-1) * items_per_page | limitTo: items_per_page" \r
37                                                 ng-class-odd="''" \r
38                                                 ng-class-even="'even'">\r
39                         <th data-resourceid="{[{ resource.urn }]}" \r
40                                                         data-rowindex="{[{ $index }]}" \r
41                                                         data-resourceindex="{[{ resource.index }]}" \r
42                                                         style="word-wrap: break-word; word-break: break-all; ">\r
43                                                         {[{ resource.hostname }]}\r
44                                                 </th>\r
45                         <td ng-repeat="lease in resource.leases | offset: from / lcm_colspan  | limitTo: num_visible_cells / lcm_colspan"\r
46                                                         data-slotid="{[{ lease.id }]}" \r
47                                                         data-groupid="{[{ lease.groupid }]}" \r
48                                                         ng-class="{{ 'lease.status' }}"\r
49                                                         colspan="{[{resource.granularity / granularity}]}"\r
50                                                         ng-click="select(from+$index, lease, $parent.resource)">\r
51                                                 </td>\r
52                     </tr>\r
53                 </tbody>\r
54             </table>\r
55 \r
56             <div class="row">\r
57                 <div class="col-xs-5">\r
58                     <div id="resources-list__table_length" class="dataTables_length">\r
59                         <label>Total pages : {[{page_count()}]}</label>\r
60                     </div>\r
61                 </div>\r
62                 <div class="col-xs-7">\r
63                     <div class="dataTables_paginate paging_bootstrap">\r
64                         <ul class="pagination">\r
65                                                         <li ng-class="prevPageDisabled()">\r
66                                                           <a href ng-click="prevPage()">« Prev</a>\r
67                                                         </li>\r
68                             <li ng-repeat="n in range()" \r
69                                                             ng-class="{active: n==current_page}" \r
70                                                                 ng-click="setPage(n)"><a href="#">{[{n}]}</a></li>\r
71                                                         <li ng-class="nextPageDisabled()">\r
72                                               <a href ng-click="nextPage()">Next »</a>\r
73                                             </li>\r
74                         </ul>\r
75                     </div>\r
76                 </div>\r
77             </div>\r
78             {% comment %}\r
79             <div id="reservation-table-scroll-container">\r
80                 <table id='{{domid}}-reservation-table' class='table table-bordered'>\r
81                     <thead>\r
82                         <tr>\r
83                             {% for ts in time_slots %}\r
84                             <th class='center info'>{{ ts|safe }}</th>\r
85                             {% endfor %}\r
86                         </tr>\r
87                     </thead>\r
88                     <tbody>\r
89 \r
90                         {% for itms in nodes %}\r
91                         {% for n in itms.1 %}\r
92                         <tr data-trindex="">\r
93                             {% for ts in time_slots %}\r
94                             {% if n == 'node020' %}\r
95                             <td class="maintenance closed" data-tdindex="{{forloop.counter}}"></td>\r
96                             {% elif n == 'node023' or n == 'node030' %}\r
97                             <td class="closed" data-tdindex="{{forloop.counter}}"></td>\r
98                             {% else %}\r
99                             <td class="" data-tdindex="{{forloop.counter}}"></td>\r
100                             {% endif %}\r
101                             {% endfor %}\r
102                         </tr>\r
103                         {% endfor %}\r
104                         {% endfor %}\r
105                     </tbody>\r
106                 </table>\r
107             </div>\r
108             {% endcomment  %}\r
109 \r
110             <div class="legend">\r
111                 <ol>\r
112                     <li class="free">free</li>\r
113                     <li class="selected">selected</li>\r
114                     <li class="closed">reserved</li>\r
115                     <li class="maintenance">maintenance</li>\r
116                 </ol>\r
117             </div>\r
118         </div><!-- / scheduler plugin -->\r
119         <script type="text/javascript">\r
120             //alert("1");\r
121         </script>\r
122     </div>\r