-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ALl files for Sensor Management Component
- Loading branch information
0 parents
commit 5c8947f
Showing
16 changed files
with
3,419 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/*global module:false*/ | ||
module.exports = function(grunt) { | ||
|
||
'use strict'; | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
meta : { | ||
banner : '/*!\n' + | ||
' * GMaps.js v<%= pkg.version %>\n' + | ||
' * <%= pkg.homepage %>\n' + | ||
' *\n' + | ||
' * Copyright <%= grunt.template.today("yyyy") %>, <%= pkg.author %>\n' + | ||
' * Released under the <%= pkg.license %> License.\n' + | ||
' */\n\n' | ||
}, | ||
|
||
concat: { | ||
options: { | ||
banner: '<%= meta.banner %>' | ||
}, | ||
dist: { | ||
src: [ | ||
'lib/gmaps.core.js', | ||
'lib/gmaps.controls.js', | ||
'lib/gmaps.markers.js', | ||
'lib/gmaps.overlays.js', | ||
'lib/gmaps.geometry.js', | ||
'lib/gmaps.layers.js', | ||
'lib/gmaps.routes.js', | ||
'lib/gmaps.geofences.js', | ||
'lib/gmaps.static.js', | ||
'lib/gmaps.map_types.js', | ||
'lib/gmaps.styles.js', | ||
'lib/gmaps.streetview.js', | ||
'lib/gmaps.events.js', | ||
'lib/gmaps.utils.js', | ||
'lib/gmaps.native_extensions.js' | ||
], | ||
dest: 'gmaps.js' | ||
} | ||
}, | ||
|
||
jasmine: { | ||
options: { | ||
template: 'test/template/jasmine-gmaps.html', | ||
specs: 'test/spec/*.js', | ||
vendor: 'http://maps.google.com/maps/api/js?sensor=true', | ||
styles: 'test/style.css' | ||
}, | ||
src : '<%= concat.dist.src %>' | ||
}, | ||
|
||
watch : { | ||
files : '<%= concat.dist.src %>', | ||
tasks : 'default' | ||
}, | ||
|
||
jshint : { | ||
all : ['Gruntfile.js'] | ||
}, | ||
|
||
uglify : { | ||
options : { | ||
sourceMap : true | ||
}, | ||
all : { | ||
files: { | ||
'gmaps.min.js': [ 'gmaps.js' ] | ||
} | ||
} | ||
}, | ||
|
||
umd : { | ||
all : { | ||
src : 'gmaps.js', | ||
objectToExport : 'GMaps', | ||
globalAlias : 'GMaps', | ||
template : 'umd.hbs', | ||
deps: { | ||
amd: ['jquery', 'googlemaps!'] | ||
} | ||
} | ||
} | ||
|
||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-jasmine'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-umd'); | ||
|
||
grunt.registerTask('test', ['jshint', 'jasmine']); | ||
grunt.registerTask('default', ['test', 'concat', 'umd', 'uglify']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
$servername = "localhost"; | ||
$username = "root"; | ||
$password = ""; | ||
$dbnam = "sensor"; | ||
|
||
// Create connection | ||
$conn = new mysqli($servername, $username, $password,$dbnam); | ||
|
||
// Check connection | ||
if (!$conn) { | ||
die("Connection failed: " . $conn->connect_error); | ||
} | ||
echo "Connected successfully"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
include 'connect.php'; | ||
|
||
|
||
|
||
//if ($conn->query($r) === TRUE) { | ||
//echo "New record created successfully"; | ||
//} else { | ||
//echo "Error: " . $sql . "<br>" . $conn->er | ||
|
||
|
||
$id = $_GET['id']; | ||
$query = "DELETE FROM sensor_list WHERE Sensor_name='".$id."'"; | ||
echo $query; | ||
if ($conn->query($query) === TRUE) { | ||
echo 'ok'; | ||
} | ||
|
||
exit; // finish execution since we only need the "ok" or "err" answers from the server. | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type='text/javascript' | ||
src='http://code.jquery.com/jquery-2.0.2.js'></script> | ||
<link rel="stylesheet" type="text/css" | ||
href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> | ||
<link rel="stylesheet" type="text/css" | ||
href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/simple-sidebar.css"> | ||
<script type='text/javascript' | ||
src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> | ||
<link rel="stylesheet" type="text/css" | ||
href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css"> | ||
|
||
<style type="text/css"> | ||
table{ | ||
text-align: center; | ||
margin: auto; | ||
width: 400px; | ||
|
||
} | ||
th | ||
{ | ||
text-align: center; | ||
} | ||
@media (min-width: 768px) { | ||
.sidebar-nav .navbar .navbar-collapse { | ||
padding: 0; | ||
max-height: none; | ||
} | ||
.sidebar-nav .navbar ul { | ||
float: none; | ||
} | ||
.sidebar-nav .navbar ul:not { | ||
display: block; | ||
} | ||
.sidebar-nav .navbar li { | ||
float: none; | ||
display: block; | ||
} | ||
.sidebar-nav .navbar li a { | ||
padding-top: 12px; | ||
padding-bottom: 12px; | ||
} | ||
} | ||
|
||
</style> | ||
</head> | ||
<body> | ||
<nav class="navbar navbar-inverse"> | ||
<a class="navbar-brand" href=""><span class="glyphicon glyphicon-home"></span></a> | ||
</nav> | ||
<br> | ||
<button class="btn btn-success btn-lg" style="width: 200px; position: fixed; right:0;"> Create Group</button> <br><br> | ||
<hr> | ||
<table style="width: 800px" id="myTable" class="table table-hover"> | ||
<thead> | ||
<tr > | ||
<th>#</th> | ||
<th>Group Name</th> | ||
<th>Group Description</th> | ||
<th>Manage</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
|
||
<tr> | ||
<td>1</td> | ||
<td>Jacob</td> | ||
<td>Thornton</td> | ||
<td> <a class="btn btn-danger" href="del22.html"><span class="glyphicon glyphicon-trash"></span> Delete Group</a>   <button data-toggle="modal" data-target="#myModal" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> Add Sensor </button> <a href="#" class="btn btn-info"><span class="glyphicon glyphicon-pencil"></span> Edit | ||
</a> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>2</td> | ||
<td>Larry</td> | ||
<td>the Bird</td> | ||
<td> <a class="btn btn-danger" href="del32.html"><span class="glyphicon glyphicon-trash"></span> Delete Group</a>   <button data-toggle="modal" data-target="#myModal" class="btn btn-success"><span class="glyphicon glyphicon-plus"></span> Add Sensor </button>  <a href="#" class="btn btn-info"><span class="glyphicon glyphicon-pencil"></span> Edit | ||
</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="modal fade" id="myModal" role="dialog"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal">×</button> | ||
<h4 class="modal-title">Provide Details of Your Sensor</h4> | ||
</div> | ||
<form> | ||
|
||
<div class="row"> | ||
<div class="col-sm-2"></div> | ||
<div class="col-sm-8"> | ||
<label for="sensorname">Sensor Name</label> | ||
<input type="email" class="form-control" id="sensorname" placeholder="Sensor Name"><br> | ||
|
||
<label for="type">Description</label> | ||
<input type="email" class="form-control" id="Description" placeholder="What Type"><br> | ||
|
||
<label for="format">Data Format</label> | ||
<input type="email" class="form-control" id="format" placeholder="Data Format"><br> | ||
<label for="hub">Select Existing Sensor hub</label> | ||
<input type="email" class="form-control" id="hub" placeholder="Select Existing Sensor hub"><br> | ||
|
||
<label for="url">URL</label> | ||
<input type="email" class="form-control" id="url" placeholder="URL"><br> | ||
|
||
<label for="api">API Token</label> | ||
<input type="email" class="form-control" id="api" placeholder="API Token"><br> | ||
<label for="status">Sensor Status ON</label> | ||
<input type="checkbox" checked data-toggle="toggle" id="status"><br><br> | ||
<label for="freq">Frequency</label> | ||
<input type="email" class="form-control" id="freq" placeholder="Frequency"><br> | ||
<p class="help-block">Please Provide the Correct Information so that We can MAP your Sensor correctly.</p> | ||
<div style="text-align: center;"> | ||
<button type="submit" class="btn btn-success">Submit</button> | ||
<button type="reset" class="btn btn-danger">Reset</button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.