Commit 2b83094a by Corey Koval

AOI/AOE Selection fully functional.

parent d8f660bf
...@@ -4,4 +4,4 @@ numpy>=1.13.3 ...@@ -4,4 +4,4 @@ numpy>=1.13.3
lxml>=4.2.1 lxml>=4.2.1
czml3>=0.5.4 czml3>=0.5.4
scikit_learn>=0.23.2 scikit_learn>=0.23.2
Paste>=3.5.0 Paste>=3.2.0
...@@ -73,6 +73,16 @@ add_aoi.onchange = function() { ...@@ -73,6 +73,16 @@ add_aoi.onchange = function() {
clearHover(); clearHover();
} }
} }
var run_aoi_rules = document.getElementById("run_aoi_rules"); //Button to add new RX
run_aoi_rules.onchange = function() {
if (run_aoi_rules.checked) {
var user_conf = confirm("Did you define every AOI first?\n\
You are about to delete every intersection outside of the currently defined AOIs.\
This cannot be undone! When in doubt, backup your database.");
if (user_conf) {runAoi()};
run_aoi_rules.checked = false;
}
}
var exclusion_br = document.createElement("br"); var exclusion_br = document.createElement("br");
var exclusion_latlabel = document.createTextNode("Lat:"); var exclusion_latlabel = document.createTextNode("Lat:");
......
...@@ -80,6 +80,19 @@ function purgeAoi(uid) { ...@@ -80,6 +80,19 @@ function purgeAoi(uid) {
}) })
} }
// *******************************************
// * Runs all AOI rules on the backend and Reloads Map
// *******************************************
function runAoi(uid) {
clearOld();
fetch("/run_all_aoi_rules")
.then(res => {
// removerx(uid);
loadAoi(createAois);
loadAllCzml();
})
}
// ***************************************** // *****************************************
// * Removes ALL of the RX Cards // * Removes ALL of the RX Cards
// ***************************************** // *****************************************
......
...@@ -158,6 +158,14 @@ body { ...@@ -158,6 +158,14 @@ body {
font-size: 23pt; font-size: 23pt;
} }
.aoi-rule-icon {
display: block;
position: absolute;
top: 0px;
right: 7px;
font-size: 23pt;
}
.delete-icon { .delete-icon {
display: block; display: block;
position: absolute; position: absolute;
......
...@@ -252,9 +252,12 @@ ...@@ -252,9 +252,12 @@
<hr> <hr>
<div id="aoicards" class="menusections"> <div id="aoicards" class="menusections">
<h2 style="color: #eee; padding-left: 5px;">Areas of Interest</h2> <h2 style="color: #eee; padding-left: 5px;">Areas of Interest</h2>
<p> This does nothing right now. </p>
<input id="add_aoi" class="edit-checkbox add-icon" type="checkbox" style="width: 23px; height: 23px;"/> <input id="add_aoi" class="edit-checkbox add-icon" type="checkbox" style="width: 23px; height: 23px;"/>
<span id="add_aoi_icon" class="material-icons add-icon no-select">add_circle_outline</span> <span id="add_aoi_icon" class="material-icons add-icon no-select">add_circle_outline</span>
<input id="run_aoi_rules" class="edit-checkbox aoi-rule-icon" type="checkbox"
title="Apply All AOI Rules. Do not click this before defining all off your AOIs.
It will permanently delete intersections!" style="width: 23px; height: 23px;"/>
<span id="run_aoi_icon" class="material-icons aoi-rule-icon no-select">rule</span>
<div style="visibility: hidden; height: 0;" id="new_aoi_div" style="padding: 0;"> <div style="visibility: hidden; height: 0;" id="new_aoi_div" style="padding: 0;">
<span id="new-aoi"></span> <span id="new-aoi"></span>
</div> </div>
...@@ -262,7 +265,6 @@ ...@@ -262,7 +265,6 @@
<hr> <hr>
<div id="exclusioncards" class="menusections"> <div id="exclusioncards" class="menusections">
<h2 style="color: #eee; padding-left: 5px;">Exclusion Areas</h2> <h2 style="color: #eee; padding-left: 5px;">Exclusion Areas</h2>
<p> This does nothing right now. </p>
<input id="add_exclusion" class="edit-checkbox add-icon" type="checkbox" style="width: 23px; height: 23px;"/> <input id="add_exclusion" class="edit-checkbox add-icon" type="checkbox" style="width: 23px; height: 23px;"/>
<span id="add_exclusion_icon" class="material-icons add-icon no-select">add_circle_outline</span> <span id="add_exclusion_icon" class="material-icons add-icon no-select">add_circle_outline</span>
<div style="visibility: hidden; height: 0;" id="new_exclusion_div" style="padding: 0;"> <div style="visibility: hidden; height: 0;" id="new_exclusion_div" style="padding: 0;">
...@@ -307,7 +309,7 @@ ...@@ -307,7 +309,7 @@
Maximum distance between neighboring points in a cluster. Set to 0 to disable clustering.<br> Maximum distance between neighboring points in a cluster. Set to 0 to disable clustering.<br>
Disabling clustering will plot all intersections and may cause longer load times.</span> Disabling clustering will plot all intersections and may cause longer load times.</span>
<span class="slidespan"> <span class="slidespan">
<input name="epsilonValue" type="range" min="0" max="1" step="0.01" value="{{epsilon}}" class="slider" id="epsilonRange"> <input name="epsilonValue" type="range" min="0" max="2" step="0.01" value="{{epsilon}}" class="slider" id="epsilonRange">
</span> </span>
<span class="slidevalue" id="epsilon"></span> <span class="slidevalue" id="epsilon"></span>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment