administration_view.tpl 22.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{*
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}" />
<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}" />

<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>
42
43
44
		<li><a href="#project_data_management" data-toggle="tab">Projets data management</a></li>
                <li><a href="#purge_demand_management" data-toggle="tab">Purge demand management</a></li>
                
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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
225
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
270
	</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">
                        <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>
			            <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>
				            <th><center><input type="checkbox" id="chk_all_user"></center></th>
				            <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>
		</div>
		
		<div class="tab-pane fade" id="wf_monitoring"></div>
271
		<div class="tab-pane fade" id="project_data_management">
272
273
274
275
276
277
278
		    <div id="purge_menu" class="clearfix">
		        <div>
		            <p>
		                Please use the following options to retrieve project, run, analyses acces to purge options.
		            </p>
		        </div>
	        
279
		       <div  class="col-sm-6">
280
281
282
283
                    <fieldset class="col-sm-12">
                        <h4>1. Filter on size greater than</h4>
				        <div class="text">
				            <label class="text">
Celine Noirot's avatar
Celine Noirot committed
284
					            <input type="text" name="size" id="filter_size" > bytes
285
286
287
288
289
				            </label>
			            </div>
                    </fieldset>
		        </div>
		        
290
291
292
293
294
295
296
297
298
299
300
		       <div  class="col-sm-6">
                    <fieldset class="col-sm-12">
                        <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>
                    </fieldset>
		        </div>
		         
301
302
		        <div  class="col-sm-6">
		            <fieldset class="col-sm-12">
303
304
                        <h4>3. Which create user ?</h4>
				       <div id="wrapper_datatable_create">
Celine Noirot's avatar
Celine Noirot committed
305
			        <table class="table table-striped table-bordered dataTable" id="data_table_users">
306
			            <thead>
307
308
			                <th></th>
			                <th>Create user</th>
309
310
			            </thead>
			            <tbody>
311
			                {foreach $ng6_admin_users key=user_key item=user_values}
312
			                    <tr>
313
314
			                        <td><center><input type="checkbox" class="chk_create_user"  value="{$user_values.id}"></center></td>
			                        <td>{$user_values.username}</td>
315
316
317
318
319
320
321
322
323
			                    </tr>
			                {/foreach}
			            </tbody>
			        </table>
			         </fieldset>
			    </div>
				
				<div  class="col-sm-6">
		            <fieldset class="col-sm-12">
324
                        <h4>4. Without laboratories implie ?</h4>
325
				       <div id="wrapper_datatable_laboratories">
Celine Noirot's avatar
Celine Noirot committed
326
			        <table class="table table-striped table-bordered dataTable" id="data_table_select_lab">
327
			            <thead>
328
			                <th></th>
329
330
331
332
333
			                <th>Laboratories</th>
			            </thead>
			            <tbody>
			                {foreach $distribution key=group_name item=group_values}
			                    <tr>
334
			                        <td><center><input type="checkbox" class="chk_without_lab_element"  value="{$group_values.group_id}"></center></td>
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
			                        <td>{$group_name}</td>
			                    </tr>
			                {/foreach}
			            </tbody>
			        </table>
			        </fieldset>
			    </div>
			
				<div class="row">
					<div class="col-sm-offset-10 col-sm-2">
						<button type="button" id="refresh_purge_list_btn" class="multiple-selection-btn btn btn-primary"> <i class="glyphicon glyphicon-refresh"></i> Refresh list</button>
						
					</div>
			    </div>
			</div>	
350
			
351
352
353
354
			
			<br />
			
			<div id="purge_list"> 
355
356
357
358
359
			<div>
		            <p>
		                Table with the number of runs and analysis who is obsolete and who has no purge demand mail sended.
		            </p>
		        </div>
360
			<table class="table table-striped table-bordered dataTable" id="data_table_obsolete">
361
362
363
364
365
		            <thead>
			            <tr>
				            <th rowspan="2"><center><input type="checkbox" id="chk_all_runs"></center></th>
				            <th rowspan="2">Project</th>
				            <th rowspan="2">All Run</th>
366
				            <th colspan="2"><center>Obsoletes Runs </center></th>
367
				            <th rowspan="2">All Analyze</th>
368
				            <th colspan="2"><center>Obsoletes Analyzes</center></th>
369
370
371
				            <th rowspan="2">Total Size Purgeable</th>
				            <th rowspan="2">Users</th>
				        </tr>
372
				       <tr>
373
374
375
376
377
378
379
380
381
382
383
				            <th>Nb Run stored</th>
				            <th>Nb Run extended</th>
				            <th>Nb Analyze stored</th>
				            <th>Nb Analyze extended</th>
			            </tr>
		            </thead>
		            
		            <tbody> 
			            {foreach from=$ng6_purge_projects key=c_project_id item=project_values}
				            <tr id="tr_project_{$c_project_id}" >
					            <td><center><input type="checkbox" id="chk_project_{$c_project_id}" value="project_{$c_project_id}" /></center></td>
384
					            <td><a href="index.php?id=3&tx_nG6_pi1[project_id]={$c_project_id}">{$project_values.project_name}</a> </td>
385
					            <td>{$project_values.nb_runs}</td>
