kasugaijin / baja-pet-rescue

Kasugaijin's open-source Ruby on Rails production app that enables dog rescue organisation staff in Mexico to post dogs and receive applications for adoption from users in USA and Canada..
27 stars 9 forks source link

[WIP] Add charts to active admin dashboard #178

Closed egemen-dev closed 1 year ago

egemen-dev commented 1 year ago

It would be awesome to visualize some data from this application in active admin dashboard, such as adoptions, user sign ups and donations over time.

Related issue: https://github.com/kasugaijin/baja-pet-rescue/issues/168


This PR is pretty self-descriptive as the title suggests. So, I think it does not need much explanation.

In this PR, I added the chartkick gem to generate charts in activeadmin.

There are 3 new sections in /admin/dashboard. Adoptions Over Time, Donations Over Time and User Sign Ups Over Time. They are all line charts.

Example screenshot

Screenshot 2023-07-21 at 20-09-17 Dashboard Baja Pet Rescue

kasugaijin commented 1 year ago

Note: I have no idea why Ruby on Rails CI / test (pull_request) fails on 'Install Ruby and gems' section.

Could you please try committing gemfile.lock as it's the new chartkick gem that is failing on bunde install in the test container.

If that does not work, the solution probably lies here: https://stackoverflow.com/questions/72331753/ruby-and-rails-github-action-exit-code-16 - running that command, then committing gemfile.lock again. Though I am not sure why it would just start failing.

egemen-dev commented 1 year ago

Note: I have no idea why Ruby on Rails CI / test (pull_request) fails on 'Install Ruby and gems' section.

Could you please try committing gemfile.lock as it's the new chartkick gem that is failing on bunde install in the test container.

If that does not work, the solution probably lies here: https://stackoverflow.com/questions/72331753/ruby-and-rails-github-action-exit-code-16

I remember that you once told don't commit Gemfile.lock, am I wrong? That's why I did not :D Apparently, it solved the issue.

kasugaijin commented 1 year ago

Note: I have no idea why Ruby on Rails CI / test (pull_request) fails on 'Install Ruby and gems' section.

Could you please try committing gemfile.lock as it's the new chartkick gem that is failing on bunde install in the test container. If that does not work, the solution probably lies here: https://stackoverflow.com/questions/72331753/ruby-and-rails-github-action-exit-code-16

I remember that you once told don't commit Gemfile.lock, am I wrong? That's why I did not :D Apparently, it solved the issue.

Haha yes I was wrong in saying that. It was something I had learned not to do at my last job, but after a lot of googling it looks like gemfile.lock should always be committed. I have changed the readme to reflect that also.