$("#upgrade-in-progress").hide();
$("#upgrade-modal").modal("hide");

<% if @upgrade_ok %>

  <% if @testwisely_deploy %>
  
  bootbox.alert("<%= I18n.t(:new_version_installed, :version => @version, :new_relesase_root => @new_release_root ) %>, Restart server (e.g. Nginx) to take effect.");
  
  <% else %>

  bootbox.alert("<%= I18n.t(:new_version_installed, :version => @version, :new_relesase_root => @new_release_root ) %>.");
  
  <% end %>
  
<% else %>
  bootbox.alert("<%= I18n.t(:upgrade_failed) %>, <%= @error rescue nil %>");
<% end %>
