{% extends "layout.html" %} {% set active_page = "method_list" %} {% set help_page = ["methods", _('Methods')] %} {% block title %} - {{_('Method-Builder')}}{% endblock %} {% block head %} {% if current_user.theme in ['cyborg', 'darkly', 'slate', 'superhero'] %} {% endif %} {% endblock %} {% block body %}
{% include 'flash_messages.html' %} {%- set method_setpoint = [] -%} {%- for each_method_line in method_data if each_method_line.method_id == method.id and each_method_line.setpoint_start != None -%} {%- do method_setpoint.append(1) -%} {%- endfor -%} << {{_('Back to Method Management')}}
{{_('Method-Builder')}} ({{method.method_type}} {{_('Method ID')}}: {{method.id}})
{{form_mod_method.csrf_token}} {{form_mod_method.method_id(class_='form-control', value=method.id)}}
{{form_mod_method.name.label(class_='control-label')}}
{{form_mod_method.name(class_='form-control', value=method.name)}}
{{form_mod_method.rename(class_='form-control btn btn-default')}}
{{form_add_method.csrf_token}} {{form_add_method.method_id(class_='form-control', value=method.id)}} {%- if method.method_type == "Duration" -%} {%- set method_repeat = [] -%} {%- for each_method in method_data if each_method.method_id == method.id and not each_method.relay_id and not each_method.duration_sec -%} {%- do method_repeat.append(1) -%} {% endfor %} {% if not method_repeat %} {% include 'pages/method_options/build_duration.html' %} {% endif %} {%- elif method.method_type == "Date" -%} {% include 'pages/method_options/build_duration.html' %} {%- elif method.method_type == "Daily" -%} {% include 'pages/method_options/build_daily.html' %} {%- elif method.method_type == "DailySine" -%} {% include 'pages/method_options/build_daily_sine.html' %} {%- elif method.method_type == "DailyBezier" -%} {% include 'pages/method_options/build_daily_bezier.html' %} {%- endif -%}
{%- if method_setpoint or method.method_type in ["DailySine", "DailyBezier"] -%}
{%- endif -%} {%- if method_setpoint -%}

Setpoint Tracking

{%- for each_method in method_data if each_method.method_id == method.id and not each_method.relay_id -%}
{{form_mod_method.csrf_token}} {{form_mod_method.method_id(class_='form-control', value=method.id)}} {{form_mod_method.method_data_id(class_='form-control', value=each_method.id)}} {% if method.method_type == "Date" -%}
{{form_mod_method.time_start.label(class_='control-label')}}
{{form_mod_method.time_start(class_='form-control', value=each_method.time_start)}}
{{form_mod_method.time_end.label(class_='control-label')}}
{{form_mod_method.time_end(class_='form-control', value=each_method.time_end)}}
{% elif method.method_type == "Daily" -%}
{{form_mod_method.daily_time_start.label(class_='control-label')}}
{{form_mod_method.daily_time_start(class_='form-control', value=each_method.time_start)}}
{{form_mod_method.daily_time_end.label(class_='control-label')}}
{{form_mod_method.daily_time_end(class_='form-control', value=each_method.time_end)}}
{% elif method.method_type == "Duration" and each_method.duration_sec -%}
{{form_mod_method.duration.label(class_='control-label')}}
{{form_mod_method.duration(class_='form-control', value=each_method.duration_sec)}}
{% endif -%} {% if method.method_type == "Duration" and not each_method.duration_sec %}
{{form_mod_method.duration_end.label(class_='control-label')}}
{{form_mod_method.duration_end(class_='form-control', value=each_method.duration_end)}}
{{form_mod_method.save(class_='form-control btn btn-default')}}
{{form_mod_method.Delete(class_='form-control btn btn-default',**{'onclick':'return confirm("Are you sure you want to delete this method line?")'})}}
{% else %}
{{form_mod_method.setpoint_start.label(class_='control-label')}}
{{form_mod_method.setpoint_start(class_='form-control', value=each_method.setpoint_start)}}
{{form_mod_method.setpoint_end.label(class_='control-label')}}
{{form_mod_method.setpoint_end(class_='form-control', value=each_method.setpoint_end)}}
{{form_mod_method.save(class_='form-control btn btn-default')}}
{{form_mod_method.Delete(class_='form-control btn btn-default',**{'onclick':'return confirm("Are you sure you want to delete this method line?")'})}}
{% endif %}
{%- endfor -%}
{%- endif -%} {%- set method_relay = [] -%} {%- for each_method in method_data if each_method.method_id == method.id and each_method.relay_id -%} {%- do method_relay.append(1) -%} {%- endfor -%} {%- if method_relay -%}

{{_('Relay Modulation')}}

{{_('Note: This feature is currently not implemented. These relays will NOT be modulated if applied to a PID. This will be implemented soon.')}}
{%- endif -%} {%- for each_method in method_data if each_method.method_id == method.id and each_method.relay_id -%}
{{form_mod_method.csrf_token}} {{form_mod_method.method_id(class_='form-control', value=method.id)}} {{form_mod_method.method_data_id(class_='form-control', value=each_method.id)}} {% if method.method_type == "Date" -%}
{{form_mod_method.relay_time.label(class_='control-label')}}
{{form_mod_method.relay_time(class_='form-control', value=each_method.time_start)}}
{% elif method.method_type == "Daily" -%}
{{form_mod_method.relay_daily_time.label(class_='control-label')}}
{{form_mod_method.relay_daily_time(class_='form-control', value=each_method.time_start)}}
{% elif method.method_type == "Duration" -%}
{{form_mod_method.duration.label(class_='control-label')}}
{{form_mod_method.duration(class_='form-control', value=each_method.duration_sec)}}
{% endif -%}
{{form_mod_method.relay_id.label(class_='control-label')}}
{{form_mod_method.relay_state.label(class_='control-label')}}
{{form_mod_method.relay_duration.label(class_='control-label')}}
{{form_mod_method.relay_duration(class_='form-control', value=each_method.relay_duration)}}
{{form_mod_method.save(class_='form-control btn btn-default')}}
{{form_mod_method.Delete(class_='form-control btn btn-default',**{'onclick':'return confirm("Are you sure you want to delete this method line?")'})}}
{%- endfor -%}
{% endblock %}