administration_view.tpl 25.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{*
Copyright (C) 2009 INRA
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*}

<div id="user_information_dialog" title=""></div>

<input type="hidden" id="user_is_login" value="{$login_user}" />
<input type="hidden" id="user_id" value="{$user_id}" />
22
<input type="hidden" id="user_name" value="{$user_name}" />
23
24
25
<input type="hidden" id="data_folder" value="{$data_folder}" />
<input type="hidden" id="usergroup" value="{$group_info.uid}" />
<input type="hidden" id="server_url" value="{$server_url}" />
26
27
<input type="hidden" id="server_name" value="{$server_name}" />

Celine Noirot's avatar
Celine Noirot committed
28
<input type="hidden" id="purge_delay" value="{$ng6_purge_delay}" />
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<div class="sub-content sc-top">	
	<div class="ng6-content-header-left administration">
		<h2>Administration <small> center </small> </h2>
	</div>
	<div class="ng6-content-header-right">
		Monitor running workflows and disk space usage, manage users with administation rights.
	</div>
	<div style="clear:both"></div>
</div>

<div class="sub-content sc-bottom">

	<ul id="myTab" class="nav nav-tabs">
		<li class="active"><a href="#statistics" data-toggle="tab">Statistics</a></li>
		<li><a href="#admin_management" data-toggle="tab">Admin management</a></li>
		<li><a href="#wf_monitoring" data-toggle="tab">Workflows monitoring</a></li>
45
46
		<li><a href="#project_data_management" data-toggle="tab">Mail obsolete project</a></li>
                <li><a href="#purge_demand_management" data-toggle="tab">Process mail demands</a></li>
47
                <li><a href="#all_project_extention" data-toggle="tab">Extend project</a></li>
48
49
50
51
52
53
54
55
56
57
58
59
60
61
	</ul>

	<div id="myTabContent" class="tab-content">
	
		<div class="tab-pane fade in active" id="statistics">
		    <div id="stat_menu" class="clearfix">
		        <div>
		            <p>
		                Please use the following options to configure the statistics to display, select an element in the 
		                following table  and use the button to generate the chart.
		            </p>
		        </div>
		        <div class="col-sm-6">
		            <fieldset class="col-sm-12">
