Browse Source

Update icon class names for Font-Awesome 6

Akinori MUSHA 4 tháng trước cách đây
mục cha
commit
0c68b9ddd6
2 tập tin đã thay đổi với 5 bổ sung9 xóa
  1. 4 4
      app/views/agents/show.html.erb
  2. 1 5
      app/views/scenarios/index.html.erb

+ 4 - 4
app/views/agents/show.html.erb

@@ -24,7 +24,7 @@
 
           <li class="dropdown">
             <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-th-list"></span> Actions <span class="caret"></span></a>
-            <%= render 'agents/action_menu', :agent => @agent, :return_to => "show" %>
+            <%= render 'agents/action_menu', agent: @agent, return_to: "show" %>
           </li>
         </ul>
       </div>
@@ -47,7 +47,7 @@
                 <h2>
                   <%= @agent.name %> Logs
                   <small>
-                    <%= image_tag "spinner-arrows.gif", :class => "spinner" %>
+                    <%= image_tag "spinner-arrows.gif", class: "spinner" %>
                     <span class="glyphicon glyphicon-refresh action-icon refresh"></span>
                     <span class="glyphicon glyphicon-trash action-icon clear"></span>
                   </small>
@@ -173,8 +173,8 @@
             <% if @agent.memory.present? %>
               <p id="memory" data-agent-id="<%= @agent.id %>">
                 <b>Memory:</b>
-                <i class="fa fa-spinner fa-pulse spinner"></i>
-                <i class="fa fa-trash action-icon clear"></i>
+                <i class="fa-solid fa-spinner fa-spin-pulse spinner"></i>
+                <i class="fa-solid fa-trash action-icon clear"></i>
                 <a id="toggle-memory" href="#">Show</a>
                 <pre class="memory hidden"><%= Utils.pretty_jsonify @agent.memory || {} %></pre>
               </p>

+ 1 - 5
app/views/scenarios/index.html.erb

@@ -23,11 +23,7 @@
         <% @scenarios.each do |scenario| %>
           <tr>
             <td>
-              <% if scenario.icon.blank? %>
-                <%= scenario_label(scenario, icon('gear'))%>
-              <% else %>
-                <%= scenario_label(scenario, icon(scenario.icon))%>
-              <% end %>
+              <%= scenario_label(scenario, icon('fa-solid', scenario.icon.presence || 'gear'))%>
               <%= link_to(scenario.name, scenario) %>
             </td>
             <td><%= link_to pluralize(scenario.agents.count, "agent"), scenario %></td>