Skip to content
Snippets Groups Projects
Commit ac65675b authored by Mitchell Moore's avatar Mitchell Moore
Browse files

Fix variable convention

parent e722ae02
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,8 @@ function displayloading() { ...@@ -16,8 +16,8 @@ function displayloading() {
" <div class=\"joyride-modal-bg\" style=\"display: block;\"></div>" " <div class=\"joyride-modal-bg\" style=\"display: block;\"></div>"
} }
function socketIO() { function request_account() {
socket.emit('user data', { socket.emit('request account', {
fullname: document.getElementById("fullname").value, fullname: document.getElementById("fullname").value,
reason: document.getElementById("reason").value, reason: document.getElementById("reason").value,
username: document.getElementById("username").innerText username: document.getElementById("username").innerText
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<input class="form-control" id="fullname" name="fullname" placeholder="Enter Full Name" required="" type="text"> <input class="form-control" id="fullname" name="fullname" placeholder="Enter Full Name" required="" type="text">
<label><b><label for="reason">Reason for Requesting Account: </label><br></b></label> <label><b><label for="reason">Reason for Requesting Account: </label><br></b></label>
<textarea class="form-control" id="reason" name="reason" placeholder="Enter Reason for Account Request" required=""></textarea> <textarea class="form-control" id="reason" name="reason" placeholder="Enter Reason for Account Request" required=""></textarea>
<input class="btn btn-primary btn-block" id="submit" name="submit" type="button" value="Submit" onclick="socketIO()"> <input class="btn btn-primary btn-block" id="submit" name="submit" type="button" value="Submit" onclick="request_account()">
<div> <div>
<strong id="error" style="color: #be051b; text-align: center;"></strong> <strong id="error" style="color: #be051b; text-align: center;"></strong>
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import os import os
import time import time
import subprocess
import pika import pika
from flask_socketio import SocketIO from flask_socketio import SocketIO
...@@ -49,7 +50,6 @@ def create_account(username, fullname, reason): ...@@ -49,7 +50,6 @@ def create_account(username, fullname, reason):
def account_confirmation(username): def account_confirmation(username):
# Todo: Code to create a consumer based on the username goes here # Todo: Code to create a consumer based on the username goes here
# Todo: Goal is to have it listening for confirmation. # Todo: Goal is to have it listening for confirmation.
time.sleep(5)
return True return True
...@@ -59,7 +59,7 @@ def handle_my_custom_event(json, methods=['GET', 'POST']): ...@@ -59,7 +59,7 @@ def handle_my_custom_event(json, methods=['GET', 'POST']):
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' connected.') print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' connected.')
@socketio.on('user data') @socketio.on('request account')
def ingest_data(json, methods=['GET', 'POST']): def ingest_data(json, methods=['GET', 'POST']):
print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json)) print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment