48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
<% if flash[:notice] %>
|
|
<div class="m-4 rounded px-4 py-2 bg-accept text-white">
|
|
<%= flash[:notice] %>
|
|
</div>
|
|
<% elsif flash[:alert] %>
|
|
<div class="m-4 rounded px-4 py-2 bg-danger text-white">
|
|
<%= flash[:alert] %>
|
|
</div>
|
|
<% end %>
|
|
<div class="flex flex-col h-full divide-y divide-border-table-border">
|
|
<div class="flex flex-col flex-1 p-4 space-y-4">
|
|
<table class="base-table">
|
|
<thead>
|
|
<tr>
|
|
<th>시간</th>
|
|
<th>온도</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @schedule.each do |s| %>
|
|
<tr>
|
|
<td><%= s.hour %>시</td>
|
|
<td><%= s.temperature %> °C</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<div>
|
|
<div class="flex gap-x-2">
|
|
<%= button_to "스케쥴러 시작", start_modbus_index_path, method: :post, class: "btn bg-accept" %>
|
|
<%= button_to "스케쥴러 정지", stop_modbus_index_path, method: :post, class: "btn bg-danger" %>
|
|
</div>
|
|
|
|
<div class="py-4">
|
|
<span class="font-semibold">스케쥴러 상태:</span>
|
|
<% if @modbus_running %>
|
|
<span class="text-accept font-bold">실행 중</span>
|
|
<% else %>
|
|
<span class="text-danger font-bold">정지됨</span>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="flex p-4">
|
|
<%= link_to "수정", "/modbus/schedule_edit", class: "btn bg-default-slate" %>
|
|
</div>
|
|
</div>
|