Skip to content

Commit

Permalink
added mapdashboard and singlegraph links
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster444 committed Sep 14, 2017
1 parent ee6671b commit be6a775
Show file tree
Hide file tree
Showing 12 changed files with 227 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app/controllers/maps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ def ctg
end
end
end

def viewsinglegraph
end

def mapdashboard
end
private
def map_params
params.require(:map).permit(:datapoints, :maptitle)
Expand Down
91 changes: 91 additions & 0 deletions app/views/maps/mapdashboard.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<div class='row'>
<h4> Population Correlation Matrix: <%= @map.maptitle %> </h4>
<span> Select Data for Map Group Data Summary </span>
<button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="#ctgmodal"> Create Trait Group </button>
</div>
<div class='row'>
<div class='col-sm-6'>
<fieldset>
<legend align="center">GROUPS</legend>
Include Groups: <textarea id="inGroups" name='tags2' placeholder='Add Groups'></textarea><br>
Exclude Groups: <textarea id="exGroups" name='tags2' placeholder='Add Groups'></textarea><br>
</fieldset>
</div>
<div class='col-sm-6'>
<fieldset>
<legend align="center">TAGS</legend>
Include Tags: <textarea id="inTags" name='tags2' placeholder='Add Tags'></textarea><br>
Exclude Tags: <textarea id="exTags" name='tags2' placeholder='Add Tags'></textarea><br>
</fieldset>
</div>
</div>

<div class='row'>
<div class='col-sm-6'>
<fieldset>
<legend align="center">TRAITS</legend>
Include Traits: <textarea id="inTraits" name='tags2' placeholder='Add Traits'></textarea><br>
Exclude Traits: <textarea id="exTraits" name='tags2' placeholder='Add Traits'></textarea><br>
</fieldset>
</div>

<div class='col-sm-6'>
<fieldset>
<legend align="center">STATISTICS</legend>
Include Traits: <textarea id="inStats" name='tags2' placeholder='Add Statistics'></textarea><br>
Exclude Traits: <textarea id="exStats" name='tags2' placeholder='Add Statistics'></textarea><br>
</fieldset>
</div>
</div>
<input id="traitValues" value='<%= @trait.trait %>' type="hidden" />
<input id="traitgroupValues" value='<%= @group_array %>' type="hidden" />
<div id="matrix">
<div style="display:inline-block;" id="legend"></div>
<div style="display:inline-block; float:left" id="container"></div>
</div>

<!-- Modal -->
<div id="ctgmodal" class="modal fade" role="dialog">
<div class="modal-dialog">

<!-- Modal content-->
<%= form_tag ctg_maps_path, :id => 'ctg_modal', multipart: true do %>
<%= hidden_field_tag :id, @map.id%>
<%= hidden_field_tag :selected_traits, @map.id%>

<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Create/Manage Trait Group</h4>
</div>
<div class="modal-body">
<div class="form-group">
<div class="col-12">
<%= text_field_tag :trait_group_name, :autofocus => true, class: 'form-control', :required=>'required' %>
</div>
<div class="col-12">
<br/>
<p> Click to Select Traits to Include in Group </p>
</div>
</div>
<% csv_headers = @csv_table.headers
csv_headers.shift(4)
%>
<div id="checkbox_wrapper">
<% csv_headers.each do |button| %>
<span class="button-checkbox">
<button type="button" class="btn" data-color="default"><%= button %></button>
<input type="checkbox" class="hidden" checked />
</span>
<% end %>
</div>
</div>
<div class="modal-footer">
<%= submit_tag "Save", class: "btn btn-primary"%>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<% end %>
</div>
</div>
91 changes: 91 additions & 0 deletions app/views/maps/viewsinglegraph.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<div class='row'>
<h4> Population Correlation Matrix: <%= @map.maptitle %> </h4>
<span> Select Data for Map Group Data Summary </span>
<button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="#ctgmodal"> Create Trait Group </button>
</div>
<div class='row'>
<div class='col-sm-6'>
<fieldset>
<legend align="center">GROUPS</legend>
Include Groups: <textarea id="inGroups" name='tags2' placeholder='Add Groups'></textarea><br>
Exclude Groups: <textarea id="exGroups" name='tags2' placeholder='Add Groups'></textarea><br>
</fieldset>
</div>
<div class='col-sm-6'>
<fieldset>
<legend align="center">TAGS</legend>
Include Tags: <textarea id="inTags" name='tags2' placeholder='Add Tags'></textarea><br>
Exclude Tags: <textarea id="exTags" name='tags2' placeholder='Add Tags'></textarea><br>
</fieldset>
</div>
</div>

<div class='row'>
<div class='col-sm-6'>
<fieldset>
<legend align="center">TRAITS</legend>
Include Traits: <textarea id="inTraits" name='tags2' placeholder='Add Traits'></textarea><br>
Exclude Traits: <textarea id="exTraits" name='tags2' placeholder='Add Traits'></textarea><br>
</fieldset>
</div>

