Skip to content
forked from catarse/dbhero

DBHero is a simple and elegant web interface to extract data clips from your app database. just plug and play ;)

License

Notifications You must be signed in to change notification settings

DanielHeath/dbhero

This branch is 4 commits ahead of catarse/dbhero:master.

Folders and files

NameName
Last commit message
Last commit date
Jun 13, 2024
Mar 19, 2015
Mar 22, 2015
Jun 13, 2024
Dec 14, 2020
Dec 14, 2020
Mar 23, 2015
Dec 14, 2020
Mar 23, 2015
Mar 19, 2015
Feb 9, 2022
Mar 19, 2015
Apr 28, 2015
Mar 23, 2015
Feb 9, 2022

Repository files navigation

DBHero Build Status Code Climate

DBHero is a simple and elegant web interface to extract data clips from your app database. just plug and play ;)

tested stack:

  • PostgresSQL
  • Ruby 2+
  • Rails 4.1+

Dbhero

installation

include in your Gemfile:

gem 'dbhero'

then run:

rails g dbhero:install

This will create an initializer in config/initializers/dbhero.rb Take a look in this initializer to tweak the default attributes.

and add on your routes file:

 mount Dbhero::Engine => "/dbhero", as: :dbhero

run server and open http://localhost:3000/dbhero

Configurations

On initializer config/initializers/dbhero.rb we can add the following configurations

Dbhero.configure do |config|
  # limits the total of rows that show on clips, if clip result os greather
  # that result rows of query then should show a button to download csv
  # this prevent that browser crashes :)
  config.max_rows_limit = 10_000
  # if you are using devise you can keep the "authenticate_user!"
  config.authenticate = true

  # Method to get the current user authenticated on your app
  # if you are using devise you can keep the "current_user"
  config.current_user_method = :current_user

  # Custom authentication condition hover current_user_method
  config.custom_user_auth_condition = lambda do |user|
    user.admin?
  end

  # String representation for user
  # when creating a dataclip just save on user field
  config.user_representation = :email

  # Google drive integration, uncomment to use ;)
  # you can get you google api credentials here:
  # https://developers.google.com/drive/web/auth/web-server
  # google drive callback url -> /dbhero/dataclips/drive
  config.google_api_id = 'GOOGLE_API_ID'
  config.google_api_secret = 'GOOGLE_API_SECRET'
end

This project rocks and uses MIT-LICENSE.

About

DBHero is a simple and elegant web interface to extract data clips from your app database. just plug and play ;)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 73.9%
  • Slim 9.0%
  • HTML 7.9%
  • JavaScript 5.1%
  • CSS 4.1%