{% extends "layout.html" %} {% set active_page = "method_list" %} {% set help_page = ["methods", dict_translation['method']['title']] %} {% block title %} - {{dict_translation['method']['title']}}{% endblock %} {% block head %} {% if current_user.theme in dark_themes %} {% 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.unique_id and each_method_line.setpoint_start != None -%} {%- do method_setpoint.append(1) -%} {%- endfor -%} << {{_('Back to Method Management')}}
{{dict_translation['method']['title']}}: [{{method.unique_id}}] {{method.method_type}}
{{form_mod_method.csrf_token}} {{form_mod_method.method_id(class_='form-control', value=method.unique_id)}}
{{form_mod_method.name.label(class_='control-label')}}
{{form_mod_method.name(class_='form-control', value=method.name, **{'title': dict_translation['name']['phrase']})}}
{{form_mod_method.rename(class_='btn btn-primary')}}
{{form_add_method.csrf_token}} {{form_add_method.method_id(class_='form-control', value=method.unique_id)}} {%- if method.method_type == "Duration" -%} {%- set method_repeat = [] -%} {%- for each_method in method_data if each_method.method_id == method.unique_id and not each_method.output_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_date.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.unique_id and not each_method.output_id -%}
{{form_mod_method.csrf_token}} {{form_mod_method.method_id(class_='form-control', value=method.unique_id)}} {{form_mod_method.method_data_id(class_='form-control', value=each_method.unique_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-primary')}}
{{form_mod_method.delete(class_='btn btn-primary',**{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
{% 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-primary')}}
{{form_mod_method.delete(class_='btn btn-primary',**{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
{% endif %}
{%- endfor -%}
{%- endif -%} {%- set method_output = [] -%} {%- for each_method in method_data if each_method.method_id == method.unique_id and each_method.output_id -%} {%- do method_output.append(1) -%} {%- endfor -%} {%- if method_output -%}

{{_('Output Modulation')}}

{{_('Note: This feature is currently not implemented. These outputs 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.unique_id and each_method.output_id -%}
{{form_mod_method.csrf_token}} {{form_mod_method.method_id(class_='form-control', value=method.unique_id)}} {{form_mod_method.method_data_id(class_='form-control', value=each_method.unique_id)}}
{% if method.method_type == "Date" -%}
{{form_mod_method.output_time.label(class_='control-label')}}
{{form_mod_method.output_time(class_='form-control', value=each_method.time_start)}}
{% elif method.method_type == "Daily" -%}
{{form_mod_method.output_daily_time.label(class_='control-label')}}
{{form_mod_method.output_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.output_id.label(class_='control-label')}}
{{form_mod_method.output_state.label(class_='control-label')}}
{{form_mod_method.output_duration.label(class_='control-label')}}
{{form_mod_method.output_duration(class_='form-control', value=each_method.output_duration)}}
{{form_mod_method.save(class_='form-control btn btn-primary')}}
{{form_mod_method.delete(class_='btn btn-primary',**{'onclick':'return confirm("Are you sure you want to delete this?")'})}}
{%- endfor -%}
{% endblock %}