administration_view.tpl 19.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}" />
Celine Noirot's avatar
Celine Noirot committed
26
<input type="hidden" id="purge_delay" value="{$ng6_purge_delay}" />
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<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>
43
44
45
		<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>
                
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
	</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>
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
270
271
				            <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>
272
		<div class="tab-pane fade" id="project_data_management">
273
274
275
276
277
278
279
		    <div id="purge_menu" class="clearfix">
		        <div>
		            <p>
		                Please use the following options to retrieve project, run, analyses acces to purge options.
		            </p>
		        </div>
	        
280
		       <div  class="col-sm-6">
281
282
283
284
                    <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
285
					            <input type="text" name="size" id="filter_size" > bytes
286
287
288
289
290
				            </label>
			            </div>
                    </fieldset>
		        </div>
		        
291
292
293
294
295
296
297
298
299
300
301
		       <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>
		         
302
303
		        <div  class="col-sm-6">
		            <fieldset class="col-sm-12">
304
305
                        <h4>3. Which create user ?</h4>
				       <div id="wrapper_datatable_create">
Celine Noirot's avatar
Celine Noirot committed
306
			        <table class="table table-striped table-bordered dataTable" id="data_table_users">
307
			            <thead>
308
309
			                <th></th>
			                <th>Create user</th>
310
311
			            </thead>
			            <tbody>
312
			                {foreach $ng6_admin_users key=user_key item=user_values}
313
			                    <tr>
314
315
			                        <td><center><input type="checkbox" class="chk_create_user"  value="{$user_values.id}"></center></td>
			                        <td>{$user_values.username}</td>
316
317
318
319
320
321
322
323
324
			                    </tr>
			                {/foreach}
			            </tbody>
			        </table>
			         </fieldset>
			    </div>
				
				<div  class="col-sm-6">
		            <fieldset class="col-sm-12">
Celine Noirot's avatar
Celine Noirot committed
325
                        <h4>4. Laboratories implie: </h4>
326
				       <div id="wrapper_datatable_laboratories">
Celine Noirot's avatar
Celine Noirot committed
327
			        <table class="table table-striped table-bordered dataTable" id="data_table_select_lab">
328
			            <thead>
Celine Noirot's avatar
Celine Noirot committed
329
330
			                <th>With</th>
                                        <th>Without</th>
331
332
333
334
335
			                <th>Laboratories</th>
			            </thead>
			            <tbody>
			                {foreach $distribution key=group_name item=group_values}
			                    <tr>
Celine Noirot's avatar
Celine Noirot committed
336
337
			                        <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>
338
339
340
341
342
343
344
345
346
347
			                        <td>{$group_name}</td>
			                    </tr>
			                {/foreach}
			            </tbody>
			        </table>
			        </fieldset>
			    </div>
			
				<div class="row">
					<div class="col-sm-offset-10 col-sm-2">
Celine Noirot's avatar
Celine Noirot committed
348
						<button type="button" id="refresh_obsolete_list_btn" class="multiple-selection-btn btn btn-primary"> <i class="glyphicon glyphicon-refresh"></i> Refresh list</button>
349
350
351
					</div>
			    </div>
			</div>	
352
			
353
354
			
			<br />
Celine Noirot's avatar
Celine Noirot committed
355
356
			<div class="tx-nG6-wait" id="data_table_obsolete_wait">Please wait while processing ...</span></div>
			<div id="obsolete_list"> 
357
358
			<div>
		            <p>
Celine Noirot's avatar
Celine Noirot committed
359
		                Following table contains runs and analysis which can be purged, please alert project managers with button "send mail" after selecting projects.</br>
360
361
                                Then the project will be available for extention or purge in tab "Purge demand management" </br>
                                This table contains <b><span id="nb_purgeable_project"></span> </b> corresponding to <b><span id=global_purgeable_size"</span></b>.
362
		            </p>
Celine Noirot's avatar
Celine Noirot committed
363
                        
364
		        </div>
365
			<table class="table table-striped table-bordered dataTable" id="data_table_obsolete">
366
367
		            <thead>
			            <tr>
Celine Noirot's avatar
Celine Noirot committed
368
				            <th rowspan="2"><center><input type="checkbox" id="all_chk_obsolete"></center></th>
369
370
				            <th rowspan="2">Project</th>
				            <th rowspan="2">All Run</th>
371
				            <th colspan="2"><center>Obsoletes Runs </center></th>
372
				            <th rowspan="2">All Analyze</th>
373
				            <th colspan="2"><center>Obsoletes Analyzes</center></th>
374
375
376
				            <th rowspan="2">Total Size Purgeable</th>
				            <th rowspan="2">Users</th>
				        </tr>
377
				       <tr>
378
379
380
381
382
383
384
385
386
387
				            <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>
388
				            <th align="left" colspan="10">
389
					            With selection :
390
391
                                                        <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>
392
393
394
395
396
397
398
					            </div>
				            </th>
			            </tr>
		            </tfoot>
	            </table>
			</div>
		</div>
399
400
                
                <div class="tab-pane fade" id="purge_demand_management">
Celine Noirot's avatar
Celine Noirot committed
401
402
403
404
405
                        <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>
406
                        
Celine Noirot's avatar
Celine Noirot committed
407
408
409
		        </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>
410
411
412
413
                        <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
414
                                            <th><center><input type="checkbox" id="all_chk_demand"></center></th>
415
416
417
418
419
420
421
422
423
424
                                            <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
425
                                  
426
427
428
429
430
431
432
433
434
435
436
437
438
439
                                    </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>
Celine Noirot's avatar
Celine Noirot committed
440
441
                        </div> <!--end purge_demand_list-->
                         
442
443
444
445
446
447
448
449
450
451
452
453
454
455
                </div> <!--purge demand management-->
                
        	</div>
	
        
        
        </div>
        
        
        
        
        
        
        
456
457
458
</div>

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