diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css
index 7dae164..613572e 100644
--- a/app/assets/stylesheets/application.tailwind.css
+++ b/app/assets/stylesheets/application.tailwind.css
@@ -14,7 +14,7 @@
/* theme */
--color-base-background: rgb(39, 44, 56);
--color-base-secondary: rgb(55, 61, 71);
- --color-base-text: rgb(152, 158, 172);
+ --color-base-text: rgb(255, 255, 255);
--color-base-border: rgb(77, 84, 102);
--base-font-size: 0.85rem;
@@ -78,7 +78,11 @@
}
.select-style {
- @apply block w-full h-8 px-3 py-1.5 border border-default-slate/50 rounded-xs
+ @apply block w-full h-8 px-3 py-1.5 border border-default-slate/50 rounded-xs text-base-background
+ }
+
+ .select-style option {
+ color: theme('colors.base-background');
}
.input-style {
@@ -183,7 +187,7 @@
}
.base-table th {
- @apply bg-base-text px-2 py-2 text-left font-bold lg:table-cell
+ @apply bg-base-background px-2 py-2 text-left font-bold lg:table-cell
}
.base-table td {
diff --git a/app/views/schedules/schedule_edit.html.erb b/app/views/schedules/schedule_edit.html.erb
index ef15d8c..2f4088c 100644
--- a/app/views/schedules/schedule_edit.html.erb
+++ b/app/views/schedules/schedule_edit.html.erb
@@ -23,7 +23,7 @@
<%= select_tag "schedule[#{s.id}][hour]",
options_for_select((0..23).map { |h| [h.to_s.rjust(2, '0'), h] }, s.hour),
- class: "input-style" %>
+ class: "select-style text-white" %>
|
<%= number_field_tag "schedule[#{s.id}][minute]", s.minute, min: 0, max: 59, step: 1, inputmode: "decimal", class: "input-style" %> |
<%= check_box_tag "schedule[#{s.id}][is_active]", "1", s.is_active == true || s.is_active == 1 %> |
diff --git a/app/views/schedules/view.html.erb b/app/views/schedules/view.html.erb
index 8dd921d..19cc4aa 100644
--- a/app/views/schedules/view.html.erb
+++ b/app/views/schedules/view.html.erb
@@ -1,30 +1,70 @@
-
-
-
+
+
+
<%= @controller.name %> 컨트롤러
<%= link_to "수정", schedule_edit_schedule_path(@controller.id), class: "btn bg-default-slate" %>
-
-
-
- | 시간 |
- 분 |
- 사용여부 |
- 온도 |
-
-
-
+
<% @schedule.each do |s| %>
-
- | <%= s.hour %>시 |
- <%= s.minute %>분 |
- <%= s.is_active %> |
- <%= s.temperature %> °C |
-
+ -
+
+
+
+
시간
+
+
<%= s.hour.to_s.rjust(2, '0') %>
+
:
+
<%= s.minute.to_s.rjust(2, '0') %>
+
+
+
+
+
+
온도
+
+
<%= s.temperature %>
+
°C
+
+
+
+
+
+
+
사용여부
+
+ <%#= s.is_active %>
+ <% if s.is_active %>
+
+ <% else %>
+
+ <% end %>
+
+
+
<% end %>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ <%# @schedule.each do |s| %>
+
+
+
+
+
+
+ <%# end %>
+
+
diff --git a/modbus.rb b/modbus.rb
index 77c989b..0ef6e52 100644
--- a/modbus.rb
+++ b/modbus.rb
@@ -22,13 +22,13 @@ begin
end
end
rescue
- error_message = "[#{Time.now}] #{mode} 실행 실패 (station_id: #{controller_id}, value: #{value})"
- res = Sms.send_one(
- {
- to: '01062619801',
- from: '01062619801',
- text: error_message
- }
- )
- puts res
+ # error_message = "[#{Time.now}] #{mode} 실행 실패 (station_id: #{controller_id}, value: #{value})"
+ # res = Sms.send_one(
+ # {
+ # to: '01062619801',
+ # from: '01062619801',
+ # text: error_message
+ # }
+ # )
+ # puts res
end