 <md-toolbar layout="row" class="md-toolbar-tools md-whiteframe-4dp small-toolbar" >
	<span flex></span>
   	<h5>Log servizio conversione <span hide-xs>flussi ed acquisizione esiti</span> <small>({{ctrl.maxItems}} elementi)</small></h5>
    <span flex></span>
    
    <md-input-container md-theme="toolbar" md-no-float class="md-hue-1" layout="row" layout-align="end center">
		<input type="text" ng-model="ctrl.inputFile" ng-change="ctrl.getLog()" aria-label="filtro ricerca" class="toolbar-search" ng-model-options="{debounce: 400}">
		<i class="fa fa-search"></i>
	</md-input-container>	   
	    		
 </md-toolbar>
 
 <div layout="row" flex="100" style="width:100%">
 	<md-list id="list" flex>
 		<md-subheader layout="row">
 			<div flex="100" layout="row" id="header" ng-init="ctrl.orderField='-dataAcquisizione'">
		 		 	<md-button ng-click="ctrl.setOrderField('dataAcquisizione')" ng-style="ctrl.getColumnWidth(0)" tooltip="Data acquisizione">
		 				Data attività
		 				<md-icon md-font-icon="fa fa-sort" class="fa"></md-icon>
	 				</md-button>
		 		<md-button ng-click="ctrl.setOrderField('tipoAcquisizione')" ng-style="ctrl.getColumnWidth(1)" tooltip="Tipo attività">
		 			Tipo attività
		 			<i class="fa fa-sort"></i>
	 			</md-button>
		 		
		 		<md-button ng-click="ctrl.setOrderField('descrizioneEsito')" ng-style="ctrl.getColumnWidth(2)" tooltip="Descrizione esito">
		 			Descrizione esito
		 			<i class="fa fa-sort"></i>
	 			</md-button>
				<md-button ng-click="ctrl.setOrderField('inputFile')" ng-style="ctrl.getColumnWidth(3)" tooltip="Flusso in ingresso">
		 			Flusso in ingresso
		 			<i class="fa fa-sort"></i>
	 			</md-button>
				<md-button ng-click="ctrl.setOrderField('backupFile')" ng-style="ctrl.getColumnWidth(4)" tooltip="Flusso in uscita">
		 			Flusso in uscita
		 			<i class="fa fa-sort"></i>
	 			</md-button>
 			</div>
		</md-subheader>
 		
 		<div layout="column">
			<div class="virtualRepeatVerticalUsage" id="container" ng-style="ctrl.getListHeight()" ng-style="ctrl.getMaxListWidth()">
				<md-virtual-repeat-container id="vertical-container" ng-style="ctrl.getMaxListWidth()">
				     <div class="md-1-line hilight"  md-on-demand md-virtual-repeat="data in ctrl.infiniteItems" md-item-size="25" style="margin-left:60px" ng-style="ctrl.getGridItemHeight()" ang-style="ctrl.getMaxListWidth()">
					     <div  ng-style="ctrl.getGridItemHeight()"  ang-style="ctrl.getMaxListWidth()"  layout="row" ng-click="ctrl.getLogDetail($index)"
					      layout-align="start center"
					     ng-class="{'status-ok':data.esito==1,'status-warning':data.esito==2,'status-error':data.esito==0,'selectedRow': ctrl.selectedIndex===$index}">
					     	<div style="width:0" ng-style="ctrl.getGridItemHeight()" ></div>
					     	<div ng-style="ctrl.getColumnWidth(0)"><span>{{data.dataAcquisizione.formatAsDateTime()}}</span></div>
					     	<div ng-style="ctrl.getColumnWidth(1)" style="word-wrap: break-word;word-break: break-all;"><span title="{{data.tipoAcquisizione}}">{{data.tipoAcquisizione}}</span></div>
					     	<div ng-style="ctrl.getColumnWidth(2)" style="word-wrap: break-word;word-break: break-all;">
					     		<span title="{{data.descrizioneEsito}}">
					     			{{data.descrizioneEsito}}
					     			<md-tooltip>{{data.descrizioneEsito}}</md-tooltip>
					     		</span>
					     		</div>
					     	<div ng-style="ctrl.getColumnWidth(3)" style="word-wrap: break-word;word-break: break-all;">
					     		<span title="{{data.inputFile}}">
					     			{{ctrl.onlyFilename(data.inputFile)}}
					     		</span>
					     	</div>
					     	<div ng-style="ctrl.getColumnWidth(4)" style="word-wrap: break-word;word-break: break-all;"><span title="{{data.backupFile}}">{{ctrl.onlyFilename(data.backupFile)}}</span></div>
					     </div>
				     </div>
			     </md-virtual-repeat-container>
		     </div>
		     <md-content style="height:350px;margin-top:30px" >
		     	<md-toolbar layout="row" class="md-toolbar-tools md-whiteframe-4dp small-toolbar" style="position:sticky;top:-1px;">
				   	<h5 style="width:100%;text-align:center">Dettagli log</h5>
				    <span flex></span>
			    </md-toolbar>
		     	<div ng-bind-html="ctrl.logDetails.value|to_trusted" ng-if="ctrl.selectedIndex != -1"></div>	
		     </md-content>
		</div>			 	
 	</md-list>
 
 </div>
 