Skip to content

Commit

Permalink
Remove gcharts so we do not have any external calls from scoreboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Clark committed May 23, 2019
1 parent 4eb8b51 commit 4720d90
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@
# Ignore simplecov output.
coverage

/public/uploads/*
/public/uploads/*

node_modules/
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
// Loads all Bootstrap javascripts
//= require bootstrap
//= require filterrific/filterrific-jquery
//= require highcharts
//= require chartkick
//= require bootstrap.file-input

Expand Down
1 change: 0 additions & 1 deletion app/controllers/games_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def show
end

def summary
@page_requires_gcharts = true
@view_all_teams_link = true

respond_to do |format|
Expand Down
1 change: 0 additions & 1 deletion app/controllers/teams_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def load_summary_info
format: '%l:%M %p').count }
]
@user_locations = @team.users.where('country IS NOT NULL').group(:country).count
@page_requires_gcharts = true
end

def load_team_flag_stats
Expand Down
5 changes: 0 additions & 5 deletions app/views/games/summary.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,3 @@
%h3.muted
Flag Submissions
= line_chart @line_chart_data, colors: ['#b8d12f', '#00abca']
%hr
%h3.muted
Competition Map
= geo_chart @user_locations, colors: ["#5d8cb6", '#446582']
%hr
1 change: 0 additions & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
%head
%title= @game.name
= stylesheet_link_tag "application"
= javascript_include_tag "https://www.gstatic.com/charts/loader.js" if @page_requires_gcharts
= javascript_include_tag "application"
= csrf_meta_tags
%body
Expand Down
3 changes: 0 additions & 3 deletions app/views/teams/_team_summary.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,4 @@
%td=link_to user.id, rails_admin.show_path("user", user)
%td= user.full_name
%td= user.email
%hr
%h3.muted Team Map
= geo_chart @user_locations, colors: ["#5d8cb6", '#446582']
%br
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"highcharts": "^7.1.1"
}
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


highcharts@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/highcharts/-/highcharts-7.1.1.tgz#8c4433e39d5e7dbdc064685d9548181a35e12c19"
integrity sha512-BQtWDQmH4AweQNFLGJCHBQwv9tj9kyp35bp2FFpmNBm7LOecCQdLjvZNgUKvCsKzBzJJIywcwWu4QEcAkPGCjg==

0 comments on commit 4720d90

Please sign in to comment.