-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
85 lines (72 loc) · 3.31 KB
/
index.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
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>JavaScript DBMS</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script type="text/javascript" src="app.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body ng-app="JDBMS" ng-controller="MainCtrl">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div style="height:100px;"></div>
<h2><span class="fa fa-server"></span> JavaScript DBMS</h2>
<p>An attempt to develop a Relational Database Management System as an AngularJS service, which can be integrated to web applications. Similar to <a href='http://www.taffydb.com/'>TaffyDB</a>.</p>
<p>For ease of use, this page is developed with a Graphical User Interface for DBMS operations.</p>
<br>
<div ng-show='data.length'>
<h2>Tables</h2>
<br>
<div class="list-group">
<a href="#" ng-click="displayTable(table)" ng-repeat="table in data" class="list-group-item">{{table.name}}</a>
</div>
</div>
<h2>Insert Table</h2>
<input class="form-control" type='text' ng-model='tableQuery'>
<br>
<button class='btn btn-success' ng-click='addTable()'>Add</button>
<h2>{{selectedTable.name}}</h2>
<table class='table table-hover'>
<tr>
<th ng-repeat="heading in selectedTable.schema">{{heading.field}}</th>
<th ng-show='selectedTable'></th>
</tr>
<tr ng-repeat="data in selectedTable.data" ng-show="shouldDisplay(data)">
<td ng-repeat="value in data" ng-click="setUpdateField(data,$index)">{{value}}</td>
<td>
<button ng-click="deleteTuples($index)" class="btn btn-danger"><span class="glyphicon glyphicon-remove"></span></button>
</td>
</tr>
</table>
<div ng-show='selectedTable'>
<h2>Select</h2>
<input class="form-control" type='text' ng-model='constraint'>
<br>
<button class='btn btn-success' ng-click='applyConstraint(constraint)'>Apply</button>
<h2>Insert</h2>
<input class="form-control" type="text" ng-model="tupleToInsert"><br/>
<button class="btn btn-success" ng-click="insertTuple()">Insert</button>
<h2>Update</h2>
<input class="form-control" type="text" ng-model="updateValue"><br/>
<button class="btn btn-success" ng-click="update()">Update</button>
<br>
<br>
<button class="btn btn-danger" ng-click="dropTable()">Drop Table</button>
</div>
</div>
</div>
<div style="height:40px;"></div>
</div>
</body>
</html>