<commit_before>.state('<%-s.friendly%>', {
 url: '<%-stateName%>',
 templateUrl: 'partial/<%=controller%>.html',
 controller: '<%=controller%>Ctrl'
})
<% Object.keys(s.elements).forEach(function(actionableName){ 
var a = s.elements[actionableName]; %>
.state('<%-s.friendly%>.<%=actionableName%>', {
  url: '/<%=actionableName%><%-a.subPath%>',
  templateUrl: 'partial/<%=controller%>.<%=actionableName%>.html',
  controller:function($scope, $stateParams,RestService, SocketService,$translate) {
    var stateName = '<%=actionableName%>';
    var id = $scope.params.id= $stateParams.id;
    if(id){
      RestService['FINDBYID']('<%- s.url %>', null,id,function(err,data){
        $scope.data[stateName]=data;
        console.log("Loaded %s",$stateParams.id,$scope.data[stateName]);
      });
    }
    <%
      var actions= a.components.actions; 
      Object.keys(actions).forEach(function(act){
        var action = actions[act];
      %>
      // This method is called when using a REST API
      
      <% if(act.match(/find/i)){ %>
        $scope.currentPage=1; 
        
        $scope.gridOptions = {
            data: 'table.results',
//            enableCellSelection: true,
//            enableRowSelection: false,
//            enableCellEditOnFocus: true,
            columnDefs: [
                         <% 
                         console.log(a.components);
                         var elems =a.components.elements;
                         Object.keys(elems).forEach(function(elem){
                           var element=elems[elem];
                         %>
                         {field: '<%-elem%>', headerCellTemplate:"<span>{{'<%-element.ui.title%>'|translate}}</span>"}, 
                        <%});%>
                        ]
        }
        
        $scope.on<%= act %> = function(notUsed,page) {
          page = page || 1;
          var data = $scope.data['<%= act %>'];
          RestService['<%= act %>']('<%- s.url%>', data,page,function(err,data){
            console.log("loading page:", JSON.stringify(data,null,2))
            $scope.table=data;<commit_msg>remove log<commit_after>.state('<%-s.friendly%>', {
 url: '<%-stateName%>',
 templateUrl: 'partial/<%=controller%>.html',
 controller: '<%=controller%>Ctrl'
})
<% Object.keys(s.elements).forEach(function(actionableName){ 
var a = s.elements[actionableName]; %>
.state('<%-s.friendly%>.<%=actionableName%>', {
  url: '/<%=actionableName%><%-a.subPath%>',
  templateUrl: 'partial/<%=controller%>.<%=actionableName%>.html',
  controller:function($scope, $stateParams,RestService, SocketService,$translate) {
    var stateName = '<%=actionableName%>';
    var id = $scope.params.id= $stateParams.id;
    if(id){
      RestService['FINDBYID']('<%- s.url %>', null,id,function(err,data){
        $scope.data[stateName]=data;
        console.log("Loaded %s",$stateParams.id,$scope.data[stateName]);
      });
    }
    <%
      var actions= a.components.actions; 
      Object.keys(actions).forEach(function(act){
        var action = actions[act];
      %>
      // This method is called when using a REST API
      
      <% if(act.match(/find/i)){ %>
        $scope.currentPage=1; 
        
        $scope.gridOptions = {
            data: 'table.results',
//            enableCellSelection: true,
//            enableRowSelection: false,
//            enableCellEditOnFocus: true,
            columnDefs: [
                         <% 
                         var elems =a.components.elements;
                         Object.keys(elems).forEach(function(elem){
                           var element=elems[elem];
                         %>
                         {field: '<%-elem%>', headerCellTemplate:"<span>{{'<%-element.ui.title%>'|translate}}</span>"}, 
                        <%});%>
                        ]
        }
        
        $scope.on<%= act %> = function(notUsed,page) {
          page = page || 1;
          var data = $scope.data['<%= act %>'];
          RestService['<%= act %>']('<%- s.url%>', data,page,function(err,data){
            console.log("loading page:", JSON.stringify(data,null,2))
            $scope.table=data;
{'fraction_non_alphanumeric': 0.18604091456077015, 'fraction_numerical': 0.001444043321299639, 'mean_word_length': 2.1014925373134328, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, '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': '2445364', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1218, 'n_words': 177}