Class: Marty::ApiLogView
- Includes:
- Extras::Layout
- Defined in:
- app/components/marty/api_log_view.rb
Constant Summary collapse
- DATE_OP_MAP =
{ 'eq' => '=', 'gt' => '>', 'lt' => '<' }
- @@attrs =
[ :timestamp_custom, :script, :node, :attrs, :input, :output, :error, :remote_ip, :auth_name, :start_time, :end_time, ]
Constants included from Extras::Layout
Extras::Layout::BOOL_MAP, Extras::Layout::MAP_BOOL
Constants included from Permissions
Instance Method Summary collapse
Methods included from Extras::Layout
#bool_getter, #bool_setter, #dispfield, #enum_array, #enum_column, #enum_setter, #fieldset, #get_sorter, #hbox, #hspacer, #jsonb_field, #nullable_bool_column, #range_column, #range_field, #range_getter, #range_setter, #textarea_field, #tooltip, #vbox, #vspacer
Methods inherited from Grid
#child_components, #class_can?, #configure_form_window, #get_json_sorter, #has_search_action?, #initialize, #linked_components
Methods included from Permissions
#can_call_endpoint?, #can_perform_action?, #can_perform_actions, #current_user_roles, extended, #has_any_perm?, #has_marty_permissions, #has_perm?
Constructor Details
This class inherits a constructor from Marty::Grid
Instance Method Details
#configure(c) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'app/components/marty/api_log_view.rb', line 26 def configure(c) super c.editing = :in_form c.paging = :pagination c.title = 'Api Log View' c.model = Marty::Log c.attributes = @@attrs c.scope = { message_type: 'api' } c.store_config.merge!(sorters: [{ property: :timestamp, direction: 'DESC' }]) end |
#default_form_items ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'app/components/marty/api_log_view.rb', line 42 def default_form_items [ :script, :node, :attrs, :start_time, :end_time, textarea_field(:input).merge!(height: 300), textarea_field(:output).merge!(height: 300), :error, :remote_ip, :auth_name, ] end |