Commit f124fa8f authored by Celine Noirot's avatar Celine Noirot
Browse files

Add purge icons + add list of ids of runs and analysis

parent 03e68a06
This diff is collapsed.
......@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th>Date</th>
<th>Software</th>
<th>Version</th>
<th>Data state</th>
</tr>
</thead>
<tbody>
......
......@@ -50,7 +50,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<strong>{$project_analysis|@count}</strong> analyse(s) have been done on the run {$projects[key($projects)].name}.
<br />
{assign var="project_size" value="<span id='size' class='tx-nG6-mini-wait'></span>"}
Raw data and analysis results use <strong>{$project_size}</strong> on the hard drive for the whole project.
Raw data and analysis results use <strong>{$project_size}</strong> on the hard drive for the whole project.<br />
{assign var="nb_run_stored" value=0}
{foreach from=$project_runs key=run_id item=run_values}
{if $run_values.data_state == "stored"}
{$nb_run_stored = $nb_run_stored +1}
{/if}
{/foreach}
{$nb_run_stored}
</div>
<div style="clear:both"></div>
</div>
......
......@@ -67,11 +67,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td>{$new_element.data.date|date_format:"%d/%m/%Y"}</td>
<td>{$new_element.data.software}</td>
<td>{$new_element.data.version}</td>
<td>{if $new_element.data.data_state eq "stored"}<i class="glyphicon glyphicon-saved"></i>{elseif $new_element.data.data_state eq "purged"}<i class="glyphicon glyphicon-trash"></i>{else}<i class="glyphicon glyphicon-floppy-repeat"></i>{/if}</td>
{/if}
{else}
<td>{$new_element.data.date|date_format:"%d/%m/%Y"}</td>
<td>{$new_element.data.software}</td>
<td>{$new_element.data.version}</td>
<td>{if $new_element.data.data_state eq "stored"}<i class="glyphicon glyphicon-saved"></i>{elseif $new_element.data.data_state eq "purged"}<i class="glyphicon glyphicon-trash"></i>{else}<i class="glyphicon glyphicon-floppy-repeat"></i>{/if}</td>
{/if}
</tr>
{/if}
......
......@@ -49,6 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th data-column="{$data_col}" id="wf_run_all">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
{assign var="rcolspan" value= $rcolspan + 1}
{/if}
<th data-column="{$data_col}">Data state</th>
{$data_col = $data_col+1}
</tr>
</thead>
<tbody>
......@@ -86,6 +88,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<span class="editable" data-type="text" data-pk="{$run_values.id}" data-url="index.php?eID=tx_nG6&type=update_db_field&table=tx_nG6_run&field=sequencer" data-original-title="Enter sequencer">{$run_values.sequencer}</span>
</td>
<td id="wf_run_{$run_values.id}"></td>
{* icone change if data stored/purged *}
<td>{if $run_values.data_state eq "stored"}<i class="glyphicon glyphicon-saved"></i>{elseif $run_values.data_state eq "purged"}<i class="glyphicon glyphicon-trash"></i>{else}<i class="glyphicon glyphicon-floppy-repeat"></i>{/if}</td>
{else}
{if $is_at_least_admin_of_1_run && $login_user}
<td></td>
......@@ -103,6 +107,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{if $is_at_least_admin_of_1_run && $login_user}
<td></td>
{/if}
{* icone change if data stored/purged *}
<td>{if $run_values.data_state eq "stored"}<i class="glyphicon glyphicon-saved"></i>{elseif $run_values.data_state eq "purged"}<i class="glyphicon glyphicon-trash"></i>{else}<i class="glyphicon glyphicon-floppy-repeat"></i>{/if}</td>
{/if}
</tr>
{/if}
......
This diff is collapsed.
......@@ -54,9 +54,10 @@ $(function () {
var stat_tables = initStatMenuDataTables();
updateRefreshButton(stat_tables);
// button for drawing
$("#refresh_graph_btn").click(function(){
$('#highcharts_graph').html('<div class="tx-nG6-wait">Chart generation, please wait ...</div>');
var selected_display = $("input[type=radio][name=display_by]:checked").val() ;
......@@ -71,6 +72,23 @@ $(function () {
}
});
// button for drawing
$("#refresh_graph_btn").click(function(){
$('#highcharts_graph').html('<div class="tx-nG6-wait">Chart generation, please wait ...</div>');
var selected_display = $("input[type=radio][name=display_by]:checked").val() ;
if (selected_display == "project_distribution") {
drawProjectDistribution(stat_tables);
} else if (selected_display == "project_evolution") {
drawProjectEvolution(stat_tables);
} else if (selected_display == "data_distribution") {
drawDataDistribution(stat_tables);
} else if (selected_display == "data_evolution") {
drawDataEvolution(stat_tables);
}
});
// refresh datatables
$("input[type=radio][name=group_by]").change(function(){
var group_by = $(this).attr("id").split("_")[1];
......@@ -303,7 +321,7 @@ $(function () {
});
}
});
$("#modal-btn-addng6admin").click( function() {
$("#new_ng6_admin_user").submit();
});
......@@ -335,6 +353,28 @@ $(function () {
});
});
});
/****************************************
*
* PURGE MANAGEMENT
*
***************************************/
$("#get_purge_list_btn").click(function(){
$('#purge_list').html('<div class="tx-nG6-wait">List generation, please wait ...</div>');
var $kind_of = $("input[type=radio][name=kind_of]:checked"),
kind_of = $kind_of.val(),
state = $("input[type=radio][name=state]:checked").val();
$.ajax({
url: "index.php?eID=tx_nG6&type=purge_management&state="+state+"&kind_of="+kind_of+"&action=get_list",
dataType: 'json',
success: function(val, status, xhr) {
console.log(val);
}
});
});
});
......@@ -652,6 +692,7 @@ function initStatMenuDataTables () {
});
$.each(stat_tables,function(idx, table){
console.log(table);
table.draw();
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment