├── Scoplant ├── __init__.py ├── asgi.py ├── wsgi.py ├── urls.py └── settings.py ├── ScoplantAccounts ├── __init__.py ├── models.py ├── tests.py ├── admin.py ├── apps.py ├── templates │ ├── shared │ │ ├── _FooterRef.html │ │ ├── _MainLays.html │ │ └── _HeaderRef.html │ ├── password_reset_email.txt │ ├── password_reset_done.html │ ├── password_reset_complete.html │ ├── password_reset.html │ ├── password_confirm.html │ ├── Login.html │ └── SignUp.html ├── urls.py ├── forms.py └── views.py ├── ScoplantDevices ├── __init__.py ├── tests.py ├── views.py ├── apps.py ├── admin.py └── models.py ├── ScoplantLogInfo ├── __init__.py ├── tests.py ├── views.py ├── apps.py ├── admin.py └── models.py ├── ScoplantUserPanel ├── __init__.py ├── templates │ ├── 500.html │ ├── shared │ │ ├── _HeaderReferences.html │ │ └── _FooterReferences.html │ ├── reporting.html │ └── 404.html ├── tests.py ├── apps.py ├── urls.py ├── admin.py ├── models.py ├── mqtt.py └── forms.py ├── assets ├── images │ ├── h1.png │ ├── h2.png │ ├── v1.png │ ├── v2.PNG │ ├── v3.PNG │ ├── v4.PNG │ ├── v5.PNG │ ├── v6.PNG │ ├── logo.png │ ├── avatar.png │ ├── boxed-bg.jpg │ ├── boxed-bg.png │ ├── icons │ │ └── favicon.ico │ ├── login-animation.gif │ ├── Avatars │ │ ├── Avatar 1.jpg │ │ ├── Avatar 10.jpg │ │ ├── Avatar 11.jpg │ │ ├── Avatar 12.jpg │ │ ├── Avatar 2.jpg │ │ ├── Avatar 3.jpg │ │ ├── Avatar 4.jpg │ │ ├── Avatar 5.jpg │ │ ├── Avatar 6.jpg │ │ ├── Avatar 7.jpg │ │ ├── Avatar 8.jpg │ │ └── Avatar 9.jpg │ └── signup-animation.gif ├── fonts │ ├── vazir │ │ ├── Vazir.eot │ │ ├── Vazir.ttf │ │ ├── Vazir.woff │ │ ├── Vazir.woff2 │ │ ├── Vazir-Bold.eot │ │ ├── Vazir-Bold.ttf │ │ ├── Vazir-Thin.eot │ │ ├── Vazir-Thin.ttf │ │ ├── Vazir-Black.eot │ │ ├── Vazir-Black.ttf │ │ ├── Vazir-Black.woff │ │ ├── Vazir-Bold.woff │ │ ├── Vazir-Bold.woff2 │ │ ├── Vazir-Light.eot │ │ ├── Vazir-Light.ttf │ │ ├── Vazir-Light.woff │ │ ├── Vazir-Medium.eot │ │ ├── Vazir-Medium.ttf │ │ ├── Vazir-Thin.woff │ │ ├── Vazir-Thin.woff2 │ │ ├── Vazir-Black.woff2 │ │ ├── Vazir-Light.woff2 │ │ ├── Vazir-Medium.woff │ │ └── Vazir-Medium.woff2 │ ├── IRANsanDN │ │ ├── IRANSansDN │ │ │ ├── IRANSansDN.eot │ │ │ ├── IRANSansDN.otf │ │ │ ├── IRANSansDN.ttf │ │ │ └── IRANSansDN.woff │ │ ├── IRANSansDN-Bold │ │ │ ├── IRANSansDN-Bold.eot │ │ │ ├── IRANSansDN-Bold.otf │ │ │ ├── IRANSansDN-Bold.ttf │ │ │ └── IRANSansDN-Bold.woff │ │ └── IRANSansDN_Light │ │ │ ├── IRANSansDN_Light.eot │ │ │ ├── IRANSansDN_Light.otf │ │ │ ├── IRANSansDN_Light.ttf │ │ │ └── IRANSansDN_Light.woff │ └── font-awesome-4.7.0 │ │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ ├── screen-reader.less │ │ ├── fixed-width.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── core.less │ │ ├── stacked.less │ │ ├── font-awesome.less │ │ ├── bordered-pulled.less │ │ ├── rotated-flipped.less │ │ ├── path.less │ │ ├── animated.less │ │ └── mixins.less │ │ ├── scss │ │ ├── _fixed-width.scss │ │ ├── _screen-reader.scss │ │ ├── _larger.scss │ │ ├── _list.scss │ │ ├── _core.scss │ │ ├── font-awesome.scss │ │ ├── _stacked.scss │ │ ├── _bordered-pulled.scss │ │ ├── _rotated-flipped.scss │ │ ├── _path.scss │ │ ├── _animated.scss │ │ └── _mixins.scss │ │ └── HELP-US-OUT.txt ├── plugins │ ├── font-awesome │ │ └── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ ├── datatables │ │ └── extensions │ │ │ └── AutoFill │ │ │ ├── images │ │ │ └── filler.png │ │ │ ├── css │ │ │ ├── dataTables.autoFill.min.css │ │ │ └── dataTables.autoFill.css │ │ │ └── Readme.txt │ ├── morris │ │ └── morris.css │ ├── select2 │ │ └── i18n │ │ │ ├── zh-TW.js │ │ │ ├── az.js │ │ │ ├── zh-CN.js │ │ │ ├── fi.js │ │ │ ├── id.js │ │ │ ├── hu.js │ │ │ ├── tr.js │ │ │ ├── th.js │ │ │ ├── ko.js │ │ │ ├── nb.js │ │ │ ├── vi.js │ │ │ ├── is.js │ │ │ ├── de.js │ │ │ ├── et.js │ │ │ ├── hr.js │ │ │ ├── sv.js │ │ │ ├── bg.js │ │ │ ├── he.js │ │ │ ├── gl.js │ │ │ ├── da.js │ │ │ ├── fr.js │ │ │ ├── ro.js │ │ │ ├── en.js │ │ │ ├── hi.js │ │ │ ├── fa.js │ │ │ ├── mk.js │ │ │ ├── eu.js │ │ │ ├── pt-BR.js │ │ │ ├── lv.js │ │ │ ├── pt.js │ │ │ ├── es.js │ │ │ ├── lt.js │ │ │ ├── nl.js │ │ │ ├── ca.js │ │ │ ├── it.js │ │ │ ├── sr.js │ │ │ ├── pl.js │ │ │ ├── uk.js │ │ │ ├── ru.js │ │ │ ├── sk.js │ │ │ └── cs.js │ ├── jvectormap │ │ └── jquery-jvectormap-1.2.2.css │ ├── kamadatepicker │ │ ├── kamadatepicker.min.css │ │ ├── kamadatepicker.holidays.js │ │ └── kamadatepicker.scss │ ├── bootstrap-wysihtml5 │ │ ├── bootstrap3-wysihtml5.min.css │ │ └── bootstrap3-wysihtml5.css │ ├── bootstrap │ │ └── css │ │ │ ├── bootstrap-reboot.min.css │ │ │ └── bootstrap-reboot.css │ └── slimScroll │ │ └── jquery.slimscroll.min.js ├── js │ ├── ruang-admin.min.js │ ├── main.js │ └── demo.js └── vendor │ ├── jquery │ └── jquery.easing.min.js │ ├── bootstrap │ ├── js │ │ └── ruang-admin.js │ └── css │ │ ├── bootstrap-reboot.min.css │ │ └── bootstrap-reboot.css │ └── tilt │ └── tilt.jquery.min.js ├── .gitattributes ├── requirements.txt ├── mqtt ├── subscriber.py └── publisher.py ├── manage.py ├── LICENSE ├── .gitignore └── README.md /Scoplant/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ScoplantAccounts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ScoplantDevices/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ScoplantLogInfo/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ScoplantUserPanel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ScoplantUserPanel/templates/500.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ScoplantAccounts/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /ScoplantAccounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /ScoplantDevices/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /ScoplantLogInfo/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /ScoplantUserPanel/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /ScoplantAccounts/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /ScoplantDevices/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /ScoplantLogInfo/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /assets/images/h1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/h1.png -------------------------------------------------------------------------------- /assets/images/h2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/h2.png -------------------------------------------------------------------------------- /assets/images/v1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/v1.png -------------------------------------------------------------------------------- /assets/images/v2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/v2.PNG -------------------------------------------------------------------------------- /assets/images/v3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/v3.PNG -------------------------------------------------------------------------------- /assets/images/v4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/v4.PNG -------------------------------------------------------------------------------- /assets/images/v5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/v5.PNG -------------------------------------------------------------------------------- /assets/images/v6.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/v6.PNG -------------------------------------------------------------------------------- /assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/logo.png -------------------------------------------------------------------------------- /assets/images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/avatar.png -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir.eot -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir.ttf -------------------------------------------------------------------------------- /assets/images/boxed-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/boxed-bg.jpg -------------------------------------------------------------------------------- /assets/images/boxed-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/boxed-bg.png -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir.woff -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir.woff2 -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Bold.eot -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Thin.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Thin.eot -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Thin.ttf -------------------------------------------------------------------------------- /assets/images/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/icons/favicon.ico -------------------------------------------------------------------------------- /assets/images/login-animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/login-animation.gif -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Black.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Black.eot -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Black.ttf -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Black.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Black.woff -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Bold.woff -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Bold.woff2 -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Light.eot -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Light.woff -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Medium.eot -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Thin.woff -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Thin.woff2 -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 1.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 10.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 11.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 12.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 2.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 3.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 4.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 5.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 6.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 7.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 8.jpg -------------------------------------------------------------------------------- /assets/images/Avatars/Avatar 9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/Avatars/Avatar 9.jpg -------------------------------------------------------------------------------- /assets/images/signup-animation.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/images/signup-animation.gif -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Black.woff2 -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Light.woff2 -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Medium.woff -------------------------------------------------------------------------------- /assets/fonts/vazir/Vazir-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/vazir/Vazir-Medium.woff2 -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.eot -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.otf -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.ttf -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN/IRANSansDN.woff -------------------------------------------------------------------------------- /assets/plugins/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/plugins/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/font-awesome-4.7.0/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.eot -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.otf -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.ttf -------------------------------------------------------------------------------- /assets/plugins/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/plugins/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/plugins/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/plugins/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/plugins/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/plugins/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN-Bold/IRANSansDN-Bold.woff -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.eot -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.otf -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.ttf -------------------------------------------------------------------------------- /assets/plugins/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/plugins/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /ScoplantAccounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ScoplantaccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'ScoplantAccounts' 7 | -------------------------------------------------------------------------------- /ScoplantDevices/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ScoplantdevicesConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'ScoplantDevices' 7 | -------------------------------------------------------------------------------- /ScoplantLogInfo/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ScoplantloginfoConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'ScoplantLogInfo' 7 | -------------------------------------------------------------------------------- /assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/IRANsanDN/IRANSansDN_Light/IRANSansDN_Light.woff -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/fonts/font-awesome-4.7.0/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /assets/plugins/datatables/extensions/AutoFill/images/filler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alialaei1/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor/HEAD/assets/plugins/datatables/extensions/AutoFill/images/filler.png -------------------------------------------------------------------------------- /ScoplantUserPanel/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ScoplantuserpanelConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'ScoplantUserPanel' 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.html linguist-detectable=false 2 | *.js linguist-detectable=false 3 | *.css linguist-detectable=false 4 | *.scss linguist-detectable=false 5 | *.less linguist-detectable=false 6 | *.php linguist-detectable=false 7 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | autopep8==1.5.7 2 | Django==3.2.6 3 | django-render-partial==0.4 4 | djongo==1.3.6 5 | jalaali==0.0.1 6 | jdatetime==3.6.2 7 | Pillow==8.3.1 8 | pymongo==3.12.0 9 | xhtml2pdf==0.2.5 10 | openpyxl==3.0.9 11 | paho-mqtt==1.6.1 12 | plotly==5.4.0 13 | pandas==1.3.4 14 | kaleido==0.2.1 -------------------------------------------------------------------------------- /ScoplantLogInfo/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import * 3 | 4 | # Register your models here. 5 | 6 | class LogInfoAdmin(admin.ModelAdmin): 7 | list_display = ['__str__', 'id_device', 'Date_Log','Time_Log','Battery_Log'] 8 | 9 | 10 | class Meta: 11 | model = LogInfo 12 | 13 | 14 | admin.site.register(LogInfo, LogInfoAdmin) -------------------------------------------------------------------------------- /ScoplantUserPanel/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from .views import * 3 | 4 | 5 | 6 | urlpatterns = [ 7 | path('',add_device, name='add_device'), 8 | path('device-info//',device_info, name='device_info'), 9 | path('remove-device/',remove_device), 10 | path('reports/', reporting_device, name='reporting'), 11 | ] 12 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /assets/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.min.css: -------------------------------------------------------------------------------- 1 | div.AutoFill_filler{display:none;position:absolute;height:14px;width:14px;background:url(../images/filler.png) no-repeat center center;z-index:1002}div.AutoFill_border{display:none;position:absolute;background-color:#0063dc;z-index:1001;box-shadow:0px 0px 5px #76b4ff;-moz-box-shadow:0px 0px 5px #76b4ff;-webkit-box-shadow:0px 0px 5px #76b4ff} 2 | -------------------------------------------------------------------------------- /ScoplantUserPanel/admin.py: -------------------------------------------------------------------------------- 1 | from .models import * 2 | from django.contrib import admin 3 | 4 | # Register your models here. 5 | 6 | 7 | class AddDeviceInfoAdmin(admin.ModelAdmin): 8 | list_display = ['__str__', 'User', 'Name', 'Location', 'Date', 'Time'] 9 | search_fields = ['Name', 'Location'] 10 | 11 | class Meta: 12 | model = AddDeviceInfo 13 | 14 | 15 | 16 | admin.site.register(AddDeviceInfo, AddDeviceInfoAdmin) 17 | -------------------------------------------------------------------------------- /assets/plugins/morris/morris.css: -------------------------------------------------------------------------------- 1 | .morris-hover{position:absolute;z-index:1090;}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#f9f9f9;background:rgba(0, 0, 0, 0.8);border:solid 2px rgba(0, 0, 0, 0.9);font-weight: 600;font-size:14px;text-align:center;}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0;} 2 | .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0;} 3 | -------------------------------------------------------------------------------- /ScoplantDevices/admin.py: -------------------------------------------------------------------------------- 1 | from .models import AccountDevice 2 | from django.contrib import admin 3 | 4 | # Register your models here. 5 | 6 | 7 | class AccountDeviceAdmin(admin.ModelAdmin): 8 | list_display = ['__str__', 'Username', 'Version','Active'] 9 | list_filter = ['Active'] 10 | search_fields = ['Username'] 11 | 12 | 13 | class Meta: 14 | model = AccountDevice 15 | 16 | 17 | admin.site.register(AccountDevice, AccountDeviceAdmin) 18 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /Scoplant/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for Scoplant project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Scoplant.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Scoplant/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for Scoplant project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Scoplant.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ScoplantAccounts/templates/shared/_FooterRef.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /ScoplantAccounts/templates/password_reset_email.txt: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hello, 3 | 4 | We received a request to reset the password for your account for this email address. To initiate the password reset process for your account, click the link below. 5 | 6 | {{ protocol }}://{{ domain }}{% url 'password_confirm' uidb64=uid token=token %} 7 | 8 | This link can only be used once. If you need to reset your password again, please visit {{ protocol }}://{{domain}} and request another reset. 9 | 10 | If you did not make this request, you can simply ignore this email. 11 | 12 | Sincerely, 13 | The Website Team 14 | 15 | {% endautoescape %} -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/zh-TW.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/datatables/extensions/AutoFill/css/dataTables.autoFill.css: -------------------------------------------------------------------------------- 1 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2 | * AutoFill styles 3 | */ 4 | 5 | div.AutoFill_filler { 6 | display: none; 7 | position: absolute; 8 | height: 14px; 9 | width: 14px; 10 | background: url(../images/filler.png) no-repeat center center; 11 | z-index: 1002; 12 | } 13 | 14 | div.AutoFill_border { 15 | display: none; 16 | position: absolute; 17 | background-color: #0063dc; 18 | z-index: 1001; 19 | 20 | box-shadow: 0px 0px 5px #76b4ff; 21 | -moz-box-shadow: 0px 0px 5px #76b4ff; 22 | -webkit-box-shadow: 0px 0px 5px #76b4ff; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /mqtt/subscriber.py: -------------------------------------------------------------------------------- 1 | import time 2 | import json 3 | import paho.mqtt.client as mqtt 4 | from random import randint 5 | from datetime import datetime 6 | def on_message(client, userdata, message): 7 | data = message.payload.decode("utf-8") 8 | # dict_data = json.loads(data) 9 | # SampleRate = dict_data["S"] 10 | print(f"The Sample Rate is => {data}") 11 | 12 | broker = "mqtt.eclipseprojects.io" 13 | 14 | client = mqtt.Client(client_id="scoplantuser", clean_session=False, userdata=None) 15 | 16 | client.connect(broker) 17 | client.loop_start() 18 | while True: 19 | client.subscribe("scoplant/s/sensor/v1/1133") 20 | client.on_message = on_message 21 | time.sleep(2) -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/az.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/id.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantUserPanel/models.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.models import User 2 | from django.db import models 3 | 4 | # Create your models here. 5 | 6 | 7 | class AddDeviceInfo(models.Model): 8 | User = models.ForeignKey(User, on_delete=models.CASCADE) 9 | id = models.IntegerField(primary_key=True) 10 | Username = models.CharField(max_length=64) 11 | Version = models.CharField(max_length=64) 12 | Name = models.CharField(max_length=64) 13 | Location = models.CharField(max_length=64) 14 | Time = models.TimeField(auto_now=True) 15 | Date = models.CharField(max_length=10) 16 | Sampling_Rate = models.IntegerField(default=60) 17 | 18 | def __str__(self): 19 | return self.Username -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/tr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/th.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/ko.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/nb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/vi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Scoplant.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/is.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/sv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantAccounts/templates/shared/_MainLays.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | {% block head-content %} {% endblock %} {% include 'shared/_HeaderRef.html' %} {% block header_ref %}{% endblock %} 12 | 13 | 14 | 15 |
16 |
17 | 18 | 19 | 20 | {% block content %}{% endblock %} 21 | 22 | 23 |
24 |
25 | {% include 'shared/_FooterRef.html' %} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/bg.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"התוצאות לא נטענו בהלכה"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק "+t+" תווים";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס "+t+" תווים או יותר";return n},loadingMore:function(){return"טען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור רק "+e.maximum+" פריטים";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantAccounts/urls.py: -------------------------------------------------------------------------------- 1 | 2 | from django.contrib.auth import views as auth_views 3 | from django.urls import path 4 | from .views import * 5 | 6 | 7 | urlpatterns = [ 8 | path('signup', user_signup, name='signup'), 9 | path('login', user_login, name='login'), 10 | path("password_reset", password_reset_request, name="password_reset"), 11 | path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='templates/password_reset_done.html'), name='password_reset_done'), 12 | path('reset///', auth_views.PasswordResetConfirmView.as_view(template_name="password_confirm.html"), name='password_confirm'), 13 | path('reset/done/', auth_views.PasswordResetCompleteView.as_view(template_name='password_reset_complete.html'), name='password_reset_complete'), 14 | ] -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantAccounts/templates/shared/_HeaderRef.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ScoplantDevices/models.py: -------------------------------------------------------------------------------- 1 | import uuid 2 | from django.db import models 3 | 4 | # Create your models here. 5 | 6 | class AccountDevice(models.Model): 7 | Username = models.CharField(max_length=64,unique=True) 8 | Version = models.CharField(max_length=64) 9 | id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) 10 | MQTT_ID = models.CharField(max_length=64) 11 | MQTT_USERNAME = models.CharField(max_length=64) 12 | MQTT_PASSWORD = models.CharField(max_length=64) 13 | MQTT_PUB = models.CharField(max_length=64) 14 | MQTT_SUB = models.CharField(max_length=64) 15 | Date = models.DateTimeField(auto_now=True) 16 | Active = models.BooleanField(default=False,editable=False ,help_text="Warning! Do Not Active This") 17 | 18 | def __str__(self): 19 | return self.Username -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să introduceți mai puțin de "+t;return n+=" caracter",n!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți incă "+t;return n+=" caracter",n!==1&&(n+="e"),n},loadingMore:function(){return"Se încarcă…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",t!==1&&(t+="e"),t},noResults:function(){return"Nu a fost găsit nimic"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"ių","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"ių","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t="Er kunnen maar "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t+=" worden geselecteerd",t},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ScoplantAccounts/templates/password_reset_done.html: -------------------------------------------------------------------------------- 1 | {% extends 'shared/_MainLays.html' %} {% load static %}{% block head-content %} 2 | {{ title }} 3 | {% endblock %} {% block content %} 4 |
5 | 20 | 21 |
22 | {% endblock %} -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maxiumum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantAccounts/templates/password_reset_complete.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% extends 'shared/_MainLays.html' %} {% load static %}{% block head-content %} 5 | {{ title }} 6 | {% endblock %} {% block content %} 7 |
8 | 18 | 19 |
20 | 28 | {% endblock %} -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantLogInfo/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from ScoplantUserPanel.models import * 3 | import uuid 4 | # Create your models here. 5 | 6 | 7 | class LogInfo(models.Model): 8 | # The device username beacus its uniqu 9 | id_device = models.ForeignKey(AddDeviceInfo, on_delete=models.CASCADE) 10 | id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) 11 | Date_Log = models.DateField(auto_now=True) 12 | Time_Log = models.CharField(max_length=10) 13 | Battery_Log = models.CharField(max_length=3) 14 | Lux_Log = models.CharField(max_length=10) 15 | Humidity_Log = models.CharField(max_length=10) 16 | Temperature_Log = models.CharField(max_length=10) 17 | SoilMoisture_Log = models.CharField(max_length=10) 18 | SoilTemperature_Log = models.CharField(max_length=10) 19 | EC_Log = models.CharField(max_length=10) 20 | 21 | def __str__(self): 22 | return f"{self.id_device}---{self.Date_Log}-{self.Time_Log}" 23 | -------------------------------------------------------------------------------- /assets/plugins/jvectormap/jquery-jvectormap-1.2.2.css: -------------------------------------------------------------------------------- 1 | .jvectormap-label { 2 | position: absolute; 3 | display: none; 4 | border: solid 1px #CDCDCD; 5 | -webkit-border-radius: 3px; 6 | -moz-border-radius: 3px; 7 | border-radius: 3px; 8 | background: #292929; 9 | color: white; 10 | font-size: 10px!important; 11 | padding: 3px; 12 | z-index: 9999; 13 | } 14 | 15 | .jvectormap-zoomin, .jvectormap-zoomout { 16 | position: absolute; 17 | top: 100%; 18 | margin-top: -25px; 19 | -webkit-border-radius: 2px; 20 | -moz-border-radius: 2px; 21 | border-radius: 2px; 22 | background: #d2d6de;//rgba(0,0,0,0.4); 23 | padding: 5px; 24 | color: #444; 25 | cursor: pointer; 26 | line-height: 10px; 27 | text-align: center; 28 | font-weight: bold; 29 | box-shadow: 0 1px 2px rgba(0,0,0,0.2); 30 | } 31 | 32 | .jvectormap-zoomin { 33 | left: 100%; 34 | margin-left: -50px; 35 | } 36 | 37 | .jvectormap-zoomout { 38 | left: 100%; 39 | margin-left: -30px; 40 | } -------------------------------------------------------------------------------- /mqtt/publisher.py: -------------------------------------------------------------------------------- 1 | import time 2 | import paho.mqtt.client as mqtt 3 | from random import randint 4 | import json 5 | import datetime 6 | mqttBroker = "mqtt.eclipseprojects.io" 7 | 8 | client = mqtt.Client(client_id="scoplantadmin") 9 | client.connect(mqttBroker) 10 | 11 | str(datetime.date.today()) 12 | while True: 13 | our_data_in_dict = { 14 | "A": str(randint(1, 100)), 15 | "B": str(randint(1, 100)), 16 | "C": str(randint(1, 100)), 17 | "D": str(randint(1, 100)), 18 | "E": str(randint(1, 100)), 19 | "F": str(randint(1, 100)), 20 | "G": str(randint(1, 100)), 21 | "H": datetime.datetime.now().time().strftime("%H:%M:%S"), 22 | # "I": , we dont need date in jason here 23 | "J": str(randint(1, 100)), 24 | "K": str(randint(1, 100)), 25 | "L": str(randint(1, 100)), 26 | } 27 | 28 | data_json = json.dumps(our_data_in_dict) 29 | 30 | client.publish("scoplant/p/sensor/v1/5414273529", data_json) 31 | 32 | print("Message Send!") 33 | 34 | time.sleep(5) 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Ali Alaei 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /assets/plugins/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ 2 | 3 | (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /ScoplantUserPanel/templates/shared/_HeaderReferences.html: -------------------------------------------------------------------------------- 1 | {% load static %} 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 | -------------------------------------------------------------------------------- /assets/js/ruang-admin.min.js: -------------------------------------------------------------------------------- 1 | !function($){"use strict";$("#sidebarToggle, #sidebarToggleTop").on("click",(function(e){$("body").toggleClass("sidebar-toggled"),$(".sidebar").toggleClass("toggled"),$(".sidebar").hasClass("toggled")&&$(".sidebar .collapse").collapse("hide")})),$(window).resize((function(){$(window).width()<768&&$(".sidebar .collapse").collapse("hide")})),$("body.fixed-nav .sidebar").on("mousewheel DOMMouseScroll wheel",(function(e){if($(window).width()>768){var e0=e.originalEvent,delta=e0.wheelDelta||-e0.detail;this.scrollTop+=30*(delta<0?1:-1),e.preventDefault()}})),$(document).on("scroll",(function(){var scrollDistance;$(this).scrollTop()>100?$(".scroll-to-top").fadeIn():$(".scroll-to-top").fadeOut()})),$(document).on("click","a.scroll-to-top",(function(e){var $anchor=$(this);$("html, body").stop().animate({scrollTop:$($anchor.attr("href")).offset().top},1e3,"easeInOutExpo"),e.preventDefault()}))}(jQuery),$(document).ready((function(){$("#myBtn").click((function(){$(".modal").modal("show")})),$("#modalLong").click((function(){$(".modal").modal("show")})),$("#modalScroll").click((function(){$(".modal").modal("show")})),$("#modalCenter").click((function(){$(".modal").modal("show")}))})),$((function(){$('[data-toggle="popover"]').popover()})),$(".popover-dismiss").popover({trigger:"focus"});var version=document.getElementById("version-ruangadmin");version.innerHTML="Version 1.1"; -------------------------------------------------------------------------------- /assets/plugins/kamadatepicker/kamadatepicker.min.css: -------------------------------------------------------------------------------- 1 | /*! kamadatepicker - version 1.5.3 */.bd-hide{display:none}.bd-main{background-color:#fff;border:1px solid #000;padding:5px;z-index:9999;width:auto!important;margin:0;box-shadow:0 4px 8px 0 rgba(0,0,0,.2),0 6px 20px 0 rgba(0,0,0,.19)}.bd-calendar{width:210px;padding:0;margin:0}.bd-calendar table{border:none;width:210px}.bd-title{width:210px;padding:0;margin:0}.bd-dropdown{display:inline-block;float:right;width:75px}.bd-dropdown select{width:100%}.bd-dropdown select,.bd-next,.bd-prev{height:30px;border:none;cursor:pointer}.bd-next,.bd-prev{background-repeat:no-repeat;background-position:50% 50%;background-color:#fff;width:30px;margin:0;padding:0;display:inline-block;float:right}.bd-table thead{background-color:#555;color:#fff}.bd-table thead tr{height:30px;cursor:context-menu}.bd-table thead tr th{text-align:center}.bd-table tbody tr td{border:none}.bd-empty-cell,.bd-table-days button{width:30px;height:30px}.bd-table-days button{background-color:#f8f8f8;border:0}.bd-table-days button:hover:enabled{color:red;font-weight:700;background-color:#e7e7e7;cursor:pointer}.bd-table-days button:disabled{background-color:#eee}.bd-today{background-color:#dff0d8!important;color:green}.bd-holiday{background-color:#fde8e8!important}.bd-selected-day{color:red;font-weight:700}.bd-goto-today{width:210px;height:30px;color:#fff;background-color:#555;padding-top:5px;cursor:pointer;text-align:center} -------------------------------------------------------------------------------- /assets/plugins/datatables/extensions/AutoFill/Readme.txt: -------------------------------------------------------------------------------- 1 | # AutoFill 2 | 3 | AutoFill gives an Excel like option to a DataTable to click and drag over multiple cells, filling in information over the selected cells and incrementing numbers as needed. Key features include: 4 | 5 | * Click and drag cell content insertion 6 | * Automatic incrementing of numeric information 7 | * Enable and disable on any column 8 | * Detailed callback functions for customisation 9 | * Support for both DataTables and browser window scrolling 10 | 11 | 12 | # Installation 13 | 14 | To use AutoFill, first download DataTables ( http://datatables.net/download ) and place the unzipped AutoFill package into a `extensions` directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the `examples` directory in your web-browser. 15 | 16 | 17 | # Basic usage 18 | 19 | AutoFill is initialised using the `$.fn.dataTable.AutoFill` constructor. For example: 20 | 21 | ```js 22 | $(document).ready( function () { 23 | var table = $('#example').dataTable(); 24 | new $.fn.dataTable.AutoFill( table ); 25 | } ); 26 | ``` 27 | 28 | 29 | # Documentation / support 30 | 31 | * Documentation: http://datatables.net/extensions/autofill/ 32 | * DataTables support forums: http://datatables.net/forums 33 | 34 | 35 | # GitHub 36 | 37 | If you fancy getting involved with the development of AutoFill and help make it better, please refer to its GitHub repo: https://github.com/DataTables/AutoFill 38 | 39 | -------------------------------------------------------------------------------- /ScoplantAccounts/templates/password_reset.html: -------------------------------------------------------------------------------- 1 | {% extends 'shared/_MainLays.html' %} {% load static %}{% block head-content %} 2 | {{ title }} 3 | {% endblock %} {% block content %} 4 |
5 | 37 | 38 |
39 | {% endblock content %} -------------------------------------------------------------------------------- /assets/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | (function ($) { 3 | "use strict"; 4 | 5 | 6 | /*================================================================== 7 | [ Validate ]*/ 8 | var input = $('.validate-input .input100'); 9 | 10 | $('.validate-form').on('submit',function(){ 11 | var check = true; 12 | 13 | for(var i=0; iتنظیم گذرواژه 3 | 42 | {% endblock %} {% block content %} 43 | 57 | 58 | {% endblock %} -------------------------------------------------------------------------------- /ScoplantUserPanel/mqtt.py: -------------------------------------------------------------------------------- 1 | import time 2 | import json 3 | import paho.mqtt.client as mqtt 4 | from random import randint 5 | from ScoplantLogInfo.models import LogInfo 6 | from datetime import datetime 7 | 8 | # Whatever you need here. 9 | 10 | broker = "mqtt.eclipseprojects.io" 11 | def subscriber(): 12 | def on_message(client, userdata, message): 13 | data = message.payload.decode("utf-8") 14 | loaded = json.loads(data) 15 | Battery = loaded.get("A","0") 16 | Lux = loaded.get("B","0") 17 | Humidity = loaded.get("C","0") 18 | Temprature = loaded.get("D","0") 19 | SoilMoisture = loaded.get("E","0") 20 | Soil_temprature = loaded.get("F","0") 21 | Ec = loaded.get("G","0") 22 | Hours = loaded.get("H","0") 23 | # Date = datetime.strptime(loaded["I"], '%y-%m-%d') 24 | print(loaded) 25 | device_id=str(message.topic) 26 | a=device_id.split("/") 27 | topic_id=a[-1] 28 | LogInfo.objects.create(id_device_id=topic_id, id=randint(0, 9999999999), Time_Log=Hours, Battery_Log=Battery, Lux_Log=Lux, Humidity_Log=Humidity, 29 | Temperature_Log=Temprature, SoilMoisture_Log=SoilMoisture, SoilTemperature_Log=Soil_temprature, EC_Log=Ec) 30 | client = mqtt.Client(client_id="scoplantuser", 31 | clean_session=False) 32 | client.connect(broker) 33 | client.loop_start() 34 | 35 | client.subscribe("scoplant/p/sensor/v1/$") 36 | 37 | client.on_message = on_message 38 | 39 | 40 | 41 | def publisher(sample_rate): 42 | client = mqtt.Client(client_id="scoplantclient") 43 | client.connect(broker) 44 | 45 | client.publish("scoplant/s/sensor/v1/1133", sample_rate) 46 | print("sample Send!") 47 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /assets/fonts/font-awesome-4.7.0/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /assets/plugins/kamadatepicker/kamadatepicker.holidays.js: -------------------------------------------------------------------------------- 1 | // list of fixed holidays + all dynamic holidays for years of 1399 and 1400 based on https://time.ir/ 2 | // you can pass this exact array or modified version of this arrays as holidays to kamaDatepicker options 3 | 4 | const HOLIDAYS = [ 5 | { month: 1, day: 1 }, 6 | { month: 1, day: 2 }, 7 | { month: 1, day: 3 }, 8 | { month: 1, day: 4 }, 9 | { month: 1, day: 12 }, 10 | { month: 1, day: 13 }, 11 | { month: 3, day: 14 }, 12 | { month: 3, day: 15 }, 13 | { month: 11, day: 22 }, 14 | { month: 12, day: 29 }, 15 | { year: 1399, month: 1, day: 21 }, 16 | { year: 1399, month: 2, day: 26 }, 17 | { year: 1399, month: 3, day: 4 }, 18 | { year: 1399, month: 3, day: 5 }, 19 | { year: 1399, month: 3, day: 28 }, 20 | { year: 1399, month: 5, day: 10 }, 21 | { year: 1399, month: 5, day: 18 }, 22 | { year: 1399, month: 6, day: 8 }, 23 | { year: 1399, month: 6, day: 9 }, 24 | { year: 1399, month: 7, day: 17 }, 25 | { year: 1399, month: 7, day: 25 }, 26 | { year: 1399, month: 7, day: 26 }, 27 | { year: 1399, month: 8, day: 4 }, 28 | { year: 1399, month: 8, day: 13 }, 29 | { year: 1399, month: 10, day: 28 }, 30 | { year: 1399, month: 12, day: 7 }, 31 | { year: 1399, month: 12, day: 21 }, 32 | { year: 1399, month: 12, day: 30 }, 33 | { year: 1400, month: 1, day: 9 }, 34 | { year: 1400, month: 2, day: 14 }, 35 | { year: 1400, month: 2, day: 24 }, 36 | { year: 1400, month: 2, day: 25 }, 37 | { year: 1400, month: 3, day: 17 }, 38 | { year: 1400, month: 4, day: 30 }, 39 | { year: 1400, month: 5, day: 7 }, 40 | { year: 1400, month: 5, day: 27 }, 41 | { year: 1400, month: 5, day: 28 }, 42 | { year: 1400, month: 7, day: 6 }, 43 | { year: 1400, month: 7, day: 14 }, 44 | { year: 1400, month: 7, day: 15 }, 45 | { year: 1400, month: 7, day: 23 }, 46 | { year: 1400, month: 8, day: 2 }, 47 | { year: 1400, month: 10, day: 17 }, 48 | { year: 1400, month: 11, day: 26 }, 49 | { year: 1400, month: 12, day: 10 }, 50 | { year: 1400, month: 12, day: 28 }, 51 | ]; -------------------------------------------------------------------------------- /assets/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css: -------------------------------------------------------------------------------- 1 | /*! bootstrap3-wysihtml5-bower 2014-09-26 */ 2 | 3 | ul.wysihtml5-toolbar{margin:0;padding:0;display:block}ul.wysihtml5-toolbar::after{clear:both;display:table;content:""}ul.wysihtml5-toolbar>li{float:left;display:list-item;list-style:none;margin:0 5px 10px 0}ul.wysihtml5-toolbar a[data-wysihtml5-command=bold]{font-weight:700}ul.wysihtml5-toolbar a[data-wysihtml5-command=italic]{font-style:italic}ul.wysihtml5-toolbar a[data-wysihtml5-command=underline]{text-decoration:underline}ul.wysihtml5-toolbar a.btn.wysihtml5-command-active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#D9D9D9;outline:0}ul.wysihtml5-commands-disabled .dropdown-menu{display:none!important}ul.wysihtml5-toolbar div.wysihtml5-colors{display:block;width:50px;height:20px;margin-top:2px;margin-left:5px;position:absolute;pointer-events:none}ul.wysihtml5-toolbar a.wysihtml5-colors-title{padding-left:70px}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=black]{background:#000!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=silver]{background:silver!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=gray]{background:gray!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=maroon]{background:maroon!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=red]{background:red!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=purple]{background:purple!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=green]{background:green!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=olive]{background:olive!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=navy]{background:navy!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=blue]{background:#00f!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=orange]{background:orange!important}.glyphicon-quote:before{content:"\201C";font-family:Georgia,serif;font-size:50px;position:absolute;top:-4px;left:-3px;max-height:100%}.glyphicon-quote:after{content:"\0000a0"} -------------------------------------------------------------------------------- /assets/plugins/kamadatepicker/kamadatepicker.scss: -------------------------------------------------------------------------------- 1 | .bd-hide { 2 | display: none; 3 | } 4 | 5 | .bd-main { 6 | background-color: #FFF; 7 | border: 1px solid #000; 8 | padding: 5px; 9 | z-index: 9999; 10 | width: auto !important; 11 | margin: 0; 12 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 13 | } 14 | 15 | .bd-calendar { 16 | width: 210px; 17 | padding: 0; 18 | margin: 0; 19 | 20 | table { 21 | border: none; 22 | width: 210px; 23 | } 24 | } 25 | 26 | .bd-title { 27 | width: 210px; 28 | padding: 0; 29 | margin: 0; 30 | } 31 | 32 | .bd-dropdown { 33 | display: inline-block; 34 | float: right; 35 | width: 75px; 36 | 37 | select { 38 | width: 100%; 39 | height: 30px; 40 | border: none; 41 | cursor: pointer; 42 | } 43 | } 44 | 45 | .bd-next, .bd-prev { 46 | cursor: pointer; 47 | background-repeat: no-repeat; 48 | background-position: 50% 50%; 49 | background-color: #FFF; 50 | height: 30px; 51 | width: 30px; 52 | margin: 0; 53 | padding: 0; 54 | border: none; 55 | display: inline-block; 56 | float: right; 57 | } 58 | 59 | .bd-table { 60 | thead { 61 | background-color: #555555; 62 | color: #FFF; 63 | 64 | tr { 65 | height: 30px; 66 | cursor: context-menu; 67 | 68 | th { 69 | text-align: center; 70 | } 71 | } 72 | } 73 | 74 | tbody { 75 | tr { 76 | td { 77 | border: none; 78 | } 79 | } 80 | } 81 | } 82 | 83 | .bd-empty-cell { 84 | width: 30px; 85 | height: 30px; 86 | } 87 | 88 | .bd-table-days { 89 | button { 90 | width: 30px; 91 | height: 30px; 92 | background-color: #F8F8F8; 93 | border: 0; 94 | 95 | &:hover:enabled { 96 | color: red; 97 | font-weight: bold; 98 | background-color: #E7E7E7; 99 | cursor: pointer; 100 | } 101 | 102 | &:disabled { 103 | background-color: #eee; 104 | } 105 | } 106 | } 107 | 108 | .bd-today { 109 | background-color: #DFF0D8 !important; 110 | color: green; 111 | } 112 | 113 | .bd-holiday { 114 | background-color: #FDE8E8 !important; 115 | } 116 | 117 | .bd-selected-day { 118 | color: red; 119 | font-weight: bold; 120 | } 121 | 122 | .bd-goto-today { 123 | width: 210px; 124 | height: 30px; 125 | color: #FFF; 126 | background-color: #555555; 127 | padding-top: 5px; 128 | cursor: pointer; 129 | text-align: center; 130 | } -------------------------------------------------------------------------------- /assets/vendor/jquery/jquery.easing.min.js: -------------------------------------------------------------------------------- 1 | (function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function($){return factory($)})}else if(typeof module==="object"&&typeof module.exports==="object"){exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){$.easing.jswing=$.easing.swing;var pow=Math.pow,sqrt=Math.sqrt,sin=Math.sin,cos=Math.cos,PI=Math.PI,c1=1.70158,c2=c1*1.525,c3=c1+1,c4=2*PI/3,c5=2*PI/4.5;function bounceOut(x){var n1=7.5625,d1=2.75;if(x<1/d1){return n1*x*x}else if(x<2/d1){return n1*(x-=1.5/d1)*x+.75}else if(x<2.5/d1){return n1*(x-=2.25/d1)*x+.9375}else{return n1*(x-=2.625/d1)*x+.984375}}$.extend($.easing,{def:"easeOutQuad",swing:function(x){return $.easing[$.easing.def](x)},easeInQuad:function(x){return x*x},easeOutQuad:function(x){return 1-(1-x)*(1-x)},easeInOutQuad:function(x){return x<.5?2*x*x:1-pow(-2*x+2,2)/2},easeInCubic:function(x){return x*x*x},easeOutCubic:function(x){return 1-pow(1-x,3)},easeInOutCubic:function(x){return x<.5?4*x*x*x:1-pow(-2*x+2,3)/2},easeInQuart:function(x){return x*x*x*x},easeOutQuart:function(x){return 1-pow(1-x,4)},easeInOutQuart:function(x){return x<.5?8*x*x*x*x:1-pow(-2*x+2,4)/2},easeInQuint:function(x){return x*x*x*x*x},easeOutQuint:function(x){return 1-pow(1-x,5)},easeInOutQuint:function(x){return x<.5?16*x*x*x*x*x:1-pow(-2*x+2,5)/2},easeInSine:function(x){return 1-cos(x*PI/2)},easeOutSine:function(x){return sin(x*PI/2)},easeInOutSine:function(x){return-(cos(PI*x)-1)/2},easeInExpo:function(x){return x===0?0:pow(2,10*x-10)},easeOutExpo:function(x){return x===1?1:1-pow(2,-10*x)},easeInOutExpo:function(x){return x===0?0:x===1?1:x<.5?pow(2,20*x-10)/2:(2-pow(2,-20*x+10))/2},easeInCirc:function(x){return 1-sqrt(1-pow(x,2))},easeOutCirc:function(x){return sqrt(1-pow(x-1,2))},easeInOutCirc:function(x){return x<.5?(1-sqrt(1-pow(2*x,2)))/2:(sqrt(1-pow(-2*x+2,2))+1)/2},easeInElastic:function(x){return x===0?0:x===1?1:-pow(2,10*x-10)*sin((x*10-10.75)*c4)},easeOutElastic:function(x){return x===0?0:x===1?1:pow(2,-10*x)*sin((x*10-.75)*c4)+1},easeInOutElastic:function(x){return x===0?0:x===1?1:x<.5?-(pow(2,20*x-10)*sin((20*x-11.125)*c5))/2:pow(2,-20*x+10)*sin((20*x-11.125)*c5)/2+1},easeInBack:function(x){return c3*x*x*x-c1*x*x},easeOutBack:function(x){return 1+c3*pow(x-1,3)+c1*pow(x-1,2)},easeInOutBack:function(x){return x<.5?pow(2*x,2)*((c2+1)*2*x-c2)/2:(pow(2*x-2,2)*((c2+1)*(x*2-2)+c2)+2)/2},easeInBounce:function(x){return 1-bounceOut(1-x)},easeOutBounce:bounceOut,easeInOutBounce:function(x){return x<.5?(1-bounceOut(1-2*x))/2:(1+bounceOut(2*x-1))/2}})}); -------------------------------------------------------------------------------- /assets/vendor/bootstrap/js/ruang-admin.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | "use strict"; // Start of use strict 3 | 4 | // Toggle the side navigation 5 | $("#sidebarToggle, #sidebarToggleTop").on('click', function(e) { 6 | $("body").toggleClass("sidebar-toggled"); 7 | $(".sidebar").toggleClass("toggled"); 8 | if ($(".sidebar").hasClass("toggled")) { 9 | $('.sidebar .collapse').collapse('hide'); 10 | }; 11 | }); 12 | 13 | // Close any open menu accordions when window is resized below 768px 14 | $(window).resize(function() { 15 | if ($(window).width() < 768) { 16 | $('.sidebar .collapse').collapse('hide'); 17 | }; 18 | }); 19 | 20 | // Prevent the content wrapper from scrolling when the fixed side navigation hovered over 21 | $('body.fixed-nav .sidebar').on('mousewheel DOMMouseScroll wheel', function(e) { 22 | if ($(window).width() > 768) { 23 | var e0 = e.originalEvent, 24 | delta = e0.wheelDelta || -e0.detail; 25 | this.scrollTop += (delta < 0 ? 1 : -1) * 30; 26 | e.preventDefault(); 27 | } 28 | }); 29 | 30 | // Scroll to top button appear 31 | $(document).on('scroll', function() { 32 | var scrollDistance = $(this).scrollTop(); 33 | if (scrollDistance > 100) { 34 | $('.scroll-to-top').fadeIn(); 35 | } else { 36 | $('.scroll-to-top').fadeOut(); 37 | } 38 | }); 39 | 40 | // Smooth scrolling using jQuery easing 41 | $(document).on('click', 'a.scroll-to-top', function(e) { 42 | var $anchor = $(this); 43 | $('html, body').stop().animate({ 44 | scrollTop: ($($anchor.attr('href')).offset().top) 45 | }, 1000, 'easeInOutExpo'); 46 | e.preventDefault(); 47 | }); 48 | 49 | })(jQuery); // End of use strict 50 | 51 | // Modal Javascript 52 | 53 | $(document).ready(function () { 54 | $("#myBtn").click(function () { 55 | $('.modal').modal('show'); 56 | }); 57 | 58 | $("#modalLong").click(function () { 59 | $('.modal').modal('show'); 60 | }); 61 | 62 | $("#modalScroll").click(function () { 63 | $('.modal').modal('show'); 64 | }); 65 | 66 | $('#modalCenter').click(function () { 67 | $('.modal').modal('show'); 68 | }); 69 | }); 70 | 71 | // Popover Javascript 72 | 73 | $(function () { 74 | $('[data-toggle="popover"]').popover() 75 | }); 76 | $('.popover-dismiss').popover({ 77 | trigger: 'focus' 78 | }); 79 | 80 | 81 | // Version in Sidebar 82 | 83 | var version = document.getElementById('version-ruangadmin'); 84 | 85 | version.innerHTML = "Version 1.1"; -------------------------------------------------------------------------------- /ScoplantUserPanel/templates/reporting.html: -------------------------------------------------------------------------------- 1 | {% extends 'shared/_MainLayout.html' %} {% load static %} {% block head-content %} 2 | {{ title }} 3 | {% endblock %}{% block breadcrums %} 4 | 5 |
6 |
7 |
8 |
9 |

{{ title }}

10 |
11 | 12 |
13 | 17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 | 25 | 26 | {% endblock %} {% block content %} 27 |
28 | {% if wrong_date_range %} 29 |
30 | 31 |

The start date cannot be greater than the end date

32 |
33 |
{% endif %} 34 | 35 |
36 |
37 |

Select date

38 |
39 | 40 | 41 |
42 | {% csrf_token %} 43 |
44 |
45 | {{ export_methods.start_date }} 46 |
47 |
48 | {{ export_methods.end_date }} 49 |
50 | 51 |
52 |
53 | 54 | {{ export_methods.Select_Export }} 55 |
56 |
57 |
58 | {{ export_methods.Select_Parameter }} 59 |
60 |
61 |
62 | 63 | 64 | 67 |
68 |
69 | 70 |
71 | 72 | {% endblock %} -------------------------------------------------------------------------------- /ScoplantUserPanel/templates/shared/_FooterReferences.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 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 | 75 | 76 | 79 | 80 | 81 | 82 | 83 | 94 | -------------------------------------------------------------------------------- /assets/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.css: -------------------------------------------------------------------------------- 1 | ul.wysihtml5-toolbar { 2 | margin: 0; 3 | padding: 0; 4 | display: block; 5 | } 6 | 7 | ul.wysihtml5-toolbar::after { 8 | clear: both; 9 | display: table; 10 | content: ""; 11 | } 12 | 13 | ul.wysihtml5-toolbar > li { 14 | float: left; 15 | display: list-item; 16 | list-style: none; 17 | margin: 0 5px 10px 0; 18 | } 19 | 20 | ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] { 21 | font-weight: bold; 22 | } 23 | 24 | ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] { 25 | font-style: italic; 26 | } 27 | 28 | ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] { 29 | text-decoration: underline; 30 | } 31 | 32 | ul.wysihtml5-toolbar a.btn.wysihtml5-command-active { 33 | background-image: none; 34 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 35 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 36 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); 37 | background-color: #E6E6E6; 38 | background-color: #D9D9D9; 39 | outline: 0; 40 | } 41 | 42 | ul.wysihtml5-commands-disabled .dropdown-menu { 43 | display: none !important; 44 | } 45 | 46 | ul.wysihtml5-toolbar div.wysihtml5-colors { 47 | display:block; 48 | width: 50px; 49 | height: 20px; 50 | margin-top: 2px; 51 | margin-left: 5px; 52 | position: absolute; 53 | pointer-events: none; 54 | } 55 | 56 | ul.wysihtml5-toolbar a.wysihtml5-colors-title { 57 | padding-left: 70px; 58 | } 59 | 60 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] { 61 | background: black !important; 62 | } 63 | 64 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] { 65 | background: silver !important; 66 | } 67 | 68 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] { 69 | background: gray !important; 70 | } 71 | 72 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] { 73 | background: maroon !important; 74 | } 75 | 76 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] { 77 | background: red !important; 78 | } 79 | 80 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] { 81 | background: purple !important; 82 | } 83 | 84 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] { 85 | background: green !important; 86 | } 87 | 88 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] { 89 | background: olive !important; 90 | } 91 | 92 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] { 93 | background: navy !important; 94 | } 95 | 96 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] { 97 | background: blue !important; 98 | } 99 | 100 | ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] { 101 | background: orange !important; 102 | } 103 | 104 | .glyphicon-quote:before { 105 | content: "\201C"; 106 | font-family: Georgia, serif; 107 | font-size: 50px; 108 | position: absolute; 109 | top: -4px; 110 | left: -3px; 111 | max-height: 100%; 112 | } 113 | 114 | .glyphicon-quote:after { 115 | content: "\0000a0"; 116 | } 117 | 118 | -------------------------------------------------------------------------------- /ScoplantUserPanel/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.core import validators 3 | from django.db.models import fields 4 | from django.db.models.base import Model 5 | from django.forms.widgets import Select 6 | from .models import * 7 | # from bootstrap_datepicker_plus import DatePickerInput 8 | 9 | 10 | class AddNewDevice(forms.Form): 11 | # Auth With models : Username, Password, Number 12 | Username = forms.CharField( 13 | widget=forms.TextInput( 14 | attrs={'placeholder': 'device ID', 'class': 'form-control', 'id':'device_name'}), 15 | validators=[ 16 | validators.MaxLengthValidator( 17 | limit_value=20, message='The number of characters in the username should not be more than 20 characters') 18 | ] 19 | ) 20 | Version = forms.CharField( 21 | widget=forms.TextInput( 22 | 23 | attrs={'placeholder': 'device version', 'class': 'form-control'}), 24 | ) 25 | Name = forms.CharField( 26 | widget=forms.TextInput( 27 | attrs={'placeholder': 'custom device name', 'class': 'form-control'}), 28 | ) 29 | Location = forms.CharField( 30 | widget=forms.TextInput( 31 | attrs={'placeholder': 'place', 'class': 'form-control'}), 32 | ) 33 | Sampling_Rate = forms.IntegerField( 34 | widget=forms.NumberInput( 35 | attrs={'placeholder': 'sampling', 'class': 'form-control', 'min': '5', 'max': '60', 'step': '5'}), 36 | validators=[ 37 | validators.MaxValueValidator( 38 | limit_value=60, message="The maximum value is 60"), 39 | validators.MinValueValidator( 40 | limit_value=5, message="Minimum value is 5"), 41 | ] 42 | ) 43 | 44 | 45 | class ExportingMethods(forms.Form): 46 | 47 | start_date = forms.CharField( 48 | widget=forms.TextInput( 49 | attrs={'class': 'form-control', 'type': 'text', 'id': 'date1', 'autocomplete': 'off', 'name': 'start_date', 'placeholder': 'Select'}), 50 | ) 51 | end_date = forms.CharField( 52 | widget=forms.TextInput( 53 | attrs={'class': 'form-control ', 'type': 'text', 'id': 'date2', 'autocomplete': 'off', 'name': 'end_date', 'placeholder': 'Select'}), 54 | ) 55 | 56 | CHOICES_Export = ( 57 | 58 | ('ExcelTableExport', 'Table in Excel format'), 59 | ('PDFTableExport', 'Table in PDF format'), 60 | ('PDFChartExportParts', 'Chart - in PDF format'), 61 | ) 62 | 63 | Select_Export = forms.ChoiceField( 64 | widget=forms.Select( 65 | attrs={'class': 'form-control select2'} 66 | ), choices=CHOICES_Export) 67 | 68 | Export_Parameter = ( 69 | ('Lux', 'light'), 70 | ('Humidity', 'humidity'), 71 | ('Temperature', 'temperature'), 72 | ('Soil_Moisture', 'soil moisture'), 73 | ('Soil_tempurature', 'soil temperature'), 74 | ('EC', 'EC'), 75 | ('Total', 'Total output (light, temperature, humidity, EC and...)'), 76 | ) 77 | 78 | Select_Parameter = forms.ChoiceField( 79 | widget=forms.Select( 80 | attrs={'class': 'form-control select2'} 81 | ), choices=Export_Parameter) 82 | -------------------------------------------------------------------------------- /ScoplantAccounts/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from django.contrib.auth.models import User 3 | from django.core import validators 4 | # Form Sign Up 5 | class SignUpForm(forms.Form): 6 | username = forms.CharField( 7 | widget=forms.TextInput( 8 | attrs={'placeholder': 'Username', 'class': 'input100','id':'signupUsernameInput'}), 9 | validators=[ 10 | validators.MaxLengthValidator(limit_value=20, message='The number of characters in the username should not be more than 20 characters') 11 | ] 12 | ) 13 | 14 | email = forms.EmailField( 15 | widget=forms.EmailInput( 16 | attrs={'placeholder': 'email', 'class': 'input100'}), 17 | validators=[ 18 | validators.EmailValidator('Email entered is not valid') 19 | ] 20 | ) 21 | 22 | password = forms.CharField( 23 | widget=forms.PasswordInput( 24 | attrs={'placeholder': 'password', 'class': 'input100'}), 25 | label='password' 26 | ) 27 | 28 | re_password = forms.CharField( 29 | widget=forms.PasswordInput( 30 | attrs={'placeholder': 'repeat password', 'class': 'input100'}), 31 | ) 32 | 33 | def clean_email(self): 34 | email = self.cleaned_data["email"] 35 | is_exist_email = User.objects.filter(email=email).exists() 36 | 37 | if is_exist_email: 38 | raise forms.ValidationError('There is a user with this email') 39 | return email 40 | 41 | def clean_username(self): 42 | username = self.cleaned_data["username"] 43 | is_exist_user_by_username = User.objects.filter( 44 | username=username).exists() 45 | 46 | if is_exist_user_by_username: 47 | raise forms.ValidationError('A user with this username exists') 48 | return username 49 | 50 | def clean_re_password(self): 51 | password = self.cleaned_data.get('password') 52 | re_password = self.cleaned_data.get('re_password') 53 | 54 | if password != re_password: 55 | raise forms.ValidationError('passwords are inconsistent') 56 | return password 57 | 58 | class LoginForm(forms.Form): 59 | username = forms.CharField( 60 | widget=forms.TextInput( 61 | attrs={'placeholder': 'Username', 'class': 'input100'}), 62 | ) 63 | 64 | password = forms.CharField( 65 | widget=forms.PasswordInput( 66 | attrs={'placeholder': 'Password', 'class': 'input100'}), 67 | ) 68 | 69 | def clean_username(self): 70 | username = self.cleaned_data["username"] 71 | is_exists_user = User.objects.filter(username=username).exists() 72 | if not is_exists_user: 73 | raise forms.ValidationError('User with this username was not found') 74 | return username 75 | 76 | class ForgotPasswordForm(forms.Form): 77 | Username = forms.CharField( 78 | widget=forms.TextInput( 79 | attrs={'placeholder': 'Enter email', 'class': 'input100','type':'email','name':'text1'}), 80 | ) 81 | 82 | def clean_username(self): 83 | username = self.cleaned_data["Username"] 84 | is_exists_user = User.objects.filter(email=username).exists() 85 | if not is_exists_user: 86 | raise forms.ValidationError('User not found!') 87 | return username 88 | 89 | -------------------------------------------------------------------------------- /ScoplantAccounts/templates/Login.html: -------------------------------------------------------------------------------- 1 | {% extends 'shared/_MainLays.html' %} {% load static %}{% block head-content %} 2 | {{ title }} 3 | {% endblock %} {% block content %} 4 |
5 | 8 | 9 | 87 |
88 | {% endblock %} -------------------------------------------------------------------------------- /assets/vendor/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | html{box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{box-sizing:inherit}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important} 2 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /assets/plugins/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.0 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ScoplantAccounts/views.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth import authenticate, login 2 | from django.shortcuts import redirect, render 3 | from .forms import SignUpForm, LoginForm, ForgotPasswordForm 4 | from django.contrib.auth.models import User 5 | import re 6 | from django.core.mail import send_mail, BadHeaderError 7 | from django.http import HttpResponse 8 | from django.template.loader import render_to_string 9 | from django.db.models.query_utils import Q 10 | from django.utils.http import urlsafe_base64_encode 11 | from django.contrib.auth.tokens import default_token_generator 12 | from django.utils.encoding import force_bytes 13 | EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$') 14 | 15 | 16 | def user_login(request): 17 | if request.user.is_authenticated: 18 | return redirect('/') 19 | 20 | login_form = LoginForm(request.POST or None) 21 | if login_form.is_valid(): 22 | username = login_form.cleaned_data.get('username') 23 | password = login_form.cleaned_data.get('password') 24 | user = authenticate(request, username=username, password=password) 25 | if user is not None: 26 | login(request, user) 27 | return redirect('/') 28 | else: 29 | login_form.add_error('username', 'User with this profile was not found!') 30 | context = { 31 | 'login_form': login_form, 32 | 'title': "Login" 33 | } 34 | return render(request, 'Login.html', context) 35 | 36 | 37 | def user_signup(request): 38 | if request.user.is_authenticated: 39 | return redirect('/') 40 | signup_form = SignUpForm(request.POST or None) 41 | 42 | if signup_form.is_valid(): 43 | username = signup_form.cleaned_data.get('username') 44 | email = signup_form.cleaned_data.get('email') 45 | password = signup_form.cleaned_data.get('password') 46 | 47 | User.objects.create_user( 48 | username=username, email=email, password=password) 49 | return redirect('/login') 50 | context = { 51 | 'signup_form': signup_form, 52 | 'title': "Register" 53 | } 54 | return render(request, 'SignUp.html', context) 55 | 56 | 57 | def password_reset_request(request): 58 | if request.user.is_authenticated: 59 | return redirect('/') 60 | passform = ForgotPasswordForm(request.POST ) 61 | add_error = False 62 | if request.method == "POST" : 63 | # A form bound to the POST data 64 | form = ForgotPasswordForm(request.POST) 65 | if form.is_valid(): # All validation rules pass 66 | myfield = form.cleaned_data['Username'] 67 | is_exists_user = User.objects.filter(email=myfield).exists() 68 | associated_users = User.objects.filter(Q(email=myfield)) 69 | if len(request.POST['Username']) < 1 or not EMAIL_REGEX.match(request.POST['Username']) or not is_exists_user: 70 | add_error = True 71 | if associated_users.exists(): 72 | for user in associated_users: 73 | subject = "Password Reset Requested" 74 | email_template_name = "password_reset_email.txt" 75 | c = { 76 | "email": user.email, 77 | 'domain': '127.0.0.1:8000', 78 | 'site_name': 'Website', 79 | "uid": urlsafe_base64_encode(force_bytes(user.pk)), 80 | "user": user, 81 | 'token': default_token_generator.make_token(user), 82 | 'protocol': 'http', 83 | } 84 | email = render_to_string(email_template_name, c) 85 | try: 86 | send_mail(subject, email, 'admin@example.com',[user.email], fail_silently=False) 87 | except BadHeaderError: 88 | return HttpResponse('Invalid header found.') 89 | return render(request, 'password_reset_done.html', {'title': "Successful"}) 90 | 91 | 92 | context = { 93 | 'forgot_password_form': passform, 94 | 95 | 'valid_error': add_error, 96 | 'title': "Forgot Password" 97 | } 98 | return render(request, 'password_reset.html', context) 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Scoplant/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for Scoplant project. 3 | 4 | Generated by 'django-admin startproject' using Django 3.2.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/3.2/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | import os 15 | 16 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 17 | BASE_DIR = Path(__file__).resolve().parent.parent 18 | 19 | 20 | # Quick-start development settings - unsuitable for production 21 | # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ 22 | 23 | # SECURITY WARNING: keep the secret key used in production secret! 24 | SECRET_KEY = 'django-insecure--v@1sg2p02o%1xd9y3%h^o&-j1ud_z@hcgzii*kfuz9=*^dm0)' 25 | 26 | 27 | EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' 28 | # SECURITY WARNING: don't run with debug turned on in production! 29 | DEBUG = True 30 | 31 | ALLOWED_HOSTS = ["*"] 32 | 33 | # config/settings.py 34 | LOGIN_REDIRECT_URL = '/' 35 | LOGOUT_REDIRECT_URL = '/' 36 | 37 | # Application definition 38 | 39 | INSTALLED_APPS = [ 40 | 'django.contrib.admin', 41 | 'django.contrib.auth', 42 | 'django.contrib.contenttypes', 43 | 'django.contrib.sessions', 44 | 'django.contrib.messages', 45 | 'django.contrib.staticfiles', 46 | 'django_render_partial', 47 | 48 | # My Apps: 49 | 'ScoplantAccounts', 50 | 'ScoplantUserPanel', 51 | 'ScoplantDevices', 52 | 'ScoplantLogInfo', 53 | ] 54 | 55 | 56 | 57 | MIDDLEWARE = [ 58 | 'django.middleware.security.SecurityMiddleware', 59 | 'django.contrib.sessions.middleware.SessionMiddleware', 60 | 'django.middleware.common.CommonMiddleware', 61 | 'django.middleware.csrf.CsrfViewMiddleware', 62 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 63 | 'django.contrib.messages.middleware.MessageMiddleware', 64 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 65 | ] 66 | 67 | ROOT_URLCONF = 'Scoplant.urls' 68 | 69 | TEMPLATES = [ 70 | { 71 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 72 | 'DIRS': [os.path.join(BASE_DIR, 'templates')], 73 | 'APP_DIRS': True, 74 | 'OPTIONS': { 75 | 'context_processors': [ 76 | 'django.template.context_processors.debug', 77 | 'django.template.context_processors.request', 78 | 'django.contrib.auth.context_processors.auth', 79 | 'django.contrib.messages.context_processors.messages', 80 | ], 81 | }, 82 | }, 83 | ] 84 | 85 | WSGI_APPLICATION = 'Scoplant.wsgi.application' 86 | 87 | 88 | # Database 89 | # https://docs.djangoproject.com/en/3.2/ref/settings/#databases 90 | 91 | DATABASES = { 92 | 'default': { 93 | 'ENGINE': 'djongo', 94 | 'NAME': 'ScoplantDB', 95 | } 96 | } 97 | 98 | 99 | # Password validation 100 | # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators 101 | 102 | AUTH_PASSWORD_VALIDATORS = [ 103 | { 104 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 105 | }, 106 | { 107 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 108 | }, 109 | { 110 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 111 | }, 112 | { 113 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 114 | }, 115 | ] 116 | 117 | 118 | # Internationalization 119 | # https://docs.djangoproject.com/en/3.2/topics/i18n/ 120 | 121 | LANGUAGE_CODE = 'en-us' 122 | 123 | TIME_ZONE = 'UTC' 124 | 125 | USE_I18N = True 126 | 127 | USE_L10N = True 128 | 129 | USE_TZ = True 130 | 131 | 132 | # Static files (CSS, JavaScript, Images) 133 | # https://docs.djangoproject.com/en/3.2/howto/static-files/ 134 | 135 | 136 | # Default primary key field type 137 | # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field 138 | STATIC_URL = '/site_statics/' 139 | 140 | STATICFILES_DIRS = [ 141 | os.path.join(BASE_DIR, "assets") 142 | ] 143 | 144 | STATIC_ROOT = os.path.join(BASE_DIR, "static_cdn", "static_root") 145 | 146 | MEDIA_URL = '/media/' 147 | 148 | MEDIA_ROOT = os.path.join(BASE_DIR, "static_cdn", "media_root") -------------------------------------------------------------------------------- /ScoplantAccounts/templates/SignUp.html: -------------------------------------------------------------------------------- 1 | {% extends 'shared/_MainLays.html' %} {% load static %}{% block head-content %} 2 | {{ title }} 3 | {% endblock %} {% block content %} 4 |
5 | 6 | 9 | 10 | 73 | {% endfor %} 74 | 75 | 76 |
77 | 78 |
79 | 80 | 81 | 82 |
83 | I already registered! 84 | Log in 85 |
86 | 87 | 88 |
89 |

Register with


90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 |
104 | 105 |
106 | 107 | 108 | 122 | {% endblock content %} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.toptal.com/developers/gitignore/api/django,python,venv 3 | # Edit at https://www.toptal.com/developers/gitignore?templates=django,python,venv 4 | 5 | ### Django ### 6 | *.log 7 | *.pot 8 | *.pyc 9 | __pycache__/ 10 | temp/ 11 | local_settings.py 12 | db.sqlite3 13 | db.sqlite3-journal 14 | media 15 | 16 | 17 | 18 | *.DS_Store 19 | *.log 20 | *.zip 21 | .idea 22 | nbproject 23 | nbproject/private 24 | node_modules 25 | .sass-cache 26 | bower_components 27 | ad.js 28 | TODO 29 | test.html 30 | .idea 31 | # If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ 32 | # in your Git repository. Update and uncomment the following line accordingly. 33 | # /staticfiles/ 34 | 35 | ### Django.Python Stack ### 36 | # Byte-compiled / optimized / DLL files 37 | *.py[cod] 38 | *$py.class 39 | 40 | # C extensions 41 | *.so 42 | 43 | # Distribution / packaging 44 | .Python 45 | build/ 46 | develop-eggs/ 47 | dist/ 48 | downloads/ 49 | eggs/ 50 | .eggs/ 51 | lib/ 52 | lib64/ 53 | parts/ 54 | sdist/ 55 | var/ 56 | wheels/ 57 | share/python-wheels/ 58 | *.egg-info/ 59 | .installed.cfg 60 | *.egg 61 | MANIFEST 62 | 63 | # PyInstaller 64 | # Usually these files are written by a python script from a template 65 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 66 | *.manifest 67 | *.spec 68 | 69 | # Installer logs 70 | pip-log.txt 71 | pip-delete-this-directory.txt 72 | 73 | # Unit test / coverage reports 74 | htmlcov/ 75 | .tox/ 76 | .nox/ 77 | .coverage 78 | .coverage.* 79 | .cache 80 | nosetests.xml 81 | coverage.xml 82 | *.cover 83 | *.py,cover 84 | .hypothesis/ 85 | .pytest_cache/ 86 | cover/ 87 | 88 | # Translations 89 | *.mo 90 | 91 | # Django stuff: 92 | 93 | # Flask stuff: 94 | instance/ 95 | .webassets-cache 96 | 97 | # Scrapy stuff: 98 | .scrapy 99 | 100 | # Sphinx documentation 101 | docs/_build/ 102 | 103 | # PyBuilder 104 | .pybuilder/ 105 | target/ 106 | 107 | # Jupyter Notebook 108 | .ipynb_checkpoints 109 | 110 | # IPython 111 | profile_default/ 112 | ipython_config.py 113 | 114 | # pyenv 115 | # For a library or package, you might want to ignore these files since the code is 116 | # intended to run in multiple environments; otherwise, check them in: 117 | # .python-version 118 | 119 | # pipenv 120 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 121 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 122 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 123 | # install all needed dependencies. 124 | #Pipfile.lock 125 | 126 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 127 | __pypackages__/ 128 | 129 | # Celery stuff 130 | celerybeat-schedule 131 | celerybeat.pid 132 | 133 | # SageMath parsed files 134 | *.sage.py 135 | 136 | # Environments 137 | .env 138 | .venv 139 | env/ 140 | venv/ 141 | ENV/ 142 | env.bak/ 143 | venv.bak/ 144 | 145 | # Spyder project settings 146 | .spyderproject 147 | .spyproject 148 | 149 | # Rope project settings 150 | .ropeproject 151 | 152 | # mkdocs documentation 153 | /site 154 | 155 | # mypy 156 | .mypy_cache/ 157 | .dmypy.json 158 | dmypy.json 159 | 160 | # Pyre type checker 161 | .pyre/ 162 | 163 | # pytype static type analyzer 164 | .pytype/ 165 | 166 | # Cython debug symbols 167 | cython_debug/ 168 | 169 | ### Python ### 170 | # Byte-compiled / optimized / DLL files 171 | 172 | # C extensions 173 | 174 | # Distribution / packaging 175 | 176 | # PyInstaller 177 | # Usually these files are written by a python script from a template 178 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 179 | 180 | # Installer logs 181 | 182 | # Unit test / coverage reports 183 | 184 | # Translations 185 | 186 | # Django stuff: 187 | 188 | # Flask stuff: 189 | 190 | # Scrapy stuff: 191 | 192 | # Sphinx documentation 193 | 194 | # PyBuilder 195 | 196 | # Jupyter Notebook 197 | 198 | # IPython 199 | 200 | # pyenv 201 | # For a library or package, you might want to ignore these files since the code is 202 | # intended to run in multiple environments; otherwise, check them in: 203 | # .python-version 204 | 205 | # pipenv 206 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 207 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 208 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 209 | # install all needed dependencies. 210 | 211 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 212 | 213 | # Celery stuff 214 | 215 | # SageMath parsed files 216 | 217 | # Environments 218 | 219 | # Spyder project settings 220 | 221 | # Rope project settings 222 | 223 | # mkdocs documentation 224 | 225 | # mypy 226 | 227 | # Pyre type checker 228 | 229 | # pytype static type analyzer 230 | 231 | # Cython debug symbols 232 | 233 | ### venv ### 234 | # Virtualenv 235 | # http://iamzed.com/2009/05/07/a-primer-on-virtualenv/ 236 | [Bb]in 237 | [Ii]nclude 238 | [Ll]ib 239 | [Ll]ib64 240 | [Ll]ocal 241 | [Ss]cripts 242 | pyvenv.cfg 243 | pip-selfcheck.json 244 | 245 | # End of https://www.toptal.com/developers/gitignore/api/django,python,venv 246 | -------------------------------------------------------------------------------- /assets/vendor/tilt/tilt.jquery.min.js: -------------------------------------------------------------------------------- 1 | "use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=function(i,s){return void 0===s&&(s="undefined"!=typeof window?require("jquery"):require("jquery")(i)),t(s),s}:t(jQuery)}(function(t){return t.fn.tilt=function(i){var s=function(){this.ticking||(requestAnimationFrame(g.bind(this)),this.ticking=!0)},e=function(){var i=this;t(this).on("mousemove",o),t(this).on("mouseenter",a),this.settings.reset&&t(this).on("mouseleave",l),this.settings.glare&&t(window).on("resize",d.bind(i))},n=function(){var i=this;void 0!==this.timeout&&clearTimeout(this.timeout),t(this).css({transition:this.settings.speed+"ms "+this.settings.easing}),this.settings.glare&&this.glareElement.css({transition:"opacity "+this.settings.speed+"ms "+this.settings.easing}),this.timeout=setTimeout(function(){t(i).css({transition:""}),i.settings.glare&&i.glareElement.css({transition:""})},this.settings.speed)},a=function(i){this.ticking=!1,t(this).css({"will-change":"transform"}),n.call(this),t(this).trigger("tilt.mouseEnter")},r=function(i){return"undefined"==typeof i&&(i={pageX:t(this).offset().left+t(this).outerWidth()/2,pageY:t(this).offset().top+t(this).outerHeight()/2}),{x:i.pageX,y:i.pageY}},o=function(t){this.mousePositions=r(t),s.call(this)},l=function(){n.call(this),this.reset=!0,s.call(this),t(this).trigger("tilt.mouseLeave")},h=function(){var i=t(this).outerWidth(),s=t(this).outerHeight(),e=t(this).offset().left,n=t(this).offset().top,a=(this.mousePositions.x-e)/i,r=(this.mousePositions.y-n)/s,o=(this.settings.maxTilt/2-a*this.settings.maxTilt).toFixed(2),l=(r*this.settings.maxTilt-this.settings.maxTilt/2).toFixed(2),h=Math.atan2(this.mousePositions.x-(e+i/2),-(this.mousePositions.y-(n+s/2)))*(180/Math.PI);return{tiltX:o,tiltY:l,percentageX:100*a,percentageY:100*r,angle:h}},g=function(){return this.transforms=h.call(this),this.reset?(this.reset=!1,t(this).css("transform","perspective("+this.settings.perspective+"px) rotateX(0deg) rotateY(0deg)"),void(this.settings.glare&&(this.glareElement.css("transform","rotate(180deg) translate(-50%, -50%)"),this.glareElement.css("opacity","0")))):(t(this).css("transform","perspective("+this.settings.perspective+"px) rotateX("+("x"===this.settings.disableAxis?0:this.transforms.tiltY)+"deg) rotateY("+("y"===this.settings.disableAxis?0:this.transforms.tiltX)+"deg) scale3d("+this.settings.scale+","+this.settings.scale+","+this.settings.scale+")"),this.settings.glare&&(this.glareElement.css("transform","rotate("+this.transforms.angle+"deg) translate(-50%, -50%)"),this.glareElement.css("opacity",""+this.transforms.percentageY*this.settings.maxGlare/100)),t(this).trigger("change",[this.transforms]),void(this.ticking=!1))},c=function(){var i=this.settings.glarePrerender;if(i||t(this).append('
'),this.glareElementWrapper=t(this).find(".js-tilt-glare"),this.glareElement=t(this).find(".js-tilt-glare-inner"),!i){var s={position:"absolute",top:"0",left:"0",width:"100%",height:"100%"};this.glareElementWrapper.css(s).css({overflow:"hidden","pointer-events":"none"}),this.glareElement.css({position:"absolute",top:"50%",left:"50%","background-image":"linear-gradient(0deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%)",width:""+2*t(this).outerWidth(),height:""+2*t(this).outerWidth(),transform:"rotate(180deg) translate(-50%, -50%)","transform-origin":"0% 0%",opacity:"0"})}},d=function(){this.glareElement.css({width:""+2*t(this).outerWidth(),height:""+2*t(this).outerWidth()})};return t.fn.tilt.destroy=function(){t(this).each(function(){t(this).find(".js-tilt-glare").remove(),t(this).css({"will-change":"",transform:""}),t(this).off("mousemove mouseenter mouseleave")})},t.fn.tilt.getValues=function(){var i=[];return t(this).each(function(){this.mousePositions=r.call(this),i.push(h.call(this))}),i},t.fn.tilt.reset=function(){t(this).each(function(){var i=this;this.mousePositions=r.call(this),this.settings=t(this).data("settings"),l.call(this),setTimeout(function(){i.reset=!1},this.settings.transition)})},this.each(function(){var s=this;this.settings=t.extend({maxTilt:t(this).is("[data-tilt-max]")?t(this).data("tilt-max"):20,perspective:t(this).is("[data-tilt-perspective]")?t(this).data("tilt-perspective"):300,easing:t(this).is("[data-tilt-easing]")?t(this).data("tilt-easing"):"cubic-bezier(.03,.98,.52,.99)",scale:t(this).is("[data-tilt-scale]")?t(this).data("tilt-scale"):"1",speed:t(this).is("[data-tilt-speed]")?t(this).data("tilt-speed"):"400",transition:!t(this).is("[data-tilt-transition]")||t(this).data("tilt-transition"),disableAxis:t(this).is("[data-tilt-disable-axis]")?t(this).data("tilt-disable-axis"):null,axis:t(this).is("[data-tilt-axis]")?t(this).data("tilt-axis"):null,reset:!t(this).is("[data-tilt-reset]")||t(this).data("tilt-reset"),glare:!!t(this).is("[data-tilt-glare]")&&t(this).data("tilt-glare"),maxGlare:t(this).is("[data-tilt-maxglare]")?t(this).data("tilt-maxglare"):1},i),null!==this.settings.axis&&(console.warn("Tilt.js: the axis setting has been renamed to disableAxis. See https://github.com/gijsroge/tilt.js/pull/26 for more information"),this.settings.disableAxis=this.settings.axis),this.init=function(){t(s).data("settings",s.settings),s.settings.glare&&c.call(s),e.call(s)},this.init()})},t("[data-tilt]").tilt(),!0}); -------------------------------------------------------------------------------- /assets/plugins/slimScroll/jquery.slimscroll.min.js: -------------------------------------------------------------------------------- 1 | (function($){$.fn.extend({slimScroll:function(options){var defaults={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:"#333",railOpacity:.2,railDraggable:true,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"};var o=$.extend(defaults,options);this.each(function(){var isOverPanel,isOverBar,isDragg,queueHide,touchDif,barHeight,percentScroll,lastScroll,divS="
",minBarHeight=30,releaseScroll=false;var me=$(this);if(me.parent().hasClass(o.wrapperClass)){var offset=me.scrollTop();bar=me.parent().find("."+o.barClass);rail=me.parent().find("."+o.railClass);getBarHeight();if($.isPlainObject(options)){if("height"in options&&options.height=="auto"){me.parent().css("height","auto");me.css("height","auto");var height=me.parent().parent().height();me.parent().css("height",height);me.css("height",height)}if("scrollTo"in options){offset=parseInt(o.scrollTo)}else if("scrollBy"in options){offset+=parseInt(o.scrollBy)}else if("destroy"in options){bar.remove();rail.remove();me.unwrap();return}scrollContent(offset,false,true)}return}else if($.isPlainObject(options)){if("destroy"in options){return}}o.height=o.height=="auto"?me.parent().height():o.height;var wrapper=$(divS).addClass(o.wrapperClass).css({position:"relative",overflow:"hidden",width:o.width,height:o.height});me.css({overflow:"hidden",width:o.width,height:o.height,"-ms-touch-action":"none"});var rail=$(divS).addClass(o.railClass).css({width:o.size,height:"100%",position:"absolute",top:0,display:o.alwaysVisible&&o.railVisible?"block":"none","border-radius":o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90});var bar=$(divS).addClass(o.barClass).css({background:o.color,width:o.size,position:"absolute",top:0,opacity:o.opacity,display:o.alwaysVisible?"block":"none","border-radius":o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99});var posCss=o.position=="right"?{right:o.distance}:{left:o.distance};rail.css(posCss);bar.css(posCss);me.wrap(wrapper);me.parent().append(bar);me.parent().append(rail);if(o.railDraggable){bar.bind("mousedown",function(e){var $doc=$(document);isDragg=true;t=parseFloat(bar.css("top"));pageY=e.pageY;$doc.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY;bar.css("top",currTop);scrollContent(0,bar.position().top,false)});$doc.bind("mouseup.slimscroll",function(e){isDragg=false;hideBar();$doc.unbind(".slimscroll")});return false}).bind("selectstart.slimscroll",function(e){e.stopPropagation();e.preventDefault();return false})}rail.hover(function(){showBar()},function(){hideBar()});bar.hover(function(){isOverBar=true},function(){isOverBar=false});me.hover(function(){isOverPanel=true;showBar();hideBar()},function(){isOverPanel=false;hideBar()});if(window.navigator.msPointerEnabled){me.bind("MSPointerDown",function(e,b){if(e.originalEvent.targetTouches.length){touchDif=e.originalEvent.targetTouches[0].pageY}});me.bind("MSPointerMove",function(e){e.originalEvent.preventDefault();if(e.originalEvent.targetTouches.length){var diff=(touchDif-e.originalEvent.targetTouches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.targetTouches[0].pageY}})}else{me.bind("touchstart",function(e,b){if(e.originalEvent.touches.length){touchDif=e.originalEvent.touches[0].pageY}});me.bind("touchmove",function(e){if(!releaseScroll){e.originalEvent.preventDefault()}if(e.originalEvent.touches.length){var diff=(touchDif-e.originalEvent.touches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.touches[0].pageY}})}getBarHeight();if(o.start==="bottom"){bar.css({top:me.outerHeight()-bar.outerHeight()});scrollContent(0,true)}else if(o.start!=="top"){scrollContent($(o.start).position().top,null,true);if(!o.alwaysVisible){bar.hide()}}attachWheel();function _onWheel(e){if(!isOverPanel){return}var e=e||window.event;var delta=0;if(e.wheelDelta){delta=-e.wheelDelta/120}if(e.detail){delta=e.detail/3}var target=e.target||e.srcTarget||e.srcElement;if($(target).closest("."+o.wrapperClass).is(me.parent())){scrollContent(delta,true)}if(e.preventDefault&&!releaseScroll){e.preventDefault()}if(!releaseScroll){e.returnValue=false}}function scrollContent(y,isWheel,isJump){releaseScroll=false;var delta=y;var maxTop=me.outerHeight()-bar.outerHeight();if(isWheel){delta=parseInt(bar.css("top"))+y*parseInt(o.wheelStep)/100*bar.outerHeight();delta=Math.min(Math.max(delta,0),maxTop);delta=y>0?Math.ceil(delta):Math.floor(delta);bar.css({top:delta+"px"})}percentScroll=parseInt(bar.css("top"))/(me.outerHeight()-bar.outerHeight());delta=percentScroll*(me[0].scrollHeight-me.outerHeight());if(isJump){delta=y;var offsetTop=delta/me[0].scrollHeight*me.outerHeight();offsetTop=Math.min(Math.max(offsetTop,0),maxTop);bar.css({top:offsetTop+"px"})}me.scrollTop(delta);me.trigger("slimscrolling",~~delta);showBar();hideBar()}function attachWheel(){if(window.addEventListener){this.addEventListener("DOMMouseScroll",_onWheel,false);this.addEventListener("mousewheel",_onWheel,false)}else{document.attachEvent("onmousewheel",_onWheel)}}function getBarHeight(){barHeight=Math.max(me.outerHeight()/me[0].scrollHeight*me.outerHeight(),minBarHeight);bar.css({height:barHeight+"px"});var display=barHeight==me.outerHeight()?"none":"block";bar.css({display:display})}function showBar(){getBarHeight();clearTimeout(queueHide);if(percentScroll==~~percentScroll){releaseScroll=o.allowPageScroll;if(lastScroll!=percentScroll){var msg=~~percentScroll==0?"top":"bottom";me.trigger("slimscroll",msg)}}else{releaseScroll=false}lastScroll=percentScroll;if(barHeight>=me.outerHeight()){releaseScroll=true;return}bar.stop(true,true).fadeIn("fast");if(o.railVisible){rail.stop(true,true).fadeIn("fast")}}function hideBar(){if(!o.alwaysVisible){queueHide=setTimeout(function(){if(!(o.disableFadeOut&&isOverPanel)&&!isOverBar&&!isDragg){bar.fadeOut("slow");rail.fadeOut("slow")}},1e3)}}});return this}});$.fn.extend({slimscroll:$.fn.slimScroll})})(jQuery); -------------------------------------------------------------------------------- /assets/vendor/bootstrap/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | html { 2 | box-sizing: border-box; 3 | font-family: sans-serif; 4 | line-height: 1.15; 5 | -webkit-text-size-adjust: 100%; 6 | -ms-text-size-adjust: 100%; 7 | -ms-overflow-style: scrollbar; 8 | -webkit-tap-highlight-color: transparent; 9 | } 10 | 11 | *, 12 | *::before, 13 | *::after { 14 | box-sizing: inherit; 15 | } 16 | 17 | @-ms-viewport { 18 | width: device-width; 19 | } 20 | 21 | article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { 22 | display: block; 23 | } 24 | 25 | body { 26 | margin: 0; 27 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 28 | font-size: 1rem; 29 | font-weight: normal; 30 | line-height: 1.5; 31 | color: #212529; 32 | background-color: #fff; 33 | } 34 | 35 | [tabindex="-1"]:focus { 36 | outline: none !important; 37 | } 38 | 39 | hr { 40 | box-sizing: content-box; 41 | height: 0; 42 | overflow: visible; 43 | } 44 | 45 | h1, h2, h3, h4, h5, h6 { 46 | margin-top: 0; 47 | margin-bottom: .5rem; 48 | } 49 | 50 | p { 51 | margin-top: 0; 52 | margin-bottom: 1rem; 53 | } 54 | 55 | abbr[title], 56 | abbr[data-original-title] { 57 | text-decoration: underline; 58 | -webkit-text-decoration: underline dotted; 59 | text-decoration: underline dotted; 60 | cursor: help; 61 | border-bottom: 0; 62 | } 63 | 64 | address { 65 | margin-bottom: 1rem; 66 | font-style: normal; 67 | line-height: inherit; 68 | } 69 | 70 | ol, 71 | ul, 72 | dl { 73 | margin-top: 0; 74 | margin-bottom: 1rem; 75 | } 76 | 77 | ol ol, 78 | ul ul, 79 | ol ul, 80 | ul ol { 81 | margin-bottom: 0; 82 | } 83 | 84 | dt { 85 | font-weight: bold; 86 | } 87 | 88 | dd { 89 | margin-bottom: .5rem; 90 | margin-left: 0; 91 | } 92 | 93 | blockquote { 94 | margin: 0 0 1rem; 95 | } 96 | 97 | dfn { 98 | font-style: italic; 99 | } 100 | 101 | b, 102 | strong { 103 | font-weight: bolder; 104 | } 105 | 106 | small { 107 | font-size: 80%; 108 | } 109 | 110 | sub, 111 | sup { 112 | position: relative; 113 | font-size: 75%; 114 | line-height: 0; 115 | vertical-align: baseline; 116 | } 117 | 118 | sub { 119 | bottom: -.25em; 120 | } 121 | 122 | sup { 123 | top: -.5em; 124 | } 125 | 126 | a { 127 | color: #007bff; 128 | text-decoration: none; 129 | background-color: transparent; 130 | -webkit-text-decoration-skip: objects; 131 | } 132 | 133 | a:hover { 134 | color: #0056b3; 135 | text-decoration: underline; 136 | } 137 | 138 | a:not([href]):not([tabindex]) { 139 | color: inherit; 140 | text-decoration: none; 141 | } 142 | 143 | a:not([href]):not([tabindex]):focus, a:not([href]):not([tabindex]):hover { 144 | color: inherit; 145 | text-decoration: none; 146 | } 147 | 148 | a:not([href]):not([tabindex]):focus { 149 | outline: 0; 150 | } 151 | 152 | pre, 153 | code, 154 | kbd, 155 | samp { 156 | font-family: monospace, monospace; 157 | font-size: 1em; 158 | } 159 | 160 | pre { 161 | margin-top: 0; 162 | margin-bottom: 1rem; 163 | overflow: auto; 164 | } 165 | 166 | figure { 167 | margin: 0 0 1rem; 168 | } 169 | 170 | img { 171 | vertical-align: middle; 172 | border-style: none; 173 | } 174 | 175 | svg:not(:root) { 176 | overflow: hidden; 177 | } 178 | 179 | a, 180 | area, 181 | button, 182 | [role="button"], 183 | input, 184 | label, 185 | select, 186 | summary, 187 | textarea { 188 | -ms-touch-action: manipulation; 189 | touch-action: manipulation; 190 | } 191 | 192 | table { 193 | border-collapse: collapse; 194 | } 195 | 196 | caption { 197 | padding-top: 0.75rem; 198 | padding-bottom: 0.75rem; 199 | color: #868e96; 200 | text-align: left; 201 | caption-side: bottom; 202 | } 203 | 204 | th { 205 | text-align: left; 206 | } 207 | 208 | label { 209 | display: inline-block; 210 | margin-bottom: .5rem; 211 | } 212 | 213 | button:focus { 214 | outline: 1px dotted; 215 | outline: 5px auto -webkit-focus-ring-color; 216 | } 217 | 218 | input, 219 | button, 220 | select, 221 | optgroup, 222 | textarea { 223 | margin: 0; 224 | font-family: inherit; 225 | font-size: inherit; 226 | line-height: inherit; 227 | } 228 | 229 | button, 230 | input { 231 | overflow: visible; 232 | } 233 | 234 | button, 235 | select { 236 | text-transform: none; 237 | } 238 | 239 | button, 240 | html [type="button"], 241 | [type="reset"], 242 | [type="submit"] { 243 | -webkit-appearance: button; 244 | } 245 | 246 | button::-moz-focus-inner, 247 | [type="button"]::-moz-focus-inner, 248 | [type="reset"]::-moz-focus-inner, 249 | [type="submit"]::-moz-focus-inner { 250 | padding: 0; 251 | border-style: none; 252 | } 253 | 254 | input[type="radio"], 255 | input[type="checkbox"] { 256 | box-sizing: border-box; 257 | padding: 0; 258 | } 259 | 260 | input[type="date"], 261 | input[type="time"], 262 | input[type="datetime-local"], 263 | input[type="month"] { 264 | -webkit-appearance: listbox; 265 | } 266 | 267 | textarea { 268 | overflow: auto; 269 | resize: vertical; 270 | } 271 | 272 | fieldset { 273 | min-width: 0; 274 | padding: 0; 275 | margin: 0; 276 | border: 0; 277 | } 278 | 279 | legend { 280 | display: block; 281 | width: 100%; 282 | max-width: 100%; 283 | padding: 0; 284 | margin-bottom: .5rem; 285 | font-size: 1.5rem; 286 | line-height: inherit; 287 | color: inherit; 288 | white-space: normal; 289 | } 290 | 291 | progress { 292 | vertical-align: baseline; 293 | } 294 | 295 | [type="number"]::-webkit-inner-spin-button, 296 | [type="number"]::-webkit-outer-spin-button { 297 | height: auto; 298 | } 299 | 300 | [type="search"] { 301 | outline-offset: -2px; 302 | -webkit-appearance: none; 303 | } 304 | 305 | [type="search"]::-webkit-search-cancel-button, 306 | [type="search"]::-webkit-search-decoration { 307 | -webkit-appearance: none; 308 | } 309 | 310 | ::-webkit-file-upload-button { 311 | font: inherit; 312 | -webkit-appearance: button; 313 | } 314 | 315 | output { 316 | display: inline-block; 317 | } 318 | 319 | summary { 320 | display: list-item; 321 | } 322 | 323 | template { 324 | display: none; 325 | } 326 | 327 | [hidden] { 328 | display: none !important; 329 | } 330 | /*# sourceMappingURL=bootstrap-reboot.css.map */ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |


2 |
3 |

4 | 5 | 6 | Scoplant - The IoT MQTT Django dashboard for ESP32 (TTGO T-Higrow) is a project that provides a web-based dashboard for monitoring and controlling environmental conditions using an ESP32-based sensor device. The project utilizes the MQTT protocol for seamless communication between the sensor device and the dashboard, allowing real-time updates on the status of the environment being monitored. 7 |
8 |

9 | 10 | The TTGO T-Higrow device is equipped with sensors that measure various environmental parameters such as temperature, humidity, and light intensity. These measurements are transmitted to the MQTT broker, which then forwards the data to the Django backend for processing. The Django backend is responsible for storing and processing the data, as well as handling user authentication and authorization. 11 |
12 |

13 | 14 | The web-based dashboard is designed using Django's templating system and is optimized for desktop and mobile devices. The dashboard displays the data in an intuitive and user-friendly manner, allowing users to monitor the environmental conditions at a glance. The dashboard also features controls that allow users to adjust the settings of the sensor device, such as the frequency of data transmission and the threshold values for triggering alerts. 15 |
16 |

17 | 18 | Overall, this project has the potential to be a valuable tool for anyone who needs to remotely monitor and control their IoT devices. By creating a system that connects an MQTT device to a dashboard, users can receive real-time insights into the performance of their devices and take action when necessary. 19 |
20 |


21 | 22 | 23 | ## MQTT Protocol 24 |


25 |
26 | 27 | 28 | This project aims to create a system that connects an MQTT device to a dashboard, enabling users to remotely monitor and control their IoT devices. MQTT is a lightweight messaging protocol that is commonly used for transmitting telemetry data from IoT devices to other devices or servers. A dashboard, on the other hand, is a visual interface that provides real-time insights into data and allows for remote monitoring and control of devices. 29 | 30 | To achieve this, the project will involve several components, including an MQTT broker, a web server, and a user interface that displays the data in a user-friendly format. The MQTT device will send telemetry data to the broker, which will then forward it to the web server. The web server will process the data and display it on the dashboard in real-time. 31 | 32 | 33 | 34 | ### Hardware 35 | 36 |


37 |
38 | 39 | The TTGO-T-HIGrow project is an open-source hardware and software solution for monitoring environmental conditions using an ESP32-based sensor device. The project provides a comprehensive set of resources for users to design and build their own TTGO-T-HIGrow sensor devices, including schematics, PCB layouts, and firmware code. 40 | 41 | The project is based on open-source principles, and all resources and designs are freely available to the community. The project encourages collaboration and knowledge sharing, and welcomes contributions from users of all levels of experience. 42 | 43 | 44 | ### Resource 45 | [TTGO-T-HIGrow]( https://github.com/pesor/TTGO-T-HIGrow) 46 | 47 | 48 | 49 | 50 | 51 | ## How to Run 52 | 53 | This Django project is designed to be easy to set up and run. Here are the steps you need to follow to get started: 54 | 55 | ### Prerequisites 56 | Before you can run this Django project, you need to have the following software installed: 57 | 58 | Download and install MongoDB from here 59 | 60 | Python 3.9 or later 61 | 62 | ### Installation 63 | 64 | To install this Django project, follow these steps: 65 | 66 | 1- Clone the project repository to your local machine using the command: 67 | ```sh 68 | git clone https://github.com/alialaei110/IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor.git 69 | ``` 70 | 2- Navigate to the project directory using the command: 71 | ```sh 72 | cd IOT-MQTT-Dashboard-for-ESP32-Plant-Sensor 73 | ``` 74 | 3- Create a virtual environment and activate it using the following commands: 75 | ```sh 76 | python -m venv env 77 | source env/Scripts/activate 78 | ``` 79 | 4- Install the project dependencies using the command: 80 | ```sh 81 | pip install -r requirements.txt 82 | ``` 83 | 84 | 85 | 86 | ### Running the Project 87 | 88 | for the first time, before running server run commands: 89 | 90 | ```sh 91 | python manage.py makemigrations 92 | ``` 93 | ```sh 94 | python manage.py migrate 95 | ``` 96 | 97 | Once you have installed and configured the Django project, you can run it using the following command: 98 | 99 | ```sh 100 | python manage.py runserver 101 | ``` 102 | 103 | This command will start the Django development server, and you should be able to access the project by navigating to ```http://127.0.0.1:8000/``` in your web browser. 104 | 105 | That's it! You should now have this Django project up and running on your local machine. 106 | 107 | 108 | ### Create user for the first time 109 | 110 | create a superuser by writing the following command: 111 | ```sh 112 | python manage.py createsuperuser 113 | ``` 114 | We then write the following credentials step by step. We can fill these credentials according to our preferences: 115 | 116 | ```sh 117 | Username: admin 118 | Email address: admin@gmail.com 119 | Password: ******** 120 | Password (again): ******** 121 | ``` 122 | Note: After filling a row, press “Enter” to fill the other information. 123 | 124 | Now the superuser will be created if we have entered all fields correctly. 125 | 126 | 127 | ## License 128 | [MIT License](LICENSE) 129 | 130 | Free Software! 131 | -------------------------------------------------------------------------------- /assets/plugins/bootstrap/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.0 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | *, 9 | *::before, 10 | *::after { 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | font-family: sans-serif; 16 | line-height: 1.15; 17 | -webkit-text-size-adjust: 100%; 18 | -ms-text-size-adjust: 100%; 19 | -ms-overflow-style: scrollbar; 20 | -webkit-tap-highlight-color: transparent; 21 | } 22 | 23 | @-ms-viewport { 24 | width: device-width; 25 | } 26 | 27 | article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { 28 | display: block; 29 | } 30 | 31 | body { 32 | margin: 0; 33 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 34 | font-size: 1rem; 35 | font-weight: 400; 36 | line-height: 1.5; 37 | color: #212529; 38 | text-align: left; 39 | background-color: #fff; 40 | } 41 | 42 | [tabindex="-1"]:focus { 43 | outline: 0 !important; 44 | } 45 | 46 | hr { 47 | box-sizing: content-box; 48 | height: 0; 49 | overflow: visible; 50 | } 51 | 52 | h1, h2, h3, h4, h5, h6 { 53 | margin-top: 0; 54 | margin-bottom: 0.5rem; 55 | } 56 | 57 | p { 58 | margin-top: 0; 59 | margin-bottom: 1rem; 60 | } 61 | 62 | abbr[title], 63 | abbr[data-original-title] { 64 | text-decoration: underline; 65 | -webkit-text-decoration: underline dotted; 66 | text-decoration: underline dotted; 67 | cursor: help; 68 | border-bottom: 0; 69 | } 70 | 71 | address { 72 | margin-bottom: 1rem; 73 | font-style: normal; 74 | line-height: inherit; 75 | } 76 | 77 | ol, 78 | ul, 79 | dl { 80 | margin-top: 0; 81 | margin-bottom: 1rem; 82 | } 83 | 84 | ol ol, 85 | ul ul, 86 | ol ul, 87 | ul ol { 88 | margin-bottom: 0; 89 | } 90 | 91 | dt { 92 | font-weight: 700; 93 | } 94 | 95 | dd { 96 | margin-bottom: .5rem; 97 | margin-left: 0; 98 | } 99 | 100 | blockquote { 101 | margin: 0 0 1rem; 102 | } 103 | 104 | dfn { 105 | font-style: italic; 106 | } 107 | 108 | b, 109 | strong { 110 | font-weight: bolder; 111 | } 112 | 113 | small { 114 | font-size: 80%; 115 | } 116 | 117 | sub, 118 | sup { 119 | position: relative; 120 | font-size: 75%; 121 | line-height: 0; 122 | vertical-align: baseline; 123 | } 124 | 125 | sub { 126 | bottom: -.25em; 127 | } 128 | 129 | sup { 130 | top: -.5em; 131 | } 132 | 133 | a { 134 | color: #007bff; 135 | text-decoration: none; 136 | background-color: transparent; 137 | -webkit-text-decoration-skip: objects; 138 | } 139 | 140 | a:hover { 141 | color: #0056b3; 142 | text-decoration: underline; 143 | } 144 | 145 | a:not([href]):not([tabindex]) { 146 | color: inherit; 147 | text-decoration: none; 148 | } 149 | 150 | a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { 151 | color: inherit; 152 | text-decoration: none; 153 | } 154 | 155 | a:not([href]):not([tabindex]):focus { 156 | outline: 0; 157 | } 158 | 159 | pre, 160 | code, 161 | kbd, 162 | samp { 163 | font-family: monospace, monospace; 164 | font-size: 1em; 165 | } 166 | 167 | pre { 168 | margin-top: 0; 169 | margin-bottom: 1rem; 170 | overflow: auto; 171 | -ms-overflow-style: scrollbar; 172 | } 173 | 174 | figure { 175 | margin: 0 0 1rem; 176 | } 177 | 178 | img { 179 | vertical-align: middle; 180 | border-style: none; 181 | } 182 | 183 | svg:not(:root) { 184 | overflow: hidden; 185 | } 186 | 187 | table { 188 | border-collapse: collapse; 189 | } 190 | 191 | caption { 192 | padding-top: 0.75rem; 193 | padding-bottom: 0.75rem; 194 | color: #6c757d; 195 | text-align: left; 196 | caption-side: bottom; 197 | } 198 | 199 | th { 200 | text-align: inherit; 201 | } 202 | 203 | label { 204 | display: inline-block; 205 | margin-bottom: 0.5rem; 206 | } 207 | 208 | button { 209 | border-radius: 0; 210 | } 211 | 212 | button:focus { 213 | outline: 1px dotted; 214 | outline: 5px auto -webkit-focus-ring-color; 215 | } 216 | 217 | input, 218 | button, 219 | select, 220 | optgroup, 221 | textarea { 222 | margin: 0; 223 | font-family: inherit; 224 | font-size: inherit; 225 | line-height: inherit; 226 | } 227 | 228 | button, 229 | input { 230 | overflow: visible; 231 | } 232 | 233 | button, 234 | select { 235 | text-transform: none; 236 | } 237 | 238 | button, 239 | html [type="button"], 240 | [type="reset"], 241 | [type="submit"] { 242 | -webkit-appearance: button; 243 | } 244 | 245 | button::-moz-focus-inner, 246 | [type="button"]::-moz-focus-inner, 247 | [type="reset"]::-moz-focus-inner, 248 | [type="submit"]::-moz-focus-inner { 249 | padding: 0; 250 | border-style: none; 251 | } 252 | 253 | input[type="radio"], 254 | input[type="checkbox"] { 255 | box-sizing: border-box; 256 | padding: 0; 257 | } 258 | 259 | input[type="date"], 260 | input[type="time"], 261 | input[type="datetime-local"], 262 | input[type="month"] { 263 | -webkit-appearance: listbox; 264 | } 265 | 266 | textarea { 267 | overflow: auto; 268 | resize: vertical; 269 | } 270 | 271 | fieldset { 272 | min-width: 0; 273 | padding: 0; 274 | margin: 0; 275 | border: 0; 276 | } 277 | 278 | legend { 279 | display: block; 280 | width: 100%; 281 | max-width: 100%; 282 | padding: 0; 283 | margin-bottom: .5rem; 284 | font-size: 1.5rem; 285 | line-height: inherit; 286 | color: inherit; 287 | white-space: normal; 288 | } 289 | 290 | progress { 291 | vertical-align: baseline; 292 | } 293 | 294 | [type="number"]::-webkit-inner-spin-button, 295 | [type="number"]::-webkit-outer-spin-button { 296 | height: auto; 297 | } 298 | 299 | [type="search"] { 300 | outline-offset: -2px; 301 | -webkit-appearance: none; 302 | } 303 | 304 | [type="search"]::-webkit-search-cancel-button, 305 | [type="search"]::-webkit-search-decoration { 306 | -webkit-appearance: none; 307 | } 308 | 309 | ::-webkit-file-upload-button { 310 | font: inherit; 311 | -webkit-appearance: button; 312 | } 313 | 314 | output { 315 | display: inline-block; 316 | } 317 | 318 | summary { 319 | display: list-item; 320 | cursor: pointer; 321 | } 322 | 323 | template { 324 | display: none; 325 | } 326 | 327 | [hidden] { 328 | display: none !important; 329 | } 330 | /*# sourceMappingURL=bootstrap-reboot.css.map */ -------------------------------------------------------------------------------- /ScoplantUserPanel/templates/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 404 Error 11 | 12 | 13 | 14 | 15 | 16 | 183 | 184 | 185 | 189 | 190 | 191 | 192 | 193 | 194 |
195 |
196 |
197 |

404

198 |
199 |

the page you requested could not found

200 |
201 |
202 | 203 | 204 | 205 | 206 | -------------------------------------------------------------------------------- /assets/js/demo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * AdminLTE Demo Menu 3 | * ------------------ 4 | * You should not use this file in production. 5 | * This file is for demo purposes only. 6 | */ 7 | (function ($) { 8 | 'use strict' 9 | 10 | var $sidebar = $('.control-sidebar') 11 | var $container = $('
', { 12 | class: 'p-3' 13 | }) 14 | 15 | $sidebar.append($container) 16 | 17 | var navbar_dark_skins = [ 18 | 'bg-primary', 19 | 'bg-info', 20 | 'bg-success', 21 | 'bg-danger' 22 | ] 23 | 24 | var navbar_light_skins = [ 25 | 'bg-warning', 26 | 'bg-white', 27 | 'bg-gray-light' 28 | ] 29 | 30 | $container.append( 31 | '
تنظیمات قالب

' 32 | + '
رنگ‌های نوار ناوبری
' 33 | ) 34 | 35 | var $navbar_variants = $('
', { 36 | 'class': 'd-flex' 37 | }) 38 | var navbar_all_colors = navbar_dark_skins.concat(navbar_light_skins) 39 | var $navbar_variants_colors = createSkinBlock(navbar_all_colors, function (e) { 40 | var color = $(this).data('color') 41 | console.log('Adding ' + color) 42 | var $main_header = $('.main-header') 43 | $main_header.removeClass('navbar-dark').removeClass('navbar-light') 44 | navbar_all_colors.map(function (color) { 45 | $main_header.removeClass(color) 46 | }) 47 | 48 | if (navbar_dark_skins.indexOf(color) > -1) { 49 | $main_header.addClass('navbar-dark') 50 | console.log('AND navbar-dark') 51 | } else { 52 | console.log('AND navbar-light') 53 | $main_header.addClass('navbar-light') 54 | } 55 | 56 | $main_header.addClass(color) 57 | }) 58 | 59 | $navbar_variants.append($navbar_variants_colors) 60 | 61 | $container.append($navbar_variants) 62 | 63 | var $checkbox_container = $('
', { 64 | 'class': 'mb-4' 65 | }) 66 | var $navbar_border = $('', { 67 | type : 'checkbox', 68 | value : 1, 69 | checked: $('.main-header').hasClass('border-bottom'), 70 | 'class': 'mr-1' 71 | }).on('click', function () { 72 | if ($(this).is(':checked')) { 73 | $('.main-header').addClass('border-bottom') 74 | } else { 75 | $('.main-header').removeClass('border-bottom') 76 | } 77 | }) 78 | $checkbox_container.append($navbar_border) 79 | $checkbox_container.append('مرز نوار ناوبری') 80 | $container.append($checkbox_container) 81 | 82 | 83 | var sidebar_colors = [ 84 | 'bg-primary', 85 | 'bg-warning', 86 | 'bg-info', 87 | 'bg-danger', 88 | 'bg-success' 89 | ] 90 | 91 | var sidebar_skins = [ 92 | 'sidebar-dark-primary', 93 | 'sidebar-dark-warning', 94 | 'sidebar-dark-info', 95 | 'sidebar-dark-danger', 96 | 'sidebar-dark-success', 97 | 'sidebar-light-primary', 98 | 'sidebar-light-warning', 99 | 'sidebar-light-info', 100 | 'sidebar-light-danger', 101 | 'sidebar-light-success' 102 | ] 103 | 104 | $container.append('
نوار تیره
') 105 | var $sidebar_variants = $('
', { 106 | 'class': 'd-flex' 107 | }) 108 | $container.append($sidebar_variants) 109 | $container.append(createSkinBlock(sidebar_colors, function () { 110 | var color = $(this).data('color') 111 | var sidebar_class = 'sidebar-dark-' + color.replace('bg-', '') 112 | var $sidebar = $('.main-sidebar') 113 | sidebar_skins.map(function (skin) { 114 | $sidebar.removeClass(skin) 115 | }) 116 | 117 | $sidebar.addClass(sidebar_class) 118 | })) 119 | 120 | $container.append('
نوار روشن
') 121 | var $sidebar_variants = $('
', { 122 | 'class': 'd-flex' 123 | }) 124 | $container.append($sidebar_variants) 125 | $container.append(createSkinBlock(sidebar_colors, function () { 126 | var color = $(this).data('color') 127 | var sidebar_class = 'sidebar-light-' + color.replace('bg-', '') 128 | var $sidebar = $('.main-sidebar') 129 | sidebar_skins.map(function (skin) { 130 | $sidebar.removeClass(skin) 131 | }) 132 | 133 | $sidebar.addClass(sidebar_class) 134 | })) 135 | 136 | var logo_skins = navbar_all_colors 137 | $container.append('
رنگ برند لوگو
') 138 | var $logo_variants = $('
', { 139 | 'class': 'd-flex' 140 | }) 141 | $container.append($logo_variants) 142 | var $clear_btn = $('', { 143 | href: 'javascript:void(0)' 144 | }).text('پاک کردن').on('click', function () { 145 | var $logo = $('.brand-link') 146 | logo_skins.map(function (skin) { 147 | $logo.removeClass(skin) 148 | }) 149 | }) 150 | $container.append(createSkinBlock(logo_skins, function () { 151 | var color = $(this).data('color') 152 | var $logo = $('.brand-link') 153 | logo_skins.map(function (skin) { 154 | $logo.removeClass(skin) 155 | }) 156 | $logo.addClass(color) 157 | }).append($clear_btn)) 158 | 159 | function createSkinBlock(colors, callback) { 160 | var $block = $('
', { 161 | 'class': 'd-flex flex-wrap mb-3' 162 | }) 163 | 164 | colors.map(function (color) { 165 | var $color = $('
', { 166 | 'class': (typeof color === 'object' ? color.join(' ') : color) + ' elevation-2' 167 | }) 168 | 169 | $block.append($color) 170 | 171 | $color.data('color', color) 172 | 173 | $color.css({ 174 | width : '40px', 175 | height : '20px', 176 | borderRadius: '25px', 177 | marginRight : 10, 178 | marginBottom: 10, 179 | opacity : 0.8, 180 | cursor : 'pointer' 181 | }) 182 | 183 | $color.hover(function () { 184 | $(this).css({ opacity: 1 }).removeClass('elevation-2').addClass('elevation-4') 185 | }, function () { 186 | $(this).css({ opacity: 0.8 }).removeClass('elevation-4').addClass('elevation-2') 187 | }) 188 | 189 | if (callback) { 190 | $color.on('click', callback) 191 | } 192 | 193 | }) 194 | 195 | return $block 196 | } 197 | 198 | $('[data-widget="chat-pane-toggle"]').click(function() { 199 | $(this).closest('.card').toggleClass('direct-chat-contacts-open') 200 | }); 201 | $('[data-toggle="tooltip"]').tooltip(); 202 | 203 | 204 | function ConvertNumberToPersion() { 205 | let persian = { 0: '۰', 1: '۱', 2: '۲', 3: '۳', 4: '۴', 5: '۵', 6: '۶', 7: '۷', 8: '۸', 9: '۹' }; 206 | function traverse(el) { 207 | if (el.nodeType == 3) { 208 | var list = el.data.match(/[0-9]/g); 209 | if (list != null && list.length != 0) { 210 | for (var i = 0; i < list.length; i++) 211 | el.data = el.data.replace(list[i], persian[list[i]]); 212 | } 213 | } 214 | for (var i = 0; i < el.childNodes.length; i++) { 215 | traverse(el.childNodes[i]); 216 | } 217 | } 218 | traverse(document.body); 219 | } 220 | 221 | ConvertNumberToPersion() 222 | 223 | })(jQuery) 224 | --------------------------------------------------------------------------------