Celine Noirot's avatar
Celine Noirot committed
386
387
					            <td><input type="hidden" values="{$project_values.state.stored.run_ids}" id="rstored_project_{$c_project_id}" />{if $project_values.state.stored.nb_run}{$project_values.state.stored.nb_run} ({$tx_nG6_utils->get_octet_string_representation($project_values.state.stored.size_run)} ){else} - {/if}</td>
					            <td><input type="hidden" values="{$project_values.state.extended.run_ids}" id="rextended_project_{$c_project_id}" />{if $project_values.state.extended.nb_run}{$project_values.state.extended.nb_run} ({$tx_nG6_utils->get_octet_string_representation($project_values.state.extended.size_run)}) {else} - {/if}</td>
388
					            <td>{$project_values.nb_analyses}</td>
Celine Noirot's avatar
Celine Noirot committed
389
390
391
					            <td><input type="hidden" values="{$project_values.state.stored.analysis_ids}" id="astored_project_{$c_project_id}" />{if $project_values.state.stored.nb_analyze}{$project_values.state.stored.nb_analyze}  ({$tx_nG6_utils->get_octet_string_representation($project_values.state.stored.size_analyze)}){else} - {/if}</td>
							    <td><input type="hidden" values="{$project_values.state.extended.analysis_ids}" id="aextended_project_{$c_project_id}" />{if $project_values.state.extended.nb_analyze}{$project_values.state.extended.nb_analyze}  ({$tx_nG6_utils->get_octet_string_representation($project_values.state.extended.size_analyze)}){else} - {/if}</td>
							    <td>{$tx_nG6_utils->get_octet_string_representation($project_values.total_purgeable_size)}</td>
392
393
							    <td>
							    {foreach from=$project_values.users key=c_user_i item=user_values}
394
									{$user_values.user_name} {if $user_values.right_level_label=="manager"} [{$user_values.email}, {$user_values.user_group_title}] {/if},
395
								{/foreach}
396
397
398
399
400
401
							    </td>
				            </tr>
			            {/foreach}
		            </tbody>
		            <tfoot>
			            <tr>
402
				            <th align="left" colspan="10">
403
					            With selection :
404
405
                                                        <div  class="btn-group">
                                                            <button id="send_mail" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-envelope"></i> Send mail </button>
406
407
408
409
410
411
412
					            </div>
				            </th>
			            </tr>
		            </tfoot>
	            </table>
			</div>
		</div>
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
                
                <div class="tab-pane fade" id="purge_demand_management">
                        <div id="purge_demand_menu" class="clearfix">
                                <div>
                                    <p>
                                        Please enter the purge demand number to process (one number per line): 
                                    </p>
                                    <textarea id="purge_demand_input" rows="4" cols="50"></textarea>
                                    <br />
                                    
                                    <button id="delete_data_from_text" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-remove"></i> Delete data</button>
                                    <button id="extend_data_retention_from_text" type="button" class="btn btn-sm btn-default"><i class="glyphicon glyphicon-pencil"></i> Extend retention date </button> 
                                                                    
                                </div>
                        
                        </div>
                        
                        <div id="purge_demand_list"> 
                            <table class="table table-striped table-bordered dataTable" id="data_table_demand">
                                    <thead>
                                        <tr>
                                            <th><center><input type="checkbox" id="chk_purge_demand"></center></th>
                                            <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> 
                                           {foreach from=$ng6_purge_demands key=c_demand_id item=demand_values}
                                                
                                                    <tr id="tr_demand_{$c_demand_id}" >
                                                            <td><center><input type="checkbox" id="chk_demand_{$c_demand_id}" value="{$c_demand_id}" /></center></td>
                                                            <td>{$c_demand_id}</td>
                                                            <td><a href="index.php?id=3&tx_nG6_pi1[project_id]={$demand_values.project_id}">{$demand_values.project_name}</a> </td>
                                                            <td>{$tx_nG6_utils->get_octet_string_representation($demand_values.purge_size)}</td>
                                                            <td>{$demand_values.mail_sent_date|date_format:"%d/%m/%y"}</td>
                                                            <td>
                                                                    {foreach from=$demand_values.users key=c_user_i item=user_values}
                                                                                {$user_values.username}[{$user_values.user_group_title}],
                                                                    {/foreach}
                                                            </td>
                                                            <td class="data-filter">{if $demand_values.delay_excedeed} Yes {else} No {/if}</td>
                                            
                                                        </tr>
                                                    
                                            {/foreach}
                                    </tbody>
                                    <tfoot>
                                          <tr>
                                                    <th align="left" colspan="7">
                                                            With selection :
                                                            <div  class="btn-group">
                                                                   <button id="delete_data_from_list" type="button" class="btn btn-sm btn-default" ><i class="glyphicon glyphicon-remove"></i> Delete data</button>
                                                                   <button id="extend_data_retention_from_list" type="button" class="btn btn-sm btn-default"><i class="glyphicon glyphicon-pencil"></i> Extend retention date </button> 
                                                            </div>
                                                    </th>
                                            </tr>
                                    </tfoot>
                                    
                            </table>
			</div>
                </div> <!--purge demand management-->
                
        	</div>
	
        
        
        </div>
        
        
        
        
        
        
        
492
493
494
</div>

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