Giter Site home page Giter Site logo

motor-admin / motor-admin Goto Github PK

View Code? Open in Web Editor NEW
1.9K 20.0 147.0 617 KB

Deploy a no-code admin panel for any application in less than a minute. Search, create, update, and delete data entries, create custom actions, and build reports.

Home Page: https://www.getmotoradmin.com

License: GNU Affero General Public License v3.0

Ruby 46.25% JavaScript 3.91% Vue 40.26% SCSS 0.86% HTML 7.95% Dockerfile 0.75% Procfile 0.02%
reports admin-dashboard admin-panel business-ingelligence no-code postgresql mysql sql-server

motor-admin's Introduction

Motor Admin

Motor Admin

No-code Admin Panel and Business Intelligence tool

๐Ÿค“ Live Demo | ๐Ÿ‘€ Features overview | ๐Ÿ“™ Docs | ๐Ÿ’ฌ Discord | โญ Pro

Search, create, update, and delete data entries using a convenient UI. Create complex custom actions like sending an automated email to your customers via API integration. Build custom reports with SQL and visualize the results with charts. Combine individual reports into a single dashboard and share it with your team.

Deployment

Heroku

Deploy to Heroku

Railway

Deploy on Railway

Digital Ocean

Deploy on Digital Ocean

Docker

docker run -it -p 3000:3000 -v `pwd`:/app motoradmin/motoradmin:latest

Docker Compose

curl https://raw.githubusercontent.com/motor-admin/motor-admin/master/docker-compose.yml  | sed "s/SECRET_KEY_BASE:/SECRET_KEY_BASE: `openssl rand -hex 64`/" > docker-compose.yml

docker compose up

Features

  • Multi-factor authentication
  • SAML SSO
  • Custom styling
  • learn more

Customizable CRUD

Resource settings

Settings UI

Custom Actions

Custom actions

Forms Builder

Custom form

SQL Queries

SQL query

Data Visualization

motor-visualization

Dashboards

Dashboard

Email Alerts

Email alert

Intelligence Search

Intelligence search

Optimized for Mobile

motor-mobile

License

Motor Admin is licensed under the AGPL v3 license.

motor-admin's People

Contributors

giorgiog avatar jokroese avatar omohokcoj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

motor-admin's Issues

getting Error: "We're sorry, but something went wrong"

After installing it from the Ubuntu binary, the following screen appears.

image

Same thing happens on Heroku.

image

I am using online PostgreSQL server on my PC which is running Kubuntu 20.04. After I add database, this error shows up. Here are logs I see on my terminal.

โšก Motor::Admin is starting under /

