easy_reports 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/easy_reports/dashboard/dashboard_content.css +2 -13
- data/app/controllers/easy_reports/databases_controller.rb +53 -0
- data/app/controllers/easy_reports/reports_controller.rb +11 -10
- data/app/forms/easy_reports/report_form.rb +22 -0
- data/app/helpers/easy_reports/databases_helper.rb +4 -0
- data/app/models/easy_reports/database.rb +11 -0
- data/app/models/easy_reports/report.rb +2 -0
- data/app/services/easy_reports/database_mediator.rb +11 -12
- data/app/views/easy_reports/dashboard/show.html.slim +8 -8
- data/app/views/easy_reports/{database_configs → databases}/_form.html.slim +6 -6
- data/app/views/easy_reports/databases/edit.html.slim +8 -0
- data/app/views/easy_reports/databases/index.html.slim +35 -0
- data/app/views/easy_reports/databases/new.html.slim +5 -0
- data/app/views/easy_reports/databases/show.html.slim +27 -0
- data/app/views/easy_reports/reports/_form.html.slim +15 -13
- data/app/views/layouts/easy_reports/application.html.slim +2 -2
- data/app/views/shared/_header.html.slim +3 -20
- data/config/initializers/simple_form.rb +145 -0
- data/config/initializers/simple_form_bootstrap.rb +45 -0
- data/config/locales/simple_form.en.yml +26 -0
- data/config/routes.rb +2 -2
- data/db/migrate/{20141213173509_create_easy_reports_database_configs.rb → 20141213173509_create_easy_reports_databases.rb} +3 -3
- data/db/migrate/20150131195101_add_config_id_to_reports.rb +5 -0
- data/easy_reports.gemspec +9 -5
- data/lib/easy_reports.rb +8 -5
- data/lib/easy_reports/version.rb +1 -1
- data/lib/templates/erb/scaffold/_form.html.erb +13 -0
- data/test/dummy/Gemfile.lock +5 -1
- data/test/dummy/db/migrate/{20141214161417_create_easy_reports_reports.easy_reports.rb → 20150131203555_create_easy_reports_reports.easy_reports.rb} +1 -1
- data/test/dummy/db/migrate/{20141214161418_create_easy_reports_database_configs.easy_reports.rb → 20150131203556_create_easy_reports_databases.easy_reports.rb} +4 -4
- data/test/dummy/db/migrate/20150131203557_add_config_id_to_reports.easy_reports.rb +6 -0
- data/test/dummy/db/schema.rb +4 -3
- metadata +58 -26
- data/app/assets/stylesheets/easy_reports/dashboard/sidebar.css +0 -10
- data/app/controllers/easy_reports/database_configs_controller.rb +0 -53
- data/app/helpers/easy_reports/database_configs_helper.rb +0 -4
- data/app/models/easy_reports/database_config.rb +0 -4
- data/app/views/easy_reports/database_configs/edit.html.slim +0 -8
- data/app/views/easy_reports/database_configs/index.html.slim +0 -35
- data/app/views/easy_reports/database_configs/new.html.slim +0 -5
- data/app/views/easy_reports/database_configs/show.html.slim +0 -27
- data/app/views/shared/_sidebar.html.slim +0 -90
- data/test/controllers/easy_reports/database_configs_controller_test.rb +0 -51
@@ -1,10 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* metismenu - v1.1.3
|
3
|
-
* Easy menu jQuery plugin for Twitter Bootstrap 3
|
4
|
-
* https://github.com/onokumus/metisMenu
|
5
|
-
*
|
6
|
-
* Made by Osman Nuri Okumus
|
7
|
-
* Under MIT License
|
8
|
-
*/
|
9
|
-
|
10
|
-
.arrow{float:right;line-height:1.42857}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"}
|
@@ -1,53 +0,0 @@
|
|
1
|
-
require_dependency "easy_reports/application_controller"
|
2
|
-
|
3
|
-
module EasyReports
|
4
|
-
class DatabaseConfigsController < ApplicationController
|
5
|
-
before_action :set_database_config, only: [:show, :edit, :update, :destroy]
|
6
|
-
|
7
|
-
def index
|
8
|
-
@database_configs = DatabaseConfig.all
|
9
|
-
end
|
10
|
-
|
11
|
-
def show
|
12
|
-
end
|
13
|
-
|
14
|
-
def new
|
15
|
-
@database_config = DatabaseConfig.new
|
16
|
-
end
|
17
|
-
|
18
|
-
def edit
|
19
|
-
end
|
20
|
-
|
21
|
-
def create
|
22
|
-
@database_config = DatabaseConfig.new(database_config_params)
|
23
|
-
|
24
|
-
if @database_config.save
|
25
|
-
redirect_to @database_config, notice: 'Database config was successfully created.'
|
26
|
-
else
|
27
|
-
render :new
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def update
|
32
|
-
if @database_config.update(database_config_params)
|
33
|
-
redirect_to @database_config, notice: 'Database config was successfully updated.'
|
34
|
-
else
|
35
|
-
render :edit
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def destroy
|
40
|
-
@database_config.destroy
|
41
|
-
redirect_to database_configs_url, notice: 'Database config was successfully destroyed.'
|
42
|
-
end
|
43
|
-
|
44
|
-
private
|
45
|
-
def set_database_config
|
46
|
-
@database_config = DatabaseConfig.find(params[:id])
|
47
|
-
end
|
48
|
-
|
49
|
-
def database_config_params
|
50
|
-
params.require(:database_config).permit(:adapter, :encoding, :pool, :username, :password, :host, :database_name, :port)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
h1 Listing database_configs
|
2
|
-
|
3
|
-
table
|
4
|
-
thead
|
5
|
-
tr
|
6
|
-
th Adapter
|
7
|
-
th Encoding
|
8
|
-
th Pool
|
9
|
-
th Username
|
10
|
-
th Password
|
11
|
-
th Host
|
12
|
-
th Port
|
13
|
-
th Database name
|
14
|
-
th
|
15
|
-
th
|
16
|
-
th
|
17
|
-
|
18
|
-
tbody
|
19
|
-
- @database_configs.each do |database_config|
|
20
|
-
tr
|
21
|
-
td = database_config.adapter
|
22
|
-
td = database_config.encoding
|
23
|
-
td = database_config.pool
|
24
|
-
td = database_config.username
|
25
|
-
td = database_config.password
|
26
|
-
td = database_config.host
|
27
|
-
td = database_config.port
|
28
|
-
td = database_config.database_name
|
29
|
-
td = link_to 'Show', database_config
|
30
|
-
td = link_to 'Edit', edit_database_config_path(database_config)
|
31
|
-
td = link_to 'Destroy', database_config, data: {:confirm => 'Are you sure?'}, :method => :delete
|
32
|
-
|
33
|
-
br
|
34
|
-
|
35
|
-
= link_to 'New Database config', new_database_config_path
|
@@ -1,27 +0,0 @@
|
|
1
|
-
p#notice = notice
|
2
|
-
|
3
|
-
p
|
4
|
-
strong Adapter:
|
5
|
-
= @database_config.adapter
|
6
|
-
p
|
7
|
-
strong Encoding:
|
8
|
-
= @database_config.encoding
|
9
|
-
p
|
10
|
-
strong Pool:
|
11
|
-
= @database_config.pool
|
12
|
-
p
|
13
|
-
strong Username:
|
14
|
-
= @database_config.username
|
15
|
-
p
|
16
|
-
strong Password:
|
17
|
-
= @database_config.password
|
18
|
-
p
|
19
|
-
strong Host:
|
20
|
-
= @database_config.host
|
21
|
-
p
|
22
|
-
strong Database:
|
23
|
-
= @database_config.database_name
|
24
|
-
|
25
|
-
= link_to 'Edit', edit_database_config_path(@database_config)
|
26
|
-
'|
|
27
|
-
= link_to 'Back', database_configs_path
|
@@ -1,90 +0,0 @@
|
|
1
|
-
.navbar-default.sidebar role="navigation"
|
2
|
-
.sidebar-nav.navbar-collapse
|
3
|
-
ul#side-menu.nav.in
|
4
|
-
li.sidebar-search
|
5
|
-
.input-group.custom-search-form
|
6
|
-
input.form-control placeholder="Search..." type="text" /
|
7
|
-
span.input-group-btn
|
8
|
-
button.btn.btn-default type="button"
|
9
|
-
i.fa.fa-search
|
10
|
-
/! /input-group
|
11
|
-
li
|
12
|
-
a.active href="index.html"
|
13
|
-
i.fa.fa-dashboard.fa-fw
|
14
|
-
| Dashboard
|
15
|
-
li
|
16
|
-
a href="#"
|
17
|
-
i.fa.fa-bar-chart-o.fa-fw
|
18
|
-
| Charts
|
19
|
-
span.fa.arrow
|
20
|
-
ul.nav.nav-second-level.collapse aria-expanded="false" style=("height: 0px;")
|
21
|
-
li
|
22
|
-
a href="flot.html" Flot Charts
|
23
|
-
li
|
24
|
-
a href="morris.html" Morris.js Charts
|
25
|
-
/! /.nav-second-level
|
26
|
-
li
|
27
|
-
a href="tables.html"
|
28
|
-
i.fa.fa-table.fa-fw
|
29
|
-
| Tables
|
30
|
-
li
|
31
|
-
a href="forms.html"
|
32
|
-
i.fa.fa-edit.fa-fw
|
33
|
-
| Forms
|
34
|
-
li
|
35
|
-
a href="#"
|
36
|
-
i.fa.fa-wrench.fa-fw
|
37
|
-
| UI Elements
|
38
|
-
span.fa.arrow
|
39
|
-
ul.nav.nav-second-level.collapse
|
40
|
-
li
|
41
|
-
a href="panels-wells.html" Panels and Wells
|
42
|
-
li
|
43
|
-
a href="buttons.html" Buttons
|
44
|
-
li
|
45
|
-
a href="notifications.html" Notifications
|
46
|
-
li
|
47
|
-
a href="typography.html" Typography
|
48
|
-
li
|
49
|
-
a href="icons.html" Icons
|
50
|
-
li
|
51
|
-
a href="grid.html" Grid
|
52
|
-
/! /.nav-second-level
|
53
|
-
li
|
54
|
-
a href="#"
|
55
|
-
i.fa.fa-sitemap.fa-fw
|
56
|
-
| Multi-Level Dropdown
|
57
|
-
span.fa.arrow
|
58
|
-
ul.nav.nav-second-level.collapse
|
59
|
-
li
|
60
|
-
a href="#" Second Level Item
|
61
|
-
li
|
62
|
-
a href="#" Second Level Item
|
63
|
-
li
|
64
|
-
a href="#"
|
65
|
-
| Third Level
|
66
|
-
span.fa.arrow
|
67
|
-
ul.nav.nav-third-level.collapse
|
68
|
-
li
|
69
|
-
a href="#" Third Level Item
|
70
|
-
li
|
71
|
-
a href="#" Third Level Item
|
72
|
-
li
|
73
|
-
a href="#" Third Level Item
|
74
|
-
li
|
75
|
-
a href="#" Third Level Item
|
76
|
-
/! /.nav-third-level
|
77
|
-
/! /.nav-second-level
|
78
|
-
li
|
79
|
-
a href="#"
|
80
|
-
i.fa.fa-files-o.fa-fw
|
81
|
-
| Sample Pages
|
82
|
-
span.fa.arrow
|
83
|
-
ul.nav.nav-second-level.collapse
|
84
|
-
li
|
85
|
-
a href="blank.html" Blank Page
|
86
|
-
li
|
87
|
-
a href="login.html" Login Page
|
88
|
-
/! /.nav-second-level
|
89
|
-
/! /.sidebar-collapse
|
90
|
-
|
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module EasyReports
|
4
|
-
class DatabaseConfigsControllerTest < ActionController::TestCase
|
5
|
-
setup do
|
6
|
-
@database_config = database_configs(:one)
|
7
|
-
end
|
8
|
-
|
9
|
-
test "should get index" do
|
10
|
-
get :index
|
11
|
-
assert_response :success
|
12
|
-
assert_not_nil assigns(:database_configs)
|
13
|
-
end
|
14
|
-
|
15
|
-
test "should get new" do
|
16
|
-
get :new
|
17
|
-
assert_response :success
|
18
|
-
end
|
19
|
-
|
20
|
-
test "should create database_config" do
|
21
|
-
assert_difference('DatabaseConfig.count') do
|
22
|
-
post :create, database_config: { adapter: @database_config.adapter, database: @database_config.database, encoding: @database_config.encoding, host: @database_config.host, password: @database_config.password, pool: @database_config.pool, username: @database_config.username }
|
23
|
-
end
|
24
|
-
|
25
|
-
assert_redirected_to database_config_path(assigns(:database_config))
|
26
|
-
end
|
27
|
-
|
28
|
-
test "should show database_config" do
|
29
|
-
get :show, id: @database_config
|
30
|
-
assert_response :success
|
31
|
-
end
|
32
|
-
|
33
|
-
test "should get edit" do
|
34
|
-
get :edit, id: @database_config
|
35
|
-
assert_response :success
|
36
|
-
end
|
37
|
-
|
38
|
-
test "should update database_config" do
|
39
|
-
patch :update, id: @database_config, database_config: { adapter: @database_config.adapter, database: @database_config.database, encoding: @database_config.encoding, host: @database_config.host, password: @database_config.password, pool: @database_config.pool, username: @database_config.username }
|
40
|
-
assert_redirected_to database_config_path(assigns(:database_config))
|
41
|
-
end
|
42
|
-
|
43
|
-
test "should destroy database_config" do
|
44
|
-
assert_difference('DatabaseConfig.count', -1) do
|
45
|
-
delete :destroy, id: @database_config
|
46
|
-
end
|
47
|
-
|
48
|
-
assert_redirected_to database_configs_path
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|