diff --git a/app/controllers/management/statistics_controller.rb b/app/controllers/management/statistics_controller.rb index 2ad8a384063cf2a6a743f15c3b32cead63baee28..9681d7966d07cb57c0a8860ace3b0cc102028aa7 100644 --- a/app/controllers/management/statistics_controller.rb +++ b/app/controllers/management/statistics_controller.rb @@ -1,110 +1,11 @@ class Management::StatisticsController < ManagementController def index - g = Gruff::Line.new - g.title = "Usuários" - g.data 'Estudantes', [0, 5, 8, 20] - g.data 'Professores', [0, 14,20, 40] - g.labels={ - 0 => '1', - 1 => '3', - 2 => '5', - 3 => '7', - 4 => '9' - } - g.theme = { - :colors => ['black', 'grey'], - :marker_color => 'grey', - :font_color => 'black', - :background_colors => 'transparent' - } - g.replace_colors(['green','yellow','black']) - g.marker_count = 1 - g = Gruff::Line.new - g.title = "Downloads" - g.data 'downloads', [0, 5, 8, 20] - g.labels={ - 0 => '1', - 1 => '3', - 2 => '5', - 3 => '7', - 4 => '9' - } - g.theme = { - :colors => ['black', 'grey'], - :marker_color => 'grey', - :font_color => 'black', - :background_colors => 'transparent' - } - g.replace_colors(['green','yellow','black']) - g.marker_count = 1 - - g = Gruff::Line.new - g.title = "Coleções" - g.data 'colections', [0, 55, 153, 220] - g.labels={ - 0 => '1', - 1 => '3', - 2 => '5', - 3 => '7', - 4 => '9' - } - g.theme = { - :colors => ['black', 'grey'], - :marker_color => 'grey', - :font_color => 'black', - :background_colors => 'transparent' - } - g.replace_colors(['green','yellow','black']) - g.marker_count = 1 - - g.write("/home/alexandre/projetos/portalmec/app/assets/images/geral_colections.png") - - - g = Gruff::Line.new - g.title = "Acessos" - g.data 'accesses', [0, 415, 388, 320, 577 ] - g.labels={ - 0 => '1', - 1 => '3', - 2 => '5', - 3 => '7', - 4 => '9' - } - g.theme = { - :colors => ['black', 'grey'], - :marker_color => 'grey', - :font_color => 'black', - :background_colors => 'transparent' - } - g.replace_colors(['green','yellow','black']) - g.marker_count = 1 - - g.write("/home/alexandre/projetos/portalmec/app/assets/images/geral_accesses.png") end def usuarios - g = Gruff::Bar.new - g.title = "Usuários" - g.data 'Estudantes', 20 - g.data 'Professores', 40 - g.data 'Curadores', 6 - g.data 'Moderadores', 3 - g.data 'Administradores', 1 - - - g.labels={ - - } - g.theme = { - :colors => ['black', 'grey'], - :marker_color => 'grey', - :font_color => 'black', - :background_colors => 'transparent' - } - g.replace_colors(['green','yellow','black','purple', 'blue']) - g.marker_count = 1 + end def downloads @@ -119,30 +20,6 @@ class Management::StatisticsController < ManagementController def collections - g = Gruff::Pie.new - g.title = "Por área de atuação" - g.data 'Filosofia', 45 - g.data 'Matemática', 92 - g.data 'LÃngua Portuguesa', 78 - g.data 'História', 57 - g.data 'FÃsica', 43 - g.data 'Sociologia', 40 - g.data 'Artes', 3 - - g.labels={ - - } - g.theme = { - :colors => ['black', 'grey'], - :marker_color => 'grey', - :font_color => 'black', - :background_colors => 'transparent' - } - g.replace_colors(['green','yellow','black','purple', 'blue', 'brown', 'red']) - g.marker_count = 1 - - g.write("/home/alexandre/projetos/portalmec/app/assets/images/colections.png") - end end diff --git a/app/views/management/statistics/index.html.erb b/app/views/management/statistics/index.html.erb index 55cf46b343add8a92fde1ca80ec84b171fe857e4..fb8d9e581c4b783df3de7b01d8655b8207b3aeb5 100644 --- a/app/views/management/statistics/index.html.erb +++ b/app/views/management/statistics/index.html.erb @@ -46,23 +46,3 @@ </div> </div> </div> - -<div position="relative", style="margin-left:10px"> -<div style="float: left" > - <%= image_tag("geral_user.png", height:"220", :alt => "Image missing") %> - -</div> - -<div style="float: left; margin-left:30px"> - <%= image_tag("geral_colections.png", height:"220", :alt => "Image missing") %> -</div> - - -<div style="float: left; margin-left:30px"> - <%= image_tag("geral_download.png", height:"220", :alt => "Image missing") %> -</div> - -<div style="float: left;margin-left:40px"> - <%= image_tag("geral_accesses.png", height:"220", :alt => "Image missing") %> -</div> -</div>