first commit

This commit is contained in:
Senad Uka
2017-11-07 09:23:57 +01:00
commit 0eee92660a
356 changed files with 747259 additions and 0 deletions

View File

@@ -0,0 +1,210 @@
{% extends "layout.html.jinja" %}
{% set title = "Helix Calculator" %}
{% block contents %}
{% if not context['csv_available'] %}
<form action="" method="post" enctype="multipart/form-data">
{{ form.csrf_token }}
<div class="form_section">
<h3>Array Information</h3>
<div class="system_data_upload initial_array_upload" id="text_upload_form">
<span class="system_data_title">Option 1: AutoCAD System Text File</span>
<span>A System Data file is needed in order to continue.</span>
{% for field in form.group('array_info') %}
<div class="upload_field button cad_block_upload">
<span class="upload_field_text">
<i class="icon-upload-cloud"></i>
Upload System Text Data
</span>
{{ field }}
</div>
{% endfor %}
<div id="error_container_txt" class="error_container">
{% for field in form.group('array_info') %}
{% if field.errors %}
<span id="error_message_txt" class="error_message centered_error">{{ field.errors[0] }}</span>
{% endif %}
{% endfor %}
</div>
</div>
<div class="system_data_upload initial_array_upload" id="dxf_upload_form">
<span class="system_data_title">Option 2: Aurora DXF File</span>
<span>An Aurora DXF file is needed in order to continue.</span>
{% for field in form.group('dxf_file') %}
<div class="upload_field button">
<span class="upload_field_text">
<i class="icon-upload-cloud"></i>
Upload System DXF
</span>
{{ field }}
</div>
{% endfor %}
<div id="error_container_dxf" class="error_container">
{% for field in form.group('dxf_file') %}
{% if field.errors %}
<span id="error_message_dxf" class="error_message centered_error">{{ field.errors[0] }}</span>
{% endif %}
{% endfor %}
</div>
</div>
</div>
{% include 'navigation_buttons.html.jinja' %}
</form>
{% else %}
<script>
var panel_data = {{ context['panel_array']|tojson|safe }};
var is_dual_tilt = {{ context['system_type']|is_dual_tilt|tojson }};
var buildings_coordinates = {{ context['buildings']|tojson|safe }};
</script>
<div class="form_section">
<h3>Array Information</h3>
<div class="array_information">
<div class="array_summary">
{% for value in context['summary_values'] %}
<div class="summary_item">
<span class="item_title">{{ value['label'] }}</span><br>
<span class="item_body">{{ value['value']|format_number }}</span>
</div>
{% endfor %}
</div>
<form class="system_data_upload change_array_form cad_block_upload" action="" method="post" enctype="multipart/form-data">
{{ form.csrf_token }}
{% for field in form.group('array_info') %}
<div class="upload_field button {{ field.render_kw['row_class'] }}" id="{{ field.id + '_row' }}">
<span class="upload_field_text">
{# <i class="icon-upload-cloud"></i>#}
{{ context['cad_file_name'] }}
</span>
{{ field }}
</div>
{% endfor %}
{% for field in form.group('dxf_file') %}
<div class="upload_field button {{ field.render_kw['row_class'] }}" id="{{ field.id + '_row' }}">
<span class="upload_field_text">
<!--i class="icon-upload-cloud"></i-->
{{ context['dxf_file_name'] }}
</span>
{{ field }}
</div>
{% endfor %}
<div id="error_container_txt" class="error_container">
{% for field in form.group('array_info') %}
{% if field.errors %}
<span class="error_message">{{ field.errors[0] }}</span>
{% endif %}
{% endfor %}
</div>
<div id="error_container_dxf" class="error_container">
{% for field in form.group('dxf_file') %}
{% if field.errors %}
<span class="error_message">{{ field.errors[0] }}</span>
{% endif %}
{% endfor %}
</div>
<input type="submit" class="button" name="submit_button" style="display: none;" value="Upload File">
</form>
<div class="subarray_summary">
<div id="seismic_save" class="hidden">
<div class="left_container">
<div class="circle">!</div>
<span class="seismic_save_message"></span>
</div>
<div class="dismiss_button clickable"><i class="icon-close"></i></div>
</div>
<h4>Subarray Summary</h4>
<table class="summary_table" id="seismic_anchor_table">
<tr>
<th>Subarray</th>
{% for subarray in context['seismic_anchors'] %}
<th>{{ subarray.subarray_number }}</th>
{% endfor %}
</tr>
<tr id="needed_anchors">
<th>Seismic Anchors Needed</th>
{% for subarray in context['seismic_anchors'] %}
<td>{{ subarray.required_seismic_anchors }}</td>
{% endfor %}
</tr>
<tr id="current_anchors">
<th>Seismic Anchors Current</th>
{% for subarray in context['seismic_anchors'] %}
<td>{{ subarray.required_seismic_anchors }}</td>
{% endfor %}
</tr>
<tr id="subarray_weight">
<th>Weight</th>
{% for subarray in context['seismic_anchors'] %}
<td>{{ subarray.weight|round|format_number }}</td>
{% endfor %}
</tr>
</table>
</div>
</div>
</div>
<div class="form_section">
{% if context['is_drawing_inaccurate'] %}
<div class="array_summary_warning"> {{ context['inaccurate_drawing_warning'] }} </div>
{% endif %}
<div class="array_visualization_header">
<div id="overlay_control" class="header_action">
<div id="anchor_overlay" class="overlay_toggle clickable">ANCHORS</div>
<div id="all_overlay" class="overlay_toggle clickable">ALL</div>
</div>
<div id="zoom_control" class="header_action">
<div id="zoom_level">0%</div>
<div class="header_action">
<div class="clickable zoom_button" id="decrease_zoom">-</div>
{% for i in range(7) %}
<div class="clickable zoom_indicator" id="zoom_indicator_{{ i }}"></div>
{% endfor %}
<div class="clickable zoom_button" id="increase_zoom"><i class="icon-plus"></i></div>
</div>
</div>
</div>
<div class="grey_line"></div>
<div class="array_visualization_header" id="seismic_control_section">
<div class="seismic_anchor_control">
<div id="add_seismic" class="seismic_control clickable">
<i class="icon-seismic-anchor"></i>
<span>Add Seismic</span>
</div>
<div id="remove_seismic" class="seismic_control clickable">
<i class="icon-seismic-anchor"></i>
<span>Remove Seismic</span>
</div>
</div>
<div class="seismic_anchor_control">
<div id="save_seismic_changes" class="seismic_control button clickable">Save</div>
<a href="./" class="seismic_control clickable cancel_button">Cancel</a>
</div>
</div>
<canvas id="arrayCanvas" width="850" height="850"></canvas>
<div id="legend_container">
{% if context['system_type']|is_dual_tilt %}
<img style="display: none" class='legend anchors_mode'
src={{ url_for('static', filename='images/sp-helix-legend-dual-anchors.png') }}>
<img style="display: none" class='legend all_mode'
src={{ url_for('static', filename='images/sp-helix-legend-dual-all.png') }}>
{% else %}
<img style="display: none" class='legend anchors_mode'
src={{ url_for('static', filename='images/sp-helix-legend-single-anchors.png') }}>
<img style="display: none" class='legend all_mode'
src={{ url_for('static', filename='images/sp-helix-legend-single-all.png') }}>
{% endif %}
<img class="anchor_colors_legend"
src={{ url_for('static', filename='images/sp-helix-legend-anchor-types.png') }}>
</div>
<a href="{{ url_for('test_dxf') }}">Wind Zone Check</a>
</div>
{% include 'navigation_buttons.html.jinja' %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,6 @@
<div class="form_row checkbox_form_row" id="{{ field.id + '_row' }}">
{{ field }}{{ field.label }}
{% if field.render_kw['link'] %}
<a href="{{ field.render_kw['link']['href'] }}" target="_blank">{{ field.render_kw['link']['text'] }}</a>
{% endif %}
</div>

View File

@@ -0,0 +1,27 @@
{% extends "layout.html.jinja" %}
{% set title = "Helix Calculator" %}
{% block contents %}
<div class="form_section">
<h3>Download</h3>
</div>
{% if context['csv_available'] %}
<div class="download">
<a href="/result">
<button>Download AutoCAD import file (.txt)</button>
</a>
</div>
<div class="download">
<a href="/documentation">
<button>Download Project Report (.pdf)</button>
</a>
</div>
<div class="download">
<a href="/bom">
<button>Download BOM (.txt)</button>
</a>
</div>
{% else %}
Please complete previous steps first!
{% endif %}
{% include "navigation_buttons.html.jinja" %}
{% endblock %}

View File

@@ -0,0 +1,37 @@
<div class="form_section">
<h3>e-BOS</h3>
<div class="ebom_section_content">
<script>
var inverterBrandData = {{ context['inverter_brands']|tojson|safe }};
var powerStationData = {{ context['power_stations']|tojson|safe }};
var standaloneInverterData = {{ context['standalone_inverters']|tojson|safe }};
var supervisorMonitorData = {{ context['power_monitors']|tojson|safe }};
var standaloneInverterStringLimits = {{ context['standalone_inverter_string_limits']|tojson|safe }};
var standaloneInverterStringDefaults = {{ context['standalone_inverter_string_defaults']|tojson|safe }};
</script>
<div class="ebom_section_header">
<div>Inverter Brand</div>
</div>
<form name="inverter_brand_form" action="" method="post" enctype="multipart/form-data">
<div id="inverter_brand_form"
class="form_section ebom_form">
{{ inverter_brand_form.csrf_token }}
{% for field in inverter_brand_form.group('hidden') %}
{{ field }}
{% endfor %}
{% for field in inverter_brand_form.group('inverter_brands') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
</div>
</form>
{% if is_delta %}
{% include 'ebom_form_delta.html.jinja' %}
{% else %}
{% include 'ebom_form_sma.html.jinja' %}
{% endif %}
</div>
</div>

View File

@@ -0,0 +1,118 @@
<div class="ebom_section_header">
<div>Inverters</div>
<div id="add_standalone_inverter" class="clickable add_button">
<i class="icon-plus"></i>Inverter
</div>
</div>
<form name="standalone_inverter_form" action="" method="post" enctype="multipart/form-data">
<div id="standalone_inverter_form"
class="form_section ebom_form {{ 'hidden' if standalone_inverter_form.errors|count == 0 }}">
{{ standalone_inverter_form.csrf_token }}
{% for field in standalone_inverter_form.group('hidden') %}
{{ field }}
{% endfor %}
{% for inverter_field in standalone_inverter_form.group('inverters') %}
{% set quantity = True %}
{% include 'inverter_form_row.html.jinja' %}
{% endfor %}
{% for field in standalone_inverter_form.group('power_station') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
<div class="ebom_subsection submit">
<input type="submit" name="submit_button" class="button" value="Add">
<a class="cancel_button button" href=".">Cancel</a>
<div class="spacer"></div>
<a class="delete_button button hidden" href="">Delete</a>
</div>
</div>
</form>
{% if context['standalone_inverters']|length > 0 %}
<div class="form_section">
<table class="standalone_inverter_table">
<tr>
<th>Model</th>
<th>Attachment Point</th>
<th>Splice<br>Box</th>
<th></th>
</tr>
{% for inverter in context['standalone_inverters'] %}
<tr class="alternating_row_color">
<td>{{ inverter['model'].label }}</td>
<td>{{ inverter['attachment_point'][0] }}</td>
<td><i class="icon-ok {{ 'hidden' if not inverter['splice_box'] }}"></i></td>
<td>
<a href="{{ url_for('delete_standalone_inverter', uuid=inverter['standalone_inverter_id']) }}"
class="trash_can_link">
<i class="icon-trash"></i>
</a>
<i id="edit_{{ inverter['standalone_inverter_id'] }}"
class="icon-pencil clickable"></i>
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class="ebom_form empty_state">
No Inverters have been added yet.
</div>
{% endif %}
<div class="ebom_section_header">
<div>Monitoring</div>
<div id="add_supervisor_monitor" class="clickable add_button">
<i class="icon-plus"></i>Add Monitoring
</div>
</div>
<form name="supervisor_monitor_form" action="" method="post" enctype="multipart/form-data">
<div id="supervisor_monitor_form"
class="form_section ebom_form {{ 'hidden' if supervisor_monitor_form.errors|count == 0 }}">
{{ supervisor_monitor_form.csrf_token }}
{% for field in supervisor_monitor_form.group('hidden') %}
{{ field }}
{% endfor %}
{% for field in supervisor_monitor_form.group('power_source') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
<div class="ebom_subsection submit">
<input type="submit" name="submit_button" class="button" value="Add">
<a class="cancel_button button" href=".">Cancel</a>
<div class="spacer"></div>
<a class="delete_button button hidden" href="">Delete</a>
</div>
</div>
</form>
{% if context['power_monitors']|length > 0 %}
<div class="form_section">
<table class="supervisor_monitor_table">
<tr>
<th>Attachment Point</th>
<th></th>
</tr>
{% for monitor in context['power_monitors'] %}
<tr class="alternating_row_color">
<td>{{ monitor['power_source'][0] }}</td>
<td>
<a href="{{ url_for('delete_supervisor_monitor', uuid=monitor['monitor_id']) }}"
class="trash_can_link">
<i class="icon-trash"></i>
</a>
<i id="edit_{{ monitor['monitor_id'] }}"
class="icon-pencil clickable"></i>
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class="ebom_form empty_state">
No Supervisor Monitors have been added yet.
</div>
{% endif %}

View File

@@ -0,0 +1,209 @@
<div class="ebom_section_header">
<div>Power Stations</div>
<div id="add_new_power_station"
class="clickable add_button">
<i class="icon-plus"></i>Add power station
</div>
</div>
<form name="power_station_form" action="" method="post" enctype="multipart/form-data">
<div id="power_station_form"
class="form_section ebom_form {{ 'hidden' if ebom_form.errors|count == 0 }}">
{{ ebom_form.csrf_token }}
{% for field in ebom_form.group('hidden') %}
{{ field }}
{% endfor %}
{% for field in ebom_form.group('header') %}
{% if field.type == 'BooleanField' %}
{% include 'checkbox_form_row.html.jinja' %}
{% else %}
{% include 'form_row.html.jinja' %}
{% endif %}
{% endfor %}
<div class="ebom_subsection">
{% for field in ebom_form.group('inverter_quantity') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
{% for inverter_field in ebom_form.group('inverters') %}
{% include 'inverter_form_row.html.jinja' %}
{% endfor %}
</div>
<div class="ebom_subsection submit">
<input type="submit" name="submit_button" class="button" value="Add">
<a class="cancel_button button" href=".">Cancel</a>
<div class="spacer"></div>
<a class="delete_button button hidden" href="">Delete</a>
</div>
</div>
</form>
{% if context['power_stations']|length > 0 %}
<div class="form_section">
<table class="power_station_table">
<tr>
<th>Description</th>
<th>Inverters</th>
<th>DC Strings<br> Quantity</th>
<th>Power Station<br> Quantity</th>
<th></th>
</tr>
{% for power_station in context['power_stations'] %}
<tr class="alternating_row_color">
<td>{{ power_station['power_station_description'] }}
{% if power_station_has_monitor(power_station, context['power_monitors']) %}
<br>
<span class="monitoring_tag">Monitoring</span>
{% endif %}
</td>
<td class="narrow_line">
{% for inverter_map in power_station['inverters'] %}
<p>{{ inverter_map['model'].label }}</p>
{% endfor %}
</td>
<td class="centered narrow_line">
{% for inverter_map in power_station['inverters'] %}
<p>{{ inverter_map['strings_per_inverter'] }}</p>
{% endfor %}
</td>
<td class="centered">{{ power_station['power_station_quantity'] }}</td>
<td>
<a href="{{ url_for('delete_power_station', uuid=power_station['power_station_id']) }}"
class="trash_can_link">
<i class="icon-trash"></i>
</a>
<i id="edit_{{ power_station['power_station_id'] }}" class="icon-pencil clickable"></i>
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class="ebom_form empty_state">
<div>No Power Stations have been added yet.</div>
</div>
{% endif %}
<div class="ebom_section_header">
<div>Standalone Inverters</div>
<div id="add_standalone_inverter" class="clickable add_button">
<i class="icon-plus"></i>Add standalone inverter
</div>
</div>
<form name="standalone_inverter_form" action="" method="post" enctype="multipart/form-data">
<div id="standalone_inverter_form"
class="form_section ebom_form {{ 'hidden' if standalone_inverter_form.errors|count == 0 }}">
{{ standalone_inverter_form.csrf_token }}
{% for field in standalone_inverter_form.group('hidden') %}
{{ field }}
{% endfor %}
{% for inverter_field in standalone_inverter_form.group('inverters') %}
{% set quantity = True %}
{% include 'inverter_form_row.html.jinja' %}
{% endfor %}
{% for field in standalone_inverter_form.group('power_station') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
<div class="ebom_subsection submit">
<input type="submit" name="submit_button" class="button" value="Add">
<a class="cancel_button button" href=".">Cancel</a>
<div class="spacer"></div>
<a class="delete_button button hidden" href="">Delete</a>
</div>
</div>
</form>
{% if context['standalone_inverters']|length > 0 %}
<div class="form_section">
<table class="standalone_inverter_table">
<tr>
<th>Model</th>
<th>Attachment Point</th>
<th>DC Strings<br> Quantity</th>
<th>Sun<br>Shade</th>
<th>DC<br>Switch</th>
<th></th>
</tr>
{% for inverter in context['standalone_inverters'] %}
<tr class="alternating_row_color">
<td>{{ inverter['model'].label }}</td>
<td>{{ inverter['attachment_point'][0] }}</td>
<td class="centered">{{ inverter['strings_per_inverter'] }}</td>
<td><i class="icon-ok {{ 'hidden' if not inverter['sunshade'] }}"></i></td>
<td><i class="icon-ok {{ 'hidden' if not inverter['dc_switch'] }}"></i></td>
<td>
<a href="{{ url_for('delete_standalone_inverter', uuid=inverter['standalone_inverter_id']) }}"
class="trash_can_link">
<i class="icon-trash"></i>
</a>
<i id="edit_{{ inverter['standalone_inverter_id'] }}"
class="icon-pencil clickable"></i>
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class="ebom_form empty_state">
No Standalone Inverters have been added yet.
</div>
{% endif %}
<div class="ebom_section_header">
<div>Monitoring</div>
<div id="add_supervisor_monitor" class="clickable add_button">
<i class="icon-plus"></i>Add Monitoring
</div>
</div>
<form name="supervisor_monitor_form" action="" method="post" enctype="multipart/form-data">
<div id="supervisor_monitor_form"
class="form_section ebom_form {{ 'hidden' if supervisor_monitor_form.errors|count == 0 }}">
{{ supervisor_monitor_form.csrf_token }}
{% for field in supervisor_monitor_form.group('hidden') %}
{{ field }}
{% endfor %}
{% for field in supervisor_monitor_form.group('power_source') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
<div class="ebom_subsection submit">
<input type="submit" name="submit_button" class="button" value="Add">
<a class="cancel_button button" href=".">Cancel</a>
<div class="spacer"></div>
<a class="delete_button button hidden" href="">Delete</a>
</div>
</div>
</form>
{% if context['power_monitors']|length > 0 %}
<div class="form_section">
<table class="supervisor_monitor_table">
<tr>
<th>Attachment Point</th>
<th></th>
</tr>
{% for monitor in context['power_monitors'] %}
<tr class="alternating_row_color">
<td>{{ monitor['power_source'][0] }}</td>
<td>
<a href="{{ url_for('delete_supervisor_monitor', uuid=monitor['monitor_id']) }}"
class="trash_can_link">
<i class="icon-trash"></i>
</a>
<i id="edit_{{ monitor['monitor_id'] }}"
class="icon-pencil clickable"></i>
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class="ebom_form empty_state">
No Supervisor Monitors have been added yet.
</div>
{% endif %}

View File

@@ -0,0 +1,49 @@
{% extends "layout.html.jinja" %}
{% set title = "Exposure Categories" %}
{% block contents %}
<dl>
<dt>Exposure B</dt>
<dd>
Surface Roughness B :Urban and suburban areas, wooded areas, or other terrain with numerous closely
spaced obstructions having the size of single-family dwellings or larger.
<br>
For buildings with a mean roof height of less than or equal to 30 ft (9.1 m), Exposure B shall apply
where the ground surface roughness, as defined above, prevails in the upwind direction for a distance
greater than 1,500 ft (457 m). For buildings with a mean roof height greater than 30 ft (9.1 m),
Exposure B shall apply where Surface Roughness B prevails in the upwind direction for a distance greater
than 2,600 ft (792 m) or 20 times the height of the building, whichever is greater.
</dd>
<dt>Exposure C</dt>
<dd>
Surface Roughness C: Open terrain with scattered obstructions having heights generally less than 30 ft
(9.1 m). This category includes flat open country and grasslands.
<br>
Exposure C shall apply for all cases where Exposures B or D do not apply.
</dd>
<dt>Exposure D</dt>
<dd>
Surface Roughness D: Flat, unobstructed areas and water surfaces. This category includes smooth mud flats,
salt flats, and unbroken ice.
<br>
Exposure D shall apply where the ground surface roughness, as defined by Surface Roughness D, prevails
in the upwind direction for a distance greater than 5,000 ft (1,524 m) or 20 times the building height,
whichever is greater. Exposure D shall also apply where the ground surface roughness immediately upwind
of the site is B or C, and the site is within a distance of 600 ft (183 m) or 20 times the building height,
whichever is greater, from an Exposure D condition as defined in the previous sentence.
</dd>
<dt>Exposure B to C</dt>
<dd>
Used to Interpolate between B and C exposures. B to C represents B exposure upwind and C
exposure
at the building. Transition distance is defined as the distance from the building to where exposure category
changes.
</dd>
<dt>Exposure C to B</dt>
<dd>
Used to Interpolate between B and C exposures. C to B represents C exposure upwind and B
exposure
at the building. Transition distance is defined as the distance from the building to where exposure category
changes.
</dd>
</dl>
{% endblock %}

View File

@@ -0,0 +1,17 @@
<div class="form_row {{ field.render_kw['row_class'] }}" id="{{ field.id + '_row' }}">
{{ field.label }}
{% if field.render_kw['tooltip'] %}
<div class="tooltip_container">
<div class="tooltip hidden">{{ field.render_kw['tooltip'] }}</div>
</div>
<i class="icon-info-circled"></i>
{% endif %}
{{ field }}
{% if field.render_kw['link'] %}
<a href="{{ field.render_kw['link']['href'] }}" target="_blank">{{ field.render_kw['link']['text'] }}</a>
{% endif %}
{% if field.errors %}
<span class="error_message">{{ field.errors[0] }}</span>
{% endif %}
</div>

View File

@@ -0,0 +1,34 @@
{% extends "layout.html.jinja" %}
{% set title = "Helix Documentation" %}
{% block contents %}
<div class="documentation">
<h3> Project Information </h3>
<img src="{{ url_for('static', filename='images/sp-helix-doc-header.png') }}"/>
<p>General Information</p>
<p>
<a href="https://sunpower.my.salesforce.com/sfc/#version?selectedDocumentId=06934000001m0pg">Dealers - Helix
User Manual Via Dealer Portal</a>
</p>
<p>
<a href="https://sunpowercorp.sharepoint.com/sites/departments/EPC/FTP/HelixRoof/Shared%20Documents/02-Project%20Design/Design%20Tools%20&%20Templates/User%20Manual,%20Helix%20Calculator.pdf">SunPower
Employees - Helix User Manual</a>
</p>
<p>
<a href="https://sunpower.my.salesforce.com/sfc/#version?selectedDocumentId=06934000001m0q5">Dealers -
Webinar
Demo</a>
</p>
<p>
<a href="https://sunpowercorp.sharepoint.com/sites/departments/EPC/FTP/HelixRoof/Shared%20Documents/02-Project%20Design/Design%20Tools%20&%20Templates/Recorded%20Helix%20Calculator-Designer%20Training-07_29_2016.wmv">SunPower
Employees - Webinar Demo</a>
</p>
<p>
<a href="https://sunpower--c.na29.visual.force.com/apex/PortalPublisher_HelixResources">Helix Resource Page
on the dealer portal.</a>
</p>
<p>
<a href="https://sunpowercorp.sharepoint.com/sites/departments/EPC/FTP/HelixRoof/SitePages/Helix Calculator Support Page.aspx">Helix Resource Page
on sharepoint. (SunPower Employees).</a>
</p>
</div>
{% endblock %}

View File

@@ -0,0 +1,23 @@
<div class="inverter_form_row" id="{{ inverter_field.id + '_row' }}">
<span class="bold_header">{{ inverter_field.label }}</span>
<div class="inverter_inputs_container">
{{ inverter_field.form.csrf_token }}
<div class="required_inverter_fields">
{% if quantity %}
{% set field = inverter_field.form.quantity %}
{% include 'form_row.html.jinja' %}
{% endif %}
{% for field in inverter_field.form.group('non-optional') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
</div>
<div class="optional_inverter_fields">
Optional Components
<div class="checkbox_row">
{% for field in inverter_field.form.group('optional') %}
{% include 'checkbox_form_row.html.jinja' %}
{% endfor %}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,73 @@
<!doctype html>
<html>
<head>
<title>{{ title }}</title>
{% assets 'main_css' %}
<link rel="stylesheet" type="text/css" href="{{ ASSET_URL }}">
{% endassets %}
<link href="//cdn.rawgit.com/noelboss/featherlight/1.7.6/release/featherlight.min.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="https://us.sunpower.com/sites/sunpower/files/favicon.ico">
<link rel="stylesheet" type="text/css" href={{ url_for('static', filename='css/fontello.css') }}>
{% if context['google_analytics_token'] %}
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', '{{ context['google_analytics_token'] }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</head>
<body>
<header>
<div class="group">
<h1>{{ title }}</h1>
<a href="{{ url_for('helix_documentation') }}" class="back button" target="_blank">Documentation</a>
</div>
<img src={{ url_for('static', filename='images/sp_logo.png') }}>
</header>
<div class="content">
<div class="navigation_header">
{% for step_number, step_name, step_link, step_completed in context["steps"] %}
{% if step_completed is not none %}
<div id="step_{{ step_number }}"
class="nav_step {{ 'active' if context['current_step'] == step_number }} {{ 'completed' if step_completed }}">
<div class="step_line">
<div class="line"></div>
<div class="circle">
<i class="icon-ok"></i>
</div>
<div class="line"></div>
</div>
{{ step_name }}
</div>
{% endif %}
{% endfor %}
</div>
{% block contents %}{% endblock %}
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
{% if context['javascripts'] %}
{% for script in context['javascripts'] %}
{% if script.startswith('http') %}
<script type="text/javascript" src={{ script }}></script>
{% else %}
<script type="text/javascript"
src={{ url_for('static', filename='javascripts/' + script + '.js') }}></script>
{% endif %}
{% endfor %}
{% endif %}
</body>
</html>

View File

@@ -0,0 +1,14 @@
<div class="navigation_buttons">
<a class="back button" href="{{ context['steps'][context['current_step'] - 2][2] }}">Back</a>
{% if context['steps']|length > context['current_step'] and not context.get('no_proceed') %}
{% if not form or context['override_form'] %}
<a class="button" href="{{ context['steps'][context['current_step']][2] }}" value="Next">Next</a>
{% else %}
{% if not context['hide_submit'] %}
<input type="submit" class="button" name="submit_button" value="Next">
{% else %}
<input type="submit" class="button" name="submit_button" value="Next" style="display: none;">
{% endif %}
{% endif %}
{% endif %}
</div>

View File

@@ -0,0 +1,6 @@
{% extends "layout.html.jinja" %}
{% set title = "Helix Calculator" %}
{% block contents %}
{% include 'ebom_form.html.jinja' %}
{% include 'navigation_buttons.html.jinja' %}
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends "layout.html.jinja" %}
{% set title = "Helix Calculator" %}
{% block contents %}
<form action="" method="post" enctype="multipart/form-data">
{{ form.csrf_token }}
<div class="form_section">
<h3> Project Information </h3>
{% for field in form.group('project_info') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
</div>
<div class="form_section">
<h3> Site Characterization </h3>
{% for field in form.group('site_info') %}
{% include 'form_row.html.jinja' %}
{% endfor %}
</div>
<div class="submit navigation_buttons">
<input type="submit" class="button" name="submit_button" value="Next">
</div>
</form>
{% endblock %}

View File

@@ -0,0 +1,87 @@
{% extends "layout.html.jinja" %}
{% set title = "Helix Calculator" %}
{% block contents %}
{% if context['site_data_available'] %}
<div class="form_section">
<h3>Summary</h3>
{% for warning in context['warning_messages'] %}
<div class="summary_warning">{{ warning.value }}</div>
{% endfor %}
<table class="summary_table" id="summary_table">
<tr>
<td colspan="2" class="table_meta_headers">OUTPUTS</td>
<td colspan="{{ context['wind_zones']|length }}" class="table_meta_headers">WIND ZONES</td>
</tr>
<tr>
<th>PANEL TYPES</th>
<th>ATTRIBUTES</th>
{% for wind_zone in context['wind_zones'] %}
<th>{{ wind_zone }}</th>
{% endfor %}
</tr>
{% for panel_type in context['summary_table'] %}
{% set td_class = 'table_horizontal_borders' %}
<tr class="alternating_row_color">
<td class="table_horizontal_borders {{ panel_type.snake_case() }}_border" rowspan="3">{{ panel_type.number() }}</td>
<td class="left_text_cell">Ballast Block(s)</td>
{% for id, count in enum(context['summary_table'][panel_type]['ballast blocks']) %}
{% set ballast_block_class = td_class + ' warning' if context['summary_table'][panel_type]['warnings'][id]|length > 0 else td_class %}
<td class="{{ ballast_block_class }}">{{ count }}</td>
{% endfor %}
</tr>
<tr class="alternating_row_color">
<td class="left_text_cell">Wind Anchor(s)</td>
{% for id, count in enum(context['summary_table'][panel_type]['anchors']) %}
{% set anchors_class = td_class + ' warning' if context['summary_table'][panel_type]['warnings'][id]|length > 0 else td_class %}
<td class="{{ anchors_class }}">{{ count }}</td>
{% endfor %}
</tr>
<tr class="alternating_row_color">
<td class="left_text_cell">Pressure (psf)</td>
{% for id, count in enum(context['summary_table'][panel_type]['pressure']) %}
{% set pressure_class = td_class + ' warning' if context['summary_table'][panel_type]['warnings'][id]|length > 0 else td_class %}
<td class="{{ pressure_class }}">{{ count }}</td>
{% endfor %}
</tr>
{% endfor %}
<tr class="alternating_row_color">
<td colspan="2" class="right_border_cell left_text_cell">Minimum Array Size by Zone{{ " (Tents)" if context['system_type']|is_dual_tilt }}</td>
{% for minimum_array_size in context['minimum_array_sizes'] %}
<td class="table_horizontal_borders">{{ minimum_array_size }}</td>
{% endfor %}
</tr>
</table>
<div class="image_container sample_images">
{% if context['system_type']|is_dual_tilt %}
<a href="#" class="image_button back" data-featherlight={{ url_for('static', filename='images/panel_types_dual_tilt@2x.png') }}>Example Dual Tilt Array</a>
<a href="#" class="image_button back" data-featherlight={{ url_for('static', filename='images/wind_zones_dual_tilt@2x.png') }}>Example Wind Zone Diagram</a>
{% else %}
<a href="#" class="image_button back" data-featherlight={{ url_for('static', filename='images/panel_types_single_tilt@2x.png') }}>Example Single Tilt Array</a>
<a href="#" class="image_button back" data-featherlight={{ url_for('static', filename='images/wind_zones_single_tilt_north@2x.png') }}> Example Northern Wind Zones</a>
<a href="#" class="image_button back" data-featherlight={{ url_for('static', filename='images/wind_zones_single_tilt_south@2x.png') }}>Example Southern Wind Zones</a>
{% endif %}
</div>
<h3>Summary Values</h3>
<table class="summary_table" id="summary_values_table">
<tr>
<th>L<sub>B</sub> - Building Scaling Factor (feet)</th>
<th>K<sub>Z</sub> - Site Wind Pressure Factor</th>
<th>q<sub>z</sub> - Site Wind Pressure (psf)</th>
</tr>
<tr>
<td>{{ context['l_b']|format_number }}</td>
<td>{{ context['k_z']|format_number }}</td>
<td>{{ context['q_z']|format_number }}</td>
</tr>
</table>
</div>
{% endif %}
{% include "navigation_buttons.html.jinja" %}
{% endblock %}

View File

@@ -0,0 +1,114 @@
{% if context.get('panels') %}
<p>Color is used to represent different subarrays, not different panels/tents.</p>
<p>The first number on the panel is the panel id</p>
<p>The second number on the panel is the panel type - 1 is corner, 2 is north/south, 3 is east/west, 4 is middle</p>
<p>The third number on the panel is the wind zone it is in - 1 is A, 2 is B, 3 is C, and so on</p>
<p>Areas shaded <span style="color:red">red</span> indicates wind zone A</p>
<p>Areas shaded <span style="color:green">green</span> indicates wind zone B</p>
<p>Areas shaded <span style="color:blue">blue</span> indicates wind zone C</p>
<p>Areas shaded <span style="color:black">black</span> indicates wind zone D</p>
<p>Areas shaded <span style="color:purple">purple</span> indicates wind zone E (Single Tilt only. No color indicates E)</p>
<p>Areas shaded <span style="color:grey">grey</span> indicates wind zone F</p>
<p>Areas shaded <span style="color:hotpink">hotpink</span> indicates wind zone G</p>
<p>Areas shaded <span style="color:yellow">yellow</span> indicates wind zone H</p>
<p>Areas shaded <span style="color:orange">orange</span> indicates wind zone I</p>
<p>Areas shaded <span style="color:forestgreen">forestgreen</span> indicates wind zone J</p>
<p>In Single tilt, no shade indicates wind zone K. In Dual tilt, no shade indicates wind zone E.</p>
<p>The current L_B is {{ context['l_b']|format_number }} inches</p>
{% if context['buildings']|length == 0 %}
<p>Unable to perform wind zone analysis - no building edges provided.</p>
{% endif %}
<svg width="{{ context['size'][0] }}" height="{{ context['size'][1] }}">
{% for building in context['buildings'] %}
<polygon fill="white" stroke="blue" points="{{ building.svg_points(context['size']) }}"></polygon>
{% endfor %}
{% for idx in range(context['modules']|length) %}
<polygon fill="{{ context['colors'][(context['panels'][idx].subarray - 1) % (context['colors']|length)] }}" stroke="black" points="{{ context['modules'][idx].svg_points(context['size']) }}"></polygon>
<text text-anchor="middle" x="{{ context['panels'][idx].coordinate.x }}" y="{{ context['size'][1] - context['panels'][idx].coordinate.y }}">{{ context['panels'][idx].id }} - {{ context['panels'][idx].panel_type.number() }} - {{ context['panels'][idx].wind_zone }}</text>
{% endfor %}
{% for polygon in context['lb_polygons'] %}
<polygon fill="{{ polygon.color }}" stroke="{{ polygon.color }}" fill-opacity="0.5" points="{{ polygon.svg_points(context['size']) }}"></polygon>
{% endfor %}
</svg>
<p>
<h1>Panels</h1>
<table border="1px solid black">
<tr>
<th>Subarray</th>
<th>id</th>
<th>Panel Type</th>
<th>Wind Zone</th>
<th>orig-x</th>
<th>orig-y</th>
<th>orig-rotation</th>
<th>x</th>
<th>y</th>
<th>rotation</th>
</tr>
{% for panel in context['panels'] %}
<tr>
<td>{{ panel.subarray }}</td>
<td>{{ panel.id }}</td>
<td>{{ panel.panel_type }}</td>
<td>{{ panel.wind_zone }}</td>
<td>{{ panel.original_coordinate.x }}</td>
<td>{{ panel.original_coordinate.y }}</td>
<td>{{ panel.original_coordinate.rotation }}</td>
<td>{{ panel.coordinate.x }}</td>
<td>{{ panel.coordinate.y }}</td>
<td>{{ panel.coordinate.rotation }}</td>
</tr>
{% endfor %}
</table>
</p>
<!--
{% for panel in context['panels'] %}Panel(subarray={{panel.subarray}}, id={{panel.id}}, panel_type={{panel.panel_type}}, wind_zone={{panel.wind_zone}}, fuzzy_wind_zone={{panel.fuzzy_wind_zone}}, original_coordinate=Coordinate({{panel.original_coordinate.x}}, {{panel.original_coordinate.y}}, {{panel.original_coordinate.rotation}}), coordinate=Coordinate({{panel.coordinate.x}}, {{panel.coordinate.y}}, {{panel.coordinate.rotation}})),
{% endfor %}
{% for subarray in context['subarrays'] %}Subarray(subarray_number={{subarray.subarray_number}}, size={{subarray.size}}, start_row={{subarray.start_row}}),
{% endfor %}
-->
<p>
<h1>Subarrays</h1>
<table>
{% for subarray in context['subarrays'] %}
<tr>
<th>Number</th>
<th>Size</th>
</tr>
<tr>
<td>{{ subarray.subarray_number }}</td>
<td>{{ subarray.size }}</td>
</tr>
{% endfor %}
</table>
</p>
<hr />
{% endif %}
<p>Test DXF upload visualization</p>
<p>Upload your aurora dxf file, click next and we will process it and show you a visualization</p>
<p>This uses the values set in <a href="{{ url_for('site_characterization') }}">site characterization</a> for system/module type information</p>
<form action="" method="post" enctype="multipart/form-data">
{{ form.csrf_token }}
<div class="form_section">
<h3>Array Information</h3>
<div class="system_data_upload">
<span class="system_data_title">System Data File</span>
<span>A System Data file is needed in order to continue.</span>
{% for field in form.group('array_info') %}
<div class="upload_field button">
<span class="upload_field_text">
{{ field.name }}
</span>
{{ field }}
{% if field.errors %}
<span class="error_message">{{ field.errors[0] }}</span>
{% endif %}
</div>
{% endfor %}
<input type="submit" class="button" name="submit_button" value="Upload">
</div>
</div>
</form>