47 lines
1.4 KiB
Plaintext
47 lines
1.4 KiB
Plaintext
<% if flash[:notice] %>
|
|
<div class="mb-4 rounded bg-green-100 px-4 py-2 text-green-800 border border-green-300">
|
|
<%= flash[:notice] %>
|
|
</div>
|
|
<% elsif flash[:alert] %>
|
|
<div class="mb-4 rounded bg-red-100 px-4 py-2 text-red-800 border border-red-300">
|
|
<%= flash[:alert] %>
|
|
</div>
|
|
<% end %>
|
|
<div class="flex flex-col h-full divide-y divide-border-table-border">
|
|
<div class="flex-1 overflow-y-auto 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> |