Sha256: d8abbdc4739dcd53b962c548082bdc42b2793929eaeae82b1ea21099999189e9

Contents?: true

Size: 750 Bytes

Versions: 2

Compression:

Stored size: 750 Bytes

Contents

module Naf
  class LogParsersController < Naf::ApiSimpleClusterAuthenticatorApplicationController

    def logs
      if naf_cookie_valid?
        if params['record_id'].present?
          response = params['logical_type'].constantize.new(params).logs

          if response.present?
            success = true
          else
            success = false
          end
        else
          response = {
            logs: '&nbsp;&nbsp;<span>Record id is not present</br></span>'
          }
          success = false
        end

        render json: "convertToJsonCallback(" + { success: success }.merge(response).to_json + ")"
      else
        render json: "convertToJsonCallback(" + { success: false }.to_json + ")"
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
naf-2.1.12 app/controllers/naf/log_parsers_controller.rb
naf-2.1.11 app/controllers/naf/log_parsers_controller.rb