- blue = "#4886C2" - green = "#7FEC8D" - red = "#E44646" - orange = "#F49C54" - grey = "#A6A6A6" - colors = { accepted: blue, rsvp_confirmed: green, rsvp_denied: red, pending: "#F98728", denied: "#666", waitlist: "#059", late_waitlist: "#057" } = javascript_include_tag "hackathon_manager/vendor/d3.v3.min.js" = javascript_include_tag "hackathon_manager/vendor/queue.v1.min.js" = javascript_include_tag "hackathon_manager/vendor/topojson.v1.min.js" %section.section.manage %h1.section-title= title "Dashboard" - if flash[:notice] #disclaimer= flash[:notice] .container.container-full #map :javascript $('#map').initMap(); .container.container-half{ style: "width: 59%" } %h4.dashboard-container-title Today's Activity = area_chart todays_activity_data_manage_dashboard_index_path, colors: [blue, green, red, grey] .container.container-half{ style: "width: 39%" } %h4.dashboard-container-title Today's Stats = pie_chart todays_stats_data_manage_dashboard_index_path, colors: [blue, green, red, grey] .container.container-full %h4.dashboard-container-title Confirmation Activity .graph-overlay.double-metrics %h3= Questionnaire.where("checked_in_at != 0").count %p total checked in %h3= Questionnaire.where(acc_status: "rsvp_confirmed").count %p total confirmed = area_chart confirmation_activity_data_manage_dashboard_index_path, colors: [green, red], library: { legend: { enabled: false } } .container.container-full %h4.dashboard-container-title Application Activity .graph-overlay %h3= Questionnaire.count %p total applications = area_chart application_activity_data_manage_dashboard_index_path, colors: [blue, orange, grey], library: { legend: { enabled: false } } .container.container-half %h4.dashboard-container-title User Distribution = pie_chart user_distribution_data_manage_dashboard_index_path, colors: [grey, blue, orange] .container.container-half %h4.dashboard-container-title Application Distribution = pie_chart application_distribution_data_manage_dashboard_index_path, colors: [colors[:pending], colors[:accepted], colors[:waitlisted], colors[:denied], colors[:late_waitlist], colors[:rsvp_confirmed], colors[:rsvp_denied]] .container.container-full %h4.dashboard-container-title Schools (Confirmed) %ul = bar_chart schools_confirmed_data_manage_dashboard_index_path, height: "600px", stacked: true, colors: [blue, orange] %h4.dashboard-container-title Schools (Applied) %ul = bar_chart schools_applied_data_manage_dashboard_index_path, height: "600px", stacked: true, colors: [colors[:rsvp_confirmed], colors[:accepted], colors[:waitlist], colors[:late_waitlist], colors[:rsvp_denied], colors[:denied], colors[:pending]], library: { legend: { enabled: false } } - if School.where("questionnaire_count >= 1 AND questionnaire_count < 5").count > 0 %button{ onclick: "$('#least-applied-schools').toggle()" }= "List schools with < 5 applicants" %ul#least-applied-schools{ style: "display: none" } - School.where("questionnaire_count >= 1 AND questionnaire_count < 5").select([:name, :questionnaire_count]).order("questionnaire_count DESC").each do |school| %li= "#{school.questionnaire_count} - #{school.name}"