{% extends "layout.html" %} {% set active_page = "method_list" %} {% set help_page = ["https://kizniche.github.io/Mycodo/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" -%} {% include 'pages/method_options/build_duration.html' %} {%- 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' %} {%- elif method.method_type == "Cascade" -%} {% include 'pages/method_options/build_cascade.html' %} {%- endif -%}
{%- if method_setpoint or method.method_type in ["DailySine", "DailyBezier"] -%}
{%- endif -%} {%- if method.method_type == "Cascade" -%}
{{_('Methods invoked to calculate the value of this method')}}:
{%- for each_method in method_data if each_method.method_id == method.unique_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)}}
{%- for linked_method in cascade_method if linked_method.unique_id == each_method.linked_method_id -%}
[{{'%02d' % linked_method.id}}] {{linked_method.name}}
{%- endfor -%}
{{form_mod_method.delete(class_='btn btn-primary')}}
{%- endfor -%} {%- endif -%} {%- if method_setpoint -%}

Setpoint Tracking

{%- for each_method in method_data if each_method.method_id == method.unique_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 -%}
{% endblock %}