62
63
64
65
66
67
68
                                <h4>1. Which users should be considered ?</h4>
                                        <div class="radio">
                                            <label class="radio">
                                                    <input type="radio" name="users_to_consider" id="select_cruser" value="create_user" checked>
                                                            users who have added data 
                                            </label>
                                        </div>
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
			            <div class="radio">
				            <label class="radio">
					            <input type="radio" name="users_to_consider" id="select_owner" value="manager">
						            users for whom data were made ​​available
				            </label>
			            </div>
                    </fieldset>
                    
                    <fieldset class="col-sm-12">
                        <h4>2. How should they be grouped ?</h4>
				        <div class="radio">
				            <label class="radio">
					            <input type="radio" name="group_by" id="by_laboratories" value="title" checked>
						            by laboratories
				            </label>
			            </div>
			            <div class="radio">
				            <label class="radio">
					            <input type="radio" name="group_by" id="by_organizations" value="organism">
						            by organization
				            </label>
			            </div>
			            <div class="radio">
				            <label class="radio">
					            <input type="radio" name="group_by" id="by_locations" value="location">
						            by location
				            </label>
			            </div>
                    </fieldset>
		        </div>
		        
		        <div class="col-sm-6">
		            <fieldset class="col-sm-12">
                        <h4>3. How should the data be displayed ?</h4>
				        <div class="radio">
				            <label class="radio">
					            <input type="radio" name="display_by" id="project_distribution" value="project_distribution" checked>
						            display the projects as a pie chart
				            </label>
			            </div>
			            <div class="radio">
				            <label class="radio">
					            <input type="radio" name="display_by" id="project_evolution" value="project_evolution">
						            display the projects creation evolution 
				            </label>
			            </div>
			            <div class="radio">
				            <label class="radio">
					            <input type="radio" name="display_by" id="data_distribution" value="data_distribution">
						            display the stored data as a pie chart 
				            </label>
			            </div>
			            <div class="radio">
				            <label class="radio">
					            <input type="radio" name="display_by" id="data_evolution" value="data_evolution">
						            display the stored data evolution
				            </label>
			            </div>
				        
				        <h5>3.1. Misc</h5>
				
				        <div class="checkbox">
				            <label class="checkbox" style="font-size:12px">
					            <input id="chk_includes_analyses" type="checkbox" disabled>
					            Includes analyses
				            </label>
			            </div>
			            <div class="checkbox">
				            <label class="checkbox" style="font-size:12px">
					            <input id="chk_display_bases" type="checkbox" disabled>
             					Should the size be in number of bases (default is in bytes)
				            </label>
			            </div>
			            <div class="checkbox">
				            <label class="checkbox" style="font-size:12px">
					            <input id="chk_cumulate" type="checkbox" disabled>
             					Cumulate values
				            </label>
			            </div>
                    </fieldset>
		        </div>
                
                
                
		    </div>

			<div id="selection_tables" class="clearfix">
				<h4><strong>Which <span id="by_span">laboratories</span> should be displayed ? <small> non selected ones will be gathered in the "others" group </small></strong></h4>
				
				<div id="wrapper_datatable_laboratories">
			        <table class="table table-striped table-bordered dataTable" id="data_table_laboratories">
			            <thead>
			                <th><center><input type="checkbox" id="chk_all_laboratories"></center></th>
			                <th>Laboratories</th>
			                <th>Organizations</th>
			                <th>Locations</th>
			                <th>Number of project</th>
			            </thead>
			            <tbody>
			                {foreach $distribution key=group_name item=group_values}
			                    <tr>
			                        <td><center><input type="checkbox" class="chk_stat_element"  value="{$group_name}"></center></td>
			                        <td>{$group_name}</td>
								    <td>{$group_values.organism}</td>
								    <td>{$group_values.location}</td>
								    <td>{$group_values.count}</td>
			                    </tr>
			                {/foreach}
			            </tbody>
			        </table>
			    </div>
			    
			    <div id="wrapper_datatable_organizations" style="display:none">
			        <table class="table table-striped table-bordered dataTable" id="data_table_organizations">
			            <thead>
			                <th><center><input type="checkbox" id="chk_all_organizations"></center></th>
			                <th>Organizations</th>
			                <th>Number of project</th>
			            </thead>
			            <tbody></tbody>
			        </table>
			    </div>
			    
			    <div id="wrapper_datatable_locations" style="display:none">
			        <table class="table table-striped table-bordered dataTable" id="data_table_locations">
			            <thead>
			                <th><center><input type="checkbox" id="chk_all_locations"></center></th>
			                <th>Locations</th>
			                <th>Number of project</th>
			            </thead>
			            <tbody></tbody>
			        </table>
			    </div>
			    
				<br />
				
				<div class="row">
					<div class="col-sm-offset-10 col-sm-2">
						<button type="button" id="refresh_graph_btn" class="multiple-selection-btn btn btn-primary" disabled> <i class="glyphicon glyphicon-refresh"></i> refresh graph</button>
					</div>
			    </div>
				
			</div>
			
			<br />
			
			<div id="highcharts_graph"> </div>
		</div>
		
		<div class="tab-pane fade" id="admin_management">
		
		    <div id="admin_users">
	            <p>This table allows you to add a user to the list of ng6 administrator</p>
	            <table class="table table-striped table-bordered dataTable" id="users_data_table">
		            <thead>
			            <tr>
Celine Noirot's avatar
Celine Noirot committed
225
				            <th><center></th>
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
				            <th>Login</th>
				            <th>Last name</th>
				            <th>First name</th>
				            <th>Email</th>
			            </tr>
		            </thead>
		            <tbody> 
			            {foreach from=$ng6_admin_users key=c_user_id item=user_values}
				            {* highlight user personnal line *}
				            {assign var="emphasis" value=""}
				            {if $user_values.id==$user_id}
					            {assign var="emphasis" value="tx-nG6-pi1-line-emphasis"}
				            {/if}
			
				            <tr id="tr_user_{$user_values.id}" class="{$emphasis}">
					
					            {if $user_values.id == $user_id }
						            <td></td>
					            {else}
						            <td><center><input type="checkbox" id="chk_user_{$user_values.id}" value="user_{$user_values.id}" /></center></td>
					            {/if}
					
					            <td>{$user_values.username}</td>
					            <td>{$user_values.last_name}</td>
					            <td>{$user_values.first_name}</td>
					            <td>{$user_values.email}</td>
					
				            </tr>
			            {/foreach}
		            </tbody>
		            <tfoot>
			            <tr>
				            <th align="left" colspan="8">
					            With selection :
					            <div  class="btn-group">
						            <button id="add_admin" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-plus"></i> add user</button>
						            <button id="del_admin" type="button" class="btn multipleu-selection-btn btn-sm btn-default"><i class="glyphicon glyphicon-minus"></i> delete user</button>
					            </div>
				            </th>
			            </tr>
		            </tfoot>
	            </table>
            </div>
		
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
			{if $is_current_user_superadmin}
				<div id="superadmin_users">
					<p></br>This table allows you to manage every ng6 superadmin</p>
	            	<table class="table table-striped table-bordered dataTable" id="superadmin_users_data_table">
						<thead>
			           		<tr>
				           		<th><center></th>
				          		<th>Login</th>
				           		<th>Last name</th>
				           		<th>First name</th>
				           		<th>Email</th>
			           		</tr>
		           		</thead>
						<tbody> 
			           		{foreach from=$ng6_superadmin_users key=c_user_id item=user_values}
				           		{* highlight user personnal line *}
				           		{assign var="emphasis" value=""}
				           		{if $user_values.id==$user_id}
					           		{assign var="emphasis" value="tx-nG6-pi1-line-emphasis"}
				           		{/if}
			
				           		<tr id="tr_user_{$user_values.id}" class="{$emphasis}">
				
				            		{if $user_values.id == $user_id }
					           			<td></td>
				            		{else}
					           			<td><center><input type="checkbox" id="chk_user_{$user_values.id}" value="user_{$user_values.id}" /></center></td>
				            		{/if}
				
				            		<td>{$user_values.username}</td>
				            		<td>{$user_values.last_name}</td>
				            		<td>{$user_values.first_name}</td>
				            		<td>{$user_values.email}</td>
				           		</tr>
			           		{/foreach}
		           		</tbody>
						<tfoot>
			           		<tr>
				           		<th align="left" colspan="8">
				            		With selection :
				            		<div  class="btn-group">
					            		<button id="add_superadmin" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-plus"></i> add user</button>
					            		<button id="del_superadmin" type="button" class="btn multipleu-selection-btn btn-sm btn-default"><i class="glyphicon glyphicon-minus"></i> delete user</button>
				            		</div>
				           		</th>
			           		</tr>
		           		</tfoot>
					</table>
				</div>
			{/if}
		</div>
				
322
		<div class="tab-pane fade" id="wf_monitoring"></div>
323
		<div class="tab-pane fade" id="project_data_management">
324
325
326
327
328
329
330
		    <div id="purge_menu" class="clearfix">
		        <div>
		            <p>
		                Please use the following options to retrieve project, run, analyses acces to purge options.
		            </p>
		        </div>
	        
331
		       <div  class="col-sm-6">
332
                        <fieldset class="col-sm-12">
333
334
335
                        <h4>1. Filter on size greater than</h4>
				        <div class="text">
				            <label class="text">
Celine Noirot's avatar
Celine Noirot committed
336
					            <input type="text" name="size" id="filter_size" > bytes
337
338
				            </label>
			            </div>
339
                        </fieldset>
340
341
		        </div>
		        
342
		       <div  class="col-sm-6">
343
                        <fieldset class="col-sm-12">
344
345
346
347
348
349
                        <h4>2. Retention date lower than : </h4>
				        <div class="text">
				            <label class="text">
					            <input id="max_retention_date" class="form-control" type="text" value="" data-date-format="dd/mm/yyyy" data-provide="datepicker" name="max_retention_date"/>
				            </label>
			            </div>
350
                        </fieldset>
351
352
		        </div>
		         
353
		        <div  class="col-sm-6">
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
                                <fieldset class="col-sm-12">
                                <h4>3. Which create user ?</h4>
                                               <div id="wrapper_datatable_create">
                                        <table class="table table-striped table-bordered dataTable" id="data_table_users">
                                            <thead>
                                                <th></th>
                                                <th>Create user</th>
                                            </thead>
                                            <tbody>
                                                {foreach $ng6_admin_users key=user_key item=user_values}
                                                    <tr>
                                                        <td><center><input type="checkbox" class="chk_create_user"  value="{$user_values.id}"></center></td>
                                                        <td>{$user_values.username}</td>
                                                    </tr>
                                                {/foreach}
                                            </tbody>
                                        </table>
371
372
373
			         </fieldset>
			    </div>
				
374
                        <div  class="col-sm-6">
375
		            <fieldset class="col-sm-12">
376
                                <h4>4. Laboratories implie: </h4>
377
				       <div id="wrapper_datatable_laboratories">
Celine Noirot's avatar
Celine Noirot committed
378
			        <table class="table table-striped table-bordered dataTable" id="data_table_select_lab">
379
			            <thead>
Celine Noirot's avatar
Celine Noirot committed
380
381
			                <th>With</th>
                                        <th>Without</th>
382
383
384
385
386
			                <th>Laboratories</th>
			            </thead>
			            <tbody>
			                {foreach $distribution key=group_name item=group_values}
			                    <tr>
Celine Noirot's avatar
Celine Noirot committed
387
388
			                        <td><center><input type="checkbox" class="chk_with_lab_element"  name="group_{$group_values.group_id}" value="{$group_values.group_id}"></center></td>
                                                <td><center><input type="checkbox" class="chk_without_lab_element" name="group_{$group_values.group_id}"  value="{$group_values.group_id}"></center></td>
389
390
391
392
393
394
			                        <td>{$group_name}</td>
			                    </tr>
			                {/foreach}
			            </tbody>
			        </table>
			    </div>
395
396
397
398
399
400
401
402
403
404
405
                            </fieldset>
                        </div>
                     
                            
                        <div class="row">
                                <div class="col-sm-offset-10 col-sm-2">
                                        <button type="button" id="refresh_obsolete_list_btn" class="multiple-selection-btn btn btn-primary"> <i class="glyphicon glyphicon-refresh"></i> Refresh list</button>
                                </div>
                        </div>
                
                        </div>	
406
			
407
408
			
			<br />
Celine Noirot's avatar
Celine Noirot committed
409
			<div class="tx-nG6-wait" id="data_table_obsolete_wait">Please wait while processing ...</span></div>
Gerald Salin's avatar
#79    
Gerald Salin committed
410
			<div class="alert alert-danger" id="data_table_obsolete_error" style="display:none"></div>
Celine Noirot's avatar
Celine Noirot committed
411
			<div id="obsolete_list"> 
412
413
			<div>
		            <p>
Celine Noirot's avatar
Celine Noirot committed
414
		                Following table contains runs and analysis which can be purged, please alert project managers with button "send mail" after selecting projects.</br>
noirot's avatar
noirot committed
415
                                Then the project will be available for extention or purge in tab "Purge demand management"<br/>
416
				This table contains <b><span id="nb_purgeable_project"></span> </b> project corresponding to <b><span id="global_purgeable_size"</span></b>.
417
		            </p>
Celine Noirot's avatar
Celine Noirot committed
418
                        
419
		        </div>
420
			<table class="table table-striped table-bordered dataTable" id="data_table_obsolete">
421
422
		            <thead>
			            <tr>
Celine Noirot's avatar
Celine Noirot committed
423
				            <th rowspan="2"><center><input type="checkbox" id="all_chk_obsolete"></center></th>
424
425
				            <th rowspan="2">Project</th>
				            <th rowspan="2">All Run</th>
426
				            <th colspan="2"><center>Obsoletes Runs </center></th>
427
				            <th rowspan="2">All Analyze</th>
428
				            <th colspan="2"><center>Obsoletes Analyzes</center></th>
429
				            <th rowspan="2">Total Size Purgeable</th>
430
				            <th rowspan="2">Project category</th>
431
432
				            <th rowspan="2">Users</th>
				        </tr>
433
				       <tr>
434
435
436
437
438
439
440
441
442
443
				            <th>Nb Run stored</th>
				            <th>Nb Run extended</th>
				            <th>Nb Analyze stored</th>
				            <th>Nb Analyze extended</th>
			            </tr>
		            </thead>
		            <tbody> 
		            </tbody>
		            <tfoot>
			            <tr>
444
				            <th align="left" colspan="11">
445
					            With selection :
446
                                                        <div  class="btn-group">
