def process_stats
      @items = basic_collection
      
      handle_special_fields
      
      data = {
        alternatives: [
          {
            type: 'spread',
            uri: url_for(action: "spread_stats", field: params[:field], filters: params[:filters], only_path: true)
          },
          {
            type: 'process'
          }
        ],
        from: @stat_from.to_time.utc.to_i * 1000,
        thru: @stat_thru.to_time.utc.to_i * 1000,
        step: @stat_step.to_i * 1000,
        data: @items.stat(params[:field], @stat_from, @stat_thru, @stat_step)
      }
      
      if further_details.keys.include? params[:field]
        filters = (params[:filters] || {})
        filters[params[:field]] = '%{self}'
        
        data[:detail_uri] = url_for(action: "process_stats", field: further_details[params[:field]], filters: filters, only_path: true)
      end
      
      render json: data
    end
def process_stats
      @items = basic_collection
      
      handle_special_fields
      
      data = {
        alternatives: [
          {
            type: 'spread',
            uri: url_for(action: "spread_stats", field: params[:field], filters: params[:filters], only_path: true)
          },
          {
            type: 'process'
          }
        ],
        from: @stat_from.to_time.utc.to_i * 1000,
        thru: @stat_thru.to_time.utc.to_i * 1000,
        step: @stat_step.to_i * 1000,
        data: @items.stat(params[:field], @stat_from, @stat_thru, @stat_step)
      }
      
      if further_details.keys.include? params[:field]
        filters = (params[:filters] || {})
        filters[params[:field]] = '%{self}'
        
        data[:detail_uri] = url_for(action: "process_stats", field: further_details[params[:field]], filters: filters, only_path: true)
      end
      
      render json: data
    end
This action generates a JSON for a process statistics.