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