<commit_before><?php $this->view('partials/head'); ?>

<?php //Initialize models needed for the table
new Machine_model;
new Reportdata_model;
new Fan_temps_model;
?>

<div class="container">

  <div class="row">

  	<div class="col-lg-12">

		  <h3><span data-i18n="fan_temps.reporttitle"></span> <span id="total-count" class='label label-primary'>…</span></h3>
		  
		  <table class="table table-striped table-condensed table-bordered">
		    <thead>
		      <tr>
		      	<th data-i18n="listing.computername" data-colname='machine.computer_name'></th>
		        <th data-i18n="serial" data-colname='reportdata.serial_number'></th>
		        <th data-i18n="fan_temps.fan_0" data-colname='fan_temps.fan_0'></th>
		        <th data-i18n="fan_temps.fan_1" data-colname='fan_temps.fan_1'></th>
		        <th data-i18n="fan_temps.fan_2" data-colname='fan_temps.fan_2'></th>
		        <th data-i18n="fan_temps.ta0p" data-colname='fan_temps.ta0p'></th>
		        <th data-i18n="fan_temps.tc0f" data-colname='fan_temps.tc0f'></th>
		        <th data-i18n="fan_temps.tc0d" data-colname='fan_temps.tc0d'></th>
		        <th data-i18n="fan_temps.tc0p_short" data-colname='fan_temps.tc0p'></th>
		        <th data-i18n="fan_temps.tb0t" data-colname='fan_temps.tb0t'></th>
		        <th data-i18n="fan_temps.tb1t" data-colname='fan_temps.tb1t'></th>
		        <th data-i18n="fan_temps.tb2t" data-colname='fan_temps.tb2t'></th>
		        <th data-i18n="fan_temps.tg0d" data-colname='fan_temps.tg0d'></th>
		        <th data-i18n="fan_temps.tg0h" data-colname='fan_temps.tg0h'></th>
		        <th data-i18n="fan_temps.tg0p_short" data-colname='fan_temps.tg0p'></th>
		        <th data-i18n="fan_temps.tl0p_short" data-colname='fan_temps.tl0p'></th>
		        <th data-i18n="fan_temps.th0p_short" data-colname='fan_temps.th0p'></th>
		        <th data-i18n="fan_temps.th0h" data-colname='fan_temps.th0h'></th>
		        <th data-i18n="fan_temps.th1h" data-colname='fan_temps.th0h'></th>
		        <th data-i18n="fan_temps.th2h" data-colname='fan_temps.th2h'></th>
		        <th data-i18n="fan_temps.tm0s" data-colname='fan_temps.tm0s'></th>
		        <th data-i18n="fan_temps.tm0p_short" data-colname='fan_temps.tm0p'></th>
		        <th data-i18n="fan_temps.ts0p" data-colname='fan_temps.ts0p'></th>
		        <th data-i18n="fan_temps.tm0p_short" data-colname='fan_temps.tm0p'></th>
		        <th data-i18n="fan_temps.tn0h" data-colname='fan_temps.tn0h'></th>
		        <th data-i18n="fan_temps.tn0d_short" data-colname='fan_temps.tn0d'></th>
		        <th data-i18n="fan_temps.tn0p_short" data-colname='fan_temps.tn0p'></th>
		        <th data-i18n="fan_temps.tp0p_short" data-colname='fan_temps.tp0p'></th>
		      </tr>
		    </thead>
		    <tbody>
		    	<tr>
					<td data-i18n="listing.loading" colspan="28" class="dataTables_empty"></td>
				</tr>
		    </tbody>
		  </table>
    </div> <!-- /span 12 -->
  </div> <!-- /row -->
</div>  <!-- /container -->

