From 6d33769ee6baccc05a939337fa6d3f8aa9c3f0f6 Mon Sep 17 00:00:00 2001 From: Bohung Date: Thu, 31 Mar 2022 13:58:30 +0800 Subject: [PATCH] Fix bug. --- app/views/admin/site_panel/_sites_list_table.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/admin/site_panel/_sites_list_table.html.erb b/app/views/admin/site_panel/_sites_list_table.html.erb index 618da13..64b6c25 100644 --- a/app/views/admin/site_panel/_sites_list_table.html.erb +++ b/app/views/admin/site_panel/_sites_list_table.html.erb @@ -18,6 +18,7 @@ <% status_relation = {"creating"=>"creating".html_safe,"error"=>"error".html_safe,"finish"=>"finish".html_safe,"closed"=>"closed".html_safe}%> + <% time_now = Time.now %> <% @sites.each do |site|%> <%=site.server_type%> @@ -35,7 +36,7 @@ <%= (site.status.blank? ? "not yet create" : status_relation[site.status]) %> site.domain_name})%>" class="btn btn-primary see_infos" data-id="<%=site.id.to_s%>"><%=t('client_management.see_logs')%> - <% if site.status.blank? %> + <% if site.status.blank? || (site.status == 'creating' && (time_now - site.updated_at > 60)) %> <%=t('client_management.create_site')%> <% elsif site.status == "error" || site.status == "finish" %> <%=t('client_management.recreate_site')%>