Commit 0fb57db6 authored by Krish Moodbidri's avatar Krish Moodbidri
Browse files

Merge branch 'feat-ui-changes' into 'master'

made UI changes to the app

See merge request !8
parents 4c1b15c7 4344d562
......@@ -3,17 +3,17 @@
# local imports
from __future__ import print_function
import vars
import messages
# third-party imports
import uuid
from flask import Flask, redirect, url_for, request, render_template, flash, session
from flask import Flask, redirect, url_for, request, render_template, flash, session, send_from_directory
from flask_bootstrap import Bootstrap
import random
import os
import json
def create_app(config_name):
app = Flask(__name__) # initialization of the flask app
app = Flask(__name__, static_folder='static') # initialization of the flask app
Bootstrap(app) # allowing app to use bootstrap
def get_authorized_user():
......@@ -49,7 +49,14 @@ def create_app(config_name):
return render_template('auth/SignUp.html', room_id=session['uid'],
username=session['user'].get('username'),
fullname=session['user'].get('fullname'), email=session['user'].get('email'),
referrer=session['return_url'], cancel_url=vars.default_referrer)
referrer=session['return_url'], cancel_url=vars.default_referrer,
welcome_msg=messages.welcome_message,
cancel_msg=messages.cancel_message,
error_msg=messages.error_message)
@app.route('/error_account')
def error_account_create():
return render_template('errors/error.html', title='account creation failed')
# misc page error catching
......
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 157"><title>Supercomputer-logo</title><image width="300" height="157" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACdCAYAAAAOnEURAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4Xu2dfZAc5X3nP30VUi5cLq3FH7hipzQDzYtUEG2dkxMkddHgEUYrMFoW+0hAghUmxkQmWtspRK441OJyPsSVzRKCMQ6GXRAYAizLmwSJxsziM0h3RxXCLgmRQTtbVlLHH8hsuaxLna76uT+epzW9vd1Pd8/0zHbvPp8qaWbneeaZ7v49z/d5nt/zZgkhMCwe/t2OjX1C0O+6Fq4A1wUhLN69+/l63HcNhrxjGcEqPn/0n68sCWENuy6DrmC1EBAULFeAEBx0XcZcYY0d+e7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4m7Vk3+8cpPpqdCBUklWEVCJ1gGQ1qiBMvQW2K7hAaDwZAXjGAZDIbCYATLYDAUBiNYBoOhMBjBMhgMhcEIlsFgKAyLdlqDwWBYfJgWlsFgKAxGsAwGQ2EwgmUwGArD/weo98DC2yYdnQAAAABJRU5ErkJggg=="/></svg>
\ No newline at end of file
function displayloading() {
$('#myModal').modal('show');
function displayloading1() {
$('#overlayModal').modal('show');
}
function displayloading2() {
$('#overlayModal').modal('hide');
$('#myModal2').modal('show');
}
function request_account() {
......@@ -11,27 +16,31 @@ function request_account() {
})
}
function refresh() {
document.location.reload(true);
function renderDom(title, message, error_msg) {
document.getElementById("form-wrapper").innerHTML = "<h3>" + title + "</h3><br>";
document.getElementById("form-wrapper").innerHTML += "<p>" + message + "</p><br>";
if (error_msg !== null ) {
var error_button = document.createElement("BUTTON");
error_button.innerHTML = 'Read Error Message';
document.getElementById("form-wrapper").appendChild(error_button);
error_button.onclick = function(){document.getElementById("form-wrapper").innerHTML += "<br>" +error_msg}
}
}
function autofill_form(username, fullname, email) {
let username_input = document.getElementById("username");
let fullname_input = document.getElementById("fullname");
let email_input = document.getElementById("email");
if ((username.localeCompare("None")) !== 0) {
username_input.value = username;
username_input.disabled = "true";
}
if ((fullname.localeCompare("None")) !== 0) {
fullname_input.value = fullname;
fullname_input.disabled = "true";
}
if ((email.localeCompare("None")) !== 0) {
email_input.value = email;
email_input.disabled = "true";
}
let username_input = document.getElementById("username");
let fullname_input = document.getElementById("fullname");
let email_input = document.getElementById("email");
if ((username.localeCompare("None")) !== 0) {
username_input.value = username;
username_input.disabled = "true";
}
if ((fullname.localeCompare("None")) !== 0) {
fullname_input.value = fullname;
fullname_input.disabled = "true";
}
if ((email.localeCompare("None")) !== 0) {
email_input.value = email;
email_input.disabled = "true";
}
}
......@@ -17,36 +17,34 @@
});
socket.on( 'creating account', function( msg ) {
document.getElementById("error").innerText = "";
displayloading();
displayloading2();
});
socket.on( 'account ready', function( msg ) {
$('#myModal').modal('hide');
$('#myModal2').modal('hide');
window.location.replace('{{ referrer }}');
});
socket.on( 'Account creation failed', function( msg ) {
document.getElementById("error").innerText = "Registration Failed. Please try again.";
socket.on( 'account error', function( msg ) {
console.log(msg);
$('#myModal2').modal('hide');
renderDom("Account Create Error", "{{ error_msg }}", msg);
});
});
</script>
<style type="text/css">
.important { color: #336699; }
</style>
<link rel="shortcut icon" type="image/x-icon" href="/public/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="/public/favicon.ico">
<link rel="stylesheet" media="all" href="{{ url_for('static', filename='style/application.css') }}">
<link rel="stylesheet" media="all" href="{{ url_for('static', filename='style/app2.css') }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.navbar-inverse {
background-color: rgb(0,99,65);
}
.navbar-inverse { background-color: rgb(0,99,65); }
button{ margin: 13px;
.important { color: #336699; }}
</style>
</head>
......@@ -55,91 +53,99 @@
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="/">Research Computing</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-9" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<a class="navbar-brand" href="/"> UAB Research Computing</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-9">
<ul class="nav navbar-nav">
</ul>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li>
<a target="_blank" href="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted">
<i class="fas fa-info-circle fa-fw"></i> Online Documentation
</a></li>
<li>
</li></ul>
</div>
<div class="navbar-right">
<ul class="nav navbar-nav">
<li>
<a target="_blank" href="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted">
<i class="fas fa-info-circle fa-fw"></i> Online Documentation
</a>
</li>
</ul>
</div>
</div>
</div>
</nav>
</header>
<div class="container content" role="main" style="width: 625px">
<div style="position:relative;">
<img alt="logo" height="auto" width="100%" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/cheaha-logo-a605de0aecd3006b82a5ee30a6d0cb8cd9bf8b7e836296cc293eac746a4c2b11.png') }}">
<a href="https://tinyurl.com/cheahaAL" target="_blank">
<div style="float:left;position:absolute;display:block;left:310px;top:-6px;padding:10px 20px;"> </div>
</a>
</div>
<!-- <h2>Hello, <span id="username">{{ user }}</span>!</h2> -->
<h2>Hi, </h2>
<div id="user-input">
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
<div class="form-group">
<label for="username" class="control-label">Blazer Id:</label>&#9;<input id="username" class="form-control"
placeholder="Enter Username" required><br>
</div>
<div class="form-group">
<label for="fullname" class="control-label">Full Name:</label>&#9;<input id="fullname" class="form-control"
placeholder="Enter Full Name" required><br>
</div>
<div class="form-group">
<label for="email" class="control-label">Email:</label>&#9;<input id="email" class="form-control"
placeholder="Enter Email" required><br>
</div>
<div class="form-group">
<label for="reason" class="control-label">Reason for Requesting Account:</label><br>
<div class="container content" role="main" style="width: 100%">
<div class="col-md-2 col-sm-2 my-col">
<img alt="logo" height="auto" width="80%" src="{{ url_for('static', filename='img/logo_svg.svg') }}">
<a href="https://tinyurl.com/cheahaAL" target="_blank"></a>
</div>
<div class="col-md-10 col-sm-10 my-col">
<div id="form-wrapper">
<h2> Self Registration Form </h2>
<p style="font-size:110%;"> {{ welcome_msg |safe }}</p>
<div id="user-input">
<form id="signup" data-toggle="validator" role="form" action="." method="post" onsubmit="">
<div class="col-md-7 col-sm-7 my-col">
<label for="username" class="control-label">Blazer Id:</label>&#9;<input id="username" class="form-control" placeholder="Enter Username" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="fullname" class="control-label">Full Name:</label>&#9;<input id="fullname" class="form-control" placeholder="Enter Full Name" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="email" class="control-label">Email:</label>&#9;<input id="email" class="form-control" placeholder="Enter Email" required><br>
</div>
<div class="col-md-7 col-sm-7 my-col">
<label for="reason" class="control-label">Reason for Requesting Account:</label><br>
<textarea class="form-control" id="reason" name="reason" placeholder="Enter Reason for Account Request" required></textarea>
</div>
<input class="btn btn-primary btn-block" id="submit" name="submit" type="button" value="Submit" onclick="request_account()">
<div>
<strong id="error" style="color: #be051b; text-align: center;"></strong>
</div>
</form>
</div>
<br>
<div class="col-md-7 col-sm-7 my-col">
<button class="btn btn-danger btn-md" id="cancel" name="cancel" type="button" onClick="renderDom('Account Creation Cancelled','{{ cancel_msg |safe }}', null)">Cancel</button>
<button class="btn btn-primary btn-md" id="submit" name="submit" type="button" value="Submit" onclick="displayloading1();request_account()"> Create Account</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="modal fade" id="overlayModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Communicating this information to the server</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Please wait while we create your account. This may take up to 5-10 minutes.</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-sm" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myModalLabel">Account Request Received!</h4>
</div>
<div class="modal-body">
<span>Please wait while we create your account. This may take up to 5-10 minutes.</span>
<img src="{{ url_for('static', filename='img/loading.gif') }}" width="40px">
</div>
</div>
</div>
</div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-sm-6">
<a href="https://osc.github.io/Open-OnDemand/">
<img class="footer-logo" alt="Powered by Open OnDemand" height="40" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/OpenOnDemand_powered_by_RGB-cb3aad5ff5350c7994f250fb334ddcc72e343233ce99eb71fda93beddd76a847.svg') }}">
<a href="https://osc.github.io/Open-OnDemand/">
<img class="footer-logo" alt="Powered by Open OnDemand" height="40" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/OpenOnDemand_powered_by_RGB-cb3aad5ff5350c7994f250fb334ddcc72e343233ce99eb71fda93beddd76a847.svg') }}">
</a>
</div>
</div>
</div><!-- /.container -->
</div>
</footer>
</body>
</html>
<html class="gr__rc_uab_edu">
<title>User Registration Error</title>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<script src="{{ url_for('static', filename='scripts/function.js') }}"></script>
<script>
</script>
<style type="text/css">
.important { color: #336699; }
</style>
<link rel="shortcut icon" type="image/x-icon" href="/public/favicon.ico">
<link rel="stylesheet" media="all" href="{{ url_for('static', filename='style/application.css') }}">
<link rel="stylesheet" media="all" href="{{ url_for('static', filename='style/app2.css') }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.navbar-inverse {
background-color: rgb(0,99,65);
}
</style>
</head>
<body data-gr-c-s-loaded="true">
<div class="container content" role="main" style="width: 625px">
<div style="position:relative;">
<img alt="logo" height="auto" width="100%" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/cheaha-logo-a605de0aecd3006b82a5ee30a6d0cb8cd9bf8b7e836296cc293eac746a4c2b11.png') }}">
<a href="https://tinyurl.com/cheahaAL" target="_blank">
<div style="float:left;position:absolute;display:block;left:310px;top:-6px;padding:10px 20px;"> </div>
</a>
</div>
<footer>
<div class="container-fluid">
<div class="row">
<div class="col-md-6 col-sm-6">
<a href="https://osc.github.io/Open-OnDemand/">
<img class="footer-logo" alt="Powered by Open OnDemand" height="40" style="margin-bottom: 20px" src="{{ url_for('static', filename='img/OpenOnDemand_powered_by_RGB-cb3aad5ff5350c7994f250fb334ddcc72e343233ce99eb71fda93beddd76a847.svg') }}">
</a>
</div>
</div>
</div><!-- /.container -->
</footer>
</body>
</html>
......@@ -7,8 +7,5 @@
<body>
<h2>Something went right...</h2>
<p>
Redirecting back to sign-in page in 5 seconds.
</p>
</body>
</html>
\ No newline at end of file
</html>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 300 157"><title>Supercomputer-logo</title><image width="300" height="157" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACdCAYAAAAOnEURAAAACXBIWXMAAAsSAAALEgHS3X78AAAgAElEQVR4Xu2dfZAc5X3nP30VUi5cLq3FH7hipzQDzYtUEG2dkxMkddHgEUYrMFoW+0hAghUmxkQmWtspRK441OJyPsSVzRKCMQ6GXRAYAizLmwSJxsziM0h3RxXCLgmRQTtbVlLHH8hsuaxLna76uT+epzW9vd1Pd8/0zHbvPp8qaWbneeaZ7v49z/d5nt/zZgkhMCwe/t2OjX1C0O+6Fq4A1wUhLN69+/l63HcNhrxjGcEqPn/0n68sCWENuy6DrmC1EBAULFeAEBx0XcZcYY0d+e7Ex3HpGgx5wwh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qdCBUklWEVCJ1gGQ1qiBMvQW2K7hAaDwZAXjGAZDIbCYATLYDAUBiNYBoOhMBjBMhgMhcEIlsFgKAyLdlqDwWBYfJgWlsFgKAxGsAwGQ2EwgmUwGArD/weo98DC2yYdnQAAAABJRU5ErkJggg=="/></svg>
\ No newline at end of file
welcome_message = "Welcome to UAB's Reseach Computing cluster. The information below will be used to create your account. Please fill in all the details as this helps us understand our user base. Contact <a href='mailto:someone@yoursite.com'>Research Computing</a> for any assistance in creating your account."
cancel_message = "Close browser to end session. Contact <a href="'mailto:someone@yoursite.com'">Research Computing</a> for any assistance in creating your account."
error_message = "Error while creating your account. We've been notified about this. Contact <a href="'mailto:someone@yoursite.com'">Research Computing</a> for any assistance in creating your account."
......@@ -7,9 +7,7 @@ import vars
from flask import session
from flask_socketio import SocketIO, join_room
from app import create_app
from gevent import monkey
monkey.patch_all(subprocess=True)
......@@ -18,18 +16,14 @@ app = create_app(config_name)
app.config['SECRET_KEY'] = vars.key
socketio = SocketIO(app, message_queue= vars.message_queue)
@socketio.on('join_room')
def on_room(json):
room = str(session['uid'])
referrer = json['referrer']
join_room(room)
print('\t\t\t|-----Room ID: ' + room)
print('\t\t\t|-----Referrer: ' + referrer)
@socketio.on('request account')
def request_account(json, methods=['GET', 'POST']):
print (time.strftime("%m-%d-%Y_%H:%M:%S") + '\tQueue request received: ' + str(json))
......@@ -41,6 +35,5 @@ def request_account(json, methods=['GET', 'POST']):
print(time.strftime("%m-%d-%Y_%H:%M:%S") + "\tError in account creation: ", e)
socketio.emit("Account creation failed", room)
if __name__ == '__main__':
socketio.run(app, host='0.0.0.0')
from celery import Celery
import vars
import sys
import json
import time
import signal
from celery import Celery
from flask_socketio import SocketIO
import subprocess
import vars
import rc_util
from gevent import monkey
monkey.patch_all(subprocess=True)
sys.path.append('/cm/shared/rabbitmq_agents/')
import rc_util
broker_url = vars.broker_url
celery = Celery('flask_user_reg', broker=broker_url)
socketio = SocketIO(message_queue=vars.message_queue)
timeout = 30
def gen_f(room):
def callback(channel, method, properties, body):
msg = json.loads(body)
username = msg['username']
if msg['success']:
print(f'Account for {username} has been created.')
send_msg('account ready', room)
else:
print(f"There's some issue while creating account for {username}")
errmsg = msg.get('errmsg', [])
for err in errmsg:
print(err)
socketio.emit('account error', errmsg, room= room)
rc_util.rc_rmq.stop_consume()
rc_util.rc_rmq.delete_queue()
return callback
def send_msg(event, room):
print("Post '{}' to room '{}'".format(event,room))
socketio.emit(event, room=room)
socketio.emit(event, room=room)
def timeout_handler(signum, frame):
print("Process timeout, there's might some issue with agents")
socketio.emit('account error', errmsg, room= room)
rc_util.rc_rmq.stop_consume()
rc_util.rc_rmq.delete_queue()
@celery.task
def celery_create_account(json, session):
......@@ -26,11 +51,12 @@ def celery_create_account(json, session):
email= json['email']
fullname= json['fullname']
reason= json['reason']
queuename= rc_util.encode_name(username)
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tUser ' + username + ' added to queue')
send_msg('creating account', room)
print(username)
rc_util.add_account(username, email, fullname, reason)
rc_util.consume(username)
print(time.strftime("%m-%d-%Y_%H:%M:%S") + '\tAccount successfully created for ' + username)
send_msg('account ready', room)
rc_util.add_account(username, queuename, email, fullname, reason)
print('sent account info')
print('Waiting for completion...')
rc_util.consume(queuename, routing_key=f'complete.{queuename}', callback=gen_f(room))
id = ''
password = ''
key = ''
broker_url = 'amqp://' + id + ':' + password + '@ohpc:5672/'
message_queue = broker_url + 'socketio'
default_referrer = "/pun/sys/dashboard"
username_key = ["REMOTE_USER"]
fullname_key = ["HTTP_DISPLAYNAME"]
email_key = ["HTTP_MAIL"]
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