Puma starting in single mode...
* Puma version: 5.5.2 (ruby 2.7.1-p83) ("Zawgyi")
*  Min threads: 20
*  Max threads: 20
*  Environment: production
*          PID: 3602
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop
I, [2021-12-10T13:13:52.362012 #3602]  INFO -- : [7f72711d-ce73-4776-bdff-f179fe974b26] {"method":"GET","path":"/sign_in","status":302,"duration":6.77,"view":0.0,"db":1.46,"fwd":"127.0.0.1","uid":null}
I, [2021-12-10T13:13:52.377372 #3602]  INFO -- : [a8cadbc9-4aba-4775-8379-0e9dbe699383] {"method":"GET","path":"/setup","status":200,"duration":9.53,"view":4.01,"db":0.57,"fwd":"127.0.0.1","uid":null}
I, [2021-12-10T13:14:19.213741 #3602]  INFO -- : [1c3883b5-3adf-4d11-91cf-94a7433ec6e2] {"method":"POST","path":"/api/setup","status":200,"duration":979.41,"view":0.22,"db":643.52,"fwd":"127.0.0.1","uid":1}
I, [2021-12-10T13:15:18.011325 #3602]  INFO -- : [09ec0c90-4efc-4cc7-ab38-ab7f6f53869a] {"method":"POST","path":"/api/verify_db_connection","status":200,"duration":1656.82,"view":0.0,"db":1.13,"fwd":"127.0.0.1","uid":1}
I, [2021-12-10T13:15:18.163022 #3602]  INFO -- : [f23e1a68-c04c-4748-9ea8-8dc97701cc8a] {"method":"POST","path":"/api/encrypted_configs","status":200,"duration":139.68,"view":0.64,"db":130.77,"fwd":"127.0.0.1","uid":1}
I, [2021-12-10T13:15:25.461007 #3602]  INFO -- : [68ca1ddb-c3db-4d7a-87f3-fa8113296149] {"method":"GET","path":"/","status":500,"duration":5696.31,"view":0.0,"db":3614.06,"fwd":"127.0.0.1","uid":1}
F, [2021-12-10T13:15:25.461997 #3602] FATAL -- : [68ca1ddb-c3db-4d7a-87f3-fa8113296149]   
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] NameError (wrong constant name Product theme):
[68ca1ddb-c3db-4d7a-87f3-fa8113296149]   
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:96:in `const_set'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:96:in `block in define_models'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:77:in `each'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:77:in `filter_map'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:77:in `define_models'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:53:in `block in call'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:50:in `synchronize'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] lib/motor/define_ar_models.rb:50:in `call'
[68ca1ddb-c3db-4d7a-87f3-fa8113296149] config/initializers/set_db_connection_and_define_ar_models.rb:28:in `set_db_connection_and_define_ar_models'

Allow to define virtual resource ?

I'd love to create virtual resource, which data is not fetched from db, but from a remote API.

Imaging just like API type form, could we have API type for table, report also ?

Problem with '_' underscore in postgres connection url

/__enclose_io_memfs__/lib/ruby/2.7.0/uri/generic.rb:208:in `initialize': the scheme postgresql does not accept registry part: postgres:postgres@postgres_f:5432 (or bad hostname?) (URI::InvalidURIError)

When using a - instead of a _its working.

    restart: always
    depends_on:
      - 'postgres_f'
    image: 'motoradmin/motoradmin:latest'
    ports:
      - '3210:3000'
    volumes:
      - '/srv/docker/volumes/motoradmin:/app'
    environment:
      BASE_PATH: /motor/
      DATABASE_URL: "postgresql://postgres:postgres@postgres_f:5432/motoradmin"

  postgres_f:
    restart: always
    image: 'postgres:13.4'
    ports:
      - '5432:5432'
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: motoradmin

I was searching some time for this issue :D

Add support for has_and_belongs_to_many

Hey! I have a has_and_belongs_to_many relation and it's failing to load resources in the joined table

 NotImplementedError (NotImplementedError):
12:44:38 web.1    |
12:44:38 web.1    | activerecord (6.1.4.1) lib/active_record/reflection.rb:560:in `association_class'
12:44:38 web.1    | activerecord (6.1.4.1) lib/active_record/associations.rb:315:in `association'
12:44:38 web.1    | activerecord (6.1.4.1) lib/active_record/associations/builder/association.rb:103:in `posts'
12:44:38 web.1    | cancancan (3.3.0) lib/cancan/controller_resource_loader.rb:71:in `resource_base_through_parent_resource'
12:44:38 web.1    | cancancan (3.3.0) lib/cancan/controller_resource_loader.rb:77:in `resource_base_through'
12:44:38 web.1    | cancancan (3.3.0) lib/cancan/controller_resource_loader.rb:91:in `resource_base'
12:44:38 web.1    | cancancan (3.3.0) lib/cancan/controller_resource.rb:78:in `load_collection?'
12:44:38 web.1    | cancancan (3.3.0) lib/cancan/controller_resource_loader.rb:19:in `load_resource'
12:44:38 web.1    | cancancan (3.3.0) lib/cancan/controller_resource.rb:33:in `load_and_authorize_resource'
12:44:38 web.1    | motor-admin (0.2.24) app/controllers/concerns/motor/load_and_authorize_dynamic_resource.rb:62:i

Create class-level custom actions, not just instance level

Custom actions can currently only be defined (as far as I can see) on existing instances (or rows in the database, if you prefer).

This prevents several very common use cases for custom actions - as an example, if we have a user model that allows for the invitation of new users, that action can only be invoked from the context of a current user... Something that is obviously entirely non-sensical. This kind of action would live at the same level as eg the new or create action.

If this functionality already exists, I apologise, but I have not been able to find it.

configure cors

Hey there,

first thank you for the great work :) I really like your tool.

I want to set up motor admin with some https nginx proxy, but I get the following error:

W, [2021-11-17T15:30:31.807601 #1]  WARN -- : [0da10b23-eca1-4445-8a5b-c7aa7029a279] HTTP Origin header (https://*****olutions.eu) didn't match request.base_url (http://****olutions.eu)
I, [2021-11-17T15:30:32.030903 #1]  INFO -- : [0da10b23-eca1-4445-8a5b-c7aa7029a279] {"method":"POST","path":"/sign_in","status":422,"duration":223.71,"view":0.0,"db":0.0,"fwd":"192.168.178.131","uid":1}
F, [2021-11-17T15:30:32.031586 #1] FATAL -- : [0da10b23-eca1-4445-8a5b-c7aa7029a279]
[0da10b23-eca1-4445-8a5b-c7aa7029a279] ActionController::InvalidAuthenticityToken (HTTP Origin header  (https://*****olutions.eu) didn't match request.base_url  (https://*****olutions.eu)):

Changing the BASE_URLparameter seems not working and result in other errors.

Support for Apple Silicon (arm64)

Attempting to run the Docker image on a M1 Max MBP (arm64) and getting the error:

myapp-motoradmin  | qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
myapp-motoradmin exited with code 25

I found the following line in the Dockerfile which I believe is the root of the problem. Can we also get a arm64 build and then make the Dockerfile work for both x86-64 and arm64?

https://github.com/motor-admin/motor-admin/blob/master/Dockerfile#L9

Filter conditions: IS (NOT) NULL

Problem

Scope filters cover some ground but lack some fundamental support, for nullability tests for instance:

image

Proposed solution

Testing the nullability of a field seems something very useful.

So implementing the Is null & Is not null filter conditions would be neat!

What do you think?

Date fields

I would suggest handling these cases as dates by default:

  • Any whatever_at or whatever_on field, such as created_at, updated_at and so on;
  • Any field that is TIMESTAMP or TIMESTAMPTZ.

PG int arrays display

I have this PG field

example integer[] DEFAULT '{}'::integer[]

it is correctly identified as integer

in the single view it gets displayed as
Screenshot 2021-11-12 at 00 36 46

character varying[] fields work as expected.

configure resources inclusively not exclusively

I'm wondering if it's possible to configure my motor.yml to explicitly include a model rather than excluding all the others with

- name: workbook1_arrangement_factory
  preferences:
    visible: false```

I have several hundred models in my app and only want to include a small number of them in this motor admin 

How to setup images

Hi @omohokcoj ! I haven't been able to setup images with Motor admin so far.

I've tried peeking at the demo to understand how to set it up, and I've attempted several options to no avail. I've found that in the demo dashboard, even though the Product resource has images, the table itself doesn't appear to have it has a column, so I attempted to directly add a new column with the type of Image to my resource, but then it gives me "column_name" is not an attribute. If I then change my table schema to include "column_name" as a column, then it goes through. But then when I upload an image when I create a new row, the image doesn't appear to work. No row is created on the Attachments resource, and I only find the value '{"filename"=>"image 18.png", "io"=>#StringIO:0x000000000b6187e8}' in the column for the image.

Thanks for any guidance on how to set it up!

Problem with sign_in and different BASE_PATH set than /

Scenario:

motor admin is both reachable with this url:

https://dev.***utions.eu/motor
and
http://docker.****tions.eu:3210/

Requesting https://dev.***utions.eu/motor results in https://dev.***utions.eu/sign_in which result in 404 because nginx dont route this url to motor.

Requesting http://docker.****tions.eu:3210/ results in error (okay because motor is missing)

Requesting http://docker.****tions.eu:3210/motor redirects to http://docker.****tions.eu:3210/sign_in which should not be okay, but its working login form. It logs in and i can start working.

Can be work-arounded by following nginx snippet:

   location /sign_in {
        proxy_pass http://docker.****ions.eu:3210/sign_in;
        client_max_body_size 10M;
        proxy_set_header  Host $host;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto $scheme;
        proxy_set_header  X-Forwarded-Ssl on; # Optional
        proxy_set_header  X-Forwarded-Port $server_port;
        proxy_set_header  X-Forwarded-Host $host;
   }

So the problem is: sign_inrouting ignores BASE_URL env.

Email alerts not working when clicking "send now"

I'm running under docker on windows with wsl2 -- Docker version 20.10.8, build 3967b7d

I added Amazon SES SMTP credentials (that I'm pretty sure are active)

  1. I ticked "send even if empty" and hit save, and then hit send now.

  2. I created a new alert for something that definitely has data, and I'm getting:

This error (in the web and in docker logs)
Please specify your sender address via MOTOR_ALERTS_FROM_ADDRESS environment variable

But I set a from address when I set the SMTP information.

  1. I restarted docker setting that variable and now I get:
E, [2021-11-03T21:31:55.174745 #1] ERROR -- : [be0b97a4-2f1c-4bad-a640-f65b2c685e7a] end of file reached
E, [2021-11-03T21:31:55.174820 #1] ERROR -- : [be0b97a4-2f1c-4bad-a640-f65b2c685e7a] /__enclose_io_memfs__/lib/ruby/2.7.0/net/protocol.rb:225:in `rbuf_fill'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/protocol.rb:191:in `readuntil'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/protocol.rb:201:in `readline'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:944:in `recv_response'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:553:in `block in do_start'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:954:in `critical'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:553:in `do_start'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:518:in `start'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/mail-2.7.1/lib/mail/message.rb:276:in `deliver!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.0.alpha2/lib/action_mailer/message_delivery.rb:109:in `block in deliver_now!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.0.alpha2/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.0.alpha2/lib/action_mailer/message_delivery.rb:108:in `deliver_now!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/motor-admin-0.2.18/app/controllers/motor/send_alerts_controller.rb:11:in `create'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/base.rb:214:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/rendering.rb:53:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/callbacks.rb:221:in `block in process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:138:in `run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/callbacks.rb:220:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/rescue.rb:22:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/instrumentation.rb:65:in `block in process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/notifications.rb:207:in `block in instrument'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/notifications.rb:207:in `instrument'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/instrumentation.rb:64:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/base.rb:151:in `process'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal.rb:188:in `dispatch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal.rb:251:in `dispatch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `each'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:845:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/engine.rb:530:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/railtie.rb:207:in `public_send'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/railtie.rb:207:in `method_missing'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/mapper.rb:48:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `each'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:845:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/cookies.rb:693:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:99:in `run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/lograge-0.11.2/lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/rack/logger.rb:25:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:37:in `tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:99:in `tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/rack/logger.rb:25:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/request_id.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/static.rb:24:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/host_authorization.rb:90:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/engine.rb:530:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/configuration.rb:249:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/request.rb:77:in `block in handle_request'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/request.rb:76:in `handle_request'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/server.rb:447:in `process_client'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
I, [2021-11-03T21:31:55.175263 #1]  INFO -- : [be0b97a4-2f1c-4bad-a640-f65b2c685e7a] {"method":"POST","path":"/api/send_alerts","status":500,"duration":32053.6,"view":0.16,"db":452.22,"fwd":"172.17.0.1","uid":1}E, [2021-11-03T21:32:52.180681 #1] ERROR -- : [b9583da1-0c3c-4510-8662-f310f5b8bfa6] end of file reached
E, [2021-11-03T21:32:52.180757 #1] ERROR -- : [b9583da1-0c3c-4510-8662-f310f5b8bfa6] /__enclose_io_memfs__/lib/ruby/2.7.0/net/protocol.rb:225:in `rbuf_fill'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/protocol.rb:191:in `readuntil'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/protocol.rb:201:in `readline'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:944:in `recv_response'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:553:in `block in do_start'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:954:in `critical'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:553:in `do_start'
/__enclose_io_memfs__/lib/ruby/2.7.0/net/smtp.rb:518:in `start'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/mail-2.7.1/lib/mail/message.rb:276:in `deliver!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.0.alpha2/lib/action_mailer/message_delivery.rb:109:in `block in deliver_now!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.0.alpha2/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionmailer-7.0.0.alpha2/lib/action_mailer/message_delivery.rb:108:in `deliver_now!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/motor-admin-0.2.18/app/controllers/motor/send_alerts_controller.rb:11:in `create'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/base.rb:214:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/rendering.rb:53:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/callbacks.rb:221:in `block in process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:127:in `block in run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:138:in `run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/callbacks.rb:220:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/rescue.rb:22:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/instrumentation.rb:65:in `block in process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/notifications.rb:207:in `block in instrument'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/notifications.rb:207:in `instrument'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/instrumentation.rb:64:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/abstract_controller/base.rb:151:in `process'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal.rb:188:in `dispatch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_controller/metal.rb:251:in `dispatch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `each'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:845:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/engine.rb:530:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/railtie.rb:207:in `public_send'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/railtie.rb:207:in `method_missing'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/mapper.rb:48:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `each'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:845:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/cookies.rb:693:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:99:in `run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/lograge-0.11.2/lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/rack/logger.rb:25:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:37:in `tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:99:in `tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/rack/logger.rb:25:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/request_id.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/static.rb:24:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/host_authorization.rb:90:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/engine.rb:530:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/configuration.rb:249:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/request.rb:77:in `block in handle_request'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/request.rb:76:in `handle_request'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/server.rb:447:in `process_client'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'

Is it possible to create a Cohort analysis?

Given an orders table, create a cohort analysis to see the percent of users from each cohort are coming back in the next periods

I believe the motor has the potential to do so, using tables but i cant come up with the proper query

This is how it should look like

IMG_20211202_134453

Can you help me please ?

Search by reference

Is it currently possible to search by reference?

Let's say we have the Orders table such as https://motor-admin.herokuapp.com/demo/data/orders and we want to search by user's name that is displayed (ie. Wally). But since the column itself is just an ID, even adding customer to the searchable fields doesn't help.

I guess the workaround is to search customers table and click through associated orders, and that is enough for our case even if it could be be a bit confusing for some of our users that they cannot filter the orders table (or its equivalent in our db) by customer name.

Or is there some way to do it in the current version? Thank you for your answer

Radar Chart Possibility Using Chart JS

Hi,

First things first, the power and possibilities of Motor Admin bring to us is huge. So I have a suggestion that I think is going to improve this tool and could bring a huge value (and a differential feature) to that.

I got on github issues repository that motor admin has a Chart JS engine into your core. This tool has a radar chart option to show some insights about kind of contexts.

Is there a possibility to bring this kind of chart like a default chart into Motor Admin Tool?

Below I am leaving some references about this topic.

https://www.chartjs.org/docs/latest/charts/radar.html

PostgreSQL specify schemas, or excluding schemas

Using PostgreSQL and PostGIS and it's pulling in all the tiger, tiger_data, topology schemas and data. How can I specify only the schemas I wish to use within Motor Admin. Alternatively, a way to specify schemas I wish to exclude from Motor Admin.

Related, I think I hit some sort of limit in Motor Admin, because I only see data from the PostGIS schemas. I don't see my schema tables even listed at all.

Schemas

Hello,

I've deployed motoradmin on my container and it worked fine. However, I encountered an issue while switching the schemas under it. By default, they have fetched the tables under the public at first and when I tried to change the schema from public to one of my custom one, the tables aren't listed. I've decommissioned the container and started from scratch. During the initial process, I've tried adding the custom schema and fetched the tables. But again,we won't be able to add a new scheme.

Is there any solution for this?

problem building queries with mariadb 10

SELECT 'Hello there'

results in

Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.* FROM "__query__" LIMIT 100000' at line 3

running with server

 backend_db:
    restart: always
    image: "mariadb:10"
    environment:
      MYSQL_DATABASE: "backend"
      MYSQL_USER: "backend"
      MYSQL_PASSWORD: "backend"
      MYSQL_RANDOM_ROOT_PASSWORD: "yes"
    ports:
      - "3306:3306"

I think you are buiding some not compatible query for mariadb in this class.

https://github.com/motor-admin/motor-admin-rails/blob/515695a75b8042a9548a675aaf46c1eec159d5d0/lib/motor/queries/run_query.rb

SQL error when extending default SQL queries

Extending the SQL query in the query editor makes it unusable since motoradmin version 0.2.19.

Default query

SELECT "schema"."mytable".* FROM "schema"."mytable"

Modified query

SELECT "schema"."mytable".*, 'so meta' as complimentary_field FROM "schema"."mytable"

Result

The table listing doesn't work; no data is fetched.

When investigating with Postgres 12.4 we discover the following error:

ERROR: syntax error at or near "."
LINE 1: ....*, 'so meta' as complimentary_field FROM "schema"."mytable") AS schema.mytable...

Which is heavily linked to how the associated query is generated:

Generated query

SELECT "schema"."mytable".* FROM (
  SELECT
    "schema"."mytable".*,
    'so meta' as complimentary_field FROM "schema"."mytable"
) AS schema.mytable -- ๐Ÿ‘ˆ
ORDER BY "schema"."mytable"."name" ASC
LIMIT $1 OFFSET $2;

Strange pre-filled field in custom form

We have a custom form with one field defined like
Screenshot 2022-08-11 at 14 00 10
but when I try to fill this form (it's assigned to create action on a collection), the field is pre-filled with one of the options (it shouldn't be)
Screenshot 2022-08-11 at 14 01 21
but it is still empty as far as validation is concerned
Screenshot 2022-08-11 at 14 03 41

Here is the field configuration in the form from YAML

    - display_name: Service
      name: serviceId
      field_type: reference
      default_value: ''
      validators:
      - required: true
      reference:
        model_name: service

Can you see what is going wrong in here? It is just one field that is acting this weird. Also, once the date is filled in and the form is submitted and reopened, that date starts acting the same (it's pre-filled, but marked as empty by validation)

Creating row with NULL in one column

Hi, I have a table like this (simplified)

CREATE TABLE "Vouchers" (
   ...
    discount numeric(9,2)
);

The column discount is optional a can be either a numeric value or NULL. But when I try to create a new row in this table through MotorAdmin (with this field being blank), I get error message "Discount is not a number", which prevents me from saving the form.

Is this intentional? How should I handle such situation with MotorAdmin?

More filter conditions for Long text & Richtext

Creating advanced filters for Text columns works pretty well, one having the luxury to choose from multiple filter conditions:

image

However, the filter conditions list is rather sparse for Long text, Richtext:

image

And one could wonder why? ๐Ÿง

โค๏ธ kudos to a very well executed full-fledged auto-generated admin panel solution

NameError (wrong constant name Db-migration):

After I run the setup wizard and successfully connect to my PostgreSQL database for the first time I am getting an error:

โšก Motor::Admin is starting under /

Puma starting in single mode...
* Puma version: 5.5.2 (ruby 2.7.1-p83) ("Zawgyi")
*  Min threads: 20
*  Max threads: 20
*  Environment: production
*          PID: 11931
* Listening on http://0.0.0.0:3000
Use Ctrl-C to stop
I, [2021-11-02T21:53:32.126898 #11931]  INFO -- : [03f58b53-9647-49c2-95ec-36a3f38955d3] {"method":"GET","path":"/sign_in","status":302,"duration":6.27,"view":0.0,"db":1.32,"fwd":"127.0.0.1","uid":null}
I, [2021-11-02T21:53:32.142927 #11931]  INFO -- : [07649f6e-dfd7-49a7-bba9-5d97f904991b] {"method":"GET","path":"/setup","status":200,"duration":11.36,"view":4.97,"db":0.61,"fwd":"127.0.0.1","uid":null}
I, [2021-11-02T21:53:49.581512 #11931]  INFO -- : [e6ae59d4-500a-4bbd-9e74-ebdab4021f7b] {"method":"POST","path":"/api/setup","status":200,"duration":360.5,"view":0.11,"db":7.72,"fwd":"127.0.0.1","uid":1}
I, [2021-11-02T21:54:33.406803 #11931]  INFO -- : [d5759736-9fd6-411f-9d64-75ca6178e16a] {"method":"POST","path":"/api/verify_db_connection","status":200,"duration":98.2,"view":0.0,"db":2.44,"fwd":"127.0.0.1","uid":1}
I, [2021-11-02T21:54:33.432325 #11931]  INFO -- : [95012639-f5ec-4a81-8379-3bf5673df696] {"method":"POST","path":"/api/encrypted_configs","status":200,"duration":15.73,"view":0.31,"db":2.49,"fwd":"127.0.0.1","uid":1}
I, [2021-11-02T21:54:33.666596 #11931]  INFO -- : [d6af41d9-60e4-4d05-a235-0d5ece261536] {"method":"GET","path":"/","status":500,"duration":220.85,"view":0.0,"db":72.91,"fwd":"127.0.0.1","uid":1}
F, [2021-11-02T21:54:33.666994 #11931] FATAL -- : [d6af41d9-60e4-4d05-a235-0d5ece261536]
[d6af41d9-60e4-4d05-a235-0d5ece261536] NameError (wrong constant name Db-migration):
[d6af41d9-60e4-4d05-a235-0d5ece261536]
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:87:in `const_set'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:87:in `block in define_models'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:70:in `each'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:70:in `filter_map'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:70:in `define_models'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:46:in `block in call'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:43:in `synchronize'
[d6af41d9-60e4-4d05-a235-0d5ece261536] lib/motor/define_ar_models.rb:43:in `call'
[d6af41d9-60e4-4d05-a235-0d5ece261536] config/initializers/set_db_connection_and_define_ar_models.rb:33:in `set_db_connection_and_define_ar_models'

Error with mysql database

Hi,

im a trying to get the dockerized Version to work with a local mysql-database:

docker run \
--name somedb-motor \
-v `pwd`:/app \
--env SECRET_KEY_BASE=b4d3076a484320f0affb23c052319ea9110d0069be377239f9ced2f104b9bb3702fa1a57627f9a9fe97737616cdc557ffe4f0bbfb89485d57ffede8fdee84d80 \
--env DATABASE_URL=mysql://somedbuser:somedbpasswd@localhost:3306/somedb \
--restart unless-stopped \
--publish 3000:3000 \
motoradmin/motoradmin:latest

But i am getting this error message:

/enclose_io_memfs/local/config/boot.rb:37:in `require': Could not load the 'mysql' Active Record adapter. Ensure that the adapter is spelled correctly in config/database.yml and that you've added the necessary adapter gem to your Gemfile. (LoadError)

/enclose_io_memfs/local/config/boot.rb:37:in `require': cannot load such file -- active_record/connection_adapters/mysql_adapter (LoadError)

Any Help? Many Thanks in advance :-)

mysql configuration

I'm having trouble making simple SQL queries in motor admin. a simple query such as select * from users shows the error

Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '__query__ AS (select * from users ) SELECT query.* FROM queryLIMIT ' at line 1

Is there any database configuration necessary in motor.yml?

Support generated columns

A table with generated columns currently prevents the admin panel from creating new entries:

PG::SyntaxError: ERROR: cannot insert into column "full_text" DETAIL: Column "full_text" is a generated column.

How to handle version control (git)

Hello, I just discovered this project and the approach is used is far better than other alternatives. However is there a possibility to version control this? And how to handle different environments, say I have a develop environment and I want to move everything to production?

Thanks

Custom query issue with non-lowercase table names

Hi,
Whenever a custom query is entered for Columns in Query Editor, we are currently getting an error ERROR: missing FROM-clause entry for table "ActionLoggers". Only default query works and any change results in error when the query is saved (does not happen when just pushing run, that works)

It is most likely caused by all our tables being named with capital letters (thus needed to be enclosed in quotation marks) and MotorAdmin omitting them in one place when rewriting the query.

For example when I write query
SELECT * FROM "ActionLoggers"
it gets rewritten as
SELECT "ActionLoggers".* FROM (SELECT * FROM "ActionLoggers") as ActionLoggers; (see the missing quotation marks in the last word)

Is there anything we are doing wrong?

Customize data view in bar/row graphs

Hi, I'd like to know an information about graph visualization.

Is it possible to configure bar or row graphs to show total values (on top and tooltip box) when "stacked" option on?

E.g.:
image

Security Issues

Hi motor-admin team,
I've tried to contact you through mail, but received no response.
I'm approaching you regarding security issues found in your project.

Please contact me through mail, to this address: [email protected]
Thanks

Loading form data results in 401

Using the latest version of motor admin (0.2.57), docker release

Create request will use Authorization
Bildschirmfoto 2022-02-08 um 12 38 09

Fetching form data has no authorization header
Bildschirmfoto 2022-02-08 um 12 44 23

Cannot update entries / undefined method getutc from nil:NilClass

The following error message pops when trying to update some entries:

undefined method `getutc' from nil:NilClass

Here is the stack trace, in case it would ring a bell to someone:

E, [2021-11-25T21:44:41.159110 #7]
ERROR -- : [1a4c0e06-e8b9-471d-b877-47a0ebe10823] undefined method `getutc' for nil:NilClassE, [2021-11-25T21:44:41.162530 #7]
ERROR -- : [1a4c0e06-e8b9-471d-b877-47a0ebe10823] 
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/postgresql/oid/timestamp_with_time_zone.rb:19:in `cast_value'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/type/value.rb:46:in `cast'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/type/helpers/accepts_multiparameter_time.rb:16:in `cast'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/attribute.rb:179:in `type_cast'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/attribute.rb:43:in `value'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/attribute_set/builder.rb:43:in `fetch_value'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/transactions.rb:403:in `block in restore_transaction_record_state'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/attribute_set.rb:93:in `transform_values'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activemodel-7.0.0.alpha2/lib/active_model/attribute_set.rb:93:in `map'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/transactions.rb:402:in `restore_transaction_record_state'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/transactions.rb:334:in `rolledback!'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/transaction.rb:134:in `rollback_records'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/transaction.rb:312:in `block in rollback_transaction'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/transaction.rb:309:in `rollback_transaction'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/transaction.rb:325:in `rescue in block in within_new_transaction'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/transaction.rb:322:in `block in within_new_transaction'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/connection_adapters/abstract/database_statements.rb:316:in `transaction'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activerecord-7.0.0.alpha2/lib/active_record/persistence.rb:702:in `update!'
[...]
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `each'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:845:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/engine.rb:530:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/railtie.rb:207:in `public_send'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/railtie.rb:207:in `method_missing'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/mapper.rb:19:in `block in '
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/mapper.rb:48:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:50:in `block in serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `each'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/journey/router.rb:32:in `serve'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/routing/route_set.rb:845:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/tempfile_reaper.rb:15:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/etag.rb:27:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/conditional_get.rb:40:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:266:in `context'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/session/abstract/id.rb:260:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/cookies.rb:693:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/callbacks.rb:99:in `run_callbacks'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/debug_exceptions.rb:28:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/show_exceptions.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/lograge-0.11.2/lib/lograge/rails_ext/rack/logger.rb:15:in `call_app'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/rack/logger.rb:25:in `block in call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:37:in `tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/activesupport-7.0.0.alpha2/lib/active_support/tagged_logging.rb:99:in `tagged'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/rack/logger.rb:25:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/remote_ip.rb:93:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/request_store-1.5.0/lib/request_store/middleware.rb:19:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/request_id.rb:26:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/runtime.rb:22:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/executor.rb:14:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/static.rb:24:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/sendfile.rb:110:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/actionpack-7.0.0.alpha2/lib/action_dispatch/middleware/host_authorization.rb:90:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/railties-7.0.0.alpha2/lib/rails/engine.rb:530:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/configuration.rb:249:in `call'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/request.rb:77:in `block in handle_request'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/request.rb:76:in `handle_request'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/server.rb:447:in `process_client'
/__enclose_io_memfs__/lib/ruby/gems/2.7.0/gems/puma-5.5.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'

I, [2021-11-25T21:44:41.164457 #7]  INFO -- : [1a4c0e06-e8b9-471d-b877-47a0ebe10823] {"method":"PUT","path":"/api/data/users/17602","status":500,"duration":18.78,"view":0.45,"db":2.23,"fwd":"[REDACTED]","uid":1}

View resources / tables generated by another ORM

Hello! I'm trying to view the tables created by an application that uses Gorm as resources. But motor admin doesn't show them and I cannot find how to add a resource to the motor admin. Is there guide for this? Thank you.

Remove default order by id desc when a scope sets an specific order

Currently I have a scope on Posts called "most_commented" which orders by comments_count desc but when selecting that scope in the admin panel, it prepends an order by id desc before so giving precedence to the actual selected scope.

I can click on the id column and it takes away the default id order. ButI have to do it everytime for every sope that has an order.

sqllite

I see if you dont define a db on startup it creates an sqlite db. is there a way to connect to sqllite from the start. I just see mysql and pg?

Date Input Issues

Hello,

I'd like to report a bug we had recently, that happens only when using the Date input.

When selecting a date in March 2022, the input field automatically changes to a date in Nov 2022.

  • Our Motor Admin version is the latest: 0.2.61

  • I was only being able to replicate this bug after changing my browser's timezone to San Francisco (GMT-8) This was to match the timezone of the users that reported the bug. (It can be changed in dev tools -> sensors)

The bug can be replicated using the live motor admin demo.

Here is a video:

screen-recorder-thu-mar-10-2022-11-40-11.mov

Thank you!

Add support for MinIO

You guys should think of supporting MinIO which is an open source self hostable and S3 compatible alterntative

Has One association missing from show view

An Order belongs_to a Consultation and a Consultation has one Order.

We can see this association reflected in the list view for orders, but on the list view for consultations, the order seems to be missing.
CleanShot 2022-07-25 at 14 30 36@2x

CleanShot 2022-07-25 at 14 33 37@2x

Core Dumped in Docker

I try to start the container but it crashes immediately, the console output is this:

ruby 3.1.0p0 (2021-12-25) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001be0 (none) [FINISH]


-- C level backtrace information -------------------------------------------
/app/motor-admin(rb_print_backtrace+0x14) [0x7badaa] /tmp/rubyc/ruby-3.1.0.dev/vm_dump.c:759
/app/motor-admin(rb_vm_bugreport) /tmp/rubyc/ruby-3.1.0.dev/vm_dump.c:1045
/app/motor-admin(rb_assert_failure+0x76) [0x62545f] /tmp/rubyc/ruby-3.1.0.dev/error.c:885
/app/motor-admin(rb_vm_canary_is_found_dead+0x0) [0x78812f] /tmp/rubyc/ruby-3.1.0.dev/vm_insnhelper.c:5719
/app/motor-admin(Init_vm_stack_canary) (null):0
/app/motor-admin(rb_call_inits+0x10a) [0x6591c2] /tmp/rubyc/ruby-3.1.0.dev/inits.c:77
/app/motor-admin(ruby_setup+0x165) [0x62b498] /tmp/rubyc/ruby-3.1.0.dev/eval.c:88
/app/motor-admin(ruby_init+0x6) [0x62b563] /tmp/rubyc/ruby-3.1.0.dev/eval.c:100
/app/motor-admin(main+0x227) [0x48330f] /tmp/rubyc/ruby-3.1.0.dev/main.c:154

-- Other runtime information -----------------------------------------------

* Loaded script: ruby

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb

* Process memory map:

00400000-00ea3000 r-xp 00000000 fd:06 100730224                          /app/motor-admin
00ea3000-00eec000 r-xp 00aa2000 fd:06 100730224                          /app/motor-admin
00eec000-04245000 rwxp 00aeb000 fd:06 100730224                          /app/motor-admin
04245000-04264000 rwxp 00000000 00:00 0
04396000-043b7000 rwxp 00000000 00:00 0                                  [heap]
043b7000-0447e000 rwxp 00000000 00:00 0                                  [heap]
7f010e562000-7f010e752000 r-xs 00000000 fd:03 3130003                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f010e752000-7f010f829000 rwxp 00000000 00:00 0
7f010f829000-7f011406d000 r-xs 00000000 fd:06 100730224                  /app/motor-admin
7f011406d000-7f0114086000 r-xp 00000000 fd:03 3130028                    /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7f0114086000-7f0114087000 r-xp 00018000 fd:03 3130028                    /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7f0114087000-7f0114088000 rwxp 00019000 fd:03 3130028                    /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7f0114088000-7f0114089000 ---p 00000000 00:00 0
7f0114089000-7f011412a000 rwxp 00000000 00:00 0
7f011412a000-7f011412b000 ---p 00000000 00:00 0
7f011412b000-7f01141cc000 rwxp 00000000 00:00 0
7f01141cc000-7f01141cd000 ---p 00000000 00:00 0
7f01141cd000-7f011426e000 rwxp 00000000 00:00 0
7f011426e000-7f011426f000 ---p 00000000 00:00 0
7f011426f000-7f0114310000 rwxp 00000000 00:00 0
7f0114310000-7f0114311000 ---p 00000000 00:00 0
7f0114311000-7f01143b2000 rwxp 00000000 00:00 0
7f01143b2000-7f01143b3000 ---p 00000000 00:00 0
7f01143b3000-7f0114454000 rwxp 00000000 00:00 0
7f0114454000-7f0114455000 ---p 00000000 00:00 0
7f0114455000-7f01144f6000 rwxp 00000000 00:00 0
7f01144f6000-7f01144f7000 ---p 00000000 00:00 0
7f01144f7000-7f0114598000 rwxp 00000000 00:00 0
7f0114598000-7f0114599000 ---p 00000000 00:00 0
7f0114599000-7f011463a000 rwxp 00000000 00:00 0
7f011463a000-7f011463b000 ---p 00000000 00:00 0
7f011463b000-7f01146dc000 rwxp 00000000 00:00 0
7f01146dc000-7f01146dd000 ---p 00000000 00:00 0
7f01146dd000-7f011477e000 rwxp 00000000 00:00 0
7f011477e000-7f011477f000 ---p 00000000 00:00 0
7f011477f000-7f0114820000 rwxp 00000000 00:00 0
7f0114820000-7f0114821000 ---p 00000000 00:00 0
7f0114821000-7f01148c2000 rwxp 00000000 00:00 0
7f01148c2000-7f01148c3000 ---p 00000000 00:00 0
7f01148c3000-7f0114964000 rwxp 00000000 00:00 0
7f0114964000-7f0114965000 ---p 00000000 00:00 0
7f0114965000-7f0114a06000 rwxp 00000000 00:00 0
7f0114a06000-7f0114a07000 ---p 00000000 00:00 0
7f0114a07000-7f0114aa8000 rwxp 00000000 00:00 0
7f0114aa8000-7f0114aa9000 ---p 00000000 00:00 0
7f0114aa9000-7f0114b4a000 rwxp 00000000 00:00 0
7f0114b4a000-7f0114b4b000 ---p 00000000 00:00 0
7f0114b4b000-7f0114bec000 rwxp 00000000 00:00 0
7f0114bec000-7f0114bed000 ---p 00000000 00:00 0
7f0114bed000-7f0114c8e000 rwxp 00000000 00:00 0
7f0114c8e000-7f0114c8f000 ---p 00000000 00:00 0
7f0114c8f000-7f0114d30000 rwxp 00000000 00:00 0
7f0114d30000-7f0114d31000 ---p 00000000 00:00 0
7f0114d31000-7f0114dd2000 rwxp 00000000 00:00 0
7f0114dd2000-7f0114dd3000 ---p 00000000 00:00 0
7f0114dd3000-7f0114e74000 rwxp 00000000 00:00 0
7f0114e74000-7f0114e75000 ---p 00000000 00:00 0
7f0114e75000-7f0114f16000 rwxp 00000000 00:00 0
7f0114f16000-7f0114f17000 ---p 00000000 00:00 0
7f0114f17000-7f0114fb8000 rwxp 00000000 00:00 0
7f0114fb8000-7f0114fb9000 ---p 00000000 00:00 0
7f0114fb9000-7f011505a000 rwxp 00000000 00:00 0
7f011505a000-7f011505b000 ---p 00000000 00:00 0
7f011505b000-7f01150fc000 rwxp 00000000 00:00 0
7f01150fc000-7f01150fd000 ---p 00000000 00:00 0
7f01150fd000-7f011519e000 rwxp 00000000 00:00 0
7f011519e000-7f011519f000 ---p 00000000 00:00 0
7f011519f000-7f0115240000 rwxp 00000000 00:00 0
7f0115240000-7f0115241000 ---p 00000000 00:00 0
7f0115241000-7f01152e2000 rwxp 00000000 00:00 0
7f01152e2000-7f01152e3000 ---p 00000000 00:00 0
7f01152e3000-7f0115384000 rwxp 00000000 00:00 0
7f0115384000-7f0115385000 ---p 00000000 00:00 0
7f0115385000-7f0115426000 rwxp 00000000 00:00 0
7f0115426000-7f0115427000 ---p 00000000 00:00 0
7f0115427000-7f01174c8000 rwxp 00000000 00:00 0
7f01174cb000-7f011758c000 rwxp 00000000 00:00 0
7f011758d000-7f011768e000 rwxp 00000000 00:00 0
7f011768e000-7f0117691000 rwxp 00000000 00:00 0
7f0117691000-7f0117878000 r-xp 00000000 fd:03 3130003                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f0117878000-7f0117879000 ---p 001e7000 fd:03 3130003                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f0117879000-7f011787c000 r-xp 001e7000 fd:03 3130003                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f011787c000-7f011787f000 rwxp 001ea000 fd:03 3130003                    /usr/lib/x86_64-linux-gnu/libc-2.31.so
7f011787f000-7f0117885000 rwxp 00000000 00:00 0
7f0117885000-7f0117888000 r-xp 00000000 fd:03 3130128                    /usr/lib/x86_64-linux-gnu/libutil-2.31.so
7f0117888000-7f0117889000 r-xp 00002000 fd:03 3130128                    /usr/lib/x86_64-linux-gnu/libutil-2.31.so
7f0117889000-7f011788a000 rwxp 00003000 fd:03 3130128                    /usr/lib/x86_64-linux-gnu/libutil-2.31.so
7f011788a000-7f01179d7000 r-xp 00000000 fd:03 3130045                    /usr/lib/x86_64-linux-gnu/libm-2.31.so
7f01179d7000-7f01179d8000 r-xp 0014c000 fd:03 3130045                    /usr/lib/x86_64-linux-gnu/libm-2.31.so
7f01179d8000-7f01179d9000 rwxp 0014d000 fd:03 3130045                    /usr/lib/x86_64-linux-gnu/libm-2.31.so
7f01179d9000-7f0117a0a000 r-xp 00000000 fd:03 3130010                    /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7f0117a0a000-7f0117a0b000 r-xp 00030000 fd:03 3130010                    /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7f0117a0b000-7f0117a0c000 rwxp 00031000 fd:03 3130010                    /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7f0117a0c000-7f0117a14000 rwxp 00000000 00:00 0
7f0117a14000-7f0117a18000 r-xp 00000000 fd:03 3130014                    /usr/lib/x86_64-linux-gnu/libdl-2.31.so
7f0117a18000-7f0117a19000 r-xp 00003000 fd:03 3130014                    /usr/lib/x86_64-linux-gnu/libdl-2.31.so
7f0117a19000-7f0117a1a000 rwxp 00004000 fd:03 3130014                    /usr/lib/x86_64-linux-gnu/libdl-2.31.so
7f0117a1a000-7f0117a22000 r-xp 00000000 fd:03 3130101                    /usr/lib/x86_64-linux-gnu/librt-2.31.so
7f0117a22000-7f0117a23000 ---p 00008000 fd:03 3130101                    /usr/lib/x86_64-linux-gnu/librt-2.31.so
7f0117a23000-7f0117a24000 r-xp 00008000 fd:03 3130101                    /usr/lib/x86_64-linux-gnu/librt-2.31.so
7f0117a24000-7f0117a25000 rwxp 00009000 fd:03 3130101                    /usr/lib/x86_64-linux-gnu/librt-2.31.so
7f0117a25000-7f0117a42000 r-xp 00000000 fd:03 3130097                    /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
7f0117a42000-7f0117a43000 r-xp 0001c000 fd:03 3130097                    /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
7f0117a43000-7f0117a44000 rwxp 0001d000 fd:03 3130097                    /usr/lib/x86_64-linux-gnu/libpthread-2.31.so
7f0117a44000-7f0117a4a000 rwxp 00000000 00:00 0
7f0117a4d000-7f0117a79000 r-xp 00000000 fd:03 3127581                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f0117a7a000-7f0117a7b000 r-xp 0002c000 fd:03 3127581                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f0117a7b000-7f0117a7c000 rwxp 0002d000 fd:03 3127581                    /usr/lib/x86_64-linux-gnu/ld-2.31.so
7f0117a7c000-7f0117a7d000 rwxp 00000000 00:00 0
7ffef9c95000-7ffefa494000 rwxp 00000000 00:00 0                          [stack]
7ffefa4e2000-7ffefa4e4000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]


Aborted (core dumped)```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.