Compare commits
9 Commits
kotlinjssu
...
sheduledta
Author | SHA1 | Date | |
---|---|---|---|
e28cfd4a20 | |||
c839c8506c | |||
8e4aad4691 | |||
3a1cff0895 | |||
32633221f1 | |||
cb5db3dddd | |||
2c82d5fb43 | |||
c5ff6cd2aa | |||
aaa0600af4 |
@ -1,94 +0,0 @@
|
|||||||
//plugins {
|
|
||||||
// id 'org.jetbrains.kotlin.js' version '1.3.70-eap-184'
|
|
||||||
//}
|
|
||||||
|
|
||||||
//group 'org.example'
|
|
||||||
version '1.0-SNAPSHOT'
|
|
||||||
|
|
||||||
buildscript {
|
|
||||||
ext.kotlin_version = '1.3.61'
|
|
||||||
ext.web_dir = '../src/resources/wwwroot/js/'
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'kotlin2js'
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
main.java.srcDirs = ["src/js/"]
|
|
||||||
test.java.srcDirs = ["src/js/test"]
|
|
||||||
}
|
|
||||||
|
|
||||||
compileKotlin2Js {
|
|
||||||
kotlinOptions.outputFile = "${projectDir}/build/web/WasteInformationServer.js"
|
|
||||||
kotlinOptions.moduleKind = "plain"
|
|
||||||
kotlinOptions.sourceMap = true
|
|
||||||
}
|
|
||||||
|
|
||||||
compileTestKotlin2Js {
|
|
||||||
kotlinOptions.moduleKind = "plain"
|
|
||||||
kotlinOptions.sourceMap = true
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven {
|
|
||||||
url "http://dl.bintray.com/kotlin/kotlin-eap-1.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
|
|
||||||
testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
|
|
||||||
}
|
|
||||||
|
|
||||||
clean.doFirst() {
|
|
||||||
delete("${web_dir}")
|
|
||||||
}
|
|
||||||
|
|
||||||
build.doLast() {
|
|
||||||
// Copy kotlin.js and kotlin-meta.js from jar into web directory
|
|
||||||
configurations.compile.each { File file ->
|
|
||||||
copy {
|
|
||||||
includeEmptyDirs = false
|
|
||||||
|
|
||||||
from zipTree(file.absolutePath)
|
|
||||||
into "${projectDir}/${web_dir}/lib"
|
|
||||||
include { fileTreeElement ->
|
|
||||||
def path = fileTreeElement.path
|
|
||||||
path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unpack build contents
|
|
||||||
// TODO Remove this step when a CDN link is available.
|
|
||||||
copy {
|
|
||||||
File artifact = new File("build/libs/${project.name}-${project.version}.jar")
|
|
||||||
includeEmptyDirs = false
|
|
||||||
|
|
||||||
from zipTree(artifact)
|
|
||||||
into "${web_dir}"
|
|
||||||
include { fileTreeElement ->
|
|
||||||
def path = fileTreeElement.path
|
|
||||||
!(path.startsWith("META-INF/") || path.startsWith("${project.name}"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy scripts to web directory
|
|
||||||
copy {
|
|
||||||
includeEmptyDirs = false
|
|
||||||
from new File("build/classes/main")
|
|
||||||
into "${web_dir}/lib"
|
|
||||||
}
|
|
||||||
|
|
||||||
copy {
|
|
||||||
includeEmptyDirs = false
|
|
||||||
from new File("build/classes/test")
|
|
||||||
into "${web_dir}/lib"
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
rootProject.name = 'WebServer'
|
|
@ -1,26 +0,0 @@
|
|||||||
import org.w3c.fetch.RequestInit
|
|
||||||
import kotlin.browser.document
|
|
||||||
import kotlin.browser.window
|
|
||||||
import kotlin.js.Json
|
|
||||||
|
|
||||||
class Dashboard {
|
|
||||||
init {
|
|
||||||
window.fetch("/senddata/wastedata", RequestInit(method = "POST", body = "action=getStartHeaderData")).then { it -> it.text().then {
|
|
||||||
println("response text is: "+it)
|
|
||||||
val json = JSON.parse<Json>(it)
|
|
||||||
document.getElementById("total-connection-labels")?.innerHTML = json["collectionnumber"] as String
|
|
||||||
document.getElementById("planed-collection-label")?.innerHTML = json["futurecollections"] as String
|
|
||||||
|
|
||||||
document.getElementById("finished-collection-label")?.innerHTML = json["finshedcollections"] as String
|
|
||||||
|
|
||||||
document.getElementById("total-city-number-label")?.innerHTML = json["citynumber"] as String
|
|
||||||
} }
|
|
||||||
|
|
||||||
window.fetch("/senddata/wastedata", RequestInit(method = "POST", body = "action=getversionandbuildtime")).then { it -> it.text().then {
|
|
||||||
val json = JSON.parse<Json>(it)
|
|
||||||
document.getElementById("version-footer-label")?.innerHTML = "<b>Version</b> " + json["version"] + " <b>Build</b> " + json["buildtime"] as String
|
|
||||||
} }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,39 +0,0 @@
|
|||||||
import org.w3c.dom.HTMLInputElement
|
|
||||||
import org.w3c.fetch.RequestInit
|
|
||||||
import kotlin.browser.document
|
|
||||||
import kotlin.browser.window
|
|
||||||
import kotlin.js.Json
|
|
||||||
|
|
||||||
class Index {
|
|
||||||
init {
|
|
||||||
document.getElementById("loginbtn")?.addEventListener("click", {
|
|
||||||
it.preventDefault()
|
|
||||||
println("clicked!!!")
|
|
||||||
|
|
||||||
val username = document.getElementById("userfield") as HTMLInputElement
|
|
||||||
val passfield = document.getElementById("passfield") as HTMLInputElement
|
|
||||||
println(username.value)
|
|
||||||
|
|
||||||
console.log("fetch 'data.json' with 'post'")
|
|
||||||
window.fetch("/senddata/loginget", RequestInit(method = "POST", body = "username=${username.value}&password=${passfield.value}")).then { response ->
|
|
||||||
response.text().then { text ->
|
|
||||||
val json = JSON.parse<Json>(text)
|
|
||||||
if (json["status"] == "nodbconn") {
|
|
||||||
js("""Swal.fire({
|
|
||||||
type: "error",
|
|
||||||
title: 'No connection to Database',
|
|
||||||
html: 'Setup DB here --> <a href="index.html">click<a/>.'
|
|
||||||
})""")
|
|
||||||
}
|
|
||||||
|
|
||||||
if (json["accept"] == true) {
|
|
||||||
println("successfully logged in!")
|
|
||||||
document.cookie = "username=$username"
|
|
||||||
window.location.replace("dashboard.html")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// todo register pwa correctly
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
import kotlin.browser.window
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
val callurl = window.document.URL
|
|
||||||
window.onload = {
|
|
||||||
if (callurl.endsWith("/") || callurl.contains("index.html")) {
|
|
||||||
println("loaded sucessfully")
|
|
||||||
Index()
|
|
||||||
}
|
|
||||||
else if (callurl.contains("dashboard.html")) {
|
|
||||||
Dashboard()
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
println("js called from undefined html file")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
import org.w3c.xhr.XMLHttpRequest
|
|
||||||
|
|
||||||
class Requester {
|
|
||||||
fun request(){
|
|
||||||
val test = XMLHttpRequest()
|
|
||||||
|
|
||||||
test.open("GET","https://api.ipify.org?format=json")
|
|
||||||
|
|
||||||
test.onload = {
|
|
||||||
println(test.responseText)
|
|
||||||
}
|
|
||||||
|
|
||||||
test.send()
|
|
||||||
}
|
|
||||||
}
|
|
@ -49,8 +49,6 @@ task createProperties(dependsOn: processResources) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.processResources.dependsOn("WebServer:build")
|
|
||||||
|
|
||||||
task myJavadocs(type: Javadoc) {
|
task myJavadocs(type: Javadoc) {
|
||||||
title = "JAVADOC WasteInformationServer"
|
title = "JAVADOC WasteInformationServer"
|
||||||
source = sourceSets.main.allJava
|
source = sourceSets.main.allJava
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
rootProject.name = 'WasteInformationServer'
|
rootProject.name = 'WasteInformationServer'
|
||||||
|
|
||||||
include 'WebServer'
|
|
@ -28,19 +28,19 @@ class DeviceRequest : PostRequest() {
|
|||||||
val deviceid = deviceset.getInt("DeviceID")
|
val deviceid = deviceset.getInt("DeviceID")
|
||||||
val cityid = deviceset.getInt("CityID")
|
val cityid = deviceset.getInt("CityID")
|
||||||
if (cityid == -1) {
|
if (cityid == -1) {
|
||||||
sb.append("{\"deviceid\":\"").append(deviceid).append("\",\"cityid\":\"").append(cityid).append("\"}")
|
sb.append("{\"deviceid\":").append(deviceid).append(",\"cityid\":").append(cityid).append("}")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val devicename = deviceset.getString("DeviceName")
|
val devicename = deviceset.getString("DeviceName")
|
||||||
val devicelocation = deviceset.getString("DeviceLocation")
|
val devicelocation = deviceset.getString("DeviceLocation")
|
||||||
sb.append("{\"deviceid\":\"").append(deviceid).append("\",\"devicename\":\"").append(devicename).append("\",\"devicelocation\":\"").append(devicelocation).append("\",\"devices\":[")
|
sb.append("{\"deviceid\":").append(deviceid).append(",\"devicename\":\"").append(devicename).append("\",\"devicelocation\":\"").append(devicelocation).append("\",\"devices\":[")
|
||||||
val devicecities = jdbc.executeQuery("SELECT * FROM `device_city` INNER JOIN `cities` ON device_city.CityID=cities.id WHERE `DeviceID`='$deviceid'")
|
val devicecities = jdbc.executeQuery("SELECT * FROM `device_city` INNER JOIN `cities` ON device_city.CityID=cities.id WHERE `DeviceID`='$deviceid'")
|
||||||
while (devicecities.next()) {
|
while (devicecities.next()) {
|
||||||
val cityidd = devicecities.getInt("id")
|
val cityidd = devicecities.getInt("id")
|
||||||
val cityname = devicecities.getString("name")
|
val cityname = devicecities.getString("name")
|
||||||
val wastetype = devicecities.getString("wastetype")
|
val wastetype = devicecities.getString("wastetype")
|
||||||
val zone = devicecities.getString("zone")
|
val zone = devicecities.getString("zone")
|
||||||
sb.append("{\"cityid\":\"").append(cityidd).append("\",\"cityname\":\"").append(cityname).append("\",\"wastetype\":\"").append(wastetype).append("\",\"zone\":\"").append(zone).append("\"}")
|
sb.append("{\"cityid\":").append(cityidd).append(",\"cityname\":\"").append(cityname).append("\",\"wastetype\":\"").append(wastetype).append("\",\"zone\":\"").append(zone).append("\"}")
|
||||||
if (!devicecities.isLast) {
|
if (!devicecities.isLast) {
|
||||||
sb.append(",")
|
sb.append(",")
|
||||||
}
|
}
|
||||||
@ -142,14 +142,6 @@ class DeviceRequest : PostRequest() {
|
|||||||
}
|
}
|
||||||
sb.append("{\"status\":\"success\"}")
|
sb.append("{\"status\":\"success\"}")
|
||||||
}
|
}
|
||||||
"getDeviceNumber" -> try {
|
|
||||||
val numberset = jdbc!!.executeQuery("SELECT * FROM devices")
|
|
||||||
numberset.last()
|
|
||||||
val devicenr = numberset.row
|
|
||||||
sb.append("{\"devicenr\":\"$devicenr\"}")
|
|
||||||
} catch (e: SQLException) {
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
|
||||||
"addtodb" -> {
|
"addtodb" -> {
|
||||||
var cityid = -1
|
var cityid = -1
|
||||||
try {
|
try {
|
||||||
@ -162,6 +154,21 @@ class DeviceRequest : PostRequest() {
|
|||||||
}
|
}
|
||||||
sb.append("{\"success\":true}")
|
sb.append("{\"success\":true}")
|
||||||
}
|
}
|
||||||
|
"getheader" -> {
|
||||||
|
try {
|
||||||
|
var numberset = jdbc!!.executeQuery("SELECT * FROM devices")
|
||||||
|
numberset.last()
|
||||||
|
val devicenr = numberset.row
|
||||||
|
|
||||||
|
numberset = jdbc!!.executeQuery("SELECT * FROM devices WHERE CityID=-1")
|
||||||
|
numberset.last()
|
||||||
|
val unconfigureddevices = numberset.row
|
||||||
|
|
||||||
|
sb.append("{\"success\":true,\"devicenumber\":$devicenr, \"unconfigureddevices\":$unconfigureddevices}")
|
||||||
|
} catch (e: SQLException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return sb.toString()
|
return sb.toString()
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ public class LoginState {
|
|||||||
private String email;
|
private String email;
|
||||||
private int permission;
|
private int permission;
|
||||||
|
|
||||||
boolean loggedin = true;
|
boolean loggedin = false;
|
||||||
|
|
||||||
public void logIn() {
|
public void logIn() {
|
||||||
loggedin = true;
|
loggedin = true;
|
||||||
|
502
src/resources/wwwroot/ShedulePickUp.html
Normal file
502
src/resources/wwwroot/ShedulePickUp.html
Normal file
@ -0,0 +1,502 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>WasteInformation Server</title>
|
||||||
|
<!-- Tell the browser to be responsive to screen width -->
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<!-- Font Awesome -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/fontawesome-free/css/all.min.css">
|
||||||
|
<!-- Ionicons -->
|
||||||
|
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
||||||
|
<!-- DataTables -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/datatables-bs4/css/dataTables.bootstrap4.css">
|
||||||
|
<!-- Tempusdominus Bbootstrap 4 -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
|
||||||
|
<!-- iCheck -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/icheck-bootstrap/icheck-bootstrap.min.css">
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/jqvmap/jqvmap.min.css">
|
||||||
|
<!-- Theme style -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/dist/css/adminlte.min.css">
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/overlayScrollbars/css/OverlayScrollbars.min.css">
|
||||||
|
<!-- Daterange picker -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/daterangepicker/daterangepicker.css">
|
||||||
|
<!-- summernote -->
|
||||||
|
<link rel="stylesheet" href="lib/AdminLTE/plugins/summernote/summernote-bs4.css">
|
||||||
|
<!-- Google Font: Source Sans Pro -->
|
||||||
|
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Bootstrap Date-Picker Plugin -->
|
||||||
|
|
||||||
|
<link rel="stylesheet"
|
||||||
|
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker3.css"/>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/dashboard.css">
|
||||||
|
<link rel="stylesheet" type="text/css" href="css/general.css">
|
||||||
|
|
||||||
|
<link rel="icon" type="image/png" href="/favicon.png">
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="hold-transition sidebar-mini layout-fixed">
|
||||||
|
<div class="wrapper">
|
||||||
|
<!-- Main Sidebar Container -->
|
||||||
|
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<a href="ShedulePickUp.html" class="brand-link">
|
||||||
|
<img src="/favicon.png" alt="AdminLTE Logo"
|
||||||
|
class="brand-image img-circle elevation-3"
|
||||||
|
style="opacity: .8">
|
||||||
|
<span class="brand-text font-weight-light">Waste Control</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- Sidebar -->
|
||||||
|
<div class="sidebar">
|
||||||
|
<!-- Sidebar user panel (optional) -->
|
||||||
|
<div class="user-panel mt-3 pb-3 mb-3 d-flex">
|
||||||
|
<div class="image">
|
||||||
|
<!-- <img src="lib/AdminLTE/dist/img/user2-160x160.jpg" class="img-circle elevation-2" alt="User Image"> -->
|
||||||
|
<i class="nav-icon fas fa-user img-circle elevation-2" style="color:white"></i>
|
||||||
|
</div>
|
||||||
|
<!-- <i class="nav-icon fas fa-tachometer-alt"></i> -->
|
||||||
|
<div class="info">
|
||||||
|
<a href="user.html" class="d-block" id="userlabel">Username to set!</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Sidebar Menu -->
|
||||||
|
<nav class="mt-2">
|
||||||
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||||
|
data-accordion="false">
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="dashboard.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-columns"></i>
|
||||||
|
<p>
|
||||||
|
Dashboard
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="ShedulePickUp.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-calendar-alt"></i>
|
||||||
|
<p>
|
||||||
|
Shedule Pick-up
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li id="devicepanel" class="nav-item">
|
||||||
|
<a href="device.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-desktop"></i>
|
||||||
|
<p>
|
||||||
|
Devices
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li id="adminpanel" class="nav-item hideit">
|
||||||
|
<a href="adminpanel.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-plus-circle"></i>
|
||||||
|
<p>
|
||||||
|
Admin panel
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="#todo" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-cog"></i>
|
||||||
|
<p>
|
||||||
|
Settings
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="index.html" class="nav-link" id="logoutbtn">
|
||||||
|
<i class="nav-icon fas fa-sign-out-alt"></i>
|
||||||
|
<p>
|
||||||
|
Logout
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<!-- /.sidebar-menu -->
|
||||||
|
</div>
|
||||||
|
<!-- /.sidebar -->
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<!-- Content Wrapper. Contains page content -->
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<!-- Content Header (Page header) -->
|
||||||
|
<div class="content-header">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<h1 class="m-0 text-dark">Dashboard</h1>
|
||||||
|
</div><!-- /.col -->
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<ol class="breadcrumb float-sm-right">
|
||||||
|
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
||||||
|
<li class="breadcrumb-item active">Shedule Pick-up</li>
|
||||||
|
</ol>
|
||||||
|
</div><!-- /.col -->
|
||||||
|
</div><!-- /.row -->
|
||||||
|
</div><!-- /.container-fluid -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-header -->
|
||||||
|
|
||||||
|
<!-- Main content -->
|
||||||
|
<section class="content">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<!-- Small boxes (Stat box) -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-info">
|
||||||
|
<div class="inner">
|
||||||
|
<h3 id="total-sheduled-actions-label">42</h3>
|
||||||
|
|
||||||
|
<p>Sheduled actions</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-bag"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./col -->
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-gray">
|
||||||
|
<div class="inner">
|
||||||
|
<h3 id="next-action-label">42</h3>
|
||||||
|
|
||||||
|
<p>next Action</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-globe" style="color: lightgrey"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./col -->
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-warning">
|
||||||
|
<div class="inner">
|
||||||
|
<h3 id="last-added-label">44</h3>
|
||||||
|
|
||||||
|
<p>last Added</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-calendar"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./col -->
|
||||||
|
<div class="col-lg-3 col-6">
|
||||||
|
<!-- small box -->
|
||||||
|
<div class="small-box bg-success">
|
||||||
|
<div class="inner">
|
||||||
|
<h3 id="todo-label">65</h3>
|
||||||
|
|
||||||
|
<p>TODO</p>
|
||||||
|
</div>
|
||||||
|
<div class="icon">
|
||||||
|
<i class="ion ion-android-checkmark-circle"></i>
|
||||||
|
</div>
|
||||||
|
<a href="#" class="small-box-footer">More info <i class="fas fa-arrow-circle-right"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- ./col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row -->
|
||||||
|
<!-- Main row -->
|
||||||
|
<div class="row">
|
||||||
|
<!-- Left col -->
|
||||||
|
<section class="col-lg-7 connectedSortable">
|
||||||
|
<!-- Custom tabs (Charts with tabs)-->
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">
|
||||||
|
<i class="fas fa-chart-pie mr-1"></i>
|
||||||
|
All pickupdats
|
||||||
|
</h3>
|
||||||
|
</div><!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<table id="table-pickupdates" class="table table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<i class="fas fa-city"></i>
|
||||||
|
City</th>
|
||||||
|
<th><i class="fas fa-search-location"></i>
|
||||||
|
Zone</th>
|
||||||
|
<th><i class="fas fa-recycle"></i>
|
||||||
|
Waste Type</th>
|
||||||
|
<th><i class="fas fa-calendar-alt"></i>
|
||||||
|
Date</th>
|
||||||
|
<th><i class="fas fa-trash-alt"></i>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="picupdates-tablebody">
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<i class="fas fa-city"></i>
|
||||||
|
City</th>
|
||||||
|
<th><i class="fas fa-search-location"></i>
|
||||||
|
Zone</th>
|
||||||
|
<th><i class="fas fa-recycle"></i>
|
||||||
|
Waste Type</th>
|
||||||
|
<th><i class="fas fa-calendar-alt"></i>
|
||||||
|
Date</th>
|
||||||
|
<th><i class="fas fa-trash-alt"></i>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div><!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">
|
||||||
|
<i class="fas fa-chart-pie mr-1"></i>
|
||||||
|
New City
|
||||||
|
</h3>
|
||||||
|
<button id="btn-savecity" type="button" class="btn btn-success"
|
||||||
|
style="float:right;">Save
|
||||||
|
</button>
|
||||||
|
</div><!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="form-group" style="margin-top: 15px; width: 10cm;">
|
||||||
|
<label for="new_city_cityname">City/Village name</label>
|
||||||
|
<input type="email" class="form-control" id="new_city_cityname"
|
||||||
|
aria-describedby="emailHelp" placeholder="Enter city name here">
|
||||||
|
<small class="form-text text-muted">Please try to use no special
|
||||||
|
characters</small>
|
||||||
|
</div>
|
||||||
|
<div class="form-group" style="width: 10cm;">
|
||||||
|
<label for="new_city_zonename">Zone Name</label>
|
||||||
|
<input type="email" class="form-control" id="new_city_zonename"
|
||||||
|
aria-describedby="emailHelp" placeholder="Enter Zone name here">
|
||||||
|
<small class="form-text text-muted">Please try to use no special
|
||||||
|
characters</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<button id="dropdown-wastetype" type="button"
|
||||||
|
class="btn btn-outline-dark dropdown-toggle"
|
||||||
|
data-toggle="dropdown">
|
||||||
|
Select waste type
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu">
|
||||||
|
<a class="wastetype-citynew-item dropdown-item" href="#">Plastic</a>
|
||||||
|
<a class="wastetype-citynew-item dropdown-item" href="#">Metal</a>
|
||||||
|
<a class="wastetype-citynew-item dropdown-item" href="#">Residual waste</a>
|
||||||
|
<a class="wastetype-citynew-item dropdown-item" href="#">Biowaste</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Custom tabs (Charts with tabs)-->
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">
|
||||||
|
<i class="fas fa-chart-pie mr-1"></i>
|
||||||
|
New Pick up date
|
||||||
|
</h3>
|
||||||
|
</div><!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<form>
|
||||||
|
|
||||||
|
<h4>Add Data:</h4>
|
||||||
|
<div class="input-group mt-3 mb-3" style="width: 100%;">
|
||||||
|
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<button id="dropdown-city" type="button"
|
||||||
|
class="btn btn-outline-dark dropdown-toggle"
|
||||||
|
data-toggle="dropdown">
|
||||||
|
Select city
|
||||||
|
</button>
|
||||||
|
<div id="dropdown-city-data" class="dropdown-menu">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<button id="dropdown-zone" type="button"
|
||||||
|
class="btn btn-outline-dark dropdown-toggle"
|
||||||
|
data-toggle="dropdown">
|
||||||
|
Select Zone
|
||||||
|
</button>
|
||||||
|
<div id="dropdown-zone-data" class="dropdown-menu">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<button id="dropdown-type-data" type="button"
|
||||||
|
class="btn btn-outline-dark dropdown-toggle"
|
||||||
|
data-toggle="dropdown">
|
||||||
|
Select waste type
|
||||||
|
</button>
|
||||||
|
<div id="dropdown-type-drops" class="dropdown-menu">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input id="input-wastetime" style="width: 50px;" class="form-control" id="date"
|
||||||
|
name="date" placeholder="MM/DD/YYY" type="text"/>
|
||||||
|
<button type="button" class="btn-savelist btn btn-success"
|
||||||
|
style="float:right;">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div><!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- /.Left col -->
|
||||||
|
<!-- right col (We are only adding the ID to make the widgets sortable)-->
|
||||||
|
<section class="col-lg-5 connectedSortable">
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3 class="card-title">
|
||||||
|
<i class="fas fa-chart-pie mr-1"></i>
|
||||||
|
Pick up locations
|
||||||
|
</h3>
|
||||||
|
</div><!-- /.card-header -->
|
||||||
|
<!-- /.card-header -->
|
||||||
|
<div class="card-body">
|
||||||
|
<table id="example2" class="table table-bordered table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<i class="fas fa-city"></i>
|
||||||
|
City</th>
|
||||||
|
<th><i class="fas fa-search-location"></i>
|
||||||
|
Zone</th>
|
||||||
|
<th><i class="fas fa-recycle"></i>
|
||||||
|
Waste Type</th>
|
||||||
|
<th><i class="fas fa-calendar-alt"></i>
|
||||||
|
Date</th>
|
||||||
|
<th><i class="fas fa-trash-alt"></i>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="location-table-data">
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<i class="fas fa-city"></i>
|
||||||
|
City</th>
|
||||||
|
<th><i class="fas fa-search-location"></i>
|
||||||
|
Zone</th>
|
||||||
|
<th><i class="fas fa-recycle"></i>
|
||||||
|
Waste Type</th>
|
||||||
|
<th><i class="fas fa-calendar-alt"></i>
|
||||||
|
Date</th>
|
||||||
|
<th><i class="fas fa-trash-alt"></i>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- /.card-body -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- /.card -->
|
||||||
|
</section>
|
||||||
|
<!-- right col -->
|
||||||
|
</div>
|
||||||
|
<!-- /.row (main row) -->
|
||||||
|
</div><!-- /.container-fluid -->
|
||||||
|
</section>
|
||||||
|
<!-- /.content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.content-wrapper -->
|
||||||
|
<footer class="main-footer">
|
||||||
|
<strong>By Gregor Dutzler & Lukas Heiligenbrunner & Emil Meindl</strong>
|
||||||
|
<div id="version-footer-label" class="float-right d-none d-sm-inline-block">
|
||||||
|
<b>Version</b> 3.0.0
|
||||||
|
<b>Build</b> 2019-8-8 9:30
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Control Sidebar -->
|
||||||
|
<aside class="control-sidebar control-sidebar-dark">
|
||||||
|
<!-- Control sidebar content goes here -->
|
||||||
|
</aside>
|
||||||
|
<!-- /.control-sidebar -->
|
||||||
|
</div>
|
||||||
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
|
<!-- jQuery -->
|
||||||
|
<script src="lib/AdminLTE/plugins/jquery/jquery.min.js"></script>
|
||||||
|
<!-- jQuery UI 1.11.4 -->
|
||||||
|
<script src="lib/AdminLTE/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||||
|
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
|
||||||
|
<script>
|
||||||
|
$.widget.bridge('uibutton', $.ui.button)
|
||||||
|
</script>
|
||||||
|
<!-- Bootstrap 4 -->
|
||||||
|
<script src="lib/AdminLTE/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<!-- ChartJS -->
|
||||||
|
<script src="lib/AdminLTE/plugins/chart.js/Chart.min.js"></script>
|
||||||
|
<!-- Sparkline -->
|
||||||
|
<script src="lib/AdminLTE/plugins/sparklines/sparkline.js"></script>
|
||||||
|
<!-- JQVMap -->
|
||||||
|
<script src="lib/AdminLTE/plugins/jqvmap/jquery.vmap.min.js"></script>
|
||||||
|
<script src="lib/AdminLTE/plugins/jqvmap/maps/jquery.vmap.usa.js"></script>
|
||||||
|
<!-- jQuery Knob Chart -->
|
||||||
|
<script src="lib/AdminLTE/plugins/jquery-knob/jquery.knob.min.js"></script>
|
||||||
|
<!-- daterangepicker -->
|
||||||
|
<script src="lib/AdminLTE/plugins/moment/moment.min.js"></script>
|
||||||
|
<script src="lib/AdminLTE/plugins/daterangepicker/daterangepicker.js"></script>
|
||||||
|
<!-- Tempusdominus Bootstrap 4 -->
|
||||||
|
<script src="lib/AdminLTE/plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js"></script>
|
||||||
|
<!-- Summernote -->
|
||||||
|
<script src="lib/AdminLTE/plugins/summernote/summernote-bs4.min.js"></script>
|
||||||
|
<!-- overlayScrollbars -->
|
||||||
|
<script src="lib/AdminLTE/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js"></script>
|
||||||
|
<!-- AdminLTE App -->
|
||||||
|
<script src="lib/AdminLTE/dist/js/adminlte.js"></script>
|
||||||
|
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
|
||||||
|
<script src="lib/AdminLTE/dist/js/pages/dashboard.js"></script>
|
||||||
|
<!-- AdminLTE for demo purposes -->
|
||||||
|
<script src="lib/AdminLTE/dist/js/demo.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript"
|
||||||
|
src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
|
||||||
|
|
||||||
|
<!-- DataTables -->
|
||||||
|
<script src="lib/AdminLTE/plugins/datatables/jquery.dataTables.js"></script>
|
||||||
|
<script src="lib/AdminLTE/plugins/datatables-bs4/js/dataTables.bootstrap4.js"></script>
|
||||||
|
|
||||||
|
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
|
||||||
|
|
||||||
|
<!-- OWN -->
|
||||||
|
|
||||||
|
<script type="text/javascript" src="js/sheduledpickup.js"></script>
|
||||||
|
<script src="js/userManager.js"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -70,6 +70,44 @@
|
|||||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||||
data-accordion="false">
|
data-accordion="false">
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="dashboard.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-columns"></i>
|
||||||
|
<p>
|
||||||
|
Dashboard
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="ShedulePickUp.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-calendar-alt"></i>
|
||||||
|
<p>
|
||||||
|
Shedule Pick-up
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li id="devicepanel" class="nav-item">
|
||||||
|
<a href="device.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-desktop"></i>
|
||||||
|
<p>
|
||||||
|
Devices
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li id="adminpanel" class="nav-item hideit">
|
||||||
|
<a href="adminpanel.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-plus-circle"></i>
|
||||||
|
<p>
|
||||||
|
Admin panel
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#todo" class="nav-link">
|
<a href="#todo" class="nav-link">
|
||||||
<i class="nav-icon fas fa-cog"></i>
|
<i class="nav-icon fas fa-cog"></i>
|
||||||
@ -79,6 +117,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="index.html" class="nav-link" id="logoutbtn">
|
<a href="index.html" class="nav-link" id="logoutbtn">
|
||||||
<i class="nav-icon fas fa-sign-out-alt"></i>
|
<i class="nav-icon fas fa-sign-out-alt"></i>
|
||||||
@ -88,23 +127,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="#todo" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-plus-circle"></i>
|
|
||||||
<p>
|
|
||||||
New Entry
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li id="adminpanel" class="nav-item hideit">
|
|
||||||
<a href="adminpanel.html" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-plus-circle"></i>
|
|
||||||
<p>
|
|
||||||
Admin panel
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<!-- /.sidebar-menu -->
|
<!-- /.sidebar-menu -->
|
||||||
|
@ -73,23 +73,35 @@
|
|||||||
data-accordion="false">
|
data-accordion="false">
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#todo" class="nav-link">
|
<a href="dashboard.html" class="nav-link">
|
||||||
<i class="nav-icon fas fa-cog"></i>
|
<i class="nav-icon fas fa-columns"></i>
|
||||||
<p>
|
<p>
|
||||||
Settings
|
Dashboard
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="index.html" class="nav-link" id="logoutbtn">
|
<a href="ShedulePickUp.html" class="nav-link">
|
||||||
<i class="nav-icon fas fa-sign-out-alt"></i>
|
<i class="nav-icon fas fa-calendar-alt"></i>
|
||||||
<p>
|
<p>
|
||||||
Logout
|
Shedule Pick-up
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li id="devicepanel" class="nav-item">
|
||||||
|
<a href="device.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-desktop"></i>
|
||||||
|
<p>
|
||||||
|
Devices
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="adminpanel" class="nav-item hideit">
|
<li id="adminpanel" class="nav-item hideit">
|
||||||
<a href="adminpanel.html" class="nav-link">
|
<a href="adminpanel.html" class="nav-link">
|
||||||
<i class="nav-icon fas fa-plus-circle"></i>
|
<i class="nav-icon fas fa-plus-circle"></i>
|
||||||
@ -99,11 +111,21 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li id="devicepanel" class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="device.html" class="nav-link">
|
<a href="#todo" class="nav-link">
|
||||||
<i class="nav-icon fas fa-plus-circle"></i>
|
<i class="nav-icon fas fa-cog"></i>
|
||||||
<p>
|
<p>
|
||||||
Devices
|
Settings
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="index.html" class="nav-link" id="logoutbtn">
|
||||||
|
<i class="nav-icon fas fa-sign-out-alt"></i>
|
||||||
|
<p>
|
||||||
|
Logout
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -217,22 +239,23 @@
|
|||||||
<table id="table-pickupdates" class="table table-bordered table-hover">
|
<table id="table-pickupdates" class="table table-bordered table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>City</th>
|
<th><i class="fas fa-city"></i>City</th>
|
||||||
<th>Zone</th>
|
<th><i class="fas fa-search-location"></i>Zone</th>
|
||||||
<th>Waste Type</th>
|
<th><i class="fas fa-recycle"></i>Waste Type</th>
|
||||||
<th>Date</th>
|
<th><i class="fas fa-calendar-alt"></i>Date</th>
|
||||||
<th>X</th>
|
<th><i class="fas fa-trash-alt"></i></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="picupdates-tablebody">
|
<tbody id="picupdates-tablebody">
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th>City</th>
|
<th><i class="fas fa-city"></i>City</th>
|
||||||
<th>Zone</th>
|
<th><i class="fas fa-search-location"></i>Zone</th>
|
||||||
<th>Waste Type</th>
|
<th><i class="fas fa-recycle"></i>Waste Type</th>
|
||||||
<th>Date</th>
|
<th><i class="fas fa-calendar-alt"></i>Date</th>
|
||||||
<th>X</th>
|
<th><i class="fas fa-trash-alt"></i>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
@ -322,6 +345,7 @@
|
|||||||
data-toggle="dropdown">
|
data-toggle="dropdown">
|
||||||
Select waste type
|
Select waste type
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div id="dropdown-type-drops" class="dropdown-menu">
|
<div id="dropdown-type-drops" class="dropdown-menu">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -353,20 +377,28 @@
|
|||||||
<table id="example2" class="table table-bordered table-hover">
|
<table id="example2" class="table table-bordered table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>City</th>
|
<th>
|
||||||
<th>Zone</th>
|
<i class="fas fa-city"></i>
|
||||||
<th>Waste Type</th>
|
City
|
||||||
<th>X</th>
|
</th>
|
||||||
|
<th><i class="fas fa-search-location"></i>
|
||||||
|
Zone
|
||||||
|
</th>
|
||||||
|
<th><i class="fas fa-recycle"></i>
|
||||||
|
Waste Type
|
||||||
|
</th>
|
||||||
|
<th><i class="fas fa-trash-alt"></i>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="location-table-data">
|
<tbody id="location-table-data">
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th>City</th>
|
<th><i class="fas fa-city"></i>City</th>
|
||||||
<th>Zone</th>
|
<th><i class="fas fa-search-location"></i>Zone</th>
|
||||||
<th>Waste Type</th>
|
<th><i class="fas fa-recycle"></i>Waste Type</th>
|
||||||
<th>X</th>
|
<th><i class="fas fa-trash-alt"></i></th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
@ -448,8 +480,8 @@
|
|||||||
|
|
||||||
<!-- OWN -->
|
<!-- OWN -->
|
||||||
|
|
||||||
<script type="text/javascript" src="js/lib/kotlin.js"></script>
|
<script type="text/javascript" src="js/dashboard.js"></script>
|
||||||
<script type="text/javascript" src="js/WasteInformationServer.js"></script>
|
<script src="js/userManager.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
<span class="brand-text font-weight-light">Waste Control</span>
|
<span class="brand-text font-weight-light">Waste Control</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<!-- Sidebar user panel (optional) -->
|
<!-- Sidebar user panel (optional) -->
|
||||||
@ -71,19 +72,28 @@
|
|||||||
data-accordion="false">
|
data-accordion="false">
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#todo" class="nav-link">
|
<a href="dashboard.html" class="nav-link">
|
||||||
<i class="nav-icon fas fa-cog"></i>
|
<i class="nav-icon fas fa-columns"></i>
|
||||||
<p>
|
<p>
|
||||||
Settings
|
Dashboard
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="index.html" class="nav-link" id="logoutbtn">
|
<a href="ShedulePickUp.html" class="nav-link">
|
||||||
<i class="nav-icon fas fa-sign-out-alt"></i>
|
<i class="nav-icon fas fa-calendar-alt"></i>
|
||||||
<p>
|
<p>
|
||||||
Logout
|
Shedule Pick-up
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li id="devicepanel" class="nav-item">
|
||||||
|
<a href="device.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-desktop"></i>
|
||||||
|
<p>
|
||||||
|
Devices
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@ -97,14 +107,25 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li id="devicepanel" class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="device.html" class="nav-link">
|
<a href="#todo" class="nav-link">
|
||||||
<i class="nav-icon fas fa-plus-circle"></i>
|
<i class="nav-icon fas fa-cog"></i>
|
||||||
<p>
|
<p>
|
||||||
Devices
|
Settings
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="index.html" class="nav-link" id="logoutbtn">
|
||||||
|
<i class="nav-icon fas fa-sign-out-alt"></i>
|
||||||
|
<p>
|
||||||
|
Logout
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<!-- /.sidebar-menu -->
|
<!-- /.sidebar-menu -->
|
||||||
@ -141,9 +162,9 @@
|
|||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-info">
|
<div class="small-box bg-info">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3>TODO</h3>
|
<h3 id="devicenr-label">-1</h3>
|
||||||
|
|
||||||
<p>Todo</p>
|
<p>Devices</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="ion ion-bag"></i>
|
<i class="ion ion-bag"></i>
|
||||||
@ -156,9 +177,9 @@
|
|||||||
<!-- small box -->
|
<!-- small box -->
|
||||||
<div class="small-box bg-success">
|
<div class="small-box bg-success">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<h3>TODO</h3>
|
<h3 id="unconfigured-devices-label">-1</h3>
|
||||||
|
|
||||||
<p>Devices</p>
|
<p>Not Configured Devices</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<i class="ion ion-stats-bars"></i>
|
<i class="ion ion-stats-bars"></i>
|
||||||
@ -186,22 +207,22 @@
|
|||||||
<table id="table-devices" class="table table-bordered table-hover">
|
<table id="table-devices" class="table table-bordered table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Device ID</th>
|
<th><i class="fas fa-id-card"></i> Device ID</th>
|
||||||
<th>Devicename</th>
|
<th><i class="fas fa-signature"></i> Devicename</th>
|
||||||
<th>Devicelocation</th>
|
<th><i class="fas fa-search-location"></i> Devicelocation</th>
|
||||||
<th>WasteType</th>
|
<th><i class="fas fa-recycle"></i> WasteType</th>
|
||||||
<th>Action</th>
|
<th><i class="fas fa-edit"></i> Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="devices-tablebody">
|
<tbody id="devices-tablebody">
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Device ID</th>
|
<th><i class="fas fa-id-card"></i> Device ID</th>
|
||||||
<th>Devicename</th>
|
<th><i class="fas fa-signature"></i> Devicename</th>
|
||||||
<th>Devicelocation</th>
|
<th><i class="fas fa-search-location"></i> Devicelocation</th>
|
||||||
<th>WasteType</th>
|
<th><i class="fas fa-recycle"></i> WasteType</th>
|
||||||
<th>Action</th>
|
<th><i class="fas fa-edit"></i> Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
@ -24,15 +24,13 @@
|
|||||||
<!--Custom styles-->
|
<!--Custom styles-->
|
||||||
<link rel="stylesheet" type="text/css" href="css/index.css">
|
<link rel="stylesheet" type="text/css" href="css/index.css">
|
||||||
|
|
||||||
|
<script type="text/javascript" src="js/index.js"></script>
|
||||||
|
|
||||||
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
|
<script src="lib/AdminLTE/plugins/sweetalert2/sweetalert2.all.js"></script>
|
||||||
|
|
||||||
<link rel="manifest" href="/manifest.json">
|
<link rel="manifest" href="/manifest.json">
|
||||||
|
|
||||||
<link rel="icon" type="image/png" href="/favicon.png">
|
<link rel="icon" type="image/png" href="/favicon.png">
|
||||||
|
|
||||||
<script type="text/javascript" src="js/lib/kotlin.js"></script>
|
|
||||||
<script type="text/javascript" src="js/WasteInformationServer.js"></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
$(document).ready(function () {
|
$(function () {
|
||||||
new Device();
|
new Device();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
class Device {
|
class Device {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.reloadDevices()
|
this.reloadDevices();
|
||||||
|
this.loadHeader();
|
||||||
}
|
}
|
||||||
|
|
||||||
devicetable = null;
|
devicetable = null;
|
||||||
@ -36,7 +37,6 @@ class Device {
|
|||||||
var devicelocation = data.data[i].devicelocation;
|
var devicelocation = data.data[i].devicelocation;
|
||||||
|
|
||||||
var row = "<tr><td>" + id + "</td><td>" + devicename + "</td><td>" + devicelocation + "</td><td>";
|
var row = "<tr><td>" + id + "</td><td>" + devicename + "</td><td>" + devicelocation + "</td><td>";
|
||||||
|
|
||||||
for (var n = 0; n < data.data[i].devices.length; n++) {
|
for (var n = 0; n < data.data[i].devices.length; n++) {
|
||||||
var cityname = data.data[i].devices[n].cityname;
|
var cityname = data.data[i].devices[n].cityname;
|
||||||
var cityzone = data.data[i].devices[n].zone;
|
var cityzone = data.data[i].devices[n].zone;
|
||||||
@ -51,9 +51,9 @@ class Device {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_this.addDeleteButton();
|
_this._addDeleteButton();
|
||||||
_this.addAddButton();
|
_this._addAddButton();
|
||||||
_this.addConfigDialog();
|
_this._addConfigDialog();
|
||||||
_this.devicetable = $('#table-devices').DataTable();
|
_this.devicetable = $('#table-devices').DataTable();
|
||||||
}, 'json');
|
}, 'json');
|
||||||
}
|
}
|
||||||
@ -61,7 +61,8 @@ class Device {
|
|||||||
/**
|
/**
|
||||||
* add click listener to add button to add new city entries to current device
|
* add click listener to add button to add new city entries to current device
|
||||||
*/
|
*/
|
||||||
addAddButton() {
|
_addAddButton() {
|
||||||
|
var _this = this;
|
||||||
$('.addbtn').click(function (event) {
|
$('.addbtn').click(function (event) {
|
||||||
var id = event.target.getAttribute("dataid");
|
var id = event.target.getAttribute("dataid");
|
||||||
var cityname;
|
var cityname;
|
||||||
@ -84,8 +85,6 @@ class Device {
|
|||||||
}
|
}
|
||||||
]).then((result) => {
|
]).then((result) => {
|
||||||
if (result.value) {
|
if (result.value) {
|
||||||
console.log(result.value);
|
|
||||||
const answers = JSON.stringify(result.value);
|
|
||||||
cityname = result.value[0];
|
cityname = result.value[0];
|
||||||
|
|
||||||
console.log("cityname=" + cityname);
|
console.log("cityname=" + cityname);
|
||||||
@ -104,7 +103,6 @@ class Device {
|
|||||||
}
|
}
|
||||||
]).then((result) => {
|
]).then((result) => {
|
||||||
if (result.value) {
|
if (result.value) {
|
||||||
console.log(result.value);
|
|
||||||
zone = result.value[0];
|
zone = result.value[0];
|
||||||
$.post('/senddata/Devicedata', 'action=gettypes&cityname=' + cityname + '&zonename=' + zone, function (data) {
|
$.post('/senddata/Devicedata', 'action=gettypes&cityname=' + cityname + '&zonename=' + zone, function (data) {
|
||||||
Swal.mixin({
|
Swal.mixin({
|
||||||
@ -121,11 +119,8 @@ class Device {
|
|||||||
}
|
}
|
||||||
]).then((result) => {
|
]).then((result) => {
|
||||||
if (result.value) {
|
if (result.value) {
|
||||||
console.log(result.value);
|
|
||||||
wastetype = result.value[0];
|
wastetype = result.value[0];
|
||||||
|
|
||||||
|
|
||||||
//todo add to db
|
|
||||||
$.post('/senddata/Devicedata', 'action=addtodb&deviceid=' + id + '&cityname=' + cityname + '&zonename=' + zone + '&wastetype=' + wastetype, function (data) {
|
$.post('/senddata/Devicedata', 'action=addtodb&deviceid=' + id + '&cityname=' + cityname + '&zonename=' + zone + '&wastetype=' + wastetype, function (data) {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -134,8 +129,7 @@ class Device {
|
|||||||
html: 'This alert closes added.',
|
html: 'This alert closes added.',
|
||||||
timer: 1000,
|
timer: 1000,
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
console.log('Popup closed. ');
|
_this.reloadDevices();
|
||||||
reloadDevices();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -154,7 +148,7 @@ class Device {
|
|||||||
/**
|
/**
|
||||||
* add click listener to delete button to delete this device entry
|
* add click listener to delete button to delete this device entry
|
||||||
*/
|
*/
|
||||||
addDeleteButton() {
|
_addDeleteButton() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
$(".delbtn").click(function (event) {
|
$(".delbtn").click(function (event) {
|
||||||
var id = event.target.getAttribute("dataid");
|
var id = event.target.getAttribute("dataid");
|
||||||
@ -191,7 +185,8 @@ class Device {
|
|||||||
/**
|
/**
|
||||||
* add click listener to unconfigured device to show configure dialog
|
* add click listener to unconfigured device to show configure dialog
|
||||||
*/
|
*/
|
||||||
addConfigDialog() {
|
_addConfigDialog() {
|
||||||
|
var _this = this;
|
||||||
$(".configuredevicebutton").click(function (event) {
|
$(".configuredevicebutton").click(function (event) {
|
||||||
var id = event.target.getAttribute("deviceid");
|
var id = event.target.getAttribute("deviceid");
|
||||||
var cityname;
|
var cityname;
|
||||||
@ -272,7 +267,7 @@ class Device {
|
|||||||
timer: 1000,
|
timer: 1000,
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
console.log('Popup closed. ');
|
console.log('Popup closed. ');
|
||||||
reloadDevices();
|
_this.reloadDevices();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -285,10 +280,18 @@ class Device {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
console.log("click..." + id);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load header tiles
|
||||||
|
*/
|
||||||
|
loadHeader(){
|
||||||
|
$.post('/senddata/Devicedata', 'action=getheader', function (data) {
|
||||||
|
if (data.success) {
|
||||||
|
$("#devicenr-label").html(data.devicenumber);
|
||||||
|
$("#unconfigured-devices-label").html(data.unconfigureddevices);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
3
src/resources/wwwroot/js/sheduledpickup.js
Normal file
3
src/resources/wwwroot/js/sheduledpickup.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
$(function () {
|
||||||
|
console.log("bla");
|
||||||
|
})
|
@ -70,6 +70,15 @@
|
|||||||
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
|
||||||
data-accordion="false">
|
data-accordion="false">
|
||||||
|
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="ShedulePickUp.html" class="nav-link">
|
||||||
|
<i class="nav-icon fas fa-calendar-alt"></i>
|
||||||
|
<p>
|
||||||
|
Shedule Pick-up
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="#todo" class="nav-link">
|
<a href="#todo" class="nav-link">
|
||||||
<i class="nav-icon fas fa-cog"></i>
|
<i class="nav-icon fas fa-cog"></i>
|
||||||
@ -88,14 +97,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="nav-item">
|
|
||||||
<a href="#todo" class="nav-link">
|
|
||||||
<i class="nav-icon fas fa-plus-circle"></i>
|
|
||||||
<p>
|
|
||||||
New Entry
|
|
||||||
</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<!-- /.sidebar-menu -->
|
<!-- /.sidebar-menu -->
|
||||||
|
Reference in New Issue
Block a user