<commit_before><?$this->view('partials/head', array(
	"scripts" => array(
		"clients/client_list.js"
	)
));
//Initialize network model
new Network_model?>

<div class="container">

  <div class="row">

  	<div class="col-lg-12">
		<script type="text/javascript">

		$(document).ready(function() {

				// Get modifiers from data attribute
				var myCols = [], // Colnames
					mySort = [], // Initial sort
					hideThese = [], // Hidden columns
					col = 0; // Column counter

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

					  myCols.push({'mData' : $(this).data('colname')});

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

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

					  col++
				});

			    oTable = $('.table').dataTable( {
			        "bProcessing": true,
			        "bServerSide": true,
			        "sAjaxSource": "<?=url('datatables/data')?>",
			        "aaSorting": mySort,
			        "aoColumns": myCols,
			        "aoColumnDefs": [
			        	{ 'bVisible': false, "aTargets": hideThese }
					],
			        "fnCreatedRow": 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 = get_client_detail_link(name, sn, '<?=url()?>/');
			        	$('td:eq(0)', nRow).html(link);

			        	// Status
			        	var status=$('td:eq(2)', nRow).html();
			        	status = status == 1 ? '<span class="label label-success">Enabled</span>' : 
			        		(status === '0' ? '<span class="label label-danger">Disabled</span>' : '')
			        	$('td:eq(2)', nRow).html(status)

				    }
			    } );
			} );
		</script>

		  <h3>Network report <span id="total-count" class='label label-primary'>…</span></h3>

		  <table class="table table-striped table-condensed table-bordered">
		    <thead>
		      <tr>
		      	<th data-colname='machine#computer_name'>Name</th>
		        <th data-colname='machine#serial_number'>Serial</th>
		        <th data-colname='network#status'>Status</th>
		        <th data-colname='network#ethernet'>Ethernet</th>
		        <th data-colname='network#ipv4ip'>IP Address</th>
		        <th data-colname='network#ipv4router'>Router</th>
		        <th data-colname='network#ipv4mask'>Mask</th>
		      </tr>
		    </thead>
		    <tbody>
		    	<tr>
					<td colspan="6" class="dataTables_empty">Loading data from server</td>
				</tr>
		    </tbody>
		  </table>
    </div> <!-- /span 12 -->
  </div> <!-- /row -->
</div>  <!-- /container -->

<?$this->view('partials/foot')?><commit_msg>Add service column to network listing<commit_after><?$this->view('partials/head', array(
	"scripts" => array(
		"clients/client_list.js"
	)
));
//Initialize network model
new Network_model?>

<div class="container">

  <div class="row">

  	<div class="col-lg-12">
		<script type="text/javascript">

		$(document).ready(function() {

				// Get modifiers from data attribute
				var myCols = [], // Colnames
					mySort = [], // Initial sort
					hideThese = [], // Hidden columns
					col = 0; // Column counter

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

					  myCols.push({'mData' : $(this).data('colname')});

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

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

					  col++
				});

			    oTable = $('.table').dataTable( {
			        "bProcessing": true,
			        "bServerSide": true,
			        "sAjaxSource": "<?=url('datatables/data')?>",
			        "aaSorting": mySort,
			        "aoColumns": myCols,
			        "aoColumnDefs": [
			        	{ 'bVisible': false, "aTargets": hideThese }
					],
			        "fnCreatedRow": 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 = get_client_detail_link(name, sn, '<?=url()?>/');
			        	$('td:eq(0)', nRow).html(link);

			        	// Status
			        	var status=$('td:eq(3)', nRow).html();
			        	status = status == 1 ? '<span class="label label-success">Enabled</span>' : 
			        		(status === '0' ? '<span class="label label-danger">Disabled</span>' : '')
			        	$('td:eq(3)', nRow).html(status)

				    }
			    } );
			} );
		</script>

		  <h3>Network report <span id="total-count" class='label label-primary'>…</span></h3>

		  <table class="table table-striped table-condensed table-bordered">
		    <thead>
		      <tr>
		      	<th data-colname='machine#computer_name'>Name</th>
		        <th data-colname='machine#serial_number'>Serial</th>
		        <th data-colname='network#service'>Service</th>
		        <th data-colname='network#status'>Status</th>
		        <th data-colname='network#ethernet'>Ethernet</th>
		        <th data-colname='network#ipv4ip'>IP Address</th>
		        <th data-colname='network#ipv4router'>Router</th>
		        <th data-colname='network#ipv4mask'>Mask</th>
		      </tr>
		    </thead>
		    <tbody>
		    	<tr>
					<td colspan="6" class="dataTables_empty">Loading data from server</td>
				</tr>
		    </tbody>
		  </table>
    </div> <!-- /span 12 -->
  </div> <!-- /row -->
</div>  <!-- /container -->

<?$this->view('partials/foot')?>
{'fraction_non_alphanumeric': 0.2018214936247723, 'fraction_numerical': 0.006557377049180328, 'mean_word_length': 2.237617924528302, 'pattern_counts': {'":': 16, '<': 103, '<?xml version=': 0, '>': 109, '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': '3840344', 'n_tokens_mistral': 2225, 'n_tokens_neox': 1804, 'n_words': 326}