Commit 8a4f651abfc2f26e90b60e6badec5a34b2aa5518

Authored by Diego Araujo + Jefferson Fernandes
Committed by Jefferson Fernandes
1 parent ce51667e

[Mezuro] Writing message when waiting for source tree to be processed

plugins/mezuro/lib/kalibro/entities/project_result.rb
1 1 class Kalibro::Entities::ProjectResult < Kalibro::Entities::Entity
2 2  
3   - attr_accessor :project, :date, :load_time, :analysis_time, :source_tree
  3 + attr_accessor :project, :date, :load_time, :analysis_time, :source_tree, :collect_time
4 4  
5 5 def project=(value)
6 6 @project = to_entity(value, Kalibro::Entities::Project)
... ...
plugins/mezuro/public/javascripts/project_content.js
... ... @@ -59,17 +59,22 @@ function reloadProject(date){
59 59 }
60 60  
61 61 function showProjectContentFor(state){
  62 + alert(state);
62 63 if (state == 'ERROR')
63 64 callAction('project_error', {}, showProjectResult);
64 65 else if (state == 'READY') {
  66 + jQuery('.msg-time').hide();
65 67 callAction('project_result', {}, showProjectResult);
66 68 callAction('project_tree', {}, showProjectTree);
67 69 var project_name = jQuery("#project-result").attr('data-project-name');
68 70 callAction('module_result', {module_name: project_name}, showModuleResult);
69   - }
  71 + }
70 72 else if (state.endsWith("ING"))
71   - showProjectContentAfter(20);
72   -}
  73 + jQuery('.msg-time').show();
  74 + jQuery('.msg-time').replaceWith('O carregamento do projeto pode levar algumas horas!');
  75 +
  76 + showProjectContentAfter(20);
  77 + }
73 78  
74 79 function showProjectContentAfter(seconds){
75 80 if (seconds > 0){
... ...
plugins/mezuro/views/content_viewer/show_project.rhtml
... ... @@ -29,6 +29,8 @@
29 29 </table>
30 30  
31 31 <br />
  32 +<div class="msg-time"></div>
  33 +
32 34  
33 35 <div id="project-result" data-profile="<%= @page.profile.identifier %>" data-content="<%= @page.id %>"
34 36 data-project-name="<%= @project.name %>">
... ...