Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/glacials/splits-io. a speedrunning data store and analysis engine splits.io
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112require "administrate/base_dashboard"
class RunDashboard < Administrate::BaseDashboard # ATTRIBUTE_TYPES # a hash that describes the type of each of the model's fields. # # Each different type represents an Administrate::Field object, # which determines how the attribute is displayed # on pages throughout the dashboard. ATTRIBUTE_TYPES = { user: Field::BelongsTo, category: Field::BelongsTo, game: Field::HasOne, segments: Field::HasMany, id: Field::Number, created_at: Field::DateTime, updated_at: Field::DateTime, nick: Field::String, image_url: Field::String, realtime_duration_s: Field::String.with_options(searchable: false), program: Field::String, claim_token: Field::String, realtime_sum_of_best_s: Field::String.with_options(searchable: false), archived: Field::Boolean, video_url: Field::String, srdc_id: Field::String, attempts: Field::Number, s3_filename: Field::String, realtime_duration_ms: Field::Number, realtime_sum_of_best_ms: Field::Number, parsed_at: Field::DateTime, gametime_duration_ms: Field::Number, gametime_sum_of_best_ms: Field::Number, default_timing: Field::String, }.freeze
# COLLECTION_ATTRIBUTES # an array of attributes that will be displayed on the model's index page. # # By default, it's limited to four items to reduce clutter on index pages. # Feel free to add, remove, or rearrange items. COLLECTION_ATTRIBUTES = [ :user, :category, :game, :segments, ].freeze
# SHOW_PAGE_ATTRIBUTES # an array of attributes that will be displayed on the model's show page. SHOW_PAGE_ATTRIBUTES = [ :id, :user, :game, :category, :created_at, :updated_at, :parsed_at, :realtime_duration_s, :realtime_sum_of_best_s, :realtime_duration_ms, :realtime_sum_of_best_ms, :gametime_duration_ms, :gametime_sum_of_best_ms, :default_timing, :segments, :image_url, :program, :claim_token, :archived, :video_url, :attempts, :srdc_id, :s3_filename, :nick, ].freeze
# FORM_ATTRIBUTES # an array of attributes that will be displayed # on the model's form (`new` and `edit`) pages. FORM_ATTRIBUTES = [ :user, :category, :game, :segments, :nick, :image_url, :realtime_duration_s, :program, :claim_token, :realtime_sum_of_best_s, :archived, :video_url, :srdc_id, :attempts, :s3_filename, :realtime_duration_ms, :realtime_sum_of_best_ms, :parsed_at, :gametime_duration_ms, :gametime_sum_of_best_ms, :default_timing, ].freeze
# Overwrite this method to customize how runs are displayed # across all pages of the admin dashboard. # def display_resource(run) run.id36 endend