Create separate page for audio features

An additional page where the user will be directed after logging in was
created. A link to the audio features display page was added to the
aforementioned page. Changes were made to the audio features graphing
function so that the categories are displayed in ascending order (was
random before).
This commit is contained in:
Chris Shyi
2018-06-25 21:39:39 -04:00
parent df36f07080
commit bdc88b5bdb
5 changed files with 40 additions and 40 deletions

View File

@@ -1,26 +0,0 @@
/**
* Retrieves data for a specific audio feature for a certain user
* @param audioFeature: the audio feature for which data will be retrieved
* @param clientSecret: the client secret, needed for security
* @param chartElement: the SVG element in which the data will be plotted
*/
function plotAudioFeatureData(audioFeature, userSecret, chartElement) {
let httpRequest = new XMLHttpRequest();
/*
* Handler for the response
*/
httpRequest.onreadystatechange = function() {
if (httpRequest.readyState === XMLHttpRequest.DONE) {
if (httpRequest.status === 200) {
let responseData = JSON.parse(httpRequest.responseText);
} else {
alert("There was a problem with the login request, please try again!");
}
}
};
let queryString = `/audio_features/${audioFeature}/${userSecret}`;
httpRequest.open('GET', queryString, true);
httpRequest.send();
}