Loading web/index.html +4 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ <div id="top_algorithm"> <p>Algorithm currently in use: </p><p name="algorithmInUse"></p> <br> <table class="table table-bordered table-hover" style="width: 25%;"> <table class="table table-bordered table-hover" style="width: 50%;"> <thead class="thead-dark"> <tr> <th>Algorithm Name</th> Loading Loading @@ -92,5 +92,8 @@ <!-- Latest compiled JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> <!-- Visualization import --> <script src="https://code.highcharts.com/highcharts.js"></script> <!-- ML Script --> <script src="js/main.js"></script> No newline at end of file web/js/main.js +30 −0 Original line number Diff line number Diff line document.addEventListener('DOMContentLoaded', loadGraphs()) // todo fix this to actually send the message data function getPrediction() { var url = "http://localhost:8080" Loading Loading @@ -28,6 +30,8 @@ function getPrediction() { // todo fix this to actually send the message data function correctPrediction(correctLabel) { // debug var message = document.getElementById('message').value; console.log(message + " is " + correctLabel); Loading Loading @@ -144,3 +148,29 @@ function initializeIndex() { function clearIndex() { document.getElementById("message").value = ""; } function loadGraphs(){ var myChart = Highcharts.chart('other_visualizations', { chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3] }] }); } No newline at end of file Loading
web/index.html +4 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ <div id="top_algorithm"> <p>Algorithm currently in use: </p><p name="algorithmInUse"></p> <br> <table class="table table-bordered table-hover" style="width: 25%;"> <table class="table table-bordered table-hover" style="width: 50%;"> <thead class="thead-dark"> <tr> <th>Algorithm Name</th> Loading Loading @@ -92,5 +92,8 @@ <!-- Latest compiled JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> <!-- Visualization import --> <script src="https://code.highcharts.com/highcharts.js"></script> <!-- ML Script --> <script src="js/main.js"></script> No newline at end of file
web/js/main.js +30 −0 Original line number Diff line number Diff line document.addEventListener('DOMContentLoaded', loadGraphs()) // todo fix this to actually send the message data function getPrediction() { var url = "http://localhost:8080" Loading Loading @@ -28,6 +30,8 @@ function getPrediction() { // todo fix this to actually send the message data function correctPrediction(correctLabel) { // debug var message = document.getElementById('message').value; console.log(message + " is " + correctLabel); Loading Loading @@ -144,3 +148,29 @@ function initializeIndex() { function clearIndex() { document.getElementById("message").value = ""; } function loadGraphs(){ var myChart = Highcharts.chart('other_visualizations', { chart: { type: 'bar' }, title: { text: 'Fruit Consumption' }, xAxis: { categories: ['Apples', 'Bananas', 'Oranges'] }, yAxis: { title: { text: 'Fruit eaten' } }, series: [{ name: 'Jane', data: [1, 0, 4] }, { name: 'John', data: [5, 7, 3] }] }); } No newline at end of file