DBSizeAlarmEditor.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. // LoopFollow
  2. // DBSizeAlarmEditor.swift
  3. import SwiftUI
  4. struct DBSizeAlarmEditor: View {
  5. @Binding var alarm: Alarm
  6. var body: some View {
  7. Group {
  8. InfoBanner(
  9. text: "This warns you when the Nightscout database has filled the percentage you choose. Nightscout measures the used space against its own DBSIZE_MAX setting, which is 496 MiB unless the site owner changed it, so the percentage is only meaningful when that setting matches the real hosting limit.",
  10. alarmType: alarm.type
  11. )
  12. AlarmGeneralSection(alarm: $alarm)
  13. AlarmStepperSection(
  14. header: "Database Size",
  15. footer: "This alerts you when the database reaches or exceeds this percentage of the limit configured on the Nightscout site.",
  16. title: "At or Above",
  17. range: 0 ... 100,
  18. step: 5,
  19. unitLabel: "%",
  20. value: $alarm.threshold
  21. )
  22. AlarmActiveSection(alarm: $alarm)
  23. AlarmAudioSection(alarm: $alarm)
  24. AlarmSnoozeSection(alarm: $alarm)
  25. }
  26. }
  27. }