├── log
└── .keep
├── doc
└── CHANGELOG.md
├── tmp
└── sockets
│ └── .keep
├── app
├── views
│ ├── my
│ │ ├── home
│ │ │ ├── index.html.erb
│ │ │ ├── _index
│ │ │ │ └── _tab_bar_footer.html.erb
│ │ │ ├── _tab_bar.html.erb
│ │ │ └── index.html+phone.erb
│ │ ├── _auth_navbar.html.erb
│ │ ├── _index
│ │ │ └── _tab_bar_footer.html+phone.erb
│ │ └── _show
│ │ │ └── _show_table_form.html.erb
│ ├── agent
│ │ ├── home
│ │ │ ├── index.html.erb
│ │ │ └── index.html+phone.erb
│ │ ├── _nav.html.erb
│ │ └── _brand_nav.html.erb
│ ├── board
│ │ ├── home
│ │ │ ├── index.html.erb
│ │ │ ├── _index
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── _tab_bar_footer.html.erb
│ │ │ │ ├── _tab_bar.html.erb
│ │ │ │ └── _organ_item.html+phone.erb
│ │ │ ├── direct.html.erb
│ │ │ └── _organ.html+phone.erb
│ │ └── _index
│ │ │ └── _tab_bar_footer.html+phone.erb
│ ├── com
│ │ ├── common
│ │ │ ├── deploy.html.erb
│ │ │ └── info.json.jbuilder
│ │ ├── panel
│ │ │ ├── csps
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── show.html.erb
│ │ │ │ └── _filter_form.html.erb
│ │ │ ├── errs
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── clean_other.turbo_stream.erb
│ │ │ │ ├── show.html.erb
│ │ │ │ └── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── log_sqls
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── clean.turbo_stream.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _filter_form.html.erb
│ │ │ │ └── _index_thead.html.erb
│ │ │ ├── err_summaries
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── clean.turbo_stream.erb
│ │ │ │ └── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── inbound_emails
│ │ │ │ ├── _button.html.erb
│ │ │ │ └── index.html.erb
│ │ │ ├── organs
│ │ │ │ ├── _edit
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _show_table.html.erb
│ │ │ │ └── _form.html.erb
│ │ │ ├── acme_accounts
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ └── _index_thead.html.erb
│ │ │ ├── acme_identifiers
│ │ │ │ ├── _form.html.erb
│ │ │ │ └── index.html.erb
│ │ │ ├── pg_publication_tables
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ └── _index
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── logs
│ │ │ │ ├── _ip
│ │ │ │ │ ├── _index_tr.html.erb
│ │ │ │ │ ├── _index_thead.html.erb
│ │ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ │ └── _filter_form.html.erb
│ │ │ │ ├── clean.turbo_stream.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ └── ip.html.erb
│ │ │ ├── ssh_keys
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ └── _index_thead.html.erb
│ │ │ ├── meta_controllers
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── sync.turbo_stream.erb
│ │ │ │ ├── _index_meta_controller.html.erb
│ │ │ │ ├── meta_actions.turbo_stream.erb
│ │ │ │ ├── meta_namespaces.turbo_stream.erb
│ │ │ │ ├── meta_controllers.turbo_stream.erb
│ │ │ │ ├── _button.html.erb
│ │ │ │ ├── _filter_form.html.erb
│ │ │ │ ├── _index
│ │ │ │ │ └── _index_table.html.erb
│ │ │ │ └── index.html.erb
│ │ │ ├── meta_models
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── sync.turbo_stream.erb
│ │ │ │ ├── index_update.turbo_stream.erb
│ │ │ │ ├── _business_tbody.html.erb
│ │ │ │ ├── _indexes
│ │ │ │ │ ├── _index_tr.html.erb
│ │ │ │ │ ├── _index_thead.html.erb
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── index_edit.turbo_stream.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── indexes.html.erb
│ │ │ │ ├── options.turbo_stream.erb
│ │ │ │ ├── columns.turbo_stream.erb
│ │ │ │ ├── _meta_columns_options.html.erb
│ │ │ │ └── _reflections
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── pg_publications
│ │ │ │ ├── create.turbo_stream.erb
│ │ │ │ └── create_all.turbo_stream.erb
│ │ │ ├── blobs
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _new_form.html.erb
│ │ │ │ ├── index.html.erb
│ │ │ │ └── unattached.html.erb
│ │ │ ├── acme_orders
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ └── _index
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── attachments
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ └── index.html.erb
│ │ │ ├── blob_defaults
│ │ │ │ ├── add.turbo_stream.erb
│ │ │ │ ├── _form.html.erb
│ │ │ │ └── sync.turbo_stream.erb
│ │ │ ├── states
│ │ │ │ └── _index_tr.html.erb
│ │ │ ├── meta_columns
│ │ │ │ ├── sync.turbo_stream.erb
│ │ │ │ ├── test.turbo_stream.erb
│ │ │ │ ├── _form.html.erb
│ │ │ │ └── _index
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── meta_businesses
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── sync.turbo_stream.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── _button.html.erb
│ │ │ │ └── _show_table.html.erb
│ │ │ ├── meta_namespaces
│ │ │ │ ├── sync.turbo_stream.erb
│ │ │ │ ├── _form.html.erb
│ │ │ │ └── _button.html.erb
│ │ │ ├── home
│ │ │ │ └── index.html.erb
│ │ │ ├── meta_actions
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── index.html.erb
│ │ │ │ ├── update.turbo_stream.erb
│ │ │ │ ├── _index
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ ├── _roles.html.erb
│ │ │ │ └── _index_thead.html.erb
│ │ │ ├── cache_lists
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ └── _show_table.html.erb
│ │ │ ├── detectors
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ └── _form.html.erb
│ │ │ ├── detector_errors
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ └── _index_tbody.html.erb
│ │ │ ├── infos
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ └── _index_thead.html.erb
│ │ │ ├── detector_logs
│ │ │ │ └── _index
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── acme_servicers
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ └── _index_tbody.html.erb
│ │ │ ├── err_bots
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ └── index.html.erb
│ │ │ └── puma
│ │ │ │ └── thread_stats.html.erb
│ │ ├── admin
│ │ │ ├── organs
│ │ │ │ ├── _edit
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _show_table.html.erb
│ │ │ │ └── _form.html.erb
│ │ │ └── filters
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ ├── create.turbo_stream.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── detect.turbo_stream.erb
│ │ │ │ ├── _show_table.html.erb
│ │ │ │ ├── column.turbo_stream.erb
│ │ │ │ ├── column_single.turbo_stream.erb
│ │ │ │ ├── _update
│ │ │ │ └── _filter_form_tag.erb
│ │ │ │ └── update.turbo_stream.erb
│ │ ├── my
│ │ │ └── ssh_keys
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── remote_status.turbo_stream.erb
│ │ │ │ ├── _show
│ │ │ │ ├── _breadcrumb.html.erb
│ │ │ │ └── _button.html.erb
│ │ │ │ └── create.turbo_stream.erb
│ │ ├── audios
│ │ │ └── show.html.erb
│ │ ├── attachments
│ │ │ ├── _list_field_simple.html.erb
│ │ │ ├── _list_field.html+phone.erb
│ │ │ ├── _list_field.html.erb
│ │ │ └── _list_edit.html.erb
│ │ ├── videos
│ │ │ └── show.html.erb
│ │ ├── nodes
│ │ │ ├── outer.turbo_stream.erb
│ │ │ └── children.turbo_stream.erb
│ │ └── extra
│ │ │ └── _extra_form.html.erb
│ ├── panel
│ │ ├── home
│ │ │ ├── index.html.erb
│ │ │ ├── _index
│ │ │ │ └── _breadcrumb.html.erb
│ │ │ └── index.html+phone.erb
│ │ ├── _menu_bar.erb
│ │ ├── _brand_nav.html.erb
│ │ ├── _breadcrumb.html.erb
│ │ └── _nav_without_login.html.erb
│ ├── application
│ │ ├── _breadcrumb.html.erb
│ │ ├── _index_tfoot.html.erb
│ │ ├── _show_table.html.erb
│ │ ├── _tab_bar.html.erb
│ │ ├── _button_actions.html.erb
│ │ ├── _filter_default.html.erb
│ │ ├── _filter_dropdown.html.erb
│ │ ├── _filter_table.html.erb
│ │ ├── _head_analysis.html.erb
│ │ ├── _head_extra_js.html.erb
│ │ ├── _index_bar.html+phone.erb
│ │ ├── _nav_with_login.html.erb
│ │ ├── _show_table_form.html.erb
│ │ ├── _index_actions.html+phone.erb
│ │ ├── _nav_without_login.html.erb
│ │ ├── _tab_bar_footer.html+phone.erb
│ │ ├── _index_thead_actions.html+pad.erb
│ │ ├── role_denied.html+phone.erb
│ │ ├── role_denied.html.erb
│ │ ├── _modal_foot.html.erb
│ │ ├── destroy.turbo_stream.erb
│ │ ├── alert.turbo_stream.erb
│ │ ├── move_higher.turbo_stream.erb
│ │ ├── move_lower.turbo_stream.erb
│ │ ├── state_visit.html.erb
│ │ ├── _index_tr_without_actions.html.erb
│ │ ├── state_visit_get.html.erb
│ │ ├── visit.html.erb
│ │ ├── _index_list.html+phone.erb
│ │ ├── preview.turbo_stream.erb
│ │ ├── preview.turbo_stream+phone.erb
│ │ ├── _blank.html.erb
│ │ ├── destroy.turbo_stream+phone.erb
│ │ ├── state_visit.turbo_stream.erb
│ │ ├── _popup_layout.html.erb
│ │ ├── err.html.erb
│ │ ├── sync.turbo_stream.erb
│ │ ├── visit.turbo_stream.erb
│ │ ├── alert_message.turbo_stream.erb
│ │ ├── batch_destroy.turbo_stream.erb
│ │ ├── err.turbo_stream.erb
│ │ ├── show.turbo_stream.erb
│ │ ├── state_visit_get.turbo_stream.erb
│ │ ├── _page_no_more.html.erb
│ │ ├── _visit_state_get.html.erb
│ │ ├── _page_no_more.html+phone.erb
│ │ ├── _index_tbody.html.erb
│ │ ├── disposable_auth_fail.html.erb
│ │ ├── _index_thead.html.erb
│ │ ├── _show.html.erb
│ │ ├── _index_table_without_button.html+phone.erb
│ │ ├── _page_blank.html+phone.erb
│ │ ├── _page_loading.html.erb
│ │ ├── _show.html+phone.erb
│ │ ├── new.html.erb
│ │ ├── new.html+phone.erb
│ │ ├── _index_tr.html.erb
│ │ ├── _modal_form.html.erb
│ │ ├── refresh.turbo_stream.erb
│ │ ├── reorder.turbo_stream.erb
│ │ ├── show.html+phone.erb
│ │ ├── _head_title.html.erb
│ │ ├── _visit.html.erb
│ │ ├── _brand_nav.html.erb
│ │ ├── edit.turbo_stream.erb
│ │ ├── new.turbo_stream.erb
│ │ ├── _modal_header.html.erb
│ │ ├── _button.html+pad.erb
│ │ ├── _frame_layout_container.html.erb
│ │ ├── err_not_found.html.erb
│ │ ├── _filter_form_tag.erb
│ │ ├── _form.html.erb
│ │ ├── _button.html.erb
│ │ ├── refresh.turbo_stream+phone.erb
│ │ ├── _button.html+phone.erb
│ │ ├── _mini_program_message.html.erb
│ │ ├── _update.turbo_stream.erb
│ │ ├── actions.html.erb
│ │ ├── _edit_form.html+phone.erb
│ │ ├── _index.html+phone.erb
│ │ ├── _modal_form.html+phone.erb
│ │ ├── _page_loading.html+phone.erb
│ │ ├── _edit_inline_form.html.erb
│ │ ├── inline.turbo_stream.erb
│ │ ├── _index_item.html+phone.erb
│ │ ├── _visit.turbo_stream.erb
│ │ ├── _index_raw_table.html.erb
│ │ ├── _visit_state.html.erb
│ │ ├── _edit_form.html.erb
│ │ ├── _index_item.html.erb
│ │ ├── _new_form.html.erb
│ │ ├── inline.turbo_stream+phone.erb
│ │ ├── _index_sortable_table.html+phone.erb
│ │ ├── _modal_header.html+phone.erb
│ │ ├── _footer.html.erb
│ │ ├── show.html.erb
│ │ ├── _index_table.html.erb
│ │ ├── _index_table_without_striped.html.erb
│ │ ├── edit.html+phone.erb
│ │ ├── _index_sortable_table.html.erb
│ │ └── _new_form.html+phone.erb
│ ├── job
│ │ └── panel
│ │ │ ├── jobs
│ │ │ ├── _button.html.erb
│ │ │ ├── clear_all.turbo_stream.erb
│ │ │ ├── _index_tr.html.erb
│ │ │ ├── perform.turbo_stream.erb
│ │ │ ├── batch_retry.turbo_stream.erb
│ │ │ ├── show.html.erb
│ │ │ ├── _breadcrumb.html.erb
│ │ │ ├── _show
│ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── batch_destroy.turbo_stream.erb
│ │ │ ├── _index_th_check.html.erb
│ │ │ ├── _failed
│ │ │ │ └── _button.html.erb
│ │ │ ├── blocked.html.erb
│ │ │ ├── failed.html.erb
│ │ │ ├── index.html.erb
│ │ │ ├── ready.html.erb
│ │ │ ├── running.html.erb
│ │ │ ├── todo.html.erb
│ │ │ └── clearable.html.erb
│ │ │ ├── queues
│ │ │ ├── _index_thead.html.erb
│ │ │ ├── _index_tr.html.erb
│ │ │ ├── pause.turbo_stream.erb
│ │ │ ├── resume.turbo_stream.erb
│ │ │ └── index.html.erb
│ │ │ └── home
│ │ │ ├── _index_thead.html.erb
│ │ │ ├── _index_tr.html.erb
│ │ │ ├── _process_tr.html.erb
│ │ │ └── _process_table.html.erb
│ ├── our
│ │ └── home
│ │ │ ├── _index
│ │ │ ├── _button.html.erb
│ │ │ └── _top_bar.html.erb
│ │ │ └── _tab_bar.html.erb
│ ├── me
│ │ ├── home
│ │ │ ├── _index
│ │ │ │ ├── _top_bar.html+phone.erb
│ │ │ │ └── _tab_bar_footer.html.erb
│ │ │ └── _tab_bar.html.erb
│ │ ├── _nav_with_login.html.erb
│ │ └── _nav_brand.html.erb
│ ├── admin
│ │ ├── home
│ │ │ ├── _index
│ │ │ │ ├── _tab_bar_footer.html.erb
│ │ │ │ ├── _breadcrumb.html.erb
│ │ │ │ └── _top_bar.html+phone.erb
│ │ │ └── _tab_bar.html.erb
│ │ ├── _index
│ │ │ └── _tab_bar_footer.html+phone.erb
│ │ ├── role_denied.html+phone.erb
│ │ ├── _show
│ │ │ └── _show_table_form.html.erb
│ │ ├── _breadcrumb.html.erb
│ │ ├── _menu_bar.erb
│ │ ├── role_denied.html.erb
│ │ └── role_denied.turbo_stream.erb
│ ├── layouts
│ │ ├── mailer.text.erb
│ │ ├── raw.html.erb
│ │ ├── frame
│ │ │ ├── box.html.erb
│ │ │ ├── main.html.erb
│ │ │ └── body.html.erb
│ │ ├── pg
│ │ │ └── panel
│ │ │ │ └── base.html.erb
│ │ ├── simple.html.erb
│ │ ├── simple.html+phone.erb
│ │ ├── admin.html+pad.erb
│ │ ├── agent.html+pad.erb
│ │ ├── buy.html+phone.erb
│ │ ├── in.html+phone.erb
│ │ ├── me.html+phone.erb
│ │ ├── my.html+phone.erb
│ │ ├── admin.html+phone.erb
│ │ ├── agent.html+phone.erb
│ │ ├── home.html.erb
│ │ ├── our.html+phone.erb
│ │ ├── panel.html+phone.erb
│ │ └── application.html+phone.erb
│ ├── roled
│ │ ├── panel
│ │ │ ├── role_whos
│ │ │ │ ├── _index
│ │ │ │ │ ├── _button.html.erb
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ └── _index_thead.html.erb
│ │ │ ├── whos
│ │ │ │ ├── _show
│ │ │ │ │ ├── _index_thead.html.erb
│ │ │ │ │ └── _index_tbody.html.erb
│ │ │ │ └── update.turbo_stream.erb
│ │ │ ├── roles
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _overview
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── actions.turbo_stream.erb
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _side_nav.html.erb
│ │ │ │ ├── _show
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── index.html.erb
│ │ │ │ └── _overview_thead.html.erb
│ │ │ ├── tabs
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _index
│ │ │ │ │ └── _breadcrumb.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ └── index.html.erb
│ │ │ └── role_rules
│ │ │ │ ├── _form.html.erb
│ │ │ │ ├── _index_tbody.html.erb
│ │ │ │ └── index.html.erb
│ │ └── admin
│ │ │ └── base
│ │ │ └── _nav.html.erb
│ ├── home
│ │ ├── _frame_layout_container.html.erb
│ │ └── index.html.erb
│ ├── default_form
│ │ ├── _check_box.html.erb
│ │ ├── _date_field.html.erb
│ │ ├── _text_field.html.erb
│ │ ├── _time_field.html.erb
│ │ ├── _number_field.html.erb
│ │ ├── _datetime_field.html.erb
│ │ └── _select_enum.html.erb
│ ├── statis
│ │ └── panel
│ │ │ ├── counters
│ │ │ ├── _month
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ └── _button.html.erb
│ │ │ ├── _statistical
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ └── _index_tbody.html.erb
│ │ │ ├── _months
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── _breadcrumb.html.erb
│ │ │ │ └── _index_tbody.html.erb
│ │ │ ├── _index
│ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── months.html.erb
│ │ │ ├── statistical.html.erb
│ │ │ └── month.html.erb
│ │ │ ├── statistics
│ │ │ ├── _month
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ └── _button.html.erb
│ │ │ ├── _statistical
│ │ │ │ ├── _index_tr.html.erb
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ └── _index_tbody.html.erb
│ │ │ ├── _months
│ │ │ │ ├── _index_thead.html.erb
│ │ │ │ ├── _breadcrumb.html.erb
│ │ │ │ └── _index_tbody.html.erb
│ │ │ ├── _index
│ │ │ │ └── _breadcrumb.html.erb
│ │ │ ├── months.html.erb
│ │ │ ├── statistical.html.erb
│ │ │ ├── month.html.erb
│ │ │ └── index.html.erb
│ │ │ ├── counter_days
│ │ │ └── _breadcrumb.html.erb
│ │ │ └── statistic_days
│ │ │ └── _breadcrumb.html.erb
│ ├── inline_form
│ │ ├── _check_box.html.erb
│ │ ├── _date_field.html.erb
│ │ ├── _text_field.html.erb
│ │ ├── _time_field.html.erb
│ │ ├── _number_field.html.erb
│ │ ├── _datetime_field.html.erb
│ │ ├── _file_field.html.erb
│ │ └── _select_enum.html.erb
│ ├── in
│ │ └── create.turbo_stream+phone.erb
│ ├── pg
│ │ └── panel
│ │ │ ├── pg_subscriptions
│ │ │ ├── create.turbo_stream.erb
│ │ │ ├── destroy.turbo_stream.erb
│ │ │ └── refresh.turbo_stream.erb
│ │ │ └── pg_stat_subscriptions
│ │ │ └── index.html.erb
│ ├── extra_form
│ │ ├── _number_field.html.erb
│ │ └── _text_field.html.erb
│ └── kaminari
│ │ └── com
│ │ ├── _gap.html.erb
│ │ ├── _page.html.erb
│ │ ├── _page.turbo_stream.erb
│ │ ├── _last_page.html.erb
│ │ ├── _next_page.html.erb
│ │ ├── _first_page.html.erb
│ │ └── _prev_page.html.erb
├── jsons
│ ├── application
│ │ ├── _show.json.jbuilder
│ │ ├── destroy.json.jbuilder
│ │ ├── create.json.jbuilder
│ │ ├── show.json.jbuilder
│ │ ├── update.json.jbuilder
│ │ ├── error.json.jbuilder
│ │ ├── err.json.jbuilder
│ │ ├── index.json.jbuilder
│ │ ├── edit.json.jbuilder
│ │ ├── new.json.jbuilder
│ │ ├── controller_not_found.json.jbuilder
│ │ └── _pagination.json.jbuilder
│ └── layouts
│ │ └── application.json.jbuilder
├── exports
│ └── application_export.rb
├── imports
│ └── application_import.rb
├── controllers
│ ├── our_controller.rb
│ ├── out_controller.rb
│ ├── agent_controller.rb
│ ├── base_controller.rb
│ ├── in
│ │ └── base_controller.rb
│ ├── me
│ │ └── base_controller.rb
│ ├── my
│ │ ├── base_controller.rb
│ │ └── home_controller.rb
│ ├── com
│ │ ├── base_controller.rb
│ │ ├── my
│ │ │ └── base_controller.rb
│ │ ├── admin
│ │ │ ├── base_controller.rb
│ │ │ └── blob_defaults_controller.rb
│ │ ├── panel
│ │ │ ├── infos_controller.rb
│ │ │ ├── ssh_keys_controller.rb
│ │ │ ├── cache_lists_controller.rb
│ │ │ ├── base_controller.rb
│ │ │ ├── home_controller.rb
│ │ │ ├── acme_accounts_controller.rb
│ │ │ └── pg_replication_slots_controller.rb
│ │ └── controller
│ │ │ └── my.rb
│ ├── our
│ │ └── base_controller.rb
│ ├── admin
│ │ └── base_controller.rb
│ ├── agent
│ │ ├── base_controller.rb
│ │ └── home_controller.rb
│ ├── panel
│ │ ├── base_controller.rb
│ │ └── home_controller.rb
│ ├── board
│ │ ├── base_controller.rb
│ │ └── home_controller.rb
│ ├── home_controller.rb
│ ├── roled
│ │ ├── panel
│ │ │ └── base_controller.rb
│ │ ├── admin
│ │ │ ├── roles_controller.rb
│ │ │ └── base_controller.rb
│ │ └── controller
│ │ │ └── me.rb
│ ├── group_controller.rb
│ ├── me_controller.rb
│ ├── statis
│ │ └── panel
│ │ │ ├── base_controller.rb
│ │ │ └── home_controller.rb
│ ├── board_controller.rb
│ ├── admin_controller.rb
│ ├── in_controller.rb
│ ├── job
│ │ └── panel
│ │ │ └── base_controller.rb
│ ├── my_controller.rb
│ ├── application_controller.rb
│ └── panel_controller.rb
├── errors
│ ├── access_token_expired_error.rb
│ ├── com
│ │ └── disposable_token_error.rb
│ └── action_controller
│ │ ├── forbidden_error.rb
│ │ ├── unauthorized_error.rb
│ │ └── standard_error.rb
├── mailboxes
│ └── application_mailbox.rb
├── models
│ ├── err.rb
│ ├── role.rb
│ ├── state.rb
│ ├── err_bot.rb
│ ├── ssh_key.rb
│ ├── blob_temp.rb
│ ├── acme_order.rb
│ ├── com
│ │ ├── csp.rb
│ │ ├── err.rb
│ │ ├── log.rb
│ │ ├── info.rb
│ │ ├── filter.rb
│ │ ├── log_sql.rb
│ │ ├── ssh_key.rb
│ │ ├── blob_pdf.rb
│ │ ├── blob_temp.rb
│ │ ├── detector.rb
│ │ ├── acme_order.rb
│ │ ├── cache_list.rb
│ │ ├── err_notice.rb
│ │ ├── meta_model.rb
│ │ ├── acme_account.rb
│ │ ├── acme_domain.rb
│ │ ├── blob_default.rb
│ │ ├── detector_log.rb
│ │ ├── err_summary.rb
│ │ ├── log_summary.rb
│ │ ├── meta_column.rb
│ │ ├── acme_servicer.rb
│ │ ├── filter_column.rb
│ │ ├── meta_business.rb
│ │ ├── meta_namespace.rb
│ │ ├── meta_operation.rb
│ │ ├── model
│ │ │ ├── meta_relation.rb
│ │ │ ├── meta_route.rb
│ │ │ ├── meta_permission.rb
│ │ │ ├── pg_subscription.rb
│ │ │ ├── cache_list.rb
│ │ │ ├── filter_column.rb
│ │ │ └── err_bot
│ │ │ │ └── work_wechat_bot.rb
│ │ ├── acme_identifier.rb
│ │ ├── state.rb
│ │ ├── application_record.rb
│ │ ├── err_bot.rb
│ │ ├── detector_bot.rb
│ │ ├── pg_replication_slot.rb
│ │ ├── pg_stat_subscription.rb
│ │ ├── meta_action.rb
│ │ ├── pg_publication_table.rb
│ │ ├── meta_controller.rb
│ │ ├── pg_replication_origin_status.rb
│ │ ├── pg_publication.rb
│ │ └── pg_subscription.rb
│ ├── err_notice.rb
│ ├── job
│ │ ├── queue.rb
│ │ └── model
│ │ │ └── queue.rb
│ ├── meta_model.rb
│ ├── statistic.rb
│ ├── application_record.rb
│ ├── counter_day.rb
│ ├── log_summary.rb
│ ├── meta_action.rb
│ ├── meta_column.rb
│ ├── roled
│ │ ├── tab.rb
│ │ ├── cache.rb
│ │ ├── role.rb
│ │ ├── role_rule.rb
│ │ ├── role_type.rb
│ │ ├── role_who.rb
│ │ ├── cache_role.rb
│ │ ├── application_record.rb
│ │ ├── ext
│ │ │ ├── organ.rb
│ │ │ ├── member.rb
│ │ │ ├── user.rb
│ │ │ └── meta_controller.rb
│ │ └── model
│ │ │ └── cache_role.rb
│ ├── meta_business.rb
│ ├── counter_month.rb
│ ├── counter_year.rb
│ ├── pg_publication.rb
│ ├── statis
│ │ ├── config.rb
│ │ ├── statistic.rb
│ │ ├── counter_day.rb
│ │ ├── counter_year.rb
│ │ ├── counter_month.rb
│ │ ├── statistic_day.rb
│ │ ├── statistic_month.rb
│ │ └── statistic_year.rb
│ ├── statistic_day.rb
│ ├── err_bot
│ │ └── com
│ │ │ ├── slack_bot.rb
│ │ │ ├── feishu_bot.rb
│ │ │ └── work_wechat_bot.rb
│ ├── meta_controller.rb
│ ├── pg_subscription.rb
│ ├── statistic_month.rb
│ ├── statistic_year.rb
│ ├── pg_replication_slot.rb
│ ├── debug
│ │ ├── many.rb
│ │ ├── much.rb
│ │ ├── one.rb
│ │ ├── through.rb
│ │ └── model
│ │ │ └── through.rb
│ ├── pg_publication_table.rb
│ ├── pg_stat_subscription.rb
│ ├── acme_identifier
│ │ └── com
│ │ │ ├── acme_dns.rb
│ │ │ └── acme_http.rb
│ ├── acme_servicer
│ │ └── com
│ │ │ ├── ali_servicer.rb
│ │ │ ├── aws_servicer.rb
│ │ │ └── tencent_servicer.rb
│ ├── detector_bot
│ │ └── com
│ │ │ ├── detector_slack.rb
│ │ │ ├── detector_feishu.rb
│ │ │ └── detector_work_wechat.rb
│ ├── detector_log
│ │ └── com
│ │ │ ├── detector_error.rb
│ │ │ └── detector_response.rb
│ ├── pg_record.rb
│ ├── com.rb
│ ├── roled.rb
│ ├── statis.rb
│ └── debug.rb
├── views_copy
│ └── application
│ │ ├── visit.turbo_stream.erb
│ │ ├── edit.turbo_stream.erb
│ │ ├── new.turbo_stream.erb
│ │ ├── create.turbo_stream.erb
│ │ ├── _index_tr.html.erb
│ │ ├── update.turbo_stream.erb
│ │ ├── _button.html.erb
│ │ ├── _index.html.erb
│ │ ├── index.html.erb
│ │ ├── index.html+phone.erb
│ │ └── _new_modal_form.html+phone.erb
├── assets
│ └── images
│ │ └── avatar.png
├── mailers
│ └── application_mailer.rb
├── channels
│ ├── log_channel.rb
│ ├── concerns
│ │ └── log_channel_writer.rb
│ └── com
│ │ └── log_channel.rb
├── jobs
│ ├── com
│ │ ├── acme_job.rb
│ │ ├── memory_job.rb
│ │ ├── acme_order_job.rb
│ │ ├── detector_error_job.rb
│ │ ├── err_job.rb
│ │ ├── state_destroy_job.rb
│ │ ├── err_first_job.rb
│ │ ├── counter_job.rb
│ │ ├── ssh_key_setup_job.rb
│ │ ├── ssh_key_deploy_job.rb
│ │ ├── statistic_job.rb
│ │ └── detector_job.rb
│ ├── active_storage
│ │ └── identify_job.rb
│ └── roled
│ │ └── role_rule_sync_job.rb
└── helpers
│ └── rails_com
│ └── cache_helper.rb
├── test
├── fixtures
│ ├── files
│ │ └── empty_file.txt
│ └── com
│ │ ├── acme_accounts.yml
│ │ ├── cache_lists.yml
│ │ ├── blob_defaults.yml
│ │ ├── meta_businesses.yml
│ │ ├── meta_models.yml
│ │ └── acme_orders.yml
├── models
│ ├── active_storage
│ │ ├── blob_test.rb
│ │ └── blob_default_test.rb
│ ├── com
│ │ ├── acme_order_test.rb
│ │ ├── cache_list_test.rb
│ │ ├── meta_model_test.rb
│ │ ├── acme_account_test.rb
│ │ ├── blob_default_test.rb
│ │ ├── meta_column_test.rb
│ │ ├── acme_identifier_test.rb
│ │ └── meta_business_test.rb
│ └── action_mailbox
│ │ └── inbound_email_test.rb
└── lib
│ └── rails_com
│ ├── core
│ └── hash_test.rb
│ └── utils
│ ├── time_helper_test.rb
│ └── uid_helper_test.rb
├── examples
├── config
│ ├── routes.rb
│ ├── locales
│ │ └── en.yml
│ ├── initializers
│ │ └── time_format.rb
│ ├── jobber.yml
│ └── puma.rb
└── app
│ └── assets
│ └── javascripts
│ └── phone.js
├── lib
├── rails_com
│ ├── action_text.rb
│ ├── generators.rb
│ ├── type.rb
│ ├── core
│ │ ├── module.rb
│ │ ├── object.rb
│ │ ├── nil_class.rb
│ │ ├── date_time.rb
│ │ ├── pathname.rb
│ │ └── time_with_zone.rb
│ ├── active_model.rb
│ ├── action_dispatch.rb
│ ├── action_mailbox.rb
│ ├── env.rb
│ ├── utils
│ │ └── hex_helper.rb
│ ├── type
│ │ └── taxon.rb
│ └── action_view.rb
├── generators
│ ├── rails_com
│ │ └── templates
│ │ │ ├── README.md
│ │ │ ├── remove_table.rb.tt
│ │ │ └── initializer.rb.tt
│ └── templates
│ │ ├── jbuilder
│ │ ├── _show.json.jbuilder.tt
│ │ └── index.json.jbuilder.tt
│ │ └── scaffold_erb
│ │ ├── _index_tbody.html.erb.tt
│ │ ├── _form.html.erb.tt
│ │ ├── _index_thead.html.erb.tt
│ │ └── _show_table.html.erb.tt
└── templates
│ ├── rails
│ └── scaffold_controller
│ │ └── controller.rb.tt
│ └── test_unit
│ └── model
│ └── unit_test.rb.tt
├── .gitignore
├── config
├── template.yml
└── locales
│ ├── zh.helper.yml
│ ├── zh.pg.controller.yml
│ ├── job
│ └── zh.job.attributes.yml
│ └── zh.attributes.yml
└── .gitmodules
/log/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/doc/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tmp/sockets/.keep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/my/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/agent/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/board/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/common/deploy.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/panel/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/files/empty_file.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/jsons/application/_show.json.jbuilder:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/jsons/application/destroy.json.jbuilder:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_index_tfoot.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_show_table.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_tab_bar.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/csps/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/errs/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/our/home/_index/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/our/home/_index/_top_bar.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_button_actions.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_filter_default.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_filter_dropdown.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_filter_table.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_head_analysis.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_head_extra_js.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_index_bar.html+phone.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_nav_with_login.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_show_table_form.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/board/home/_index/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/common/info.json.jbuilder:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/log_sqls/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/me/home/_index/_top_bar.html+phone.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/panel/home/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/admin/home/_index/_tab_bar_footer.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_index_actions.html+phone.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_nav_without_login.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/application/_tab_bar_footer.html+phone.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/board/home/_index/_tab_bar_footer.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/admin/organs/_edit/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/admin/organs/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_summaries/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/inbound_emails/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/organs/_edit/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/organs/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/layouts/mailer.text.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
--------------------------------------------------------------------------------
/app/views/me/home/_index/_tab_bar_footer.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/my/home/_index/_tab_bar_footer.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/agent/_nav.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'admin/nav' %>
--------------------------------------------------------------------------------
/app/views/roled/panel/role_whos/_index/_button.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/home/_frame_layout_container.html.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
--------------------------------------------------------------------------------
/app/jsons/application/create.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! 'show'
2 |
--------------------------------------------------------------------------------
/app/jsons/application/show.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! 'show'
2 |
--------------------------------------------------------------------------------
/app/jsons/application/update.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.partial! 'show'
2 |
--------------------------------------------------------------------------------
/app/views/agent/_brand_nav.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'admin/brand_nav' %>
2 |
--------------------------------------------------------------------------------
/app/views/application/_index_thead_actions.html+pad.erb:
--------------------------------------------------------------------------------
1 |
|
2 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 |
--------------------------------------------------------------------------------
/app/views/com/my/ssh_keys/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :host %>
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_check_box.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.check_box name %>
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_date_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.date_field name %>
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_text_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field name %>
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_time_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.time_field name %>
2 |
--------------------------------------------------------------------------------
/app/views/my/_auth_navbar.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'application/auth_navbar' %>
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_month/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/exports/application_export.rb:
--------------------------------------------------------------------------------
1 | class ApplicationExport
2 |
3 | end
4 |
--------------------------------------------------------------------------------
/app/imports/application_import.rb:
--------------------------------------------------------------------------------
1 | class ApplicationImport
2 |
3 | end
4 |
--------------------------------------------------------------------------------
/app/jsons/application/error.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.message model.error_text
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_number_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.number_field name %>
2 |
--------------------------------------------------------------------------------
/app/views/me/_nav_with_login.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'agent/nav_with_login' %>
2 |
--------------------------------------------------------------------------------
/app/views/panel/_menu_bar.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'panel/auth_navbar' %>
2 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_month/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_statistical/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 | |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.name %> |
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_accounts/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.email_field :email %>
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_datetime_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.datetime_field name %>
2 |
--------------------------------------------------------------------------------
/app/controllers/our_controller.rb:
--------------------------------------------------------------------------------
1 | class OurController < AdminController
2 |
3 | end
4 |
--------------------------------------------------------------------------------
/app/controllers/out_controller.rb:
--------------------------------------------------------------------------------
1 | class OutController < AdminController
2 |
3 | end
4 |
--------------------------------------------------------------------------------
/app/views/application/role_denied.html+phone.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/application/role_denied.html.erb:
--------------------------------------------------------------------------------
1 | <%= flash.now[:error] %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_identifiers/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :identifier %>
2 |
--------------------------------------------------------------------------------
/app/views/inline_form/_check_box.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.check_box name, autofocus: true %>
2 |
--------------------------------------------------------------------------------
/app/views/inline_form/_date_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.date_field name, autofocus: true %>
2 |
--------------------------------------------------------------------------------
/app/views/inline_form/_text_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field name, autofocus: true %>
2 |
--------------------------------------------------------------------------------
/app/views/inline_form/_time_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.time_field name, autofocus: true %>
2 |
--------------------------------------------------------------------------------
/app/controllers/agent_controller.rb:
--------------------------------------------------------------------------------
1 | class AgentController < MeController
2 |
3 | end
4 |
--------------------------------------------------------------------------------
/app/controllers/base_controller.rb:
--------------------------------------------------------------------------------
1 | class BaseController < ApplicationController
2 | end
3 |
--------------------------------------------------------------------------------
/app/views/application/_modal_foot.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/pg_publication_tables/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/inline_form/_number_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.number_field name, autofocus: true %>
2 |
--------------------------------------------------------------------------------
/app/errors/access_token_expired_error.rb:
--------------------------------------------------------------------------------
1 | class AccessTokenExpiredError < StandardError
2 | end
3 |
--------------------------------------------------------------------------------
/app/mailboxes/application_mailbox.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailbox < ActionMailbox::Base
2 | end
3 |
--------------------------------------------------------------------------------
/app/models/err.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | Err = Com::Err unless defined? Err
4 |
--------------------------------------------------------------------------------
/app/models/role.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | Role = Roled::Role unless defined? Role
--------------------------------------------------------------------------------
/app/models/state.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | State = Com::State unless defined? State
--------------------------------------------------------------------------------
/app/views/application/destroy.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.remove "tr_#{params[:id]}" %>
2 |
--------------------------------------------------------------------------------
/app/views/in/create.turbo_stream+phone.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/inline_form/_datetime_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.datetime_field name, autofocus: true %>
2 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_statistical/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | |
4 |
5 |
--------------------------------------------------------------------------------
/app/jsons/application/err.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.message message
2 | json.err_type exception.class.name
3 |
--------------------------------------------------------------------------------
/app/models/err_bot.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ErrBot = Com::ErrBot unless defined? ErrBot
--------------------------------------------------------------------------------
/app/models/ssh_key.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | SshKey = Com::SshKey unless defined? SshKey
--------------------------------------------------------------------------------
/app/views/application/alert.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace 'alert', partial: 'alert' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_ip/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/clean.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/ssh_keys/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :host %>
2 | <%= f.text_field :ssh_user %>
--------------------------------------------------------------------------------
/app/views/job/panel/queues/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | Process UUID |
2 | |
3 | Size |
--------------------------------------------------------------------------------
/app/views/roled/panel/whos/_show/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | Govern |
2 | Contain Rules |
3 |
--------------------------------------------------------------------------------
/app/views/application/move_higher.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/application/move_lower.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/create.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/log_sqls/clean.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/clear_all.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views_copy/application/visit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/examples/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 |
3 | resources :the_guards
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/app/assets/images/avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/work-design/rails_com/HEAD/app/assets/images/avatar.png
--------------------------------------------------------------------------------
/app/controllers/in/base_controller.rb:
--------------------------------------------------------------------------------
1 | module In
2 | class BaseController < InController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/me/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Me
2 | class BaseController < MeController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/my/base_controller.rb:
--------------------------------------------------------------------------------
1 | module My
2 | class BaseController < MyController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/jsons/application/index.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.array! instance_variable_get("@#{controller_name.pluralize}")
2 |
--------------------------------------------------------------------------------
/app/mailers/application_mailer.rb:
--------------------------------------------------------------------------------
1 | class ApplicationMailer < ActionMailer::Base
2 | layout 'mailer'
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/blob_temp.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | BlobTemp = Com::BlobTemp unless defined? BlobTemp
--------------------------------------------------------------------------------
/app/views/application/state_visit.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'visit_state', locals: { state: state } %>
2 |
--------------------------------------------------------------------------------
/app/views/board/home/direct.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Filter.human_attribute_name(:name) %> |
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 | <%= f.text_field :code %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 | <%= f.text_field :description %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/home/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | Process UUID |
2 | |
3 | Size |
4 | |
--------------------------------------------------------------------------------
/app/views/job/panel/home/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/views/layouts/raw.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/raw_head' do %>
2 | <%= yield %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/lib/rails_com/action_text.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/action_text/rich_text'
4 |
--------------------------------------------------------------------------------
/lib/rails_com/generators.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/generators/named_base'
4 |
--------------------------------------------------------------------------------
/app/controllers/com/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class BaseController < BaseController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/our/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Our
2 | class BaseController < OurController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/acme_order.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | AcmeOrder = Com::AcmeOrder unless defined? AcmeOrder
--------------------------------------------------------------------------------
/app/models/com/csp.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Csp < ApplicationRecord
3 | include Model::Csp
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/err.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Err < ApplicationRecord
3 | include Model::Err
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/log.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Log < ApplicationRecord
3 | include Model::Log
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/err_notice.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | ErrNotice = Com::ErrNotice unless defined? ErrNotice
--------------------------------------------------------------------------------
/app/models/job/queue.rb:
--------------------------------------------------------------------------------
1 | module Job
2 | class Queue < ApplicationRecord
3 | include Model::Queue
4 | end
5 | end
--------------------------------------------------------------------------------
/app/models/meta_model.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | MetaModel = Com::MetaModel unless defined? MetaModel
--------------------------------------------------------------------------------
/app/models/statistic.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | Statistic = Statis::Statistic unless defined? Statistic
--------------------------------------------------------------------------------
/app/views/admin/home/_tab_bar.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'tab_bar_item' %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/application/_index_tr_without_actions.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/application/state_visit_get.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'visit_state_get', locals: { state: state } %>
2 |
--------------------------------------------------------------------------------
/app/views/application/visit.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/index_update.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/pg_publications/create.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/queues/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/views/me/home/_tab_bar.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'tab_bar_item' %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/my/home/_tab_bar.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'tab_bar_item' %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/our/home/_tab_bar.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'tab_bar_item' %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/pg/panel/pg_subscriptions/create.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/pg/panel/pg_subscriptions/destroy.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/views/pg/panel/pg_subscriptions/refresh.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/test/fixtures/com/acme_accounts.yml:
--------------------------------------------------------------------------------
1 | one:
2 | email: test@work.design
3 | two:
4 | email: test2@work.design
5 |
--------------------------------------------------------------------------------
/app/channels/log_channel.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | LogChannel = Com::LogChannel unless defined? LogChannel
--------------------------------------------------------------------------------
/app/controllers/admin/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Admin
2 | class BaseController < AdminController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/agent/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Agent
2 | class BaseController < AgentController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/com/my/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class My::BaseController < MyController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/panel/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Panel
2 | class BaseController < PanelController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/errors/com/disposable_token_error.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DisposableTokenError < StandardError
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/application_record.rb:
--------------------------------------------------------------------------------
1 | class ApplicationRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | end
4 |
--------------------------------------------------------------------------------
/app/models/com/info.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Info < ApplicationRecord
3 | include Model::Info
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/counter_day.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | CounterDay = Statis::CounterDay unless defined? CounterDay
--------------------------------------------------------------------------------
/app/models/log_summary.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | LogSummary = Com::LogSummary unless defined? LogSummary
--------------------------------------------------------------------------------
/app/models/meta_action.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | MetaAction = Com::MetaAction unless defined? MetaAction
--------------------------------------------------------------------------------
/app/models/meta_column.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | MetaColumn = Com::MetaColumn unless defined? MetaColumn
--------------------------------------------------------------------------------
/app/models/roled/tab.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class Tab < ApplicationRecord
3 | include Model::Tab
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/errs/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_ip/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Log.human_attribute_name(:ip) %> |
2 | |
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/pg_publications/create_all.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit' %>
2 |
--------------------------------------------------------------------------------
/app/controllers/board/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Board
2 | class BaseController < BoardController
3 |
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/home_controller.rb:
--------------------------------------------------------------------------------
1 | class HomeController < ApplicationController
2 |
3 | def index
4 | end
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/com/filter.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Filter < ApplicationRecord
3 | include Model::Filter
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/log_sql.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class LogSql < ApplicationRecord
3 | include Model::LogSql
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/ssh_key.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class SshKey < ApplicationRecord
3 | include Model::SshKey
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/meta_business.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | MetaBusiness = Com::MetaBusiness unless defined? MetaBusiness
--------------------------------------------------------------------------------
/app/models/roled/cache.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class Cache < ApplicationRecord
3 | include Model::Cache
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/roled/role.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class Role < ApplicationRecord
3 | include Model::Role
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/admin/_index/_tab_bar_footer.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'button' %>
3 |
--------------------------------------------------------------------------------
/app/views/application/_index_list.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/application/preview.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'index', layout: 'modal_auto' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/blobs/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/log_sqls/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/lib/generators/rails_com/templates/README.md:
--------------------------------------------------------------------------------
1 |
2 | 已创建配置文件: config/initializers/rails_extend.rb, 忽略自动 migration 的 model 。
3 |
--------------------------------------------------------------------------------
/test/models/active_storage/blob_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BlobTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/com/acme_order_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class AcmeOrderTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/com/cache_list_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class CacheListTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/com/meta_model_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class MetaModelTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/com/admin/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Admin::BaseController < AdminController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/roled/panel/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class Panel::BaseController < PanelController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/jsons/application/edit.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.error model.errors.as_json(full_messages: true)
2 | json.message model.error_text
3 |
--------------------------------------------------------------------------------
/app/jsons/application/new.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.error model.errors.as_json(full_messages: true)
2 | json.message model.error_text
3 |
--------------------------------------------------------------------------------
/app/models/com/blob_pdf.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class BlobPdf < ApplicationRecord
3 | include Model::BlobPdf
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/blob_temp.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class BlobTemp < ApplicationRecord
3 | include Model::BlobTemp
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/detector.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Detector < ApplicationRecord
3 | include Model::Detector
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/counter_month.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | CounterMonth = Statis::CounterMonth unless defined? CounterMonth
--------------------------------------------------------------------------------
/app/models/counter_year.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | CounterYear = Statis::CounterYear unless defined? CounterYear
4 |
--------------------------------------------------------------------------------
/app/models/pg_publication.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | PgPublication = Com::PgPublication unless defined? PgPublication
--------------------------------------------------------------------------------
/app/models/statis/config.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class Config < ApplicationRecord
3 | include Model::Config
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/statistic_day.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | StatisticDay = Statis::StatisticDay unless defined? StatisticDay
--------------------------------------------------------------------------------
/app/views/application/preview.turbo_stream+phone.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'index', layout: 'modal_auto' %>
2 |
--------------------------------------------------------------------------------
/app/views/board/home/_index/_tab_bar.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'admin/tab_bar_item' %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_accounts/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_orders/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/attachments/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/blob_defaults/add.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'add_form', layout: 'modal' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_summaries/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/states/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/extra_form/_number_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= ef.number_field name, value: f.object.extra[name], class: 'input', label: name %>
2 |
--------------------------------------------------------------------------------
/app/views/extra_form/_text_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= ef.text_field name, value: f.object.extra[name], class: 'input', label: name %>
2 |
--------------------------------------------------------------------------------
/app/views/layouts/frame/box.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
--------------------------------------------------------------------------------
/lib/rails_com/type.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/type/i18n'
4 | require 'rails_com/type/taxon'
5 |
--------------------------------------------------------------------------------
/test/fixtures/com/cache_lists.yml:
--------------------------------------------------------------------------------
1 | one:
2 | path: MyString
3 | key: MyString
4 | two:
5 | path: MyString
6 | key: MyString
7 |
--------------------------------------------------------------------------------
/test/models/com/acme_account_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class AcmeAccountTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/com/blob_default_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BlobDefaultTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/com/meta_column_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class MetaColumnTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/group_controller.rb:
--------------------------------------------------------------------------------
1 | class GroupController < ApplicationController
2 | include Com::Controller::Admin
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/app/errors/action_controller/forbidden_error.rb:
--------------------------------------------------------------------------------
1 | module ActionController
2 | class ForbiddenError < StandardError
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/com/acme_order.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeOrder < ApplicationRecord
3 | include Model::AcmeOrder
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/cache_list.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class CacheList < ApplicationRecord
3 | include Model::CacheList
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/err_notice.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class ErrNotice < ApplicationRecord
3 | include Model::ErrNotice
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/meta_model.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaModel < ApplicationRecord
3 | include Model::MetaModel
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/err_bot/com/slack_bot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class SlackBot < ErrBot
3 | include Model::ErrBot::SlackBot
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/meta_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | MetaController = Com::MetaController unless defined? MetaController
--------------------------------------------------------------------------------
/app/models/pg_subscription.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | PgSubscription = Com::PgSubscription unless defined? PgSubscription
--------------------------------------------------------------------------------
/app/models/roled/role_rule.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class RoleRule < ApplicationRecord
3 | include Model::RoleRule
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/roled/role_type.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class RoleType < ApplicationRecord
3 | include Model::RoleType
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/roled/role_who.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class RoleWho < ApplicationRecord
3 | include Model::RoleWho
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/statistic_month.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | StatisticMonth = Statis::StatisticMonth unless defined? StatisticMonth
--------------------------------------------------------------------------------
/app/models/statistic_year.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | StatisticYear = Statis::StatisticYear unless defined? StatisticYear
--------------------------------------------------------------------------------
/app/views/application/_blank.html.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/application/destroy.turbo_stream+phone.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.remove "tr_#{params[:id]}" %>
2 | <%= turbo_stream.remove 'modal' %>
--------------------------------------------------------------------------------
/app/views/application/state_visit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit_state', locals: { state: state } %>
2 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/detect.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'detect_form', layout: 'modal_form' %>
2 |
--------------------------------------------------------------------------------
/app/views/roled/panel/role_whos/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_months/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::StatisticMonth.human_attribute_name(:year_month) %> |
2 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_months/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::StatisticMonth.human_attribute_name(:year_month) %> |
2 |
--------------------------------------------------------------------------------
/lib/rails_com/core/module.rb:
--------------------------------------------------------------------------------
1 | class Module
2 |
3 | def root_module
4 | name.split('::')[0].constantize
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/test/models/com/acme_identifier_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class AcmeIdentifierTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/test/models/com/meta_business_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class MetaBusinessTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/infos_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::InfosController < Panel::BaseController
3 |
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/me_controller.rb:
--------------------------------------------------------------------------------
1 | class MeController < AdminController
2 | include Org::Controller::Me if defined? RailsOrg
3 |
4 | end
5 |
--------------------------------------------------------------------------------
/app/errors/action_controller/unauthorized_error.rb:
--------------------------------------------------------------------------------
1 | module ActionController
2 | class UnauthorizedError < StandardError
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/models/com/acme_account.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeAccount < ApplicationRecord
3 | include Model::AcmeAccount
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/acme_domain.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeDomain < ApplicationRecord
3 | include Model::AcmeDomain
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/blob_default.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class BlobDefault < ApplicationRecord
3 | include Model::BlobDefault
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/detector_log.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorLog < ApplicationRecord
3 | include Model::DetectorLog
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/err_summary.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class ErrSummary < ApplicationRecord
3 | include Model::ErrSummary
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/log_summary.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class LogSummary < ApplicationRecord
3 | include Model::LogSummary
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/meta_column.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaColumn < ApplicationRecord
3 | include Model::MetaColumn
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/roled/cache_role.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class CacheRole < ApplicationRecord
3 | include Model::CacheRole
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/statis/statistic.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class Statistic < ApplicationRecord
3 | include Model::Statistic
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/admin/role_denied.html+phone.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/application/_popup_layout.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
--------------------------------------------------------------------------------
/app/views/application/err.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= message %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/application/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
2 |
--------------------------------------------------------------------------------
/app/views/application/visit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to({ action: 'index' }, class: 'button is-link') do %>
2 | 加载最新
3 | <% end %>
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::MetaController.human_attribute_name(:business_identifier) %> |
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_business_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | | <%= business_identifier %> |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_indexes/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_gap.html.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/my/_index/_tab_bar_footer.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'button' %>
3 |
--------------------------------------------------------------------------------
/lib/generators/templates/jbuilder/_show.json.jbuilder.tt:
--------------------------------------------------------------------------------
1 | json.partial! '<%= singular_name %>', <%= singular_name %>: @<%= singular_name %>
2 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/ssh_keys_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::SshKeysController < Panel::BaseController
3 |
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/statis/panel/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class Panel::BaseController < Com::Panel::BaseController
3 | end
4 | end
5 |
--------------------------------------------------------------------------------
/app/jsons/application/controller_not_found.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.error do
2 | json.class exp.class.inspect
3 | end
4 | json.message exp.message
5 |
--------------------------------------------------------------------------------
/app/models/com/acme_servicer.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeServicer < ApplicationRecord
3 | include Model::AcmeServicer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/filter_column.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class FilterColumn < ApplicationRecord
3 | include Model::FilterColumn
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/meta_business.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaBusiness < ApplicationRecord
3 | include Model::MetaBusiness
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/meta_namespace.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaNamespace < ApplicationRecord
3 | include Model::MetaNamespace
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/meta_operation.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaOperation < ApplicationRecord
3 | include Model::MetaOperation
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/model/meta_relation.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::MetaRelation
3 | extend ActiveSupport::Concern
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/pg_replication_slot.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | PgReplicationSlot = Com::PgReplicationSlot unless defined? PgReplicationSlot
--------------------------------------------------------------------------------
/app/models/statis/counter_day.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class CounterDay < ApplicationRecord
3 | include Model::CounterDay
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/statis/counter_year.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class CounterYear < ApplicationRecord
3 | include Model::CounterYear
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/application/alert_message.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'alert', partial: 'alert_message', locals: { message: message } %>
2 |
--------------------------------------------------------------------------------
/app/views/application/batch_destroy.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
--------------------------------------------------------------------------------
/app/views/application/err.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.prepend 'modal_card_body', partial: 'error_messages', locals: { target: target } %>
2 |
--------------------------------------------------------------------------------
/app/views/application/show.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'show', layout: 'modal_show', locals: { model: model } %>
2 |
--------------------------------------------------------------------------------
/app/views/application/state_visit_get.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit_state_get', locals: { state: state } %>
2 |
--------------------------------------------------------------------------------
/app/views/board/_index/_tab_bar_footer.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'button' %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/blob_defaults/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :record_class %>
2 | <%= f.text_field :name %>
3 | <%= f.file_field :file %>
4 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/perform.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/test/models/action_mailbox/inbound_email_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class InboundEmailTest < ActiveSupport::TestCase
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .bundle/
2 | docs/
3 | db/
4 | node_modules/
5 | log/*.log
6 | tmp/**/*.*
7 | !tmp/.keep
8 | !tmp/sockets/.keep
9 |
10 | *.gem
11 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/cache_lists_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::CacheListsController < Panel::BaseController
3 |
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/my/home_controller.rb:
--------------------------------------------------------------------------------
1 | module My
2 | class HomeController < BaseController
3 |
4 | def index
5 | end
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/models/com/acme_identifier.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeIdentifier < ApplicationRecord
3 | include Model::AcmeIdentifier
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/state.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class State < ApplicationRecord
3 | include Model::State
4 | include Ext::Taxon
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/debug/many.rb:
--------------------------------------------------------------------------------
1 | module Debug
2 | class Many < ApplicationRecord
3 | include Model::Base
4 | include Model::Many
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/debug/much.rb:
--------------------------------------------------------------------------------
1 | module Debug
2 | class Much < ApplicationRecord
3 | include Model::Base
4 | include Model::Much
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/debug/one.rb:
--------------------------------------------------------------------------------
1 | module Debug
2 | class One < ApplicationRecord
3 | include Model::Base
4 | include Model::One
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/pg_publication_table.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | PgPublicationTable = Com::PgPublicationTable unless defined? PgPublicationTable
--------------------------------------------------------------------------------
/app/models/pg_stat_subscription.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | PgStatSubscription = Com::PgStatSubscription unless defined? PgStatSubscription
--------------------------------------------------------------------------------
/app/models/statis/counter_month.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class CounterMonth < ApplicationRecord
3 | include Model::CounterMonth
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/statis/statistic_day.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class StatisticDay < ApplicationRecord
3 | include Model::StatisticDay
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/blob_defaults/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/errs/clean_other.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_columns/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_columns/test.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/index_edit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'index_edit_modal_form', layout: 'modal_form' %>
2 |
--------------------------------------------------------------------------------
/app/views/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'carousels' %>
3 |
4 |
5 | <%= render 'menu_productions' %>
6 |
--------------------------------------------------------------------------------
/app/views/inline_form/_file_field.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'com/attachments/list_edit', locals: { target: f.object.public_send(name), f: f } %>
2 |
--------------------------------------------------------------------------------
/app/views/roled/panel/whos/update.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
2 |
--------------------------------------------------------------------------------
/lib/generators/templates/jbuilder/index.json.jbuilder.tt:
--------------------------------------------------------------------------------
1 | json.array! @<%= plural_name %>, partial: '<%= singular_name %>', as: :<%= singular_name %>
2 |
--------------------------------------------------------------------------------
/test/models/active_storage/blob_default_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BlobDefaultTest < ActiveSupport::TestCase
4 |
5 |
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/app/models/com/application_record.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class ApplicationRecord < ApplicationRecord
3 | self.abstract_class = true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/err_bot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class ErrBot < ApplicationRecord
3 | include Model::ErrBot
4 | include Inner::Bot
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/roled/application_record.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class ApplicationRecord < ApplicationRecord
3 | self.abstract_class = true
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/roled/ext/organ.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | module Ext::Organ
3 | extend ActiveSupport::Concern
4 | include Ext::Base
5 |
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/app/models/statis/statistic_month.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class StatisticMonth < ApplicationRecord
3 | include Model::StatisticMonth
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/statis/statistic_year.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class StatisticYear < ApplicationRecord
3 | include Model::StatisticYear
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/application/_page_no_more.html.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/application/_visit_state_get.html.erb:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/app/views/com/my/ssh_keys/remote_status.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'remote_status' do %>
2 | <%= @result %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_summaries/clean.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'visit', locals: defined?(url) ? { url: url } : {} %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_businesses/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 | <%= render 'com/attachments/list_field', target: f.object.logo, f: f %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_businesses/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_namespaces/sync.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/roled/admin/base/_nav.html.erb:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/app/controllers/agent/home_controller.rb:
--------------------------------------------------------------------------------
1 | module Agent
2 | class HomeController < BaseController
3 |
4 | def index
5 | end
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/controllers/board/home_controller.rb:
--------------------------------------------------------------------------------
1 | module Board
2 | class HomeController < BaseController
3 |
4 | def index
5 | end
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/controllers/panel/home_controller.rb:
--------------------------------------------------------------------------------
1 | module Panel
2 | class HomeController < BaseController
3 |
4 | def index
5 | end
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/models/acme_identifier/com/acme_dns.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeDns < AcmeIdentifier
3 | include Model::AcmeIdentifier::AcmeDns
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/acme_identifier/com/acme_http.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeHttp < AcmeIdentifier
3 | include Model::AcmeIdentifier::AcmeHttp
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/debug/through.rb:
--------------------------------------------------------------------------------
1 | module Debug
2 | class Through < ApplicationRecord
3 | include Model::Base
4 | include Model::Through
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/roled/ext/member.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | module Ext::Member
3 | extend ActiveSupport::Concern
4 | include Ext::Base
5 |
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/application/_page_no_more.html+phone.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/home/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%= render 'index_column' %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/my/_show/_show_table_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: nil, url: { action: 'update' }, method: :patch, id: 'show-form', class: 'mb-3' do %>
2 | <% end %>
--------------------------------------------------------------------------------
/app/views_copy/application/edit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'edit_modal_form', layout: 'modal_form', locals: { model: @model } %>
2 |
--------------------------------------------------------------------------------
/app/views_copy/application/new.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'new_modal_form', layout: 'modal_form', locals: { model: @model } %>
2 |
--------------------------------------------------------------------------------
/config/template.yml:
--------------------------------------------------------------------------------
1 | default: &default
2 | entry_paths: []
3 | development:
4 | <<: *default
5 | test:
6 | <<: *default
7 | production:
8 | <<: *default
9 |
--------------------------------------------------------------------------------
/lib/rails_com/active_model.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/active_model/boolean'
4 | require 'rails_com/active_model/type_value'
5 |
--------------------------------------------------------------------------------
/lib/rails_com/core/object.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class Object
4 | def to_format_yaml
5 | to_yaml.gsub(/^---(\s|\n)?/, '')
6 | end
7 | end
--------------------------------------------------------------------------------
/app/errors/action_controller/standard_error.rb:
--------------------------------------------------------------------------------
1 | module ActionController
2 | class StandardError < ::StandardError
3 | attr_accessor :code
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/acme_servicer/com/ali_servicer.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AliServicer < AcmeServicer
3 | include Model::AcmeServicer::AliServicer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/acme_servicer/com/aws_servicer.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AwsServicer < AcmeServicer
3 | include Model::AcmeServicer::AwsServicer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/detector_bot/com/detector_slack.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorSlack < DetectorBot
3 | include Model::DetectorBot::DetectorSlack
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/detector_log/com/detector_error.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorError < DetectorLog
3 | include Model::DetectorLog::DetectorError
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/pg_record.rb:
--------------------------------------------------------------------------------
1 | class PgRecord < ActiveRecord::Base
2 | self.abstract_class = true
3 | #establish_connection schema_search_path: 'pg_catalog'
4 | end
5 |
--------------------------------------------------------------------------------
/app/views/admin/_show/_show_table_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: nil, url: { action: 'update' }, method: :patch, id: 'show-form', class: 'mb-3' do %>
2 | <% end %>
--------------------------------------------------------------------------------
/app/views/application/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <% model_klass.com_column_names.each do |column| %>
2 | <%= model.public_send(column) %> |
3 | <% end %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/_show_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
<%= Com::Filter.human_attribute_name(:name) %>
3 | <%= @filter.name %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/com/my/ssh_keys/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.index.title'), { action: 'index' } %>
2 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.select :operation, options_for_select(Com::MetaAction.options_i18n(:operation), @meta_action.operation) %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/_index_meta_controller.html.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'meta_controller', collection: @meta_controllers, as: :meta_controller %>
2 |
--------------------------------------------------------------------------------
/app/views/default_form/_select_enum.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.select name, options_for_select(f.object.class.options_i18n(name), f.object.public_send(name)), prompt: true %>
2 |
--------------------------------------------------------------------------------
/app/views/inline_form/_select_enum.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.select name, options_for_select(f.object.class.options_i18n(name), f.object.public_send(name)), prompt: true %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/batch_retry.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'tbody', partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
2 |
--------------------------------------------------------------------------------
/app/views/layouts/pg/panel/base.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/admin_head' do %>
2 |
3 | <%= yield %>
4 |
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/me/_nav_brand.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to({ controller: 'me/home' }, class: 'navbar-item') do %>
2 | <%= image_tag 'logo.png', class: 'image' %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/lib/generators/templates/scaffold_erb/_index_tbody.html.erb.tt:
--------------------------------------------------------------------------------
1 | <% attributes.each do |attribute| -%>
2 | <%%= model.<%= attribute.name %> %> |
3 | <% end -%>
4 |
--------------------------------------------------------------------------------
/lib/rails_com/action_dispatch.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/action_dispatch/mapper'
4 | require 'rails_com/action_dispatch/generator'
5 |
--------------------------------------------------------------------------------
/app/controllers/board_controller.rb:
--------------------------------------------------------------------------------
1 | class BoardController < ApplicationController
2 | include Com::Controller::Admin
3 | before_action :require_user
4 |
5 | end
6 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::BaseController < PanelController
3 | include ActiveStorage::SetCurrent
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/detector_bot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorBot < ApplicationRecord
3 | include Model::DetectorBot
4 | include Inner::Bot
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/com/pg_replication_slot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class PgReplicationSlot < PgRecord
3 | self.table_name = 'pg_catalog.pg_replication_slots'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/pg_stat_subscription.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class PgStatSubscription < PgRecord
3 | self.table_name = 'pg_catalog.pg_stat_subscription'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/views/admin/home/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('me.home.index.title'), { controller: 'me/home' } %>
2 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/application/disposable_auth_fail.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/csps/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.csps.index.title'), { action: 'index' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/app/views/job/panel/queues/pause.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "tr_#{params[:id]}", partial: 'index_tbody', layout: 'index_tr', locals: { model: @queue } %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/queues/resume.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "tr_#{params[:id]}", partial: 'index_tbody', layout: 'index_tr', locals: { model: @queue } %>
2 |
--------------------------------------------------------------------------------
/examples/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | en:
2 | number:
3 | format:
4 | delimiter_pattern: !ruby/regexp /(\d)(?=((\d\d)+(\d\d\d)(?!\d)|(\d\d\d){1}(?!\d)))/ # 印度数字格式
5 |
--------------------------------------------------------------------------------
/lib/rails_com/action_mailbox.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/action_mailbox/inbound_email'
4 | require 'rails_com/action_mailbox/mail_ext'
5 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/home_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::HomeController < Panel::BaseController
3 |
4 | def index
5 | end
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/models/acme_servicer/com/tencent_servicer.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class TencentServicer < AcmeServicer
3 | include Model::AcmeServicer::TencentServicer
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/com/meta_action.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaAction < ApplicationRecord
3 | include Model::MetaAction
4 | include Roled::Ext::MetaAction
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/com/pg_publication_table.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class PgPublicationTable < PgRecord
3 | self.table_name = 'pg_catalog.pg_publication_tables'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/detector_log/com/detector_response.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorResponse < DetectorLog
3 | include Model::DetectorLog::DetectorResponse
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/err_bot/com/feishu_bot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class FeishuBot < ErrBot
3 | include Model::ErrBot::FeishuBot
4 | include Inner::FeishuBot
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/views/application/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <% model_klass.com_column_names.each do |column| %>
2 | <%= model_klass.human_attribute_name(column) %> |
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/my/ssh_keys/create.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.prepend 'tbody', partial: 'index_card', locals: { model: @ssh_key } %>
2 | <%= turbo_stream.remove 'modal' %>
--------------------------------------------------------------------------------
/app/views/com/panel/cache_lists/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.id %> |
2 | <%= model.path %> |
3 | <%= model.key %> |
4 | <%= model.etag %> |
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/detectors/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Detector.human_attribute_name(:name) %> |
2 | <%= Com::Detector.human_attribute_name(:url) %> |
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
6 | <%= yield %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/layouts/simple.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/application_head' do %>
2 |
3 | <%= yield %>
4 |
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/examples/app/assets/javascripts/phone.js:
--------------------------------------------------------------------------------
1 | import 'rails_com/application'
2 | import 'rails_com/stimulus'
3 | import 'default_form/application'
4 | import 'weui.js/dist/weui'
5 |
--------------------------------------------------------------------------------
/test/fixtures/com/blob_defaults.yml:
--------------------------------------------------------------------------------
1 | one:
2 | record_class: Com::AcmeAccount
3 | name: private_pem
4 | two:
5 | record_class: Com::AcmeAccount
6 | name: private_pem
7 |
--------------------------------------------------------------------------------
/app/controllers/roled/admin/roles_controller.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class Admin::RolesController < Admin::BaseController
3 | include Controller::Admin
4 |
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/views/admin/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <% if ['new', 'edit', 'show'].include?(params[:action]) %>
2 | <%= link_to t('.index.title'), { action: 'index' } %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/admin/_menu_bar.erb:
--------------------------------------------------------------------------------
1 | <% if current_member %>
2 | <%= render partial: 'admin/auth_navbar' %>
3 | <% else %>
4 | <%= render partial: 'auth_navbar_user' %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/agent/home/index.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'profile_item' %>
3 |
4 |
5 | <%= render 'trade_column' %>
6 |
7 | <%= render 'powered_by' %>
8 |
--------------------------------------------------------------------------------
/app/views/application/_show.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'show_layout', locals: local_assigns do %>
2 | <%= render partial: 'show_table', locals: local_assigns %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/audios/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= audio_tag @audio.url(disposition: params[:disposition]), controls: true %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/detectors/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to model.name, { controller: 'detector_logs', detector_id: model.id } %> |
2 | <%= model.url %> |
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('com.panel.errs.index.title'), { action: 'index' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/app/views/panel/_brand_nav.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%# link_to t('panel.home.index.title'), { controller: 'panel/home' }, class: 'text-centered' %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/panel/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <% if ['new', 'edit', 'show'].include?(params[:action]) %>
2 | <%= link_to t('.index.title'), { action: 'index' } %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/examples/config/initializers/time_format.rb:
--------------------------------------------------------------------------------
1 | class ActiveSupport::TimeWithZone
2 |
3 | def as_json(options = {})
4 | strftime('%Y-%m-%d %H:%M:%S')
5 | end
6 |
7 | end
--------------------------------------------------------------------------------
/lib/rails_com/core/nil_class.rb:
--------------------------------------------------------------------------------
1 | class NilClass
2 |
3 | def to_d
4 | BigDecimal(0)
5 | end
6 |
7 | def to_sym
8 | to_s.to_sym
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/controllers/admin_controller.rb:
--------------------------------------------------------------------------------
1 | class AdminController < ApplicationController
2 | include Com::Controller::Admin
3 | include Org::Controller::Admin if defined? RailsOrg
4 | end
5 |
--------------------------------------------------------------------------------
/app/controllers/statis/panel/home_controller.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 | class Panel::HomeController < Com::Panel::BaseController
3 |
4 | def index
5 | end
6 |
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/jobs/com/acme_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeJob < ApplicationJob
3 |
4 | def perform(acme_order)
5 | acme_order.get_cert
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/models/job/model/queue.rb:
--------------------------------------------------------------------------------
1 | module Job
2 | module Model::Queue
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 |
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/views/application/_index_table_without_button.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | <%= yield %>
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/views/application/_page_blank.html+phone.erb:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/app/views/application/_page_loading.html.erb:
--------------------------------------------------------------------------------
1 |
2 | 到顶了
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/log_sqls/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('com.panel.errs.index.title'), { action: 'index' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_page.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to page, url, data: { turbo_action: 'replace' }, class: (page.current? ? 'pagination-link is-current' : 'pagination-link') %>
2 |
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/_overview/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('role.panel.roles.index.title'), panel_roles_path %>
2 | <%= @role.name %>
3 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counter_days/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.configs.index.title'), { controller: 'configs' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/examples/config/jobber.yml:
--------------------------------------------------------------------------------
1 | development:
2 | url: redis://localhost:6379/1
3 |
4 | test:
5 | url: redis://localhost:6379/1
6 |
7 | production:
8 | url: redis://localhost:6379/1
9 |
--------------------------------------------------------------------------------
/lib/generators/templates/scaffold_erb/_form.html.erb.tt:
--------------------------------------------------------------------------------
1 | <% attributes.each do |attribute| -%>
2 | <%%= f.<%= attribute.field_type %> :<%= attribute.column_name %> %>
3 | <% end -%>
4 |
--------------------------------------------------------------------------------
/test/fixtures/com/meta_businesses.yml:
--------------------------------------------------------------------------------
1 | one:
2 | name: MyString
3 | identifier: MyString
4 | position: 1
5 | two:
6 | name: MyString
7 | identifier: MyString
8 | position: 1
9 |
--------------------------------------------------------------------------------
/app/models/com.rb:
--------------------------------------------------------------------------------
1 | module Com
2 |
3 | def self.use_relative_model_naming?
4 | true
5 | end
6 |
7 | def self.table_name_prefix
8 | 'com_'
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/models/com/model/meta_route.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::MetaRoute
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 |
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/err_bot/com/work_wechat_bot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class WorkWechatBot < ErrBot
3 | include Model::ErrBot::WorkWechatBot
4 | include Inner::WorkWechatBot
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/column.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace 'filter_popup_box', partial: @meta_column&.filter_type || 'filter_input_string', layout: 'filter_input_layout' %>
--------------------------------------------------------------------------------
/app/views/com/panel/detector_errors/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::DetectorError.human_attribute_name(:status) %> |
2 | <%= Com::DetectorError.human_attribute_name(:body) %> |
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_summaries/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('com.panel.errs.index.title'), { action: 'index' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/errs/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - <%= model.id %>
5 |
6 | <%= render 'show_table' %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/com/panel/infos/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.code %> |
2 | <%= model.value %> |
3 | <%= model.platform_i18n %> |
4 | <%= model.version %> |
5 |
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_namespaces/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 | <%= f.check_box :verify_organ %>
3 | <%= f.check_box :verify_member %>
4 | <%= f.check_box :verify_user %>
5 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - <%= @job.id %>
5 |
6 | <%= render 'show_table' %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/panel/home/index.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render 'org_nav' %>
2 | <%= render 'crm_nav' %>
3 | <%= render 'factory_nav' %>
4 | <%= render 'trade_nav' %>
5 | <%= render 'bench_nav' %>
6 |
--------------------------------------------------------------------------------
/lib/templates/rails/scaffold_controller/controller.rb.tt:
--------------------------------------------------------------------------------
1 | class <%= controller_class_name %>Controller < <%= controller_class_path.map(&:camelize).join('::') %>::BaseController
2 |
3 | end
4 |
--------------------------------------------------------------------------------
/app/controllers/in_controller.rb:
--------------------------------------------------------------------------------
1 | class InController < AdminController
2 | if defined? RailsOrg
3 | include Org::Controller::Me
4 | include Org::Controller::In
5 | end
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/app/jobs/com/memory_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MemoryJob < ApplicationJob
3 |
4 | def perform
5 | raise
6 | #Open3.popen2e('')
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/com/meta_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class MetaController < ApplicationRecord
3 | include Model::MetaController
4 | include Roled::Ext::MetaController
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/com/pg_replication_origin_status.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class PgReplicationOriginStatus < PgRecord
3 | self.table_name = 'pg_catalog.pg_replication_origin_status'
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/roled.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 |
3 | def self.use_relative_model_naming?
4 | true
5 | end
6 |
7 | def self.table_name_prefix
8 | 'roled_'
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/views/application/_show.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render 'show_table_form' %>
2 |
3 | <%= render 'show_table' %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/application/new.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render partial: 'new_form', locals: { model: defined?(model) ? model : instance_variable_get("@#{model_name}") } %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/detector_logs/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.detectors.index.title'), { controller: 'detectors' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_businesses/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::MetaBusiness.human_attribute_name(:name) %> |
2 | <%= Com::MetaBusiness.human_attribute_name(:identifier) %> |
3 |
--------------------------------------------------------------------------------
/app/views/job/panel/queues/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'index_table' do %>
2 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @queues, as: :model %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_page.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= button_to page, url, data: { turbo_action: 'replace' }, class: (page.current? ? 'pagination-link is-current' : 'pagination-link') %>
2 |
--------------------------------------------------------------------------------
/app/views/layouts/frame/main.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'frame_layout_container' do %>
3 | <%= yield %>
4 | <% end %>
5 |
6 |
--------------------------------------------------------------------------------
/lib/templates/test_unit/model/unit_test.rb.tt:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | <% module_namespacing do -%>
4 | class <%= class_name %>Test < ActiveSupport::TestCase
5 |
6 | end
7 | <% end -%>
8 |
--------------------------------------------------------------------------------
/app/jobs/com/acme_order_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class AcmeOrderJob < ApplicationJob
3 |
4 | def perform(acme_order)
5 | acme_order.get_cert
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/jobs/com/detector_error_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorErrorJob < ApplicationJob
3 |
4 | def perform(error)
5 | error.send_notice
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/jobs/com/err_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class ErrJob < ApplicationJob
3 | queue_as :default
4 |
5 | def perform(err)
6 | err.send_message
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/com/model/meta_permission.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::MetaPermission
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 |
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/statis.rb:
--------------------------------------------------------------------------------
1 | module Statis
2 |
3 | def self.use_relative_model_naming?
4 | true
5 | end
6 |
7 | def self.table_name_prefix
8 | 'statis_'
9 | end
10 |
11 | end
12 |
--------------------------------------------------------------------------------
/app/views/application/new.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render partial: 'new_form', locals: { model: instance_variable_get("@#{model_name}") } %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_orders/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.acme_accounts.index.title'), { controller: 'acme_accounts' } %>
2 | <%= t('.title') %>
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_indexes/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::MetaModel.human_attribute_name(:name) %> |
2 | <%= Com::MetaModel.human_attribute_name(:business_identifier) %> |
3 |
--------------------------------------------------------------------------------
/app/views/com/panel/pg_publication_tables/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.schemaname %> |
2 | <%= model.tablename %> |
3 | <%= simple_format model.attnames %> |
4 | |
5 |
--------------------------------------------------------------------------------
/app/views/layouts/simple.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'alert' %>
3 |
4 | <%= yield %>
5 |
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/app/views_copy/application/create.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.prepend 'tbody', partial: 'index_tbody', layout: 'index_tr', locals: { model: model } %>
2 | <%= turbo_stream.remove 'modal' %>
3 |
--------------------------------------------------------------------------------
/examples/config/puma.rb:
--------------------------------------------------------------------------------
1 | dir = ENV['PWD']
2 |
3 | before_fork do
4 | ActiveRecord::Base.connection_pool.disconnect!
5 | end
6 |
7 | state_path "#{File.expand_path('tmp/sockets/puma.state', dir)}"
8 |
--------------------------------------------------------------------------------
/lib/generators/templates/scaffold_erb/_index_thead.html.erb.tt:
--------------------------------------------------------------------------------
1 | <% attributes.each do |attribute| -%>
2 | <%%= <%= class_name %>.human_attribute_name(:<%= attribute.name %>) %> |
3 | <% end -%>
4 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "test/dummy"]
2 | path = test/dummy
3 | url = git@github.com:work-design/dummy.git
4 | [submodule "docker"]
5 | path = docker
6 | url = git@github.com:work-design/docker.git
7 |
--------------------------------------------------------------------------------
/app/jobs/com/state_destroy_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class StateDestroyJob < ApplicationJob
3 |
4 | def perform(id)
5 | State.where(id: id).delete_all
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/models/detector_bot/com/detector_feishu.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorFeishu < DetectorBot
3 | include Model::DetectorBot::DetectorFeishu
4 | include Inner::FeishuBot
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/views/application/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 | | <%= render partial: 'index_tr_actions', locals: { model: model } %> |
4 |
5 |
--------------------------------------------------------------------------------
/app/views/application/_modal_form.html.erb:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/app/views/application/refresh.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'tbody', partial: 'index_tbody', layout: 'index_tr', collection: instance_variable_get("@#{pluralize_model_name}"), as: :model %>
2 |
--------------------------------------------------------------------------------
/app/views/application/reorder.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'tbody', partial: 'index_tbody', layout: 'index_tr', collection: instance_variable_get("@#{pluralize_model_name}"), as: :model %>
2 |
--------------------------------------------------------------------------------
/app/views/application/show.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render 'show_table_form' %>
2 |
3 | <%= render 'show_table' %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/com/attachments/_list_field_simple.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render partial: 'com/attachments/list_edit', locals: local_assigns %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'index_table' do %>
2 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @meta_actions, as: :model %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/meta_actions.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.after "tr_#{@meta_controller.identifier}", partial: 'index_meta_action', collection: @meta_actions, as: :meta_action %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/indexes.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render layout: 'index_table' do %>
3 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @indexes, as: :model %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.statistic_configs.index.title'), { controller: 'statistic_configs' } %>
2 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_months/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.statistic_configs.index.title'), { controller: 'statistic_configs' } %>
2 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.statistic_configs.index.title'), { controller: 'statistic_configs' } %>
2 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_months/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.statistic_configs.index.title'), { controller: 'statistic_configs' } %>
2 | <%= t('.title') %>
--------------------------------------------------------------------------------
/lib/rails_com/core/date_time.rb:
--------------------------------------------------------------------------------
1 | require 'rails_com/core/date_and_time'
2 |
3 | class DateTime
4 | include RailsCom::DateAndTime
5 |
6 | def inspect
7 | to_s
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/app/views/application/_head_title.html.erb:
--------------------------------------------------------------------------------
1 | <% if request.variant.include?(:mini_program) %>
2 | <%= current_organ_name %>
3 | <% else %>
4 | <%= current_title %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/application/_visit.html.erb:
--------------------------------------------------------------------------------
1 | <% if defined?(url) %>
2 |
3 | <% else %>
4 |
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/admin/organs/_show_table.html.erb:
--------------------------------------------------------------------------------
1 | <% Hash(@organ.theme_settings).each do |k, v| %>
2 |
3 |
<%= Org::Organ.human_attribute_name(k) %>
4 | <%= v %>
5 |
6 | <% end %>
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_ip/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= link_to({ action: 'index', ip: model[0] }, class: 'size-7') do %>
3 | <%= model[0] %>
4 | <% end %>
5 | |
6 | <%= model[1] %> |
--------------------------------------------------------------------------------
/app/views/com/panel/organs/_show_table.html.erb:
--------------------------------------------------------------------------------
1 | <% Hash(@organ.theme_settings).each do |k, v| %>
2 |
3 |
<%= Org::Organ.human_attribute_name(k) %>
4 | <%= v %>
5 |
6 | <% end %>
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/actions.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "tr_#{@meta_controller.identifier}", partial: 'show_controller', locals: { meta_controller: @meta_controller, expand: true } %>
2 |
--------------------------------------------------------------------------------
/app/views_copy/application/_index_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 | | <%= render partial: 'index_tr_actions', locals: { model: model } %> |
4 |
5 |
--------------------------------------------------------------------------------
/app/views_copy/application/update.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "tr_#{params[:id]}", partial: 'index_tbody', layout: 'index_tr', locals: { model: @model } %>
2 | <%= turbo_stream.remove 'modal' %>
3 |
--------------------------------------------------------------------------------
/lib/rails_com/core/pathname.rb:
--------------------------------------------------------------------------------
1 | class Pathname
2 |
3 | # xx.html.erb => xx
4 | def without_extname
5 | suffix = basename.to_s.split('.')[0]
6 | dirname.join(suffix)
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/app/controllers/job/panel/base_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 | module Job
3 | class Panel::BaseController < PanelController
4 | # protect_from_forgery with: :exception
5 |
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/app/controllers/roled/admin/base_controller.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class Admin::BaseController < AdminController
3 | include Controller::Application
4 | before_action :require_role
5 |
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/application/_brand_nav.html.erb:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/app/views/application/edit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'edit_modal_form', layout: 'modal_form', locals: { model: defined?(model) ? model : instance_variable_get("@#{model_name}") } %>
2 |
--------------------------------------------------------------------------------
/app/views/application/new.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body', partial: 'new_modal_form', layout: 'modal_form', locals: { model: defined?(model) ? model : instance_variable_get("@#{model_name}") } %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/meta_namespaces.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.after "tr_#{params[:business_identifier].blank? ? '_' : params[:business_identifier] }", partial: 'index_meta_namespace' %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/home/_process_tr.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= yield %>
3 |
4 | <%= render partial: 'process_tbody', layout: 'process_tr', collection: model.supervisees, as: :model %>
5 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_statistical/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Statistic.human_attribute_name(:statistical_type) %> |
2 | <%= Com::Statistic.human_attribute_name(:statistical_id) %> |
3 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/months.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'bar' %>
2 |
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', collection: @month_counts, as: :model %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_statistical/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Statistic.human_attribute_name(:statistical_type) %> |
2 | <%= Com::Statistic.human_attribute_name(:statistical_id) %> |
3 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/months.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'bar' %>
2 |
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', collection: @month_counts, as: :model %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/controllers/my_controller.rb:
--------------------------------------------------------------------------------
1 | class MyController < ApplicationController
2 | include Com::Controller::Admin
3 | include Trade::Controller::My if defined? RailsTrade
4 | before_action :require_user
5 |
6 | end
7 |
--------------------------------------------------------------------------------
/app/jobs/com/err_first_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class ErrFirstJob < ApplicationJob
3 | queue_as :default
4 |
5 | def perform(err)
6 | err.send_first_message
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/detector_bot/com/detector_work_wechat.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorWorkWechat < DetectorBot
3 | include Model::DetectorBot::DetectorWorkWechat
4 | include Inner::WorkWechatBot
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/column_single.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append "filter_container_#{params[:column_name]}", partial: @meta_column&.filter_type || 'filter_input_string', layout: 'filter_input_layout' %>
--------------------------------------------------------------------------------
/app/views/com/panel/acme_servicers/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= Com::AcmeAccount.human_attribute_name(:key) %>
3 | <%= Com::AcmeAccount.human_attribute_name(:secret) %>
4 | |
5 | |
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/detector_errors/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.status %> |
2 | <% if model.error.present? %>
3 | <%= model.error %> |
4 | <% else %>
5 | <%= model.body %> |
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/update.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "tr_#{@meta_action.meta_controller.identifier}", partial: 'meta_controller', locals: { meta_controller: @meta_action.meta_controller } %>
2 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.home.index.title'), { controller: 'home' } %>
2 | <%= @queue.name %>
3 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/roled/panel/tabs/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :path %>
2 | <%= f.text_field :icon %>
3 | <%= f.text_field :name %>
4 | <%= f.collection_select :namespace, Com::MetaNamespace.all, :identifier, :identifier %>
5 |
--------------------------------------------------------------------------------
/app/views_copy/application/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'new' }, class: 'button is-rounded is-primary') do %>
2 | <%= svg_tag 'plus' %>
3 | <%= t('.new.title') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/config/locales/zh.helper.yml:
--------------------------------------------------------------------------------
1 | zh:
2 | helpers:
3 | select:
4 | prompt: 请选择
5 | submit:
6 | create: 创建
7 | update: 更新
8 | submit: 提交
9 | search: 搜索
10 | next: 下一步
11 |
--------------------------------------------------------------------------------
/app/jobs/active_storage/identify_job.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class ActiveStorage::IdentifyJob < ActiveStorage::BaseJob
4 |
5 | def perform(blob)
6 | blob.identify
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/app/jobs/com/counter_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class CounterJob < ApplicationJob
3 | queue_as :statistic
4 |
5 | def perform(counter)
6 | counter.cache_from_config
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/jobs/com/ssh_key_setup_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class SshKeySetupJob < ApplicationJob
3 |
4 | def perform(ssh_key, auth_token)
5 | ssh_key.setup_with_log(auth_token)
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/views/application/_modal_header.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= t('.title') %>
3 |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_columns/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :column_name %>
2 | <%= f.text_field :column_type %>
3 | <%= f.text_field :sql_type %>
4 | <%= f.number_field :column_limit %>
5 | <%= f.text_area :comment %>
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/options.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.remove 'model_wrapper' %>
2 | <%= turbo_stream.after params[:dom_id], partial: 'meta_models_options', locals: { f: form_object(scope: 'form') } %>
3 |
--------------------------------------------------------------------------------
/app/views/roled/panel/whos/_show/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= govern[1] || govern[0] %> |
2 |
3 | <% rule.each do |key, name| %>
4 | <%= name[0] %>
5 | <% end %>
6 | |
7 |
--------------------------------------------------------------------------------
/app/jobs/com/ssh_key_deploy_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class SshKeyDeployJob < ApplicationJob
3 |
4 | def perform(ssh_key, auth_token)
5 | ssh_key.deploy_with_log(auth_token)
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/models/com/pg_publication.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class PgPublication < PgRecord
3 | include Model::PgPublication
4 |
5 | self.table_name = 'pg_catalog.pg_publication'
6 | self.primary_key = 'oid'
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/views/com/my/ssh_keys/_show/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'deploy' }, class: 'button is-rounded is-primary') do %>
2 | <%= svg_tag 'rotate' %>
3 | <%= t('.deploy.title') %>
4 | <% end %>
--------------------------------------------------------------------------------
/app/views/com/panel/blobs/_new_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with model: @blob, url: { action: 'create' } do |f| %>
2 | <%= render 'error_messages', target: @blob %>
3 | <%= f.file_field :io %>
4 | <%= f.submit %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= @queue.name %>
2 | <%= link_to t('.jobs.index.title'), { controller: 'jobs' } %>
3 | <%= t('.title') %>
--------------------------------------------------------------------------------
/app/views/layouts/admin.html+pad.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/application_head' do %>
2 | <%= render 'nav_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/layouts/agent.html+pad.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/application_head' do %>
2 | <%= render 'nav_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/jobs/com/statistic_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class StatisticJob < ApplicationJob
3 | queue_as :statistic
4 |
5 | def perform(statistic)
6 | statistic.cache_from_config
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/com/pg_subscription.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class PgSubscription < PgRecord
3 | include Model::PgSubscription
4 |
5 | self.table_name = 'pg_catalog.pg_subscription'
6 | self.primary_key = 'oid'
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/columns.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.remove 'column_wrapper' %>
2 | <%= turbo_stream.after params[:dom_id], partial: 'meta_columns_options', locals: { f: form_object(scope: params[:dom_scope]) } %>
3 |
--------------------------------------------------------------------------------
/app/views/roled/panel/tabs/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.roles.index.title'), { controller: 'roles' } %>
2 | <%= @role.name %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/com/attachments/_list_field.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= f.label target.name %>
3 |
4 | <%= render partial: 'com/attachments/list_edit', locals: local_assigns %>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/views/com/panel/csps/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_frame_tagged 'modal' do %>
2 |
3 |
4 | <%= render 'show_table' %>
5 |
6 |
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 | <%= f.text_field :tip %>
3 | <%= f.text_area :description %>
4 | <%= f.check_box :visible, tag: 'div', after: { checkbox: 'x' } %>
5 | <%= render partial: 'type_form' %>
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/_side_nav.html.erb:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/app/controllers/com/admin/blob_defaults_controller.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module Com
4 | class Admin::BlobDefaultsController < Panel::BlobDefaultsController
5 |
6 | def add
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/controllers/roled/controller/me.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | module Controller::Me
3 |
4 | def rails_role_user
5 | logger.debug "\e[35m Role User: Member \e[0m"
6 | current_member
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/jobs/com/detector_job.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class DetectorJob < ApplicationJob
3 |
4 | def perform
5 | Detector.limit(10).each do |detector|
6 | detector.detect
7 | end
8 | end
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/app/models/roled/model/cache_role.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | module Model::CacheRole
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | belongs_to :role
7 | belongs_to :cache
8 | end
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/app/views/application/_button.html+pad.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'new', **request.query_parameters.except(:id) }, class: 'button is-link') do %>
2 | <%= svg_tag 'plus' %>
3 | <%= t('.new.title') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/application/_frame_layout_container.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
<%= render 'breadcrumb' %>
3 |
4 | <%= yield %>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/views/application/err_not_found.html.erb:
--------------------------------------------------------------------------------
1 |
2 | 您没有权限访问当前数据
3 | <% if Rails.env.local? %>
4 | <%= message %>
5 | <% end %>
6 |
7 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_bots/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::ErrBot.human_attribute_name(:type) %> |
2 | <%= Com::ErrBot.human_attribute_name(:controller_name) %> |
3 | <%= Com::ErrBot.human_attribute_name(:hook_key) %> |
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_meta_columns_options.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= f.collection_select :meta_column_id, @meta_columns, :id, :column_name, all: { select: nil }, label: '字段' %>
3 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_last_page.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to url, disabled: current_page.last?, data: { turbo_action: 'replace' }, class: 'pagination-next', title: t('views.pagination.last') do %>
2 | <%= svg_tag 'forward-fast' %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_next_page.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to url, disabled: current_page.last?, data: { turbo_action: 'replace' }, class: 'pagination-next', title: t('views.pagination.next') do %>
2 | <%= svg_tag 'forward-step' %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/roled/panel/role_whos/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.roles.index.title'), { controller: 'roles' } %>
2 | <%= @role.name %>
3 | <%= t('.title') %>
4 |
5 |
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('roled.panel.roles.index.title'), { action: 'index' } %>
2 | <%= @role.name %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_months/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | | <%= model[0] %> |
3 |
4 | <%= link_to({ action: 'month', month: model[0] }) do %>
5 | <%= model[1] %>
6 | <% end %>
7 | |
8 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_months/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | | <%= model[0] %> |
3 |
4 | <%= link_to({ action: 'month', month: model[0] }) do %>
5 | <%= model[1] %>
6 | <% end %>
7 | |
8 |
--------------------------------------------------------------------------------
/app/views/application/_filter_form_tag.erb:
--------------------------------------------------------------------------------
1 | <%= link_to filter.name, { filter_id: filter.id, **filter.filter_hash }, id: "filter_tag_#{filter.id}", class: active_helper(filter_id: filter.id, active: 'button is-primary', item: 'button is-light') %>
2 |
--------------------------------------------------------------------------------
/app/views/application/_form.html.erb:
--------------------------------------------------------------------------------
1 | <% f.object.class.input_attributes_by_model.slice(*permit_keys).each do |name, column| %>
2 | <%= render partial: "default_form/#{column[:input]}", locals: { f: f, name: name, column: column } %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_identifiers/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'filter_form' %>
2 |
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @acme_identifiers, as: :model %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/inbound_emails/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'index_table' do %>
2 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @inbound_emails, as: :model %>
3 | <% end %>
4 |
5 | <%= paginate @inbound_emails %>
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/meta_controllers.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.after "tr_#{params[:business_identifier]}_#{params[:namespace_identifier].blank? ? '_' : params[:namespace_identifier]}", partial: 'index_meta_controller' %>
2 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_first_page.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to url, disabled: current_page.first?, data: { turbo_action: 'replace' }, class: 'pagination-previous', title: t('views.pagination.first') do %>
2 | <%= svg_tag 'backward-fast' %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/layouts/frame/body.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'breadcrumb' %>
3 | <%= render 'alert' %>
4 | <%= yield %>
5 |
6 |
--------------------------------------------------------------------------------
/app/models/roled/ext/user.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | module Ext::User
3 | extend ActiveSupport::Concern
4 | include Ext::Base
5 |
6 | included do
7 | attribute :admin, :boolean, default: false
8 | end
9 |
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/app/views/application/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'new', **request.query_parameters.except(:id) }, class: 'button is-rounded is-primary') do %>
2 | <%= svg_tag 'plus' %>
3 | <%= t('.new.title') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/application/refresh.turbo_stream+phone.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'tbody', partial: 'index_item', layout: 'index_item_actions', collection: instance_variable_get("@#{pluralize_model_name}"), as: :model %>
2 | <%= turbo_stream.remove 'modal' %>
3 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/_update/_filter_form_tag.erb:
--------------------------------------------------------------------------------
1 | <%= link_to filter.name, { controller: filter.controller_path, action: filter.action_name, filter_id: filter.id, **filter.filter_hash }, id: "filter_tag_#{filter.id}", class: 'button is-primary' %>
2 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_bots/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.type_i18n %> |
2 |
3 | <% model.err_notices.each do |err_notice| %>
4 | <%= err_notice.controller_name %>
5 | <% end %>
6 | |
7 | <%= model.hook_key %> |
8 |
9 |
--------------------------------------------------------------------------------
/app/views/kaminari/com/_prev_page.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to url, disabled: current_page.first?, data: { turbo_action: 'replace' }, class: 'pagination-previous', title: t('views.pagination.previous') do %>
2 | <%= svg_tag 'backward-step' %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/layouts/buy.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar' %>
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/panel/_nav_without_login.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to({ controller: '/panel/home' }, class: active_helper(modules: 'panel', item: 'navbar-item', active: 'is-active navbar-item')) do %>
2 | <%= t('panel.home.index.title') %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/roled/panel/role_whos/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Roled::RoleWho.human_attribute_name(:who_type) %> |
2 | <%= Roled::RoleWho.human_attribute_name(:who_id) %> |
3 | <%= Roled::RoleWho.human_attribute_name(:created_at) %> |
4 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_statistical/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.statistical_type %> |
2 | <%= link_to model.statistical_id, { action: 'index', statistical_type: model.statistical_type, statistical_id: model.statistical_id } %> |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_statistical/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.statistical_type %> |
2 | <%= link_to model.statistical_id, { action: 'index', statistical_type: model.statistical_type, statistical_id: model.statistical_id } %> |
--------------------------------------------------------------------------------
/app/views/application/_button.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'new' }, class: 'button is-fullwidth is-primary mx-0', form: { class: 'is-fullwidth' }) do %>
2 | <%= svg_tag 'plus' %>
3 | <%= t('.new.title') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/application/_mini_program_message.html.erb:
--------------------------------------------------------------------------------
1 | <% if request.variant.include?(:mini_program) %>
2 |
6 | <% end %>
--------------------------------------------------------------------------------
/app/views/application/_update.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "tr_#{params[:id]}", partial: 'index_tbody', layout: 'index_tr', locals: { model: defined?(model) ? model : instance_variable_get("@#{model_name}") } %>
2 | <%= turbo_stream.remove 'modal' %>
--------------------------------------------------------------------------------
/app/views/application/actions.html.erb:
--------------------------------------------------------------------------------
1 | <% if defined? model %>
2 | <%= render partial: 'actions', locals: { model: model } %>
3 | <% else %>
4 | <%= render partial: 'actions', locals: { model: instance_variable_get("@#{model_name}") } %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/videos/show.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%=
3 | video_tag(
4 | @video.url(disposition: params[:disposition]),
5 | controls: true,
6 | preload: 'auto'
7 | )
8 | %>
9 |
10 |
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @roles, as: :model %>
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/lib/rails_com/core/time_with_zone.rb:
--------------------------------------------------------------------------------
1 | require 'rails_com/core/date_and_time'
2 |
3 | module ActiveSupport
4 | class TimeWithZone
5 | include RailsCom::DateAndTime
6 |
7 | def inspect
8 | to_fs
9 | end
10 |
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/views/application/_edit_form.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'default_phone', model: model, scope: model_name, url: { action: 'update' }, state: 'redirect' do |f| %>
2 | <%= render partial: 'form', locals: { f: f } %>
3 | <%= f.submit %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_businesses/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'sync' }, method: :post, data: { disable_with: 'Syncing' }, class: 'button is-success') do %>
2 | <%= svg_tag 'rotate' %>
3 | <%= t('.sync') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_namespaces/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'sync' }, method: :post, data: { disable_with: 'Syncing' }, class: 'button is-success') do %>
2 | <%= svg_tag 'rotate' %>
3 | <%= t('.sync') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/lib/rails_com/env.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module RailsCom::Env
4 | extend self
5 |
6 | def environments
7 | Dir.children(Rails.root.join('config', 'environments')).map! { |rb| rb.delete_suffix!('.rb') }
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/app/jsons/application/_pagination.json.jbuilder:
--------------------------------------------------------------------------------
1 | json.page do
2 | json.total_count items.total_count
3 | json.total_pages items.total_pages
4 | json.prev_page items.prev_page
5 | json.next_page items.next_page
6 | json.current_page items.current_page
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/application/_index.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: 'index_item', layout: 'index_item_actions', collection: instance_variable_get("@#{controller_name.pluralize}"), as: :model %>
2 |
3 | <%= paginate instance_variable_get("@#{controller_name.pluralize}") %>
4 |
--------------------------------------------------------------------------------
/app/views/application/_modal_form.html+phone.erb:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/app/views/application/_page_loading.html+phone.erb:
--------------------------------------------------------------------------------
1 |
8 | 到底了
9 |
10 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'sync' }, method: :post, data: { disable_with: 'Syncing' }, class: 'button is-success') do %>
2 | <%= svg_tag 'rotate' %>
3 | <%= t('.sync') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/puma/thread_stats.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <% @backtraces.each do |thread| %>
3 |
4 |
- <%= thread[:name] %>
5 |
<%= thread[:backtrace].to_format_yaml %>
6 |
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/my/home/index.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= render 'profile_item' %>
3 | <%= render 'cart_column' %>
4 |
5 |
6 | <%= render 'trade_column' %>
7 | <%= render 'com_column' %>
8 |
9 | <%= render 'powered_by' %>
10 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/_month/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'do_cache', **params.permit(:month) }, class: 'button is-rounded is-primary') do %>
2 | <%= svg_tag 'plus' %>
3 | <%= t('.do_cache.title') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/_month/_button.html.erb:
--------------------------------------------------------------------------------
1 | <%= button_to({ action: 'do_cache', **params.permit(:month) }, class: 'button is-rounded is-primary') do %>
2 | <%= svg_tag 'plus' %>
3 | <%= t('.do_cache.title') %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/config/locales/zh.pg.controller.yml:
--------------------------------------------------------------------------------
1 | zh:
2 | pg:
3 | panel:
4 | pg_subscriptions:
5 | index:
6 | title: 订阅者
7 | refresh:
8 | title: 更新
9 | pg_stat_subscriptions:
10 | index:
11 | title: 订阅状态
--------------------------------------------------------------------------------
/app/views/application/_edit_inline_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'inline', model: model, scope: model_name, url: { action: 'update' } do |f| %>
2 | <%= render partial: params[:field_type], locals: { f: f, name: params[:field] } %>
3 | <%= f.submit %>
4 | <% end %>
5 |
--------------------------------------------------------------------------------
/app/views/application/inline.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%=
2 | turbo_stream.update(
3 | "inline_#{params[:id]}_#{params[:field]}",
4 | partial: 'edit_inline_form',
5 | locals: { model: defined?(model) ? model : instance_variable_get("@#{model_name}") }
6 | )
7 | %>
8 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_servicers/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= model.key %>
3 | <%= model.secret %>
4 | |
5 |
6 | <% model.acme_domains.each do |acme_domain| %>
7 | <%= acme_domain.domain %>
8 | <% end %>
9 | |
10 |
11 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/batch_destroy.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'tbody', partial: "job/panel/jobs/_#{params[:from_action]}/index_tbody", layout: 'index_tr', collection: @jobs, as: :model %>
2 | <%= turbo_stream.replace 'xxd', partial: 'index_th_check' %>
3 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/statistical.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 |
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @statistics, as: :model %>
5 | <% end %>
6 |
7 | <%= paginate @statistics %>
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/statistical.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 |
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @statistics, as: :model %>
5 | <% end %>
6 |
7 | <%= paginate @statistics %>
--------------------------------------------------------------------------------
/config/locales/job/zh.job.attributes.yml:
--------------------------------------------------------------------------------
1 | zh:
2 | activerecord:
3 | attributes:
4 | solid_queue/job:
5 | active_job_id: 任务ID
6 | scheduled_at: 任务执行时间
7 | finished_at: 完成时间
8 | status: 状态
9 | queue_name: 队列
10 |
11 |
--------------------------------------------------------------------------------
/app/controllers/com/controller/my.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Controller::My
3 | extend ActiveSupport::Concern
4 | include Controller::Curd
5 |
6 | private
7 | def tab_item_items
8 | @roled_tabs.pluck(:path)
9 | end
10 |
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/helpers/rails_com/cache_helper.rb:
--------------------------------------------------------------------------------
1 | module RailsCom
2 | module CacheHelper
3 |
4 | def cache_with_model(namespace = '')
5 | ->(model) { [model, namespace, current_member.cache, compute_asset_path('icons_regular.svg')] }
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/views/admin/role_denied.html.erb:
--------------------------------------------------------------------------------
1 | <% if rails_role_user.is_a?(Org::Member) %>
2 | 没有权限,请联系管理员
3 | <% else %>
4 |
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/admin/filters/update.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.replace "filter_update_#{model.id}", partial: 'filter_form_update', locals: { filter: model } %>
2 | <%= turbo_stream.replace "filter_tag_#{model.id}", partial: 'filter_form_tag', locals: { filter: model } %>
3 |
--------------------------------------------------------------------------------
/lib/rails_com/utils/hex_helper.rb:
--------------------------------------------------------------------------------
1 | module HexHelper
2 | extend self
3 |
4 | def sample
5 | [rand(0..255), rand(0..255), rand(0..255)].map { |i| i.to_s(16).rjust(2, '0') }.join
6 | end
7 |
8 | def rgb_sample
9 | "##{sample}"
10 | end
11 |
12 | end
13 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/acme_accounts_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::AcmeAccountsController < Panel::BaseController
3 |
4 | private
5 | def acme_account_permit_params
6 | [
7 | :email
8 | ]
9 | end
10 |
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/controllers/com/panel/pg_replication_slots_controller.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class Panel::PgReplicationSlotsController < Panel::BaseController
3 |
4 | def index
5 | @pg_replication_slots = PgReplicationSlot.page(params[:page])
6 | end
7 |
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/models/com/model/pg_subscription.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::PgSubscription
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | has_many :pg_stat_subscriptions, primary_key: :subname, foreign_key: :subname
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/views/application/_index_item.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <% model.attributes.slice('name', 'title').each do |_, value| %>
3 | <%= value %>
4 | <% end %>
5 |
6 |
--------------------------------------------------------------------------------
/app/views/application/_visit.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.append 'body' do %>
2 | <% if defined?(url) %>
3 |
4 | <% else %>
5 |
6 | <% end %>
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/com/attachments/_list_field.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= f.label target.name %>
3 |
4 | <%= render partial: 'com/attachments/list_edit', locals: local_assigns %>
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/views/com/nodes/outer.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <% if @node.children.present? %>
2 | <%= turbo_stream.after params[:html_id], partial: 'outer_children_options', locals: { f: form_object(scope: params[:scope]), node: @node, depth: @node.depth + 1, outer: params[:outer] } %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/blobs/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'filter_form' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @blobs, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @blobs %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/detectors/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :name %>
2 | <%= f.text_field :url %>
3 | <%= f.fields :detector_bots, wrap: { all: nil, input: 'field' }, label: false, placeholder: true do |ef| %>
4 | <%= render partial: 'item_form', locals: { ef: ef } %>
5 | <% end %>
--------------------------------------------------------------------------------
/app/views/com/panel/errs/_show/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('com.panel.err_summaries.index.title'), { controller: 'err_summaries' } %>
2 | <%= link_to t('com.panel.errs.index.title'), { action: 'index' } %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/infos/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Info.human_attribute_name(:code) %> |
2 | <%= Com::Info.human_attribute_name(:value) %> |
3 | <%= Com::Info.human_attribute_name(:platform) %> |
4 | <%= Com::Info.human_attribute_name(:version) %> |
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/ip.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @logs, as: :model %>
6 | <% end %>
7 |
8 | <%# paginate @logs %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.meta_controllers.index.title'), { controller: 'meta_controllers' } %>
2 | <%= @meta_controller.controller_path %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/pg_publication_tables/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.pg_publications.index.title'), { controller: 'pg_publications' } %>
2 | <%= @pg_publication.pubname %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/job/panel/home/_process_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= render 'process_thead' %>
5 |
6 |
7 |
8 | <%= yield %>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/_index_th_check.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= check_box_tag 'xxd', 'xx', false, data: { check_target: 'all', action: 'check#toggleAll' }, id: nil %>
3 | |
--------------------------------------------------------------------------------
/app/views/roled/panel/tabs/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= svg_tag 'bars', class: 'icon is-small text-grey is-drawable' %>
3 | <%= svg_tag model.icon, class: 'icon' %>
4 | |
5 | <%= model.path %> |
6 | <%= model.name %> |
7 | <%= model.namespace %> |
8 |
--------------------------------------------------------------------------------
/app/channels/concerns/log_channel_writer.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | class LogChannelWriter
4 |
5 | def initialize(auth_token)
6 | @auth_token = auth_token
7 | end
8 |
9 | def << msg
10 | LogChannel.broadcast_to(@auth_token, msg)
11 | end
12 |
13 | end
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | include RailsCom::Application
3 | include Auth::Controller::Application if defined? RailsAuth
4 |
5 | protect_from_forgery with: :exception, unless: -> { json_format? }
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/app/controllers/panel_controller.rb:
--------------------------------------------------------------------------------
1 | class PanelController < ApplicationController
2 | include Com::Controller::Panel
3 | include Roled::Controller::Panel
4 | include Org::Controller::Panel if defined? RailsOrg
5 | before_action :require_member_or_user, :require_role
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/app/views/admin/role_denied.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <%= turbo_stream.update 'alert' do %>
2 |
3 |
4 |
你没有权限操作,请联系管理员!
5 |
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/app/views/com/nodes/children.turbo_stream.erb:
--------------------------------------------------------------------------------
1 | <% if @node.children.present? %>
2 | <%= turbo_stream.after params[:html_id], partial: 'children_options', locals: { f: form_object(@new_node, **params.permit(:index).to_h.to_options), node: @node, depth: @node.depth + 1 } %>
3 | <% end %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/blobs/unattached.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'filter_form' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @blobs, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @blobs %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/csps/_filter_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'search', model: Com::Csp.new do |f| %>
2 |
3 | <%= f.text_field :document_uri %>
4 |
5 | <%= f.submit %>
6 |
7 |
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/pg/panel/pg_stat_subscriptions/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @pg_stat_subscriptions, as: :model %>
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/app/views/roled/panel/tabs/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Roled::Tab.human_attribute_name(:icon) %> |
2 | <%= Roled::Tab.human_attribute_name(:path) %> |
3 | <%= Roled::Tab.human_attribute_name(:name) %> |
4 | <%= Roled::Tab.human_attribute_name(:namespace) %> |
5 |
--------------------------------------------------------------------------------
/lib/generators/templates/scaffold_erb/_show_table.html.erb.tt:
--------------------------------------------------------------------------------
1 | <% attributes.each do |attribute| -%>
2 |
3 | | <%%= <%= class_name %>.human_attribute_name(:<%= attribute.name %>) %> |
4 | <%%= @<%= singular_name %>.<%= attribute.name %> %> |
5 |
6 | <% end -%>
7 |
--------------------------------------------------------------------------------
/test/lib/rails_com/core/hash_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 | class HashTest < ActiveSupport::TestCase
3 |
4 |
5 |
6 | test 'leaves ok' do
7 | h = {
8 | a: 1,
9 | b: { c: 2 }
10 | }
11 |
12 | assert_equal [1, 2], h.leaves
13 | end
14 |
15 | end
16 |
--------------------------------------------------------------------------------
/app/views/application/_index_raw_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= render 'index_thead' %>
5 | |
6 |
7 |
8 |
9 | <%= yield %>
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/views/application/_visit_state.html.erb:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/app/views/com/attachments/_list_edit.html.erb:
--------------------------------------------------------------------------------
1 | <% if target.is_a?(ActiveStorage::Attached::One) %>
2 | <%= render partial: 'com/attachments/file_upload_one', locals: local_assigns %>
3 | <% else %>
4 | <%= render partial: 'com/attachments/file_upload', locals: local_assigns %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/acme_accounts/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= Com::AcmeAccount.human_attribute_name(:email) %>
3 | <%= Com::AcmeAccount.human_attribute_name(:kid) %>
4 | |
5 | <%= Com::AcmeAccount.human_attribute_name(:private_pem) %> |
6 |
--------------------------------------------------------------------------------
/app/views_copy/application/_index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @models, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @models %>
9 |
--------------------------------------------------------------------------------
/app/views_copy/application/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @models, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @models %>
9 |
--------------------------------------------------------------------------------
/app/models/com/model/cache_list.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::CacheList
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | attribute :path, :string
7 | attribute :key, :string
8 | end
9 |
10 | def etag
11 |
12 | end
13 |
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/app/models/debug/model/through.rb:
--------------------------------------------------------------------------------
1 | module Debug::Model
2 | module Through
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | attribute :name, :string
7 |
8 | belongs_to :many, inverse_of: :throughs
9 | belongs_to :much
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/app/views/admin/home/_index/_top_bar.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= link_to({ controller: 'me/home' }, class: 'px-4') do %>
3 | <%= svg_tag 'angle-left', kind: 'regular' %>
4 | <% end %>
5 |
<%= t('.title') %>
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/views/application/_edit_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with model: model, scope: model_name, url: { action: 'update' } do |f| %>
2 | <%= render 'error_messages', target: f.object if f.object.errors.present? %>
3 | <%= render partial: 'form', locals: { f: f } %>
4 | <%= f.submit %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/application/_index_item.html.erb:
--------------------------------------------------------------------------------
1 | <% tr_tag do %>
2 | <% model_klass.com_column_names.each do |column| %>
3 | <%= model.public_send(column) %> |
4 | <% end %>
5 |
6 | <%= render partial: 'index_tr_actions', locals: { model: model } %>
7 | |
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/application/_new_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with model: model, scope: model_name, url: { action: 'create' } do |f| %>
2 | <%= render 'error_messages', target: f.object if f.object.errors.present? %>
3 | <%= render partial: 'form', locals: { f: f } %>
4 | <%= f.submit %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/application/inline.turbo_stream+phone.erb:
--------------------------------------------------------------------------------
1 | <%=
2 | turbo_stream.append(
3 | 'body',
4 | partial: params.fetch(:partial, 'edit_inline_form'),
5 | locals: {
6 | model: defined?(model) ? model : instance_variable_get("@#{model_name}")
7 | }
8 | )
9 | %>
10 |
--------------------------------------------------------------------------------
/app/views/com/panel/cache_lists/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::CacheList.human_attribute_name(:id) %> |
2 | <%= Com::CacheList.human_attribute_name(:path) %> |
3 | <%= Com::CacheList.human_attribute_name(:key) %> |
4 | <%= Com::CacheList.human_attribute_name(:etag) %> |
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/cache_lists/_show_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
<%= Com::CacheList.human_attribute_name(:path) %>
3 | <%= @cache_list.path %>
4 |
5 |
6 |
<%= Com::CacheList.human_attribute_name(:etag) %>
7 | <%= @cache_list.etag %>
8 |
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/err_bots/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @err_bots, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @err_bots %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.name %> |
2 | <%= model.action_name %> |
3 | <%= model.operation_i18n %> |
4 |
5 | <% model.required_parts.each do |part| %>
6 | <%= part %>
7 | <% end %>
8 | |
9 |
10 |
--------------------------------------------------------------------------------
/app/views/layouts/in.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/layouts/me.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/layouts/my.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/roled/panel/role_rules/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.text_field :business_identifier %>
2 | <%= f.text_field :namespace_identifier %>
3 | <%= f.text_field :controller_identifier %>
4 | <%= f.text_field :action_name %>
5 | <%= f.text_field :params_name %>
6 | <%= f.text_field :params_identifier %>
7 |
--------------------------------------------------------------------------------
/app/views/roled/panel/tabs/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_sortable_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @tabs, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @tabs %>
9 |
--------------------------------------------------------------------------------
/app/views/statis/panel/counters/month.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @statistics, as: :model %>
5 | <% end %>
6 |
7 | <%= paginate @statistics %>
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/month.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 | <%= render layout: 'index_table' do %>
4 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @statistics, as: :model %>
5 | <% end %>
6 |
7 | <%= paginate @statistics %>
--------------------------------------------------------------------------------
/app/models/com/model/filter_column.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::FilterColumn
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | attribute :column, :string
7 | attribute :value, :string
8 |
9 | belongs_to :filter
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/application/_index_sortable_table.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= yield %>
5 |
6 |
7 | <%= render 'button' %>
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/views/application/_modal_header.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 |
5 | <%= t('.title') %>
6 |
7 |
--------------------------------------------------------------------------------
/app/views/board/home/_index/_organ_item.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <% if current_organ %>
5 | <%= render partial: 'organ', locals: { organ: current_organ } %>
6 | <% end %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/com/panel/attachments/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'filter_form' %>
2 | <%= render 'tabs' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @attachments, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @attachments %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_reflections/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.index.title'), { action: 'index', **request.query_parameters.except(:id, :page, :per) } %>
2 | <%= @meta_model.record_name %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/layouts/admin.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/layouts/agent.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/layouts/home.html.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/application_head' do %>
2 | <%= render 'nav_bar' %>
3 |
4 | <%= yield %>
5 |
6 | <%= render 'footer' %>
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/app/views/layouts/our.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views/layouts/panel.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/lib/generators/rails_com/templates/remove_table.rb.tt:
--------------------------------------------------------------------------------
1 | class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
2 |
3 | def change
4 | <%- tables.each do |table| -%>
5 | drop_table :<%= table %>
6 | <%- end -%>
7 | end
8 |
9 | end
10 |
--------------------------------------------------------------------------------
/lib/rails_com/type/taxon.rb:
--------------------------------------------------------------------------------
1 | module ActiveRecord::Type
2 | class Taxon < Json
3 |
4 | def input_type
5 | :taxon
6 | end
7 |
8 | def migrate_type
9 | :json
10 | end
11 |
12 | end
13 | end
14 |
15 | ActiveRecord::Type.register(:taxon, ActiveRecord::Type::Taxon)
16 |
--------------------------------------------------------------------------------
/app/views/application/_footer.html.erb:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/app/views/application/show.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'show_table_form' %>
2 |
3 | <%= render layout: 'show_layout', locals: local_assigns do %>
4 | <%= render partial: 'show_table', locals: local_assigns %>
5 | <% end %>
6 |
7 |
--------------------------------------------------------------------------------
/app/views/com/panel/ssh_keys/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= model.host %>
3 | <%= model.ssh_user %>
4 |
5 | |
6 | <%= model.public_key %> |
7 |
8 |
--------------------------------------------------------------------------------
/app/views/layouts/application.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render layout: 'layouts/phone_head' do %>
2 | <%= render 'top_bar' %>
3 | <%= render 'alert' %>
4 |
5 | <%= yield %>
6 |
7 | <%= render 'tab_bar_footer' %>
8 | <%= render 'tab_bar' %>
9 | <% end %>
10 |
--------------------------------------------------------------------------------
/app/views_copy/application/index.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= render 'filter_bar' %>
2 | <%= render 'filter_table' %>
3 |
4 | <%= render layout: 'index_list' do %>
5 | <%= render partial: 'index_item', layout: 'index_item_actions', collection: @models, as: :model %>
6 | <% end %>
7 |
8 | <%= paginate @models %>
9 |
--------------------------------------------------------------------------------
/test/lib/rails_com/utils/time_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 | class TimeHelperTest < ActiveSupport::TestCase
3 |
4 | test 'exact_distance_time' do
5 | now = Time.now
6 | r = TimeHelper.exact_distance_time now, now + 1
7 | assert_equal 1, r[:second]
8 | end
9 |
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/com/model/err_bot/work_wechat_bot.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | module Model::ErrBot::WorkWechatBot
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | attribute :base_url, :string, default: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key='
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/views/application/_index_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= render 'index_thead' %>
5 | |
6 |
7 |
8 |
9 | <%= yield %>
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/views/board/home/_organ.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= link_to organ.redirect_url(auth_token: Current.session&.id), class: 'media' do %>
2 |
3 | <%= organ.name %>
4 |
5 |
6 | <%= svg_tag 'chevron-right' %>
7 |
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/com/extra/_extra_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.fields :extra, model: OpenStruct.new(f.object.extra) do |ef| %>
2 | <% taxon.parameters.each do |k, v| %>
3 | <%= render partial: "extra_form/#{DefaultForm.config.mapping[v.to_sym][:input]}", locals: { f: f, ef: ef, name: k } %>
4 | <% end %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/logs/_ip/_filter_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'search', model: Com::Log.new, url: { action: params[:action] } do |f| %>
2 |
3 | <%= f.text_field :ip %>
4 |
5 | <%= f.submit %>
6 |
7 |
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/_filter_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'search', model: Com::MetaController.new do |f| %>
2 |
3 | <%= f.text_field :controller_name %>
4 |
5 | <%= f.submit %>
6 |
7 |
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/roled/panel/role_rules/_index_tbody.html.erb:
--------------------------------------------------------------------------------
1 | <%= model.business_identifier %> |
2 | <%= model.namespace_identifier %> |
3 | <%= model.controller_identifier %> |
4 | <%= model.action_name %> |
5 | <%= model.params_name %> |
6 | <%= model.params_identifier %> |
7 |
--------------------------------------------------------------------------------
/app/views/roled/panel/role_rules/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 | <%= render layout: 'index_table' do %>
5 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @role_rules, as: :role_rule %>
6 | <% end %>
7 |
8 | <%= paginate @role_rules %>
9 |
--------------------------------------------------------------------------------
/test/fixtures/com/meta_models.yml:
--------------------------------------------------------------------------------
1 | one:
2 | name: MyString
3 | record_name: MyString
4 | description: MyString
5 | defined_db: false
6 | customizable: false
7 | two:
8 | name: MyString
9 | record_name: MyString
10 | description: MyString
11 | defined_db: false
12 | customizable: false
13 |
--------------------------------------------------------------------------------
/test/lib/rails_com/utils/uid_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 | class UidHelperTest < ActiveSupport::TestCase
3 |
4 |
5 | test 'nsec_uuid' do
6 | r = UidHelper.nsec_uuid 'TEST'
7 | assert_kind_of String, r
8 | assert_equal 'TEST', r.split('-')[0]
9 | end
10 |
11 |
12 |
13 | end
--------------------------------------------------------------------------------
/app/models/roled/ext/meta_controller.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | module Ext::MetaController
3 | extend ActiveSupport::Concern
4 |
5 | included do
6 | has_many :role_rules, class_name: 'Roled::RoleRule', foreign_key: :controller_path, primary_key: :controller_path
7 | end
8 |
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/views/application/_index_table_without_striped.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= render 'index_thead' %>
5 | |
6 |
7 |
8 |
9 | <%= yield %>
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/views/application/edit.html+phone.erb:
--------------------------------------------------------------------------------
1 |
2 | <% if defined? model %>
3 | <%= render partial: 'edit_form', locals: { model: model } %>
4 | <% else %>
5 | <%= render partial: 'edit_form', locals: { model: instance_variable_get("@#{model_name}") } %>
6 | <% end %>
7 |
8 |
--------------------------------------------------------------------------------
/app/views/com/admin/organs/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.fields :theme_settings, model: OpenStruct.new(f.object.theme_settings) do |ef| %>
2 | <%= ef.fields :admin_menu, model: OpenStruct.new(ef.object['admin_menu']) do |pf| %>
3 | <%= render partial: 'input_color_range', locals: { f: pf } %>
4 | <% end %>
5 | <% end %>
--------------------------------------------------------------------------------
/app/views/com/panel/log_sqls/_filter_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'search', model: Com::LogSql.new, url: { action: params[:action] } do |f| %>
2 |
3 | <%= f.text_field :name %>
4 |
5 | <%= f.submit %>
6 |
7 |
8 | <% end %>
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_columns/_index/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.meta_models.index.title'), { controller: 'meta_models', **request.query_parameters.except(:id, :page, :per) } %>
2 | <%= @meta_model.record_name %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_models/_indexes/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.meta_models.index.title'), { controller: 'meta_models', **request.query_parameters.except(:id, :page, :per) } %>
2 | <%= @meta_model.record_name %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/com/panel/organs/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= f.fields :theme_settings, model: OpenStruct.new(f.object.theme_settings) do |ef| %>
2 | <%= ef.fields :panel_menu, model: OpenStruct.new(ef.object['panel_menu']) do |pf| %>
3 | <%= render partial: 'input_color_range', locals: { f: pf } %>
4 | <% end %>
5 | <% end %>
--------------------------------------------------------------------------------
/config/locales/zh.attributes.yml:
--------------------------------------------------------------------------------
1 | zh:
2 | activerecord:
3 | attributes:
4 | com/acme_order:
5 | acme_identifiers_attributes: 域名
6 | com/err:
7 | path: 路径
8 | controller_name: Controller
9 | action_name: Action
10 | com/detector_log:
11 | spend: 耗时(毫秒)
--------------------------------------------------------------------------------
/test/fixtures/com/acme_orders.yml:
--------------------------------------------------------------------------------
1 | one:
2 | acme_account: one
3 | orderid: MyString
4 | url: MyString
5 | issued_at: <%= Time.current %>
6 | status: MyString
7 | two:
8 | acme_account: one
9 | orderid: MyString
10 | url: MyString
11 | issued_at: <%= Time.current %>
12 | status: MyString
13 |
--------------------------------------------------------------------------------
/app/channels/com/log_channel.rb:
--------------------------------------------------------------------------------
1 | module Com
2 | class LogChannel < ApplicationCable::Channel
3 |
4 | def subscribed
5 | stream_from "com:log:#{verified_receiver.id}"
6 | end
7 |
8 | def self.push_log(auth_token)
9 | broadcast_to(auth_token, 'd')
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/application/_index_sortable_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= render 'index_thead' %>
5 | |
6 |
7 |
8 |
9 | <%= yield %>
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/views/com/panel/log_sqls/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::Log.human_attribute_name(:name) %> |
2 | <%= Com::Log.human_attribute_name(:sql) %> |
3 | <%= Com::Log.human_attribute_name(:duration) %> |
4 |
5 | <%= Com::Log.human_attribute_name(:created_at) %>
6 | |
7 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/_roles.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/_index/_index_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | <%= render 'index_thead' %>
5 | |
6 |
7 |
8 |
9 | <%= yield %>
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/views/com/panel/ssh_keys/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 |
2 | <%= Com::SshKey.human_attribute_name(:host) %>
3 | <%= Com::SshKey.human_attribute_name(:ssh_user) %>
4 | <%= Com::SshKey.human_attribute_name(:created_at) %>
5 | |
6 | <%= Com::SshKey.human_attribute_name(:public_key) %> |
7 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/_failed/_button.html.erb:
--------------------------------------------------------------------------------
1 | <% if params[:class_name] %>
2 | <%= button_to({ action: 'retry_all', **params.permit(:class_name) }, class: 'button is-danger', form: { data: { turbo_confirm: t('.retry_all.confirm') } }) do %>
3 | <%= t('.retry_all.title') %>
4 | <% end %>
5 | <% end %>
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/blocked.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/failed.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/ready.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/running.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/todo.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistic_days/_breadcrumb.html.erb:
--------------------------------------------------------------------------------
1 | <%= link_to t('.statistic_configs.index.title'), { controller: 'statistic_configs' } %>
2 | <%= link_to t('.statistics.index.title'), { controller: 'statistics', **request.query_parameters } %>
3 | <%= t('.title') %>
4 |
--------------------------------------------------------------------------------
/app/views/application/_new_form.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'default_phone', model: model, scope: model_name, url: { action: 'create' } do |f| %>
2 | <%= render 'error_messages', target: f.object if f.object.errors.present? %>
3 | <%= render partial: 'form', locals: { f: f } %>
4 | <%= f.submit %>
5 | <% end %>
6 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_actions/_index_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Com::MetaAction.human_attribute_name(:name) %> |
2 | <%= Com::MetaAction.human_attribute_name(:action_name) %> |
3 | <%= Com::MetaAction.human_attribute_name(:operation) %> |
4 | <%= Com::MetaAction.human_attribute_name(:required_parts) %> |
5 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_businesses/_show_table.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
<%= Com::MetaBusiness.human_attribute_name(:name) %>
3 | <%= @meta_business.name %>
4 |
5 |
6 |
<%= Com::MetaBusiness.human_attribute_name(:identifier) %>
7 | <%= @meta_business.identifier %>
8 |
9 |
--------------------------------------------------------------------------------
/app/views/com/panel/meta_controllers/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'index_bar' %>
2 | <%= render 'index_actions' %>
3 |
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_meta_business', collection: @meta_businesses, as: :meta_business %>
7 | <% end %>
8 |
9 |
--------------------------------------------------------------------------------
/app/views/job/panel/jobs/clearable.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'tabs' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @jobs, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @jobs %>
10 |
--------------------------------------------------------------------------------
/app/views/roled/panel/roles/_overview_thead.html.erb:
--------------------------------------------------------------------------------
1 | <%= Roled::Govern.human_attribute_name(:govern_taxon_id) %> |
2 | Govern (Code) |
3 |
4 | <%= link_to({ action: 'show'}, class: 'button is-small is-link') do %>
5 | <%= t('role.panel.roles.show.title') %>
6 | <% end %>
7 | |
8 |
--------------------------------------------------------------------------------
/app/views/statis/panel/statistics/index.html.erb:
--------------------------------------------------------------------------------
1 | <%= render 'bar' %>
2 | <%= render 'index_bar' %>
3 | <%= render 'index_actions' %>
4 |
5 | <%= render layout: 'index_table' do %>
6 | <%= render partial: 'index_tbody', layout: 'index_tr', collection: @statistics, as: :model %>
7 | <% end %>
8 |
9 | <%= paginate @statistics %>
--------------------------------------------------------------------------------
/app/views_copy/application/_new_modal_form.html+phone.erb:
--------------------------------------------------------------------------------
1 | <%= form_with theme: 'phone_modal', model: model, url: { action: 'create' } do |f| %>
2 | <%= render 'modal_header' %>
3 |
4 | <%= render partial: 'form', locals: { f: f } %>
5 |
6 | <%= f.submit %>
7 | <% end %>
8 |
--------------------------------------------------------------------------------
/lib/generators/rails_com/templates/initializer.rb.tt:
--------------------------------------------------------------------------------
1 | RailsCom.configure do |config|
2 | config.ignore_models = [
3 | <%- ignore_models.each do |count, models| -%>
4 | # 已定义 <%= count %> 个 attribute
5 | <%- models.each do |model| -%>
6 | '<%= model %>',
7 | <%- end -%>
8 | <%- end -%>
9 | ]
10 | end
11 |
--------------------------------------------------------------------------------
/lib/rails_com/action_view.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'rails_com/action_view/collection_renderer'
4 | require 'rails_com/action_view/partial_renderer'
5 | require 'rails_com/action_view/template_renderer'
6 | require 'rails_com/action_view/translation_helper'
7 | require 'rails_com/action_view/url_for'
8 |
--------------------------------------------------------------------------------
/app/jobs/roled/role_rule_sync_job.rb:
--------------------------------------------------------------------------------
1 | module Roled
2 | class RoleRuleSyncJob < ApplicationJob
3 | queue_as :default
4 |
5 | def perform(ids = [])
6 | RoleRule.where(id: ids).each do |role_rule|
7 | role_rule.sync_rule
8 | role_rule.save
9 | end
10 | end
11 |
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/jsons/layouts/application.json.jbuilder:
--------------------------------------------------------------------------------
1 | if ['index'].include? params[:action]
2 | json.results JSON.parse(yield)
3 | json.partial! 'pagination', items: instance_variable_get("@#{controller_name.pluralize}") if defined? instance_variable_get("@#{controller_name.pluralize}")
4 | else
5 | json.merge! JSON.parse(yield)
6 | end
7 |
--------------------------------------------------------------------------------
/app/models/debug.rb:
--------------------------------------------------------------------------------
1 | module Debug
2 |
3 | def self.use_relative_model_naming?
4 | true
5 | end
6 |
7 | def self.table_name_prefix
8 | 'debug_'
9 | end
10 |
11 | def self.clear!
12 | Many.delete_all
13 | Much.delete_all
14 | One.delete_all
15 | Through.delete_all
16 | end
17 |
18 | end
19 |
--------------------------------------------------------------------------------