447
                                                            <button id="btn_obsolete_mail" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-envelope"></i> Send mail </button>
448
449
450
451
452
453
454
					            </div>
				            </th>
			            </tr>
		            </tfoot>
	            </table>
			</div>
		</div>
455
456
                
                <div class="tab-pane fade" id="purge_demand_management">
Celine Noirot's avatar
Celine Noirot committed
457
458
459
460
461
                        <div>
		            <p>
		                Following table contains list of purge demand sent, here you can delete data or extend retention date.</br>
                                Delay exceeded is yes if mail sent more than {$ng6_purge_delay} days, so if you don't have answer from manager you can purge data.
		            </p>
462
                        
Celine Noirot's avatar
Celine Noirot committed
463
464
465
		        </div>
                        <div class="tx-nG6-wait" id="data_table_purge_demand_wait">Please wait while processing ...</div>
                        <div class="alert alert-danger" id="purge_demand_error"></div>
466
467
468
469
                        <div id="purge_demand_list"> 
                            <table class="table table-striped table-bordered dataTable" id="data_table_demand">
                                    <thead>
                                        <tr>
Celine Noirot's avatar
Celine Noirot committed
470
                                            <th><center><input type="checkbox" id="all_chk_demand"></center></th>
471
472
473
474
475
476
477
478
479
480
                                            <th>Demand number</th>
                                            <th>Project name</th>
                                            <th>Purgeable size</th>
                                            <th>Demand date</th>
                                            <th>Users</th>
                                            <th class="data-filter">Delay exceeded</th>
                                        </tr>
                                    </thead>
                                    
                                    <tbody> 
Celine Noirot's avatar
Celine Noirot committed
481
                                  
482
483
484
485
486
487
                                    </tbody>
                                    <tfoot>
                                          <tr>
                                                    <th align="left" colspan="7">
                                                            With selection :
                                                            <div  class="btn-group">
488
                                                                   <button id="btn_demand_resend_mail" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-remove"></i> Resend mail</button>
489
490
                                                                   <button id="btn_demand_delete_data" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-remove"></i> Delete data</button>
                                                                   <button id="btn_demand_retention" type="button" class="btn btn-sm btn-default"><i class="glyphicon glyphicon-pencil"></i> Extend retention date </button> 
491
492
493
494
495
496
                                                            </div>
                                                    </th>
                                            </tr>
                                    </tfoot>
                                    
                            </table>
Celine Noirot's avatar
Celine Noirot committed
497
498
                        </div> <!--end purge_demand_list-->
                         
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
                </div> <!--Extend projects-->
                <div class="tab-pane fade" id="all_project_extention">
                        <div>
		            <p>
		                Following table contains all projects.</br>
		            </p>
                        
		        </div>
                        <div class="tx-nG6-wait" id="all_project_wait">Please wait while processing ...</div>
                        <div class="alert alert-danger" id="all_project_error"></div>
                        <div id="all_project_list"> 
                            <table class="table table-striped table-bordered dataTable" id="data_table_allproject">
                                    <thead>
                                        <tr>
                                            <th><center><input type="checkbox" id="all_chk_project"></center></th>
                                            <th>Project name</th>
                                        </tr>
                                    </thead>
                                    
                                    <tbody> 
                                  
                                    </tbody>
                                    <tfoot>
                                          <tr>
                                                    <th align="left" colspan="2">
                                                        <div  style="float: left;">
                                                            Select extention date :
                                                                   <input id="input_extend_all_project" class="form-control" type="text" value="" data-date-format="dd/mm/yyyy" data-provide="datepicker" name="change_retention_date"/>                                                                      
                                                                   </div>
                                                            <div  class="btn-group" style="float: right;">
                                                                   <button id="btn_extend_all_project" type="button" class="btn btn-sm btn-default"><i class="glyphicon glyphicon-pencil"></i> Extend retention date </button> 
                                                            </div>
                                                    </th>
                                            </tr>
                                    </tfoot>
                                    
                            </table>
                        </div> <!--all_project_list-->
                         
                </div> <!--Extend projects-->
539
540
541
542
543
544
545
546
547
548
549
550
        	</div>
	
        
        
        </div>
        
        
        
        
        
        
        
551
552
553
</div>

{include file='../template/modals.tpl'}