-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathadmin.html
95 lines (78 loc) · 3.26 KB
/
admin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!doctype html>
<html ng-app="adminApp">
<head>
<meta charset="UTF-8" />
<title>Screener Admin</title>
<link href="https://fonts.googleapis.com/css?family=Amatic+SC|Roboto+Mono" rel="stylesheet"> <!-- Latest compiled and minified CSS -->
<script src="https://www.gstatic.com/firebasejs/3.4.1/firebase.js"></script>
<!-- AngularJS -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.min.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/2.0.2/angularfire.min.js"></script>
<script src="adminApp.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href='css/screener.css' rel='stylesheet'>
</head>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyDhe-myTpw0J-69sFmTlLtpe_-ZrVgUmdo",
authDomain: "daos-84628.firebaseapp.com",
databaseURL: "https://daos-84628.firebaseio.com",
storageBucket: "daos-84628.appspot.com",
messagingSenderId: "922274621965"
};
var primaryApp = firebase.initializeApp(config);
var secondaryApp = firebase.initializeApp(config, "Secondary");
</script>
<script>
function create() {
name = document.getElementById('username').value;
password = document.getElementById('password').value;
role = document.getElementById('role').value;
study = document.getElementById('study').value;
createUser(name, password, role, study);
}
window.onload = function () {
document.getElementById('create').addEventListener('click', create, false);
};
</script>
<body ng-controller='userCtrl'>
<div class='container' style='background-color:#FFFFFF' id='userCreate'>
<div class="card-block">
<h1 class="card-header">Create a user</h1>
</div>
<div class="card-block" style='padding:1rem;'>
<div class="input-group">
<input type="text" class="form-control" name='username' id='username' placeholder="Username">
<br/>
<br/>
<input type="text" class="form-control" name='password' id='password' placeholder="Password">
<br/>
<br/>
<input type="text" class="form-control" name='role' id='role' placeholder="Role">
<br/>
<br/>
<input type="text" class="form-control" name='role' id='study' placeholder="Study [optional]">
</div>
<br/>
<button type="button" class="btn-primary" id='create'>Create</button>
</div>
</div>
<div class='container' style='background-color:#FFFFFF' id='userTable'>
<h1>Users</h1>
<table class="table">
<tr>
<th>Name</th><th>Role</th><th>Session Count</th><th>Study</th><th>Created On</th>
</tr>
<tr ng-repeat="user in users">
<td>{{user.name}}</td>
<td>{{user.role}}</td>
<td>{{user.session_count}}</td>
<td>{{user.study}}</td>
<td>{{user.created_on | date: "medium"}}</td>
</tr>
</table>
</div>
</body>
</html>