Fix bug.
This commit is contained in:
parent
3d871aec8f
commit
6d33769ee6
|
@ -18,6 +18,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<% status_relation = {"creating"=>"<span style=\"color: skyblue;\">creating</span>".html_safe,"error"=>"<span style=\"color: red;\">error</span>".html_safe,"finish"=>"<span style=\"color: darkseagreen;\">finish</span>".html_safe,"closed"=>"<span style=\"color: red;\">closed</span>".html_safe}%>
|
||||
<% time_now = Time.now %>
|
||||
<% @sites.each do |site|%>
|
||||
<tr>
|
||||
<td><%=site.server_type%></td>
|
||||
|
@ -35,7 +36,7 @@
|
|||
<td class="site_status"><%= (site.status.blank? ? "not yet create" : status_relation[site.status]) %></td>
|
||||
<td>
|
||||
<a href="#" title="<%=t("client_management.see_logs_for_site",{:site=>site.domain_name})%>" class="btn btn-primary see_infos" data-id="<%=site.id.to_s%>"><%=t('client_management.see_logs')%></a>
|
||||
<% if site.status.blank? %>
|
||||
<% if site.status.blank? || (site.status == 'creating' && (time_now - site.updated_at > 60)) %>
|
||||
<a href="#" title="create <%=site.domain_name%>" class="btn btn-primary create_site" data-id="<%=site.id.to_s%>"><%=t('client_management.create_site')%></a>
|
||||
<% elsif site.status == "error" || site.status == "finish" %>
|
||||
<a href="#" title="recreate <%=site.domain_name%>" class="btn btn-primary recreate_site" data-id="<%=site.id.to_s%>"><%=t('client_management.recreate_site')%></a>
|
||||
|
|
Loading…
Reference in New Issue