Skip to content

Commit

Permalink
Update resilientCommunity.html
Browse files Browse the repository at this point in the history
current html version
  • Loading branch information
DavidArmahJr authored May 3, 2024
1 parent 6bb2608 commit ec794e2
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions omf/models/resilientCommunity.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<form name="inputForm" action="/runModel/" onsubmit="event.preventDefault(); return isFormValid();" method="post">
<!-- Required Inputs -->
<div class="shortInput">
<label>Model Type <a href="https://github.com/dpinney/omf/wiki/Models:-socialBurden" target="blank">Help?</a></label>
<label>Model Type <a href="https://github.com/dpinney/omf/wiki/Models-~-resilientCommunity" target="blank">Help?</a></label>
<input type="text" id="modelType" name="modelType" value="{{modelName}}" readonly/>
</div>
<div class="shortInput">
Expand Down Expand Up @@ -63,13 +63,6 @@
</select>
</div>
<div class="shortInput">
<label> Buses</label>
<select name="buses" id="buses">
<option value="yes" {% if allInputDataDict.buses | lower == "yes" %}selected{% endif %}>Yes</option>
<option value="no" {% if allInputDataDict.buses | lower != "yes" %}selected{% endif %}>No</option>
</select>
</div>
<div class="shortInput">
<label>Fuses</label>
<select name="fuses" id="fuses">
<option value="yes" {% if allInputDataDict.fuses | lower == "yes" %}selected{% endif %}>Yes</option>
Expand Down Expand Up @@ -117,30 +110,16 @@
var mapContent = allOutputData["resilienceMap"]
var iframe = document.createElement('iframe');
iframe.style = 'width:1000px; height:800px; border-radius:8px;'
document.getElementById('resilienceMap').innerHTML = '<div class="img-div" style="position:relative;left:0;bottom:-800px;"><img style="position:relative" src="{{allOutputDataDict["legend_path"]}}""></div>';
//document.getElementById('resilienceMap').innerHTML = '<div class="img-div" style="position:relative;left:0;bottom:-800px;"><img style="position:relative" src="{{allOutputDataDict["legend_path"]}}"></div>';
//document.getElementById('resilienceMap').innerHTML = '<ul class="legend" style="position:relative;left:0;bottom:-800px;"> <li style="float: left; margin-right: 10px;"><span class="veryhigh" style="background-color: #ff00ff;"></span>Very High</li><li><span class="relativelyhigh" style="background-color: #00ffff;""></span> Relatively High</li><li><span class="relativelymoderate" style="background-color: #0000ff;"></span> Relatively Moderate</li><li><span class="relativelylow" style="background-color: #000000;"></span> Relatively Low</li><li><span class="verylow"></span> Very Low</li><li><span class="dataunavailable"></span> Data Unavailable</li></ul>'
document.getElementById('resilienceMap').innerHTML = "<div class='my-legend' style='position:relative;left:0;bottom:-800px;'><div class='legend-title' style='position:relative'>Social Vulnerability Legend</div> <div class='legend-scale'> <ul class='legend-labels'> <li><span style='background:#0000FF;'></span>Very High</li> <li><span style='background:#ADD8E6;'></span>Rel. High</li> <li><span style='background:#90EE90;'></span>Rel. Moderate</li> <li><span style='background:#FFFF00;'></span>Rel. Low</li> <li><span style='background:#808080;'></span>Very Low</li> <li><span style='background:#000000;'></span>Data Unavailable </li> </ul> </div> <style type='text/css'> .my-legend .legend-title { text-align: left; margin-bottom: 8px; font-weight: bold; font-size: 90%; } .my-legend .legend-scale ul { margin: 0; padding: 0; float: left; list-style: none; } .my-legend .legend-scale ul li { display: block; float: left; width: 50px; margin-bottom: 6px; text-align: center; font-size: 70%; list-style: none; } .my-legend ul.legend-labels li span { display: block; float: left; height: 15px; width: 50px; } .my-legend .legend-source { font-size: 70%; color: #999; clear: both; } .my-legend a { color: #777; } </style> "
document.getElementById('resilienceMap').appendChild(iframe);
iframe.contentWindow.document.open();
iframe.contentWindow.document.write(mapContent);
iframe.contentWindow.document.close();
</script>
</div>
<p class="reportTitle">Loads Data Table</p>
<div id="traditionalLoadsTable" class="tightContent" style="height:300px; overflow-y: scroll;">
<table style="width:100%">
<tr>
{% for header in allOutputDataDict["loadTableHeadings"] %}
<th>{{ header }}</th>
{% endfor %}
</tr>
{% for values in allOutputDataDict["loadTableValues"] %}
<tr>
{% for val in values %}
<td>{{ val }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
</div>


<p class="reportTitle">Objects Data Table</p>
<div id="traditionalObjectsTable" class="tightContent" style="height:300px; overflow-y: scroll;">
Expand Down

0 comments on commit ec794e2

Please sign in to comment.