<div class='col-sm-6'>
<fieldset>
<legend align="center">STATISTICS</legend>
Include Traits: <textarea id="inStats" name='tags2' placeholder='Add Statistics'></textarea><br>
Exclude Traits: <textarea id="exStats" name='tags2' placeholder='Add Statistics'></textarea><br>
</fieldset>
</div>
</div>
<input id="traitValues" value='<%= @trait.trait %>' type="hidden" />
<input id="traitgroupValues" value='<%= @group_array %>' type="hidden" />
<div id="matrix">
<div style="display:inline-block;" id="legend"></div>
<div style="display:inline-block; float:left" id="container"></div>
</div>

<!-- Modal -->
<div id="ctgmodal" class="modal fade" role="dialog">
<div class="modal-dialog">

<!-- Modal content-->
<%= form_tag ctg_maps_path, :id => 'ctg_modal', multipart: true do %>
<%= hidden_field_tag :id, @map.id%>
<%= hidden_field_tag :selected_traits, @map.id%>

<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Create/Manage Trait Group</h4>
</div>
<div class="modal-body">
<div class="form-group">
<div class="col-12">
<%= text_field_tag :trait_group_name, :autofocus => true, class: 'form-control', :required=>'required' %>
</div>
<div class="col-12">
<br/>
<p> Click to Select Traits to Include in Group </p>
</div>
</div>
<% csv_headers = @csv_table.headers
csv_headers.shift(4)
%>
<div id="checkbox_wrapper">
<% csv_headers.each do |button| %>
<span class="button-checkbox">
<button type="button" class="btn" data-color="default"><%= button %></button>
<input type="checkbox" class="hidden" checked />
</span>
<% end %>
</div>
</div>
<div class="modal-footer">
<%= submit_tag "Save", class: "btn btn-primary"%>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<% end %>
</div>
</div>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
get "maps/:id/vsd", to:"maps#vsd"
get "maps/:id/vgs", to:"maps#vgs" , as: "groupsummary"
get "maps/:id/vcm", to:"maps#vcm" , as: "correlationmatrix"
get "maps/:id/vsg", to:"maps#viewsinglegraph" , as: "singlegraph"
get "maps/:id/md", to:"maps#mapdashboard" , as: "mapdashboard"
end
end
34 changes: 34 additions & 0 deletions log/development.log
Original file line number Diff line number Diff line change
Expand Up @@ -77839,3 +77839,37 @@ Processing by MapsController#vcm as HTML
Completed 200 OK in 290ms (Views: 286.8ms | ActiveRecord: 0.4ms)


Started GET "/maps/14/vcm" for 127.0.0.1 at 2017-09-14 11:54:25 +0300
Processing by MapsController#vcm as HTML
Parameters: {"id"=>"14"}
Map Load (0.1ms) SELECT "maps".* FROM "maps" WHERE "maps"."id" = ? LIMIT ? [["id", 14], ["LIMIT", 1]]
Trait Load (0.1ms) SELECT "traits".* FROM "traits" WHERE "traits"."id" = ? LIMIT ? [["id", 12], ["LIMIT", 1]]
Rendering maps/vcm.html.erb within layouts/application
Rendered maps/vcm.html.erb within layouts/application (1.2ms)
Rendered maps/_detaillink.html.erb (0.6ms)
Rendered layouts/_sidebar.html.erb (1.9ms)
Rendered layouts/_navigation_links.html.erb (0.3ms)
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
Rendered layouts/_nav_links_for_auth.html.erb (1.6ms)
Rendered layouts/_navigation.html.erb (3.0ms)
Rendered layouts/_messages.html.erb (0.4ms)
Rendered layouts/_settings.html.erb (0.2ms)
Completed 200 OK in 89ms (Views: 86.8ms | ActiveRecord: 0.4ms)


Started GET "/" for 127.0.0.1 at 2017-09-14 11:57:44 +0300
 (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
Processing by VisitorsController#index as HTML
Rendering visitors/index.html.erb within layouts/application
Rendered visitors/index.html.erb within layouts/application (0.8ms)
Map Load (0.2ms) SELECT "maps".* FROM "maps" ORDER BY updated_at DESC
Rendered layouts/_sidebar.html.erb (22.9ms)
Rendered layouts/_navigation_links.html.erb (0.5ms)
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 1], ["LIMIT", 1]]
Rendered layouts/_nav_links_for_auth.html.erb (94.7ms)
Rendered layouts/_navigation.html.erb (98.7ms)
Rendered layouts/_messages.html.erb (3.0ms)
Rendered layouts/_settings.html.erb (0.3ms)
Completed 200 OK in 713ms (Views: 686.0ms | ActiveRecord: 1.9ms)


Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"�app/assets/javascripts/application.js?type=application/javascript&id=a9e777ab5549cd1bcaa31d7183407e9abf3125e348179418688d5b0060b22bf5:ET
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I"}app/assets/stylesheets/application.css.scss?type=text/css&id=2a810a11c14b9ca0ab2134ad445d5e798cef1543dfb4d373a1192709054a5eca:ET
2 changes: 1 addition & 1 deletion tmp/pids/server.pid
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6873
19384

0 comments on commit be6a775

Please sign in to comment.