<script type="text/javascript">

	$(document).on('appUpdate', function(e){

		var oTable = $('.table').DataTable();
		oTable.ajax.reload();
		return;

	});	

	$(document).on('appReady', function(e, lang) {

        // Get modifiers from data attribute
        var mySort = [], // Initial sort
            hideThese = [], // Hidden columns
            col = 0, // Column counter
            runtypes = [], // Array for runtype column 
            columnDefs = [{ visible: false, targets: hideThese }]; //Column Definitions

        $('.table th').map(function(){

            columnDefs.push({name: $(this).data('colname'), targets: col});

            if($(this).data('sort')){
              mySort.push([col, $(this).data('sort')])
            }

            if($(this).data('hide')){
              hideThese.push(col);
            }

            col++
        });

	    oTable = $('.table').dataTable( {
            ajax: {
                url: appUrl + '/datatables/data',
                type: "POST",
                data: function(d){
                    d.mrColNotEmpty = "fan_temps.id";
                        
                    // Check for column in search
                    if(d.search.value){
                        $.each(d.columns, function(index, item){
                            if(item.name == 'munkireport.' + d.search.value){
                                d.columns[index].search.value = '> 0';
                            }
                        });

                    };
                }
            },
            dom: mr.dt.buttonDom,
            buttons: mr.dt.buttons,
            order: mySort,
            columnDefs: columnDefs,
		    createdRow: function( nRow, aData, iDataIndex ) {
	        	// Update name in first column to link
	        	var name=$('td:eq(0)', nRow).html();
	        	if(name == ''){name = "No Name"};
	        	var sn=$('td:eq(1)', nRow).html();
                var link = mr.getClientDetailLink(name, sn, '#tab_fan_temps-tab');
	        	$('td:eq(0)', nRow).html(link);

                var temperature_unit = "<?=conf('temperature_unit')?>";

			var columnvar=$('td:eq(2)', nRow).html();
			if(columnvar == null) {
				 $('td:eq(2)', nRow).html('');
			} else{				 
				 $('td:eq(2)', nRow).html(columnvar+" "+i18n.t('fan_temps.rpm'));
			}
                
			var columnvar=$('td:eq(3)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(3)', nRow).html('');
			} else{				 
				 $('td:eq(3)', nRow).html(columnvar+" "+i18n.t('fan_temps.rpm'));
			}
                
			var columnvar=$('td:eq(4)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(4)', nRow).html('');
			} else{				 
				 $('td:eq(4)', nRow).html(columnvar+" "+i18n.t('fan_temps.rpm'));
			}
                
			// ambient air 0
			var columnvar=$('td:eq(5)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(5)', nRow).html('');
			} else{				 
				 temperature_c = parseFloat((columnvar * 1).toFixed(2))+"°C";
				 temperature_f = parseFloat(((columnvar * 9/5 ) + 32 ).toFixed(2))+"°F";
				 if ( temperature_unit == "F" ){<commit_msg>Removed blank rpm label (#833)<commit_after><?php $this->view('partials/head'); ?>

<?php //Initialize models needed for the table
new Machine_model;
new Reportdata_model;
new Fan_temps_model;
?>

<div class="container">

  <div class="row">

  	<div class="col-lg-12">

		  <h3><span data-i18n="fan_temps.reporttitle"></span> <span id="total-count" class='label label-primary'>…</span></h3>
		  
		  <table class="table table-striped table-condensed table-bordered">
		    <thead>
		      <tr>
		      	<th data-i18n="listing.computername" data-colname='machine.computer_name'></th>
		        <th data-i18n="serial" data-colname='reportdata.serial_number'></th>
		        <th data-i18n="fan_temps.fan_0" data-colname='fan_temps.fan_0'></th>
		        <th data-i18n="fan_temps.fan_1" data-colname='fan_temps.fan_1'></th>
		        <th data-i18n="fan_temps.fan_2" data-colname='fan_temps.fan_2'></th>
		        <th data-i18n="fan_temps.ta0p" data-colname='fan_temps.ta0p'></th>
		        <th data-i18n="fan_temps.tc0f" data-colname='fan_temps.tc0f'></th>
		        <th data-i18n="fan_temps.tc0d" data-colname='fan_temps.tc0d'></th>
		        <th data-i18n="fan_temps.tc0p_short" data-colname='fan_temps.tc0p'></th>
		        <th data-i18n="fan_temps.tb0t" data-colname='fan_temps.tb0t'></th>
		        <th data-i18n="fan_temps.tb1t" data-colname='fan_temps.tb1t'></th>
		        <th data-i18n="fan_temps.tb2t" data-colname='fan_temps.tb2t'></th>
		        <th data-i18n="fan_temps.tg0d" data-colname='fan_temps.tg0d'></th>
		        <th data-i18n="fan_temps.tg0h" data-colname='fan_temps.tg0h'></th>
		        <th data-i18n="fan_temps.tg0p_short" data-colname='fan_temps.tg0p'></th>
		        <th data-i18n="fan_temps.tl0p_short" data-colname='fan_temps.tl0p'></th>
		        <th data-i18n="fan_temps.th0p_short" data-colname='fan_temps.th0p'></th>
		        <th data-i18n="fan_temps.th0h" data-colname='fan_temps.th0h'></th>
		        <th data-i18n="fan_temps.th1h" data-colname='fan_temps.th0h'></th>
		        <th data-i18n="fan_temps.th2h" data-colname='fan_temps.th2h'></th>
		        <th data-i18n="fan_temps.tm0s" data-colname='fan_temps.tm0s'></th>
		        <th data-i18n="fan_temps.tm0p_short" data-colname='fan_temps.tm0p'></th>
		        <th data-i18n="fan_temps.ts0p" data-colname='fan_temps.ts0p'></th>
		        <th data-i18n="fan_temps.tm0p_short" data-colname='fan_temps.tm0p'></th>
		        <th data-i18n="fan_temps.tn0h" data-colname='fan_temps.tn0h'></th>
		        <th data-i18n="fan_temps.tn0d_short" data-colname='fan_temps.tn0d'></th>
		        <th data-i18n="fan_temps.tn0p_short" data-colname='fan_temps.tn0p'></th>
		        <th data-i18n="fan_temps.tp0p_short" data-colname='fan_temps.tp0p'></th>
		      </tr>
		    </thead>
		    <tbody>
		    	<tr>
					<td data-i18n="listing.loading" colspan="28" class="dataTables_empty"></td>
				</tr>
		    </tbody>
		  </table>
    </div> <!-- /span 12 -->
  </div> <!-- /row -->
</div>  <!-- /container -->

<script type="text/javascript">

	$(document).on('appUpdate', function(e){

		var oTable = $('.table').DataTable();
		oTable.ajax.reload();
		return;

	});	

	$(document).on('appReady', function(e, lang) {

        // Get modifiers from data attribute
        var mySort = [], // Initial sort
            hideThese = [], // Hidden columns
            col = 0, // Column counter
            runtypes = [], // Array for runtype column 
            columnDefs = [{ visible: false, targets: hideThese }]; //Column Definitions

        $('.table th').map(function(){

            columnDefs.push({name: $(this).data('colname'), targets: col});

            if($(this).data('sort')){
              mySort.push([col, $(this).data('sort')])
            }

            if($(this).data('hide')){
              hideThese.push(col);
            }

            col++
        });

	    oTable = $('.table').dataTable( {
            ajax: {
                url: appUrl + '/datatables/data',
                type: "POST",
                data: function(d){
                    d.mrColNotEmpty = "fan_temps.id";
                        
                    // Check for column in search
                    if(d.search.value){
                        $.each(d.columns, function(index, item){
                            if(item.name == 'munkireport.' + d.search.value){
                                d.columns[index].search.value = '> 0';
                            }
                        });

                    };
                }
            },
            dom: mr.dt.buttonDom,
            buttons: mr.dt.buttons,
            order: mySort,
            columnDefs: columnDefs,
		    createdRow: function( nRow, aData, iDataIndex ) {
	        	// Update name in first column to link
	        	var name=$('td:eq(0)', nRow).html();
	        	if(name == ''){name = "No Name"};
	        	var sn=$('td:eq(1)', nRow).html();
                var link = mr.getClientDetailLink(name, sn, '#tab_fan_temps-tab');
	        	$('td:eq(0)', nRow).html(link);

                var temperature_unit = "<?=conf('temperature_unit')?>";

			var columnvar=$('td:eq(2)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(2)', nRow).html('');
			} else{				 
				 $('td:eq(2)', nRow).html(columnvar+" "+i18n.t('fan_temps.rpm'));
			}
                
			var columnvar=$('td:eq(3)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(3)', nRow).html('');
			} else{				 
				 $('td:eq(3)', nRow).html(columnvar+" "+i18n.t('fan_temps.rpm'));
			}
                
			var columnvar=$('td:eq(4)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(4)', nRow).html('');
			} else{				 
				 $('td:eq(4)', nRow).html(columnvar+" "+i18n.t('fan_temps.rpm'));
			}
                
			// ambient air 0
			var columnvar=$('td:eq(5)', nRow).html();
			if(columnvar == "") {
				 $('td:eq(5)', nRow).html('');
			} else{				 
				 temperature_c = parseFloat((columnvar * 1).toFixed(2))+"°C";
				 temperature_f = parseFloat(((columnvar * 9/5 ) + 32 ).toFixed(2))+"°F";
				 if ( temperature_unit == "F" ){
{'fraction_non_alphanumeric': 0.1938446264581782, 'fraction_numerical': 0.02506825515016133, 'mean_word_length': 2.2468439430566747, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 181, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6123788', 'n_tokens_mistral': 4971, 'n_tokens_neox': 4407, 'n_words': 615}