cirandas.net

ref: master

plugins/social_statistics/config/blazer.yml.dist


# see https://github.com/ankane/blazer for more info

data_sources:
  main:
    url: <%= ENV["BLAZER_DATABASE_URL"] %>

    # statement timeout, in seconds
    # none by default
    # timeout: 15

    # caching settings
    # can greatly improve speed
    # off by default
    # cache:
    #   mode: slow # or all
    #   expires_in: 60 # min
    #   slow_threshold: 15 # sec, only used in slow mode

    # wrap queries in a transaction for safety
    # not necessary if you use a read-only user
    # true by default
    # use_transaction: false

    smart_variables:
      # zone_id: "SELECT id, name FROM zones ORDER BY name ASC"
      period: ["day", "week", "month"]
      # status: {0: "Active", 1: "Archived"}
      category_id: "SELECT id, name FROM categories where type is null ORDER BY name ASC"
      category_parent_id: "SELECT parents.id, parents.name FROM categories as parents inner join categories as children on parents.id = children.parent_id where parents.type is null ORDER BY parents.name ASC"
      region_id: "SELECT id, name FROM categories where type = 'Region' ORDER BY name ASC"
      region_parent_id: "SELECT parents.id, parents.name FROM categories as parents inner join categories as children on parents.id = children.parent_id where parents.type = 'Region' ORDER BY parents.name ASC"
      tag_id: "SELECT id, name FROM tags ORDER BY name ASC"


    linked_columns:
      # user_id: "/admin/users/{value}"

    smart_columns:
      # user_id: "SELECT id, name FROM users WHERE id IN {value}"

# create audits
audit: true

# change the time zone
# time_zone: "Pacific Time (US & Canada)"

# class name of the user model
# user_class: User

# method name for the user model
# user_name: name

# optional auth method to use as a before_action (default: nil)
before_action: social_statistics_plugin_verify_access

# email to send checks from
# from_email: blazer@example.org

check_schedules:
  - "1 day"
  - "1 hour"
  - "5 minutes"