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 class Kalibro::Entities::ProjectResult < Kalibro::Entities::Entity 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 def project=(value) 5 def project=(value)
6 @project = to_entity(value, Kalibro::Entities::Project) 6 @project = to_entity(value, Kalibro::Entities::Project)
plugins/mezuro/public/javascripts/project_content.js
@@ -59,17 +59,22 @@ function reloadProject(date){ @@ -59,17 +59,22 @@ function reloadProject(date){
59 } 59 }
60 60
61 function showProjectContentFor(state){ 61 function showProjectContentFor(state){
  62 + alert(state);
62 if (state == 'ERROR') 63 if (state == 'ERROR')
63 callAction('project_error', {}, showProjectResult); 64 callAction('project_error', {}, showProjectResult);
64 else if (state == 'READY') { 65 else if (state == 'READY') {
  66 + jQuery('.msg-time').hide();
65 callAction('project_result', {}, showProjectResult); 67 callAction('project_result', {}, showProjectResult);
66 callAction('project_tree', {}, showProjectTree); 68 callAction('project_tree', {}, showProjectTree);
67 var project_name = jQuery("#project-result").attr('data-project-name'); 69 var project_name = jQuery("#project-result").attr('data-project-name');
68 callAction('module_result', {module_name: project_name}, showModuleResult); 70 callAction('module_result', {module_name: project_name}, showModuleResult);
69 - } 71 + }
70 else if (state.endsWith("ING")) 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 function showProjectContentAfter(seconds){ 79 function showProjectContentAfter(seconds){
75 if (seconds > 0){ 80 if (seconds > 0){
plugins/mezuro/views/content_viewer/show_project.rhtml
@@ -29,6 +29,8 @@ @@ -29,6 +29,8 @@
29 </table> 29 </table>
30 30
31 <br /> 31 <br />
  32 +<div class="msg-time"></div>
  33 +
32 34
33 <div id="project-result" data-profile="<%= @page.profile.identifier %>" data-content="<%= @page.id %>" 35 <div id="project-result" data-profile="<%= @page.profile.identifier %>" data-content="<%= @page.id %>"
34 data-project-name="<%= @project.name %>"> 36 data-project-name="<%= @project.name %>">