Compare commits

..

No commits in common. "master" and "v1.1.0" have entirely different histories.

11 changed files with 275 additions and 343 deletions

View File

@ -1,28 +0,0 @@
# .github/workflows/gradle-build-pr.yml
name: Run Gradle on pushs
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: eskatos/gradle-command-action@v1
with:
gradle-version: rc
arguments: build
- uses: eskatos/gradle-command-action@v1
with:
gradle-version: rc
arguments: jar

View File

@ -1,35 +0,0 @@
# This file is a template, and might need editing before it works on your project.
# This is the Gradle build system for JVM applications
# https://gradle.org/
# https://github.com/gradle/gradle
image: gradle:latest
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build:
stage: build
script: gradle --build-cache assemble
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
test:
stage: test
script: gradle check
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle

View File

@ -6,7 +6,7 @@ plugins {
}
group 'com.wasteinformationserver'
version '1.1.1'
version '1.0.1'
sourceCompatibility = 1.8

156
db.sql Normal file
View File

@ -0,0 +1,156 @@
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Erstellungszeit: 06. Dez 2019 um 16:11
-- Server-Version: 10.3.11-MariaDB
-- PHP-Version: 5.6.40
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `wasteinformation`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `cities`
--
CREATE TABLE `cities` (
`id` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`name` varchar(256) NOT NULL,
`wastetype` varchar(64) NOT NULL,
`zone` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Daten für Tabelle `cities`
--
INSERT INTO `cities` (`id`, `userid`, `name`, `wastetype`, `zone`) VALUES
(2, 0, 'Steyr', 'Bio', 2),
(3, 0, 'Steyr', 'Bio', 3),
(4, 0, 'Steyr', 'Bio', 4),
(128, 0, 'Steyr', 'Biowaste', 1),
(130, 0, 'abc', 'Biowaste', 1);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `pickupdates`
--
CREATE TABLE `pickupdates` (
`id` int(11) NOT NULL,
`citywastezoneid` int(11) NOT NULL,
`pickupdate` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Daten für Tabelle `pickupdates`
--
INSERT INTO `pickupdates` (`id`, `citywastezoneid`, `pickupdate`) VALUES
(6, 4, '2019-12-06'),
(7, 3, '2019-12-06'),
(8, 2, '2019-12-06'),
(9, 130, '2019-12-26');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `user`
--
CREATE TABLE `user` (
`id` int(11) NOT NULL,
`username` varchar(150) NOT NULL,
`firstName` varchar(32) NOT NULL,
`secondName` varchar(32) NOT NULL,
`password` varchar(32) NOT NULL,
`permission` int(11) NOT NULL DEFAULT 0,
`email` varchar(64) NOT NULL,
`logindate` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Daten für Tabelle `user`
--
INSERT INTO `user` (`id`, `username`, `firstName`, `secondName`, `password`, `permission`, `email`, `logindate`) VALUES
(2, 'lheilige', 'lukas', 'heiligenbrunner', 'c6e2ddf577e0dfdc4366f788f1b27102', 0, 'lukas.heiligenbrunner@gmail.com', '2019-09-20 12:19:31'),
(11, 'meindl', 'emil', 'meindl', '81dc9bdb52d04dc20036dbd8313ed055', 0, 'mailmeindl', '2019-09-27 10:23:46'),
(15, 'horni', 'kk', 'kk', 'c4ca4238a0b923820dcc509a6f75849b', 1, 'kk', '2019-09-27 13:19:09');
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `cities`
--
ALTER TABLE `cities`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `pickupdates`
--
ALTER TABLE `pickupdates`
ADD PRIMARY KEY (`id`),
ADD KEY `citywastezoneid` (`citywastezoneid`);
--
-- Indizes für die Tabelle `user`
--
ALTER TABLE `user`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `cities`
--
ALTER TABLE `cities`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=131;
--
-- AUTO_INCREMENT für Tabelle `pickupdates`
--
ALTER TABLE `pickupdates`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT für Tabelle `user`
--
ALTER TABLE `user`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `pickupdates`
--
ALTER TABLE `pickupdates`
ADD CONSTRAINT `pickupdates_ibfk_1` FOREIGN KEY (`citywastezoneid`) REFERENCES `cities` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View File

@ -1,5 +1,4 @@
@file:JvmName("Main")
package com.wasteinformationserver
import com.wasteinformationserver.basicutils.Info
@ -8,6 +7,7 @@ import com.wasteinformationserver.basicutils.Storage
import com.wasteinformationserver.db.JDBC
import com.wasteinformationserver.mqtt.MqttService
import com.wasteinformationserver.website.Webserver
import java.io.IOException
/**
* application entry point
@ -22,9 +22,14 @@ fun main() {
Log.info("startup of WasteInformationServer")
Runtime.getRuntime().addShutdownHook(Thread(Runnable {
// shutdown routine
Log.warning("Shutting down ...")
JDBC.getInstance().disconnect();
try {
Thread.sleep(200)
Log.warning("Shutting down ...")
JDBC.getInstance().disconnect();
//shutdown routine
} catch (e: InterruptedException) {
e.printStackTrace()
}
}))
Log.info("Server version: " + Info.getVersion())
@ -32,8 +37,14 @@ fun main() {
//initial connect to db
Log.message("initial login to db")
val stor = Storage.getInstance();
JDBC.init(stor.dbUser, stor.dbPassword, stor.dbName, stor.dbhost, stor.dbPort)
try {
val stor = Storage.getInstance();
JDBC.init(stor.dbUser, stor.dbPassword, stor.dbName, stor.dbhost, stor.dbPort)
//JDBC.init("ingproject", "Kb9Dxklumt76ieq6", "ingproject", "db.power4future.at", 3306)
//JDBC.init("users", "kOpaIJUjkgb9ur6S", "wasteinformation", "192.168.65.15", 3306);
} catch (e: IOException) {
Log.error("no connection to db")
}
//startup web server
@ -44,7 +55,11 @@ fun main() {
//startup mqtt service
Log.message("starting mqtt service")
val m = MqttService.getInstance()
m.init(Storage.getInstance().mqttServer, Storage.getInstance().mqttPort.toString())
m.startupService()
if (JDBC.isConnected()) {
val m = MqttService(Storage.getInstance().mqttServer, Storage.getInstance().mqttPort.toString())
// val m = MqttService("mqtt.heili.eu", "1883")
m.startupService()
}else{
Log.error("could't start mqtt service because of missing db connection!")
}
}

View File

@ -1,18 +1,14 @@
package com.wasteinformationserver.db;
import com.wasteinformationserver.basicutils.Log;
import com.wasteinformationserver.basicutils.Storage;
import com.wasteinformationserver.mqtt.MqttService;
import java.io.IOException;
import java.sql.*;
import java.util.Scanner;
/**
* basic connection class to a Database
*
* @author Lukas Heiligenbrunner
* @author Emil Meindl
*/
public class JDBC {
private static Connection conn;
@ -26,7 +22,7 @@ public class JDBC {
private static String ipc;
private static int portc;
private JDBC(String username, String password, String dbname, String ip, int port) {
private JDBC(String username, String password, String dbname, String ip, int port) throws IOException {
logintodb(username, password, dbname, ip, port);
}
@ -70,7 +66,11 @@ public class JDBC {
*/
public static JDBC getInstance() {
if (!loggedin) {
JDBC = new JDBC(usernamec, passwordc, dbnamec, ipc, portc);
try {
logintodb(usernamec, passwordc, dbnamec, ipc, portc);
} catch (IOException e) {
Log.Log.error("no connetion to db - retrying in 5min");
}
}
return JDBC;
}
@ -85,50 +85,21 @@ public class JDBC {
* @param port Server port
* @throws IOException thrown if no connection to db is possible.
*/
private boolean logintodb(String username, String password, String dbname, String ip, int port) {
private static void logintodb(String username, String password, String dbname, String ip, int port) throws IOException {
try {
DriverManager.setLoginTimeout(1);
conn = DriverManager.getConnection(
"jdbc:mysql://" + ip + ":" + port + "/" + dbname + "?useSSL=false&serverTimezone=CET",
username,
password);
checkDBStructure();
loggedin = true;
Log.Log.message("Connected to database");
} catch (SQLException e) {
// reconnect every 10 sec
Log.Log.warning("Database-Connection not possible");
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(10 * 1000);
} catch (InterruptedException interruptedException) {
interruptedException.printStackTrace();
}
Log.Log.debug("Reading config");
Storage st = Storage.Companion.getInstance();
st.init();
usernamec = st.getDbName();
passwordc = st.getDbPassword();
dbnamec = st.getDbName();
ipc = st.getDbhost();
portc = st.getDbPort();
Log.Log.info("Retry connection");
loggedin = logintodb(usernamec, passwordc, dbnamec, ipc, portc);
if (loggedin) {
// startup mqtt service if successfully connected
MqttService srvc = MqttService.Companion.getInstance();
srvc.init(st.getMqttServer(), String.valueOf(st.getMqttPort()));
srvc.startupService();
}
}
}).start();
throw new IOException("No connection to database");
// todo reconnect every 5mins or something
}
return loggedin;
}
public void disconnect() {
public void disconnect(){
try {
conn.close();
} catch (SQLException throwables) {
@ -144,19 +115,12 @@ public class JDBC {
*/
public ResultSet executeQuery(String sql) {
try {
conn.isValid(5);
PreparedStatement stmt = conn.prepareStatement(sql);
return stmt.executeQuery();
} catch (SQLNonTransientConnectionException ee) {
if (logintodb(usernamec, passwordc, dbnamec, ipc, portc)) {
return this.executeQuery(sql);
} else {
return null;
}
} catch (SQLException e) {
return null;
e.printStackTrace();
}
return null;
}
/**
@ -167,17 +131,9 @@ public class JDBC {
* @throws SQLException
*/
public int executeUpdate(String sql) throws SQLException {
try {
conn.isValid(2);
PreparedStatement stmt = conn.prepareStatement(sql);
return stmt.executeUpdate();
} catch (SQLNonTransientConnectionException ee) {
if (logintodb(usernamec, passwordc, dbnamec, ipc, portc)) {
return this.executeUpdate(sql);
} else {
throw new SQLNonTransientConnectionException();
}
}
PreparedStatement stmt = conn.prepareStatement(sql);
return stmt.executeUpdate();
}
/**
@ -188,42 +144,4 @@ public class JDBC {
public static boolean isConnected() {
return loggedin;
}
/**
* validate the correctness of the current sql db structure
*/
public void checkDBStructure() {
try {
ResultSet seti = executeQuery("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '" + dbnamec + "'");
seti.last();
Log.Log.debug("found " + seti.getInt(1) + " tables in db");
if (seti.getInt(1) != 5) {
// structure not valid
Log.Log.info("recreating Database structure!");
Scanner s = new Scanner(getClass().getResourceAsStream("/db.sql"));
s.useDelimiter("(;(\r)?\n)|(--\n)");
Statement st = null;
try {
st = conn.createStatement();
while (s.hasNext()) {
String line = s.next();
if (line.startsWith("/*!") && line.endsWith("*/")) {
int i = line.indexOf(' ');
line = line.substring(i + 1, line.length() - " */".length());
}
if (line.trim().length() > 0) {
executeUpdate(line);
}
}
} finally {
if (st != null) st.close();
}
} else {
Log.Log.message("found valid database structure!");
}
} catch (SQLException e) {
Log.Log.error("a unhandled SQLexception occured at db structure creation.");
}
}
}

View File

@ -1,6 +1,5 @@
package com.wasteinformationserver.mqtt
import com.wasteinformationserver.basicutils.Log
import com.wasteinformationserver.basicutils.Log.Log.debug
import com.wasteinformationserver.basicutils.Log.Log.error
import com.wasteinformationserver.basicutils.Log.Log.info
@ -20,84 +19,71 @@ import java.util.*
* @author Lukas Heiligenbrunner
* @author Gregor Dutzler
*/
class MqttService {
private var serveruri: String = "";
private lateinit var client: MqttClient;
class MqttService(serverurl: String, port: String) {
private val serveruri: String = "tcp://$serverurl:$port"
private var client: MqttClient = MqttClient(serveruri, "JavaSample42")
private var db: JDBC = JDBC.getInstance()
companion object {
private val obj = MqttService()
fun getInstance(): MqttService {
return obj;
}
}
fun init(serverurl: String, port: String){
serveruri = "tcp://$serverurl:$port"
/**
* initial login to db
*/
init {
connectToDb()
}
/**
* startup of the mqtt service
*/
fun startupService() {
if(JDBC.isConnected()) {
try {
client = MqttClient(serveruri, "WasteInformationServerID")
val connOpts = MqttConnectOptions()
connOpts.isCleanSession = true
client.connect(connOpts)
client.setCallback(object : MqttCallback {
override fun connectionLost(throwable: Throwable) {
error("connection lost")
Thread.sleep(500)
// restart service
startupService()
}
try {
client = MqttClient(serveruri, "JavaSample42")
val connOpts = MqttConnectOptions()
connOpts.isCleanSession = true
client.connect(connOpts)
client.setCallback(object : MqttCallback {
override fun connectionLost(throwable: Throwable) {
error("connection lost")
connectToDb()
}
override fun messageArrived(s: String, mqttMessage: MqttMessage) {
val deviceid = String(mqttMessage.payload)
message("received Request from PCB")
val res = db.executeQuery("SELECT * from devices WHERE DeviceID=$deviceid")
try {
res.last()
if (res.row != 0) {
// existing device
res.first()
val devicecities = db.executeQuery("SELECT * from device_city WHERE DeviceID='$deviceid'")
devicecities.last()
if (devicecities.row == 0) {
// not configured
tramsmitMessage("$deviceid,-1")
}
else {
devicecities.first()
devicecities.previous()
while (devicecities.next()) {
val cityid = devicecities.getInt("CityID")
checkDatabase(cityid, deviceid.toInt())
}
}
}
else {
// new device
db.executeUpdate("INSERT INTO devices (DeviceID) VALUES ($deviceid)")
info("new device registered to server")
override fun messageArrived(s: String, mqttMessage: MqttMessage) {
val deviceid = String(mqttMessage.payload)
message("received Request from PCB")
val res = db.executeQuery("SELECT * from devices WHERE DeviceID=$deviceid")
try {
res.last()
if (res.row != 0) { //existing device
res.first()
val devicecities = db.executeQuery("SELECT * from device_city WHERE DeviceID='$deviceid'")
devicecities.last()
if (devicecities.row == 0) { //not configured
tramsmitMessage("$deviceid,-1")
}
} catch (e: SQLException) {
e.printStackTrace()
}
}
else {
devicecities.first()
devicecities.previous()
override fun deliveryComplete(iMqttDeliveryToken: IMqttDeliveryToken) {}
})
client.subscribe("TopicIn")
} catch (e: MqttException) {
error("Connection to the Broker failed")
}
}else{
Log.error("could't start mqtt service because of missing db connection!")
while (devicecities.next()) {
val cityid = devicecities.getInt("CityID")
checkDatabase(cityid, deviceid.toInt())
}
}
}
else { //new device
db.executeUpdate("INSERT INTO devices (DeviceID) VALUES ($deviceid)")
info("new device registered to server")
tramsmitMessage("$deviceid,-1")
}
} catch (e: SQLException) {
e.printStackTrace()
}
}
override fun deliveryComplete(iMqttDeliveryToken: IMqttDeliveryToken) {}
})
client.subscribe("TopicIn")
} catch (e: MqttException) {
error("Connection to the Broker failed")
}
}
@ -112,8 +98,7 @@ class MqttService {
val set2 = db.executeQuery("SELECT * FROM cities WHERE `id`='$citywastezoneid'")
try {
set2.last()
if (set2.row != 1) {
//error
if (set2.row != 1) { //error
warning("multiple Rows with same city id found - DB Error")
}
else {
@ -126,8 +111,7 @@ class MqttService {
val result = db.executeQuery("SELECT pickupdates.pickupdate FROM pickupdates WHERE pickupdates.citywastezoneid=$citywastezoneid")
try {
result.last()
if (result.row == 0) {
//if not found in db --> send zero
if (result.row == 0) { //if not found in db --> send zero
debug("not found in db")
tramsmitMessage("$deviceid,$wastetype,0")
}
@ -146,8 +130,7 @@ class MqttService {
return
}
} while (result.next())
tramsmitMessage("$deviceid,$wastetype,0")
//transmit zero if not returned before
tramsmitMessage("$deviceid,$wastetype,0") //transmit zero if not returned before
}
} catch (e: SQLException) {
e.printStackTrace()
@ -182,4 +165,11 @@ class MqttService {
else -> 0
}
}
/**
* receives connection object and initial connection to db
*/
private fun connectToDb() {
db = JDBC.getInstance()
}
}

View File

@ -7,6 +7,7 @@ import com.wasteinformationserver.basicutils.Storage
import com.wasteinformationserver.db.JDBC
import com.wasteinformationserver.website.HttpTools.Companion.stringToMD5
import com.wasteinformationserver.website.basicrequest.PostRequest
import java.io.IOException
import java.sql.SQLException
import java.util.*
@ -42,7 +43,7 @@ class LoginRequest : PostRequest() {
s.last()
if (s.row == 1) {
//success
if (stringToMD5(password!!) == s.getString("password")) {
if (StringToMD5(password!!) == s.getString("password")) {
debug("login success")
LoginState.getObject().logIn()
LoginState.getObject().setAccountData(username, s.getString("firstName"), s.getString("secondName"), s.getString("email"), s.getInt("permission"))

View File

@ -1,87 +0,0 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
CREATE TABLE cities
(
id int(11) NOT NULL,
userid int(11) NOT NULL,
name varchar(256) NOT NULL,
wastetype varchar(64) NOT NULL,
zone int(11) NOT NULL
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE devices
(
DeviceID int(11) NOT NULL,
CityID int(11) NOT NULL DEFAULT '-1',
DeviceName varchar(15) DEFAULT NULL,
DeviceLocation varchar(15) DEFAULT NULL
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE device_city
(
DeviceID int(11) NOT NULL,
CityID int(11) NOT NULL
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
CREATE TABLE pickupdates
(
id int(11) NOT NULL,
citywastezoneid int(11) NOT NULL,
pickupdate date NOT NULL
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE `user`
(
id int(11) NOT NULL,
username varchar(150) NOT NULL,
firstName varchar(32) NOT NULL,
secondName varchar(32) NOT NULL,
password varchar(32) NOT NULL,
permission int(11) NOT NULL DEFAULT '0',
email varchar(64) NOT NULL,
logindate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
ALTER TABLE cities
ADD PRIMARY KEY (id);
ALTER TABLE devices
ADD PRIMARY KEY (DeviceID);
ALTER TABLE pickupdates
ADD PRIMARY KEY (id),
ADD KEY citywastezoneid (citywastezoneid);
ALTER TABLE `user`
ADD PRIMARY KEY (id);
ALTER TABLE cities
MODIFY id int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT = 143;
ALTER TABLE pickupdates
MODIFY id int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT = 67;
ALTER TABLE `user`
MODIFY id int(11) NOT NULL AUTO_INCREMENT,
AUTO_INCREMENT = 17;
ALTER TABLE pickupdates
ADD CONSTRAINT pickupdates_ibfk_1 FOREIGN KEY (citywastezoneid) REFERENCES cities (id);
/*!40101 SET CHARACTER_SET_CLIENT = @OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS = @OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION = @OLD_COLLATION_CONNECTION */;

View File

@ -269,7 +269,7 @@ class Dashboard {
}
$(".delbtn").click(function (event) {
const id = event.target.getAttribute("dataid");
var id = event.target.getAttribute("dataid");
console.log("clicked btn data " + id);
$.post('/senddata/wastedata', 'action=deletecity&id=' + id, function (data) {
console.log(data);
@ -283,12 +283,12 @@ class Dashboard {
console.log('Popup closed. ')
});
_this.reloadtable();
reloadtable();
} else if (data.status === "dependenciesnotdeleted") {
Swal.fire({
icon: "warning",
title: 'This city is a dependency of a date',
html: 'Please delete all dependencies first!',
html: 'Do you want do delete it anyway with all dependencies?',
}).then((result) => {
console.log('Popup closed. ')
@ -353,7 +353,7 @@ class Dashboard {
console.log('Popup closed. ')
});
_this.reloadDateTable();
reloadDateTable();
} else if (data.status == "dependenciesnotdeleted") {
Swal.fire({
icon: "warning",

View File

@ -3,17 +3,19 @@
<head>
<meta charset="utf-8">
<title>Login Page</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="lib/bootstrap.min.css">
<!--Made with love by Mutiullah Samim -->
<!-- jQuery library -->
<script src="lib/AdminLTE/plugins/jquery/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="lib/bootstrap.min.css">
<!-- Popper JS -->
<script src="lib/popper.min.js"></script>
<!-- jQuery library -->
<script src="lib/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="lib/AdminLTE/plugins/bootstrap/js/bootstrap.min.js"></script>
<!-- Popper JS -->
<script src="lib/popper.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="lib/bootstrap.min.js"></script>
<!--Fontawesome CDN-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">