├── apps ├── __init__.py ├── host │ ├── __init__.py │ ├── tests.py │ ├── apps.py │ ├── url.py │ ├── admin.py │ └── models.py ├── logcat │ ├── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ ├── admin.py │ └── views.py └── threat │ ├── __init__.py │ ├── tests.py │ ├── apps.py │ ├── urls.py │ ├── admin.py │ └── models.py ├── zerus ├── __init__.py ├── asgi.py ├── wsgi.py ├── urls.py └── settings.py ├── staticfile ├── fonts │ ├── Descr.WD3 │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.eot@ │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regulard41d.eot ├── img │ ├── 404_icon.png │ ├── 500_icon.png │ ├── search-icon.jpg │ ├── avatar1_small.jpg │ ├── checkbox │ │ ├── Descr.WD3 │ │ ├── check-off.png │ │ ├── check-on.png │ │ ├── radio-off.png │ │ └── radio-on.png │ ├── follower-avatar.jpg │ ├── profile-avatar.jpg │ └── favicon.html ├── assets │ ├── gritter │ │ ├── images │ │ │ ├── gritter.png │ │ │ ├── ie-spacer.gif │ │ │ └── gritter-light.png │ │ └── css │ │ │ └── jquery.gritter.css │ ├── bootstrap-colorpicker │ │ ├── img │ │ │ ├── hue.png │ │ │ ├── alpha.png │ │ │ └── saturation.png │ │ └── css │ │ │ └── colorpicker.css │ ├── jquery-file-upload │ │ ├── img │ │ │ ├── loading.gif │ │ │ └── progressbar.gif │ │ ├── js │ │ │ └── vendor │ │ │ │ ├── tmpl.min.js │ │ │ │ ├── canvas-to-blob.min.js │ │ │ │ └── load-image.min.js │ │ └── css │ │ │ └── jquery.fileupload-ui.css │ ├── jquery-ui │ │ └── images │ │ │ ├── animated-overlay.gif │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_228ef1_256x240.png │ │ │ ├── ui-icons_ef8c08_256x240.png │ │ │ ├── ui-icons_ffd27a_256x240.png │ │ │ ├── ui-icons_ffffff_256x240.png │ │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ │ └── ui-bg_highlight-soft_100_eeeeee_1x100.png │ ├── font-awesome │ │ └── font │ │ │ ├── fontawesome-webfontd41d.eot │ │ │ ├── fontawesome-webfontf77b.eot │ │ │ ├── fontawesome-webfontf77b.ttf │ │ │ └── fontawesome-webfontf77b.woff │ ├── jquery-easy-pie-chart │ │ └── jquery.easy-pie-chart.css │ ├── morris.js-0.4.3 │ │ └── morris.css │ ├── bootstrap-datepicker │ │ └── css │ │ │ └── datepicker.css │ ├── data-tables │ │ └── DT_bootstrap.js │ └── bootstrap-daterangepicker │ │ └── daterangepicker.css ├── admin │ ├── fonts │ │ ├── Roboto-Bold-webfont.woff │ │ ├── Roboto-Light-webfont.woff │ │ ├── Roboto-Regular-webfont.woff │ │ └── README.txt │ ├── img │ │ ├── tooltag-arrowright.svg │ │ ├── README.txt │ │ ├── icon-addlink.svg │ │ ├── tooltag-add.svg │ │ ├── icon-changelink.svg │ │ ├── icon-deletelink.svg │ │ ├── icon-yes.svg │ │ ├── search.svg │ │ ├── icon-alert.svg │ │ ├── icon-no.svg │ │ ├── inline-delete.svg │ │ ├── icon-viewlink.svg │ │ ├── icon-unknown-alt.svg │ │ ├── icon-unknown.svg │ │ ├── icon-clock.svg │ │ ├── gis │ │ │ ├── move_vertex_off.svg │ │ │ └── move_vertex_on.svg │ │ ├── icon-calendar.svg │ │ ├── calendar-icons.svg │ │ ├── LICENSE │ │ ├── sorting-icons.svg │ │ └── selector-icons.svg │ ├── js │ │ ├── prepopulate.min.js │ │ ├── jquery.init.js │ │ ├── cancel.js │ │ ├── prepopulate_init.js │ │ ├── popup_response.js │ │ ├── vendor │ │ │ ├── select2 │ │ │ │ ├── i18n │ │ │ │ │ ├── zh-TW.js │ │ │ │ │ ├── zh-CN.js │ │ │ │ │ ├── az.js │ │ │ │ │ ├── fi.js │ │ │ │ │ ├── ja.js │ │ │ │ │ ├── hu.js │ │ │ │ │ ├── th.js │ │ │ │ │ ├── tr.js │ │ │ │ │ ├── ko.js │ │ │ │ │ ├── id.js │ │ │ │ │ ├── vi.js │ │ │ │ │ ├── is.js │ │ │ │ │ ├── ar.js │ │ │ │ │ ├── de.js │ │ │ │ │ ├── et.js │ │ │ │ │ ├── nb.js │ │ │ │ │ ├── sv.js │ │ │ │ │ ├── bg.js │ │ │ │ │ ├── km.js │ │ │ │ │ ├── ms.js │ │ │ │ │ ├── gl.js │ │ │ │ │ ├── da.js │ │ │ │ │ ├── en.js │ │ │ │ │ ├── he.js │ │ │ │ │ ├── hi.js │ │ │ │ │ ├── fa.js │ │ │ │ │ ├── hr.js │ │ │ │ │ ├── eu.js │ │ │ │ │ ├── mk.js │ │ │ │ │ ├── pt-BR.js │ │ │ │ │ ├── lv.js │ │ │ │ │ ├── pt.js │ │ │ │ │ ├── ca.js │ │ │ │ │ ├── es.js │ │ │ │ │ ├── it.js │ │ │ │ │ ├── fr.js │ │ │ │ │ ├── nl.js │ │ │ │ │ ├── ro.js │ │ │ │ │ ├── lt.js │ │ │ │ │ ├── pl.js │ │ │ │ │ ├── el.js │ │ │ │ │ ├── sr.js │ │ │ │ │ ├── uk.js │ │ │ │ │ ├── sr-Cyrl.js │ │ │ │ │ ├── ru.js │ │ │ │ │ ├── sk.js │ │ │ │ │ └── cs.js │ │ │ │ └── LICENSE.md │ │ │ ├── xregexp │ │ │ │ └── LICENSE.txt │ │ │ └── jquery │ │ │ │ └── LICENSE.txt │ │ ├── change_form.js │ │ ├── collapse.min.js │ │ ├── autocomplete.js │ │ ├── prepopulate.js │ │ ├── collapse.js │ │ ├── actions.min.js │ │ ├── timeparse.js │ │ └── inlines.min.js │ └── css │ │ ├── fonts.css │ │ ├── dashboard.css │ │ ├── vendor │ │ └── select2 │ │ │ └── LICENSE-SELECT2.md │ │ ├── login.css │ │ ├── responsive_rtl.css │ │ └── rtl.css ├── js │ ├── easy-pie-chart.js │ ├── jquery.customSelect.min.js │ ├── jquery.scrollTo.min.js │ ├── form-validation-script.js │ ├── sliders.js │ ├── morris-script.js │ ├── all-chartjs.js │ ├── common-scripts.js │ ├── dynamic-table.js │ ├── external-dragging-calendar.js │ ├── sparkline-chart.js │ └── gritter.js └── css │ └── owl.carousel.css ├── requirements.txt ├── manage.py ├── templates ├── 500.html ├── 404.html └── login.html └── readme.md /apps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/host/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/logcat/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/threat/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /zerus/__init__.py: -------------------------------------------------------------------------------- 1 | import pymysql 2 | pymysql.install_as_MySQLdb() -------------------------------------------------------------------------------- /apps/host/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /apps/logcat/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /apps/threat/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /staticfile/fonts/Descr.WD3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/fonts/Descr.WD3 -------------------------------------------------------------------------------- /staticfile/img/404_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/404_icon.png -------------------------------------------------------------------------------- /staticfile/img/500_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/500_icon.png -------------------------------------------------------------------------------- /staticfile/img/search-icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/search-icon.jpg -------------------------------------------------------------------------------- /staticfile/img/avatar1_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/avatar1_small.jpg -------------------------------------------------------------------------------- /staticfile/img/checkbox/Descr.WD3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/checkbox/Descr.WD3 -------------------------------------------------------------------------------- /staticfile/img/follower-avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/follower-avatar.jpg -------------------------------------------------------------------------------- /staticfile/img/profile-avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/profile-avatar.jpg -------------------------------------------------------------------------------- /apps/host/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class HostConfig(AppConfig): 5 | name = 'apps.host' 6 | -------------------------------------------------------------------------------- /staticfile/img/checkbox/check-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/checkbox/check-off.png -------------------------------------------------------------------------------- /staticfile/img/checkbox/check-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/checkbox/check-on.png -------------------------------------------------------------------------------- /staticfile/img/checkbox/radio-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/checkbox/radio-off.png -------------------------------------------------------------------------------- /staticfile/img/checkbox/radio-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/img/checkbox/radio-on.png -------------------------------------------------------------------------------- /apps/logcat/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class LogcatConfig(AppConfig): 5 | name = 'apps.logcat' 6 | -------------------------------------------------------------------------------- /apps/threat/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ThreatConfig(AppConfig): 5 | name = 'apps.threat' 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | django==2.2.8 2 | kafka-python 3 | kafka 4 | apscheduler 5 | django-apscheduler 6 | ares 7 | requests 8 | osquery 9 | pymysql -------------------------------------------------------------------------------- /staticfile/assets/gritter/images/gritter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/gritter/images/gritter.png -------------------------------------------------------------------------------- /staticfile/admin/fonts/Roboto-Bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/admin/fonts/Roboto-Bold-webfont.woff -------------------------------------------------------------------------------- /staticfile/assets/gritter/images/ie-spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/gritter/images/ie-spacer.gif -------------------------------------------------------------------------------- /staticfile/admin/fonts/Roboto-Light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/admin/fonts/Roboto-Light-webfont.woff -------------------------------------------------------------------------------- /staticfile/admin/fonts/Roboto-Regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/admin/fonts/Roboto-Regular-webfont.woff -------------------------------------------------------------------------------- /staticfile/assets/gritter/images/gritter-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/gritter/images/gritter-light.png -------------------------------------------------------------------------------- /staticfile/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /staticfile/fonts/glyphicons-halflings-regular.eot@: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/fonts/glyphicons-halflings-regular.eot@ -------------------------------------------------------------------------------- /staticfile/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /staticfile/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /staticfile/assets/bootstrap-colorpicker/img/hue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/bootstrap-colorpicker/img/hue.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-file-upload/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-file-upload/img/loading.gif -------------------------------------------------------------------------------- /staticfile/assets/bootstrap-colorpicker/img/alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/bootstrap-colorpicker/img/alpha.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/animated-overlay.gif -------------------------------------------------------------------------------- /staticfile/fonts/glyphicons-halflings-regulard41d.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/fonts/glyphicons-halflings-regulard41d.eot -------------------------------------------------------------------------------- /staticfile/assets/jquery-file-upload/img/progressbar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-file-upload/img/progressbar.gif -------------------------------------------------------------------------------- /staticfile/assets/bootstrap-colorpicker/img/saturation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/bootstrap-colorpicker/img/saturation.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /staticfile/assets/font-awesome/font/fontawesome-webfontd41d.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/font-awesome/font/fontawesome-webfontd41d.eot -------------------------------------------------------------------------------- /staticfile/assets/font-awesome/font/fontawesome-webfontf77b.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/font-awesome/font/fontawesome-webfontf77b.eot -------------------------------------------------------------------------------- /staticfile/assets/font-awesome/font/fontawesome-webfontf77b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/font-awesome/font/fontawesome-webfontf77b.ttf -------------------------------------------------------------------------------- /staticfile/assets/font-awesome/font/fontawesome-webfontf77b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/font-awesome/font/fontawesome-webfontf77b.woff -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-ui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MisakiKata/zeru/master/staticfile/assets/jquery-ui/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /staticfile/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css: -------------------------------------------------------------------------------- 1 | .easyPieChart { 2 | position: relative; 3 | text-align: center; 4 | } 5 | 6 | .easyPieChart canvas { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | } 11 | -------------------------------------------------------------------------------- /staticfile/admin/fonts/README.txt: -------------------------------------------------------------------------------- 1 | Roboto webfont source: https://www.google.com/fonts/specimen/Roboto 2 | WOFF files extracted using https://github.com/majodev/google-webfonts-helper 3 | Weights used in this project: Light (300), Regular (400), Bold (700) 4 | -------------------------------------------------------------------------------- /staticfile/admin/img/tooltag-arrowright.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/host/url.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from apps.host import views 3 | 4 | 5 | app_name = 'host' 6 | 7 | extra_urlpatter = [ 8 | path('host/', views.host, name='host'), 9 | path('profile/', views.profile, name='profile'), 10 | path('edit/', views.edit_profile, name='edit'), 11 | path('passwd/', views.passwd, name='passwd'), 12 | ] -------------------------------------------------------------------------------- /staticfile/admin/img/README.txt: -------------------------------------------------------------------------------- 1 | All icons are taken from Font Awesome (http://fontawesome.io/) project. 2 | The Font Awesome font is licensed under the SIL OFL 1.1: 3 | - https://scripts.sil.org/OFL 4 | 5 | SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG 6 | Font-Awesome-SVG-PNG is licensed under the MIT license (see file license 7 | in current folder). 8 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-addlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/img/tooltag-add.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/js/prepopulate.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.prepopulate=function(d,f,g){return this.each(function(){var a=b(this),h=function(){if(!a.data("_changed")){var e=[];b.each(d,function(a,c){c=b(c);0 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/js/jquery.init.js: -------------------------------------------------------------------------------- 1 | /*global django:true, jQuery:false*/ 2 | /* Puts the included jQuery into our own namespace using noConflict and passing 3 | * it 'true'. This ensures that the included jQuery doesn't pollute the global 4 | * namespace (i.e. this preserves pre-existing values for both window.$ and 5 | * window.jQuery). 6 | */ 7 | var django = django || {}; 8 | django.jQuery = jQuery.noConflict(true); 9 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-deletelink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/img/favicon.html: -------------------------------------------------------------------------------- 1 | 2 | 404 Not Found 3 | 4 |

404 Not Found 5 |

6 | The resource requested could not be found on this server!
7 | Powered By LiteSpeed Web Server
8 | LiteSpeed Technologies is not responsible for administration and contents of this web site! 9 | -------------------------------------------------------------------------------- /apps/host/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from apps.host.models import Host, Kafka 3 | # Register your models here. 4 | 5 | 6 | @admin.register(Host) 7 | class HostAdmin(admin.ModelAdmin): 8 | list_display = ('Auther', 'Hostname', 'Email', 'Active') 9 | list_per_page = 50 10 | 11 | @admin.register(Kafka) 12 | class KafkaAdmin(admin.ModelAdmin): 13 | list_display = ('Kafka', 'Active') 14 | list_per_page = 50 -------------------------------------------------------------------------------- /staticfile/admin/img/icon-yes.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /zerus/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for zerus 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.0/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', 'zerus.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /zerus/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for zerus 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.0/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', 'zerus.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /staticfile/admin/img/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/js/cancel.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | $(function() { 4 | $('.cancel-link').on('click', function(e) { 5 | e.preventDefault(); 6 | if (window.location.search.indexOf('&_popup=1') === -1) { 7 | window.history.back(); // Go back if not a popup. 8 | } else { 9 | window.close(); // Otherwise, close the popup. 10 | } 11 | }); 12 | }); 13 | })(django.jQuery); 14 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-alert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/threat/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from apps.threat import views 3 | 4 | 5 | app_name = 'threat' 6 | 7 | 8 | extra_urlpatter = [ 9 | path('monitor/', views.filemonitor, name='monitor'), 10 | path('comshow/', views.Message_save, name='comshow'), 11 | path('inbox/', views.inbox, name='inbox'), 12 | path('read/', views.read, name='read'), 13 | path('cve/', views.cve, name='cve'), 14 | path('delect/', views.delete_key, name='delete_key'), 15 | path('add/', views.definekey, name='definekey'), 16 | ] -------------------------------------------------------------------------------- /staticfile/admin/css/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Roboto'; 3 | src: url('../fonts/Roboto-Bold-webfont.woff'); 4 | font-weight: 700; 5 | font-style: normal; 6 | } 7 | 8 | @font-face { 9 | font-family: 'Roboto'; 10 | src: url('../fonts/Roboto-Regular-webfont.woff'); 11 | font-weight: 400; 12 | font-style: normal; 13 | } 14 | 15 | @font-face { 16 | font-family: 'Roboto'; 17 | src: url('../fonts/Roboto-Light-webfont.woff'); 18 | font-weight: 300; 19 | font-style: normal; 20 | } 21 | -------------------------------------------------------------------------------- /staticfile/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* DASHBOARD */ 2 | 3 | .dashboard .module table th { 4 | width: 100%; 5 | } 6 | 7 | .dashboard .module table td { 8 | white-space: nowrap; 9 | } 10 | 11 | .dashboard .module table td a { 12 | display: block; 13 | padding-right: .6em; 14 | } 15 | 16 | /* RECENT ACTIONS MODULE */ 17 | 18 | .module ul.actionlist { 19 | margin-left: 0; 20 | } 21 | 22 | ul.actionlist li { 23 | list-style-type: none; 24 | overflow: hidden; 25 | text-overflow: ellipsis; 26 | -o-text-overflow: ellipsis; 27 | } 28 | -------------------------------------------------------------------------------- /staticfile/admin/js/prepopulate_init.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var fields = $('#django-admin-prepopulated-fields-constants').data('prepopulatedFields'); 4 | $.each(fields, function(index, field) { 5 | $('.empty-form .form-row .field-' + field.name + ', .empty-form.form-row .field-' + field.name).addClass('prepopulated_field'); 6 | $(field.id).data('dependency_list', field.dependency_list).prepopulate( 7 | field.dependency_ids, field.maxLength, field.allowUnicode 8 | ); 9 | }); 10 | })(django.jQuery); 11 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-no.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/img/inline-delete.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-viewlink.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/threat/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from apps.threat.models import FileMonitor, CVESerach, KeyName 3 | # Register your models here. 4 | 5 | @admin.register(FileMonitor) 6 | class FileAdmin(admin.ModelAdmin): 7 | list_display = ('action', 'mtime', 'target_path', 'uid', 'mode') 8 | list_per_page = 50 9 | 10 | 11 | @admin.register(CVESerach) 12 | class CVEAdmin(admin.ModelAdmin): 13 | list_display = ('id', 'cve', 'summary', 'time') 14 | list_per_page = 50 15 | 16 | @admin.register(KeyName) 17 | class CVEAdmin(admin.ModelAdmin): 18 | list_display = ('id', 'user', 'keyname') 19 | list_per_page = 50 -------------------------------------------------------------------------------- /staticfile/admin/js/popup_response.js: -------------------------------------------------------------------------------- 1 | /*global opener */ 2 | (function() { 3 | 'use strict'; 4 | var initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse); 5 | switch(initData.action) { 6 | case 'change': 7 | opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value); 8 | break; 9 | case 'delete': 10 | opener.dismissDeleteRelatedObjectPopup(window, initData.value); 11 | break; 12 | default: 13 | opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj); 14 | break; 15 | } 16 | })(); 17 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/zh-TW.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/img/icon-unknown-alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-unknown.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /apps/logcat/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from apps.logcat import views 3 | 4 | 5 | app_name = 'logcat' 6 | 7 | extra_urlpatter = [ 8 | path('system/', views.system, name='system'), 9 | path('version/', views.version, name='version'), 10 | path('memory/', views.memory, name='memory'), 11 | path('user/', views.user, name='user'), 12 | path('processes/', views.processes, name='processes'), 13 | path('crontab/', views.crontab, name='crontab'), 14 | path('hidden/', views.hidden, name='hidden'), 15 | path('shell/', views.shell_tty, name='shell'), 16 | path('port/', views.open_port, name='port'), 17 | path('bean/', views.bean_shell, name='bean'), 18 | ] -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/zh-CN.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | def main(): 7 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'zerus.settings') 8 | try: 9 | from django.core.management import execute_from_command_line 10 | except ImportError as exc: 11 | raise ImportError( 12 | "Couldn't import Django. Are you sure it's installed and " 13 | "available on your PYTHONPATH environment variable? Did you " 14 | "forget to activate a virtual environment?" 15 | ) from exc 16 | execute_from_command_line(sys.argv) 17 | 18 | 19 | if __name__ == '__main__': 20 | main() 21 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/az.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/fi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ja.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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/ja",[],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}})(); -------------------------------------------------------------------------------- /staticfile/admin/img/icon-clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/hu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/th.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/tr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ko.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/assets/morris.js-0.4.3/morris.css: -------------------------------------------------------------------------------- 1 | .morris-hover { 2 | position: absolute; 3 | z-index: 1000; 4 | } 5 | 6 | .morris-hover.morris-default-style { 7 | border-radius: 10px; 8 | padding: 6px; 9 | color: #666; 10 | background: rgba(255, 255, 255, 0.8); 11 | border: solid 2px rgba(230, 230, 230, 0.8); 12 | font-family: sans-serif; 13 | font-size: 12px; 14 | text-align: center; 15 | } 16 | 17 | .morris-hover.morris-default-style .morris-hover-row-label { 18 | font-weight: bold; 19 | margin: 0.25em 0; 20 | } 21 | 22 | .morris-hover.morris-default-style .morris-hover-point { 23 | white-space: nowrap; 24 | margin: 0.1em 0; 25 | } 26 | 27 | 28 | #hero-graph, #hero-bar, #hero-area, #hero-donut {height: 250px} -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/id.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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{errorLoading:function(){return"Data tidak boleh diambil."},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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/vi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/is.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ar.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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/ar",[],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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/de.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/et.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/nb.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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{errorLoading:function(){return"Kunne ikke hente resultater."},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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/sv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/bg.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/km.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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/km",[],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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ms.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/change_form.js: -------------------------------------------------------------------------------- 1 | /*global showAddAnotherPopup, showRelatedObjectLookupPopup showRelatedObjectPopup updateRelatedObjectLinks*/ 2 | 3 | (function($) { 4 | 'use strict'; 5 | $(document).ready(function() { 6 | var modelName = $('#django-admin-form-add-constants').data('modelName'); 7 | $('body').on('click', '.add-another', function(e) { 8 | e.preventDefault(); 9 | var event = $.Event('django:add-another-related'); 10 | $(this).trigger(event); 11 | if (!event.isDefaultPrevented()) { 12 | showAddAnotherPopup(this); 13 | } 14 | }); 15 | 16 | if (modelName) { 17 | $('form#' + modelName + '_form :input:visible:enabled:first').focus(); 18 | } 19 | }); 20 | })(django.jQuery); 21 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/gl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/da.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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"Resultaterne kunne ikke indlæses."},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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/en.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/he.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/hi.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/fa.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/hr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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{errorLoading:function(){return"Preuzimanje nije uspjelo."},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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/eu.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/mk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/pt-BR.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/lv.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/pt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ca.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/es.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/it.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/fr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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{errorLoading:function(){return"Les résultats ne peuvent pas être chargés."},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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/nl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ro.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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{errorLoading:function(){return"Rezultatele nu au putut fi incărcate."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să ștergeți"+t+" caracter";return t!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți "+t+"sau mai multe caractere";return n},loadingMore:function(){return"Se încarcă mai multe rezultate…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",e.maximum!==1&&(t+="e"),t},noResults:function(){return"Nu au fost găsite rezultate"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/lt.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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%10===1&&(e%100<11||e%100>19)?t:e%10>=2&&e%10<=9&&(e%100<11||e%100>19)?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"į","ius","ių"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"į","ius","ių"),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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/pl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/el.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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/el",[],function(){return{errorLoading:function(){return"Τα αποτελέσματα δεν μπόρεσαν να φορτώσουν."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Παρακαλώ διαγράψτε "+t+" χαρακτήρ";return t==1&&(n+="α"),t!=1&&(n+="ες"),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+="ή"),e.maximum!=1&&(t+="ές"),t},noResults:function(){return"Δεν βρέθηκαν αποτελέσματα"},searching:function(){return"Αναζήτηση…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/sr.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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{errorLoading:function(){return"Preuzimanje nije uspelo."},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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/uk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/sr-Cyrl.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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-Cyrl",[],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{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/ru.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/assets/jquery-file-upload/js/vendor/tmpl.min.js: -------------------------------------------------------------------------------- 1 | (function(a){"use strict";var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML},b.regexp=/([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){if(b)return{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[a]||"\\"+a;if(c)return c==="="?"'+_e("+d+")+'":"'+("+d+"||'')+'";if(e)return"';";if(f)return"_s+='"},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"},b.encode=function(a){return String(a||"").replace(b.encReg,function(a){return b.encMap[a]||""})},b.arg="o",b.helper=",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}",typeof define=="function"&&define.amd?define(function(){return b}):a.tmpl=b})(this); -------------------------------------------------------------------------------- /staticfile/assets/jquery-file-upload/js/vendor/canvas-to-blob.min.js: -------------------------------------------------------------------------------- 1 | (function(a){"use strict";var b=a.HTMLCanvasElement&&a.HTMLCanvasElement.prototype,c=a.Blob&&function(){try{return Boolean(new Blob)}catch(a){return!1}}(),d=c&&a.Uint8Array&&function(){try{return(new Blob([new Uint8Array(100)])).size===100}catch(a){return!1}}(),e=a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder,f=(c||e)&&a.atob&&a.ArrayBuffer&&a.Uint8Array&&function(a){var b,f,g,h,i,j;a.split(",")[0].indexOf("base64")>=0?b=atob(a.split(",")[1]):b=decodeURIComponent(a.split(",")[1]),f=new ArrayBuffer(b.length),g=new Uint8Array(f);for(h=0;h -------------------------------------------------------------------------------- /staticfile/admin/img/gis/move_vertex_on.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /staticfile/admin/img/icon-calendar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/sk.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/img/calendar-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /staticfile/admin/img/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Code Charm Ltd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /apps/host/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import User 3 | # Create your models here. 4 | 5 | class Host(models.Model): 6 | #主机信息 7 | AVATOR = { 8 | (1, '存活'), 9 | (2, '失效') 10 | } 11 | Auther = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name='主机管理员') 12 | Hostname = models.GenericIPAddressField(verbose_name='主机地址') 13 | Email = models.EmailField(verbose_name='邮件地址') 14 | Active = models.IntegerField(choices=AVATOR, default=1, verbose_name='存活状态') 15 | 16 | class Meta: 17 | verbose_name = '主机信息' 18 | verbose_name_plural = verbose_name 19 | 20 | def __str__(self): 21 | return self.Hostname 22 | 23 | 24 | class Kafka(models.Model): 25 | """kafka地址""" 26 | AVATOR = ( 27 | (1, '存活'), 28 | (2, '失效') 29 | ) 30 | Kafka = models.CharField(max_length=100, verbose_name='Kafka地址') 31 | Active = models.IntegerField(verbose_name='是否存活', choices=AVATOR, default=1) 32 | 33 | 34 | class Meta: 35 | verbose_name = 'Kakfa地址' 36 | verbose_name_plural = verbose_name 37 | 38 | def __str__(self): 39 | return self.Kafka -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/i18n/cs.js: -------------------------------------------------------------------------------- 1 | /*! Select2 4.0.3 | 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}})(); -------------------------------------------------------------------------------- /staticfile/admin/img/sorting-icons.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/xregexp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2007-2012 Steven Levithan 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/select2/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2015 Kevin Brown, Igor Vaynberg, and Select2 contributors 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /staticfile/admin/css/vendor/select2/LICENSE-SELECT2.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2015 Kevin Brown, Igor Vaynberg, and Select2 contributors 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 13 | all 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 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /staticfile/admin/js/autocomplete.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 'use strict'; 3 | var init = function($element, options) { 4 | var settings = $.extend({ 5 | ajax: { 6 | data: function(params) { 7 | return { 8 | term: params.term, 9 | page: params.page 10 | }; 11 | } 12 | } 13 | }, options); 14 | $element.select2(settings); 15 | }; 16 | 17 | $.fn.djangoAdminSelect2 = function(options) { 18 | var settings = $.extend({}, options); 19 | $.each(this, function(i, element) { 20 | var $element = $(element); 21 | init($element, settings); 22 | }); 23 | return this; 24 | }; 25 | 26 | $(function() { 27 | // Initialize all autocomplete widgets except the one in the template 28 | // form used when a new formset is added. 29 | $('.admin-autocomplete').not('[name*=__prefix__]').djangoAdminSelect2(); 30 | }); 31 | 32 | $(document).on('formset:added', (function() { 33 | return function(event, $newFormset) { 34 | return $newFormset.find('.admin-autocomplete').djangoAdminSelect2(); 35 | }; 36 | })(this)); 37 | }(django.jQuery)); 38 | -------------------------------------------------------------------------------- /staticfile/js/easy-pie-chart.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | // easy pie chart 4 | 5 | $('.percentage').easyPieChart({ 6 | animate: 1000, 7 | size: 135, 8 | barColor:'#ff6c60' 9 | }); 10 | $('.percentage-light').easyPieChart({ 11 | barColor: function(percent) { 12 | percent /= 100; 13 | return "rgb(" + Math.round(255 * (1-percent)) + ", " + Math.round(255 * percent) + ", 0)"; 14 | }, 15 | trackColor: '#666', 16 | scaleColor: false, 17 | lineCap: 'butt', 18 | lineWidth: 15, 19 | animate: 1000 20 | }); 21 | 22 | $('.update-easy-pie-chart').click(function(){ 23 | $('.easy-pie-chart .percentage').each(function() { 24 | var newValue = Math.floor(100*Math.random()); 25 | $(this).data('easyPieChart').update(newValue); 26 | $('span', this).text(newValue); 27 | }); 28 | }); 29 | 30 | $('.updateEasyPieChart').on('click', function(e) { 31 | e.preventDefault(); 32 | $('.percentage, .percentage-light').each(function() { 33 | var newValue = Math.round(100*Math.random()); 34 | $(this).data('easyPieChart').update(newValue); 35 | $('span', this).text(newValue); 36 | }); 37 | }); 38 | 39 | }(); -------------------------------------------------------------------------------- /staticfile/admin/js/vendor/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | ==== 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining 10 | a copy of this software and associated documentation files (the 11 | "Software"), to deal in the Software without restriction, including 12 | without limitation the rights to use, copy, modify, merge, publish, 13 | distribute, sublicense, and/or sell copies of the Software, and to 14 | permit persons to whom the Software is furnished to do so, subject to 15 | the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /staticfile/admin/css/login.css: -------------------------------------------------------------------------------- 1 | /* LOGIN FORM */ 2 | 3 | body.login { 4 | background: #f8f8f8; 5 | } 6 | 7 | .login #header { 8 | height: auto; 9 | padding: 15px 16px; 10 | justify-content: center; 11 | } 12 | 13 | .login #header h1 { 14 | font-size: 18px; 15 | } 16 | 17 | .login #header h1 a { 18 | color: #fff; 19 | } 20 | 21 | .login #content { 22 | padding: 20px 20px 0; 23 | } 24 | 25 | .login #container { 26 | background: #fff; 27 | border: 1px solid #eaeaea; 28 | border-radius: 4px; 29 | overflow: hidden; 30 | width: 28em; 31 | min-width: 300px; 32 | margin: 100px auto; 33 | } 34 | 35 | .login #content-main { 36 | width: 100%; 37 | } 38 | 39 | .login .form-row { 40 | padding: 4px 0; 41 | float: left; 42 | width: 100%; 43 | border-bottom: none; 44 | } 45 | 46 | .login .form-row label { 47 | padding-right: 0.5em; 48 | line-height: 2em; 49 | font-size: 1em; 50 | clear: both; 51 | color: #333; 52 | } 53 | 54 | .login .form-row #id_username, .login .form-row #id_password { 55 | clear: both; 56 | padding: 8px; 57 | width: 100%; 58 | -webkit-box-sizing: border-box; 59 | -moz-box-sizing: border-box; 60 | box-sizing: border-box; 61 | } 62 | 63 | .login span.help { 64 | font-size: 10px; 65 | display: block; 66 | } 67 | 68 | .login .submit-row { 69 | clear: both; 70 | padding: 1em 0 0 9.4em; 71 | margin: 0; 72 | border: none; 73 | background: none; 74 | text-align: left; 75 | } 76 | 77 | .login .password-reset-link { 78 | text-align: center; 79 | } 80 | -------------------------------------------------------------------------------- /zerus/urls.py: -------------------------------------------------------------------------------- 1 | """zerus URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/3.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include, re_path 18 | from apps.host import views 19 | from apps.logcat import urls 20 | from apps.host import url 21 | from apps.host.views import page_error, page_not_found 22 | from apps.threat import urls as threat 23 | from django.conf import settings 24 | from django.views.static import serve 25 | 26 | urlpatterns = [ 27 | path('admin/', admin.site.urls), 28 | path('login/', views.login, name='login'), 29 | path('logout/', views.logout, name='logout'), 30 | path('index/', views.index, name='index'), 31 | path('logcat/', include(urls.extra_urlpatter)), 32 | path('host/', include(url.extra_urlpatter)), 33 | path('file/', include(threat.extra_urlpatter)), 34 | re_path(r'^static/(?P.*)$',serve,{'document_root': settings.STATIC_ROOT}), 35 | ] 36 | handler404 = 'apps.host.views.page_not_found' 37 | handler500 = 'apps.host.views.page_error' -------------------------------------------------------------------------------- /templates/500.html: -------------------------------------------------------------------------------- 1 | {%load static%} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 500 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 |
33 | 34 |
35 | 36 |

Ouch!

37 |

500 Page Error

38 |

Looks like Something went wrong. Return Home

39 |
40 | 41 |
42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /staticfile/css/owl.carousel.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Core Owl Carousel CSS File 3 | * v1.21 4 | */ 5 | 6 | /* clearfix */ 7 | .owl-carousel .owl-wrapper:after { 8 | content: "."; 9 | display: block; 10 | clear: both; 11 | visibility: hidden; 12 | line-height: 0; 13 | height: 0; 14 | } 15 | /* display none until init */ 16 | .owl-carousel{ 17 | display: none; 18 | position: relative; 19 | width: 100%; 20 | -ms-touch-action: pan-y; 21 | } 22 | .owl-carousel .owl-wrapper{ 23 | display: none; 24 | position: relative; 25 | -webkit-transform: translate3d(0px, 0px, 0px); 26 | -webkit-perspective: 1000; 27 | } 28 | .owl-carousel .owl-wrapper-outer{ 29 | overflow: hidden; 30 | position: relative; 31 | width: 100%; 32 | } 33 | .owl-carousel .owl-wrapper-outer.autoHeight{ 34 | -webkit-transition: height 500ms ease-in-out; 35 | -moz-transition: height 500ms ease-in-out; 36 | -ms-transition: height 500ms ease-in-out; 37 | -o-transition: height 500ms ease-in-out; 38 | transition: height 500ms ease-in-out; 39 | } 40 | 41 | .owl-carousel .owl-item{ 42 | float: left; 43 | } 44 | .owl-controls .owl-page, 45 | .owl-controls .owl-buttons div{ 46 | cursor: pointer; 47 | } 48 | .owl-controls { 49 | -webkit-user-select: none; 50 | -khtml-user-select: none; 51 | -moz-user-select: none; 52 | -ms-user-select: none; 53 | user-select: none; 54 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 55 | } 56 | 57 | /* mouse grab icon */ 58 | .grabbing { 59 | /*cursor:url(grabbing.png) 8 8, move;*/ 60 | } 61 | 62 | /* fix */ 63 | .owl-carousel .owl-wrapper, 64 | .owl-carousel .owl-item{ 65 | -webkit-backface-visibility: hidden; 66 | -moz-backface-visibility: hidden; 67 | -ms-backface-visibility: hidden; 68 | } 69 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {%load static%} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 404 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 |
33 | 34 |
35 | 36 |

404

37 |

page not found

38 |

Something went wrong or that page doesn’t exist yet. Return Home

39 |
40 | 41 |
42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /staticfile/admin/js/prepopulate.js: -------------------------------------------------------------------------------- 1 | /*global URLify*/ 2 | (function($) { 3 | 'use strict'; 4 | $.fn.prepopulate = function(dependencies, maxLength, allowUnicode) { 5 | /* 6 | Depends on urlify.js 7 | Populates a selected field with the values of the dependent fields, 8 | URLifies and shortens the string. 9 | dependencies - array of dependent fields ids 10 | maxLength - maximum length of the URLify'd string 11 | allowUnicode - Unicode support of the URLify'd string 12 | */ 13 | return this.each(function() { 14 | var prepopulatedField = $(this); 15 | 16 | var populate = function() { 17 | // Bail if the field's value has been changed by the user 18 | if (prepopulatedField.data('_changed')) { 19 | return; 20 | } 21 | 22 | var values = []; 23 | $.each(dependencies, function(i, field) { 24 | field = $(field); 25 | if (field.val().length > 0) { 26 | values.push(field.val()); 27 | } 28 | }); 29 | prepopulatedField.val(URLify(values.join(' '), maxLength, allowUnicode)); 30 | }; 31 | 32 | prepopulatedField.data('_changed', false); 33 | prepopulatedField.on('change', function() { 34 | prepopulatedField.data('_changed', true); 35 | }); 36 | 37 | if (!prepopulatedField.val()) { 38 | $(dependencies.join(',')).on('keyup change focus', populate); 39 | } 40 | }); 41 | }; 42 | })(django.jQuery); 43 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ### 又叒叒一个基于osquery的监控 2 | 3 | 此项目是基于osquery的数据收集分析项目,用来监控主机,从最初的学习项目到现在的具有一定使用价值的项目。 4 | 5 | 数据流使用kafka来传输,客户端定时收集发送,服务的定时拉取,所以并没有实时监控。 6 | 7 | 基于osquery的项目官方有很多推荐,至于自己写一方面是为了学习django,一方面是为了二次开发。如果需要更完善和美观的项目可以采用官方的推荐。 8 | 9 | #### osquery配置 10 | 11 | 以下配置只是用来表示文件监控的一部分,至于其他的配置并没有使用。`/etc/osquery/osquery.conf` 12 | 13 | ``` 14 | { 15 | "options": { 16 | "config_plugin":"filesystem", 17 | "logger_plugin":"filesystem", 18 | "logger_path":"/var/log/osquery", 19 | "disable_logging":"false", 20 | "schedule_splay_percent":"10", 21 | "verbose":"false", 22 | "pidfile":"/var/osquery/osquery.pidfile", 23 | "enable_syslog": "true", 24 | "worker_threads":"5", 25 | "host_identifier":"hostname", 26 | "disable_events":"false", 27 | "disable_audit":"false", 28 | "audit_allow_config":"true", 29 | "audit_allow_sockets":"true" 30 | }, 31 | "file_paths": { 32 | "html": [ 33 | "/var/www/%%" 34 | ] 35 | }, 36 | "schedule": { 37 | "file_events": { 38 | "query": "SELECT * FROM file_events;", 39 | "removed": false, 40 | "interval": 600 41 | } 42 | } 43 | } 44 | ``` 45 | 46 | #### kafka 47 | 48 | 配置根据官方推荐来即可,如果不在同一台主机,需要注意跨主机访问的配置。 49 | 50 | #### 配置 51 | 52 | 默认django的非debug模式,需要开启监控,到设置中上面的选择开启即可。如果有问题可以先关闭再调试。agent目录为客户端文件,定时运行即可。默认定时为十分钟拉取一次,需要修改到`apps/threat/views.py`修改即可。 53 | 54 | 需要主机的IP做处理,所以最好先定义agent中的IP地址。如果不定义会自己识别,但不一定正确。 55 | 56 | 系统信息中会显示全部存在的信息,为了避免大量数据加载,所以只默认显示最近七天的数据。如果需要修改时间,可以到`apps/logcat/views.py`中修改。 57 | 58 | #### 截图 59 | 60 | ![image-20200702135628638](https://github-1300513062.cos.ap-shanghai.myqcloud.com/img/20200702135635.png) 61 | 62 | ![image-20200702140400754](https://github-1300513062.cos.ap-shanghai.myqcloud.com/img/20200702140400.png) 63 | -------------------------------------------------------------------------------- /staticfile/assets/jquery-file-upload/css/jquery.fileupload-ui.css: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | /* 3 | * jQuery File Upload UI Plugin CSS 6.10 4 | * https://github.com/blueimp/jQuery-File-Upload 5 | * 6 | * Copyright 2010, Sebastian Tschan 7 | * https://blueimp.net 8 | * 9 | * Licensed under the MIT license: 10 | * http://www.opensource.org/licenses/MIT 11 | */ 12 | 13 | .fileinput-button { 14 | position: relative; 15 | overflow: hidden; 16 | float: left; 17 | margin-right: 4px; 18 | } 19 | .fileinput-button input { 20 | position: absolute; 21 | top: 0; 22 | right: 0; 23 | margin: 0; 24 | opacity: 0; 25 | filter: alpha(opacity=0); 26 | transform: translate(-300px, 0) scale(4); 27 | font-size: 23px; 28 | direction: ltr; 29 | cursor: pointer; 30 | } 31 | .fileupload-buttonbar .btn, 32 | .fileupload-buttonbar .toggle { 33 | margin-bottom: 5px; 34 | } 35 | .files .progress { 36 | width: 200px; 37 | } 38 | .progress-animated .bar { 39 | background: url(../img/progressbar.gif) !important; 40 | filter: none; 41 | } 42 | .fileupload-loading { 43 | position: absolute; 44 | left: 50%; 45 | width: 128px; 46 | height: 128px; 47 | background: url(../img/loading.gif) center no-repeat; 48 | display: none; 49 | } 50 | .fileupload-processing .fileupload-loading { 51 | display: block; 52 | } 53 | 54 | /* Fix for IE 6: */ 55 | * html .fileinput-button { 56 | line-height: 24px; 57 | margin: 1px -3px 0 0; 58 | } 59 | 60 | /* Fix for IE 7: */ 61 | * + html .fileinput-button { 62 | padding: 2px 15px; 63 | margin: 1px 0 0 0; 64 | } 65 | 66 | @media (max-width: 767px) { 67 | .files .btn span { 68 | display: none; 69 | } 70 | .files .preview * { 71 | width: 40px; 72 | } 73 | .files .name * { 74 | width: 80px; 75 | display: inline-block; 76 | word-wrap: break-word; 77 | } 78 | .files .progress { 79 | width: 20px; 80 | } 81 | .files .delete { 82 | width: 60px; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /apps/logcat/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from apps.logcat import models 3 | # Register your models here. 4 | 5 | 6 | @admin.register(models.System_info) 7 | class SystemAdmin(admin.ModelAdmin): 8 | list_display = ('hostname','cpu_brand', 'physical_memory') 9 | list_per_page = 50 10 | 11 | @admin.register(models.Memory_info) 12 | class SystemAdmin(admin.ModelAdmin): 13 | list_display = ('hostname','memory_total', 'memory_free') 14 | list_per_page = 50 15 | 16 | 17 | @admin.register(models.OS_version) 18 | class SystemAdmin(admin.ModelAdmin): 19 | list_display = ('hostname','version', 'arguments') 20 | list_per_page = 50 21 | 22 | 23 | @admin.register(models.Log_user) 24 | class SystemAdmin(admin.ModelAdmin): 25 | list_display = ('id','hostname', 'uid', 'username','description','directory') 26 | list_per_page = 50 27 | 28 | 29 | @admin.register(models.Processes) 30 | class SystemAdmin(admin.ModelAdmin): 31 | list_display = ('hostname', 'pid', 'name','cmdline') 32 | list_per_page = 50 33 | 34 | 35 | @admin.register(models.Crontab) 36 | class SystemAdmin(admin.ModelAdmin): 37 | list_display = ('hostname', 'command', 'path') 38 | list_per_page = 50 39 | 40 | 41 | @admin.register(models.Hidden) 42 | class SystemAdmin(admin.ModelAdmin): 43 | list_display = ('hostname', 'path', 'filename') 44 | list_per_page = 50 45 | 46 | 47 | @admin.register(models.Shell_TTY) 48 | class SystemAdmin(admin.ModelAdmin): 49 | list_display = ('hostname', 'name', 'path') 50 | list_per_page = 50 51 | 52 | 53 | @admin.register(models.Open_Port) 54 | class SystemAdmin(admin.ModelAdmin): 55 | list_display = ('hostname', 'name', 'path','port','address') 56 | list_per_page = 50 57 | 58 | 59 | @admin.register(models.Bean_shell) 60 | class SystemAdmin(admin.ModelAdmin): 61 | list_display = ('hostname', 'name', 'path','remote_address','remote_port','parent_cmdline') 62 | list_per_page = 50 63 | 64 | -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | {%load static%} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ZeruLab 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 47 | 48 |
49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /staticfile/assets/jquery-file-upload/js/vendor/load-image.min.js: -------------------------------------------------------------------------------- 1 | (function(a){"use strict";var b=function(a,c,d){var e=document.createElement("img"),f,g;return e.onerror=c,e.onload=function(){g&&(!d||!d.noRevoke)&&b.revokeObjectURL(g),c(b.scale(e,d))},window.Blob&&a instanceof Blob||window.File&&a instanceof File?(f=g=b.createObjectURL(a),e._type=a.type):f=a,f?(e.src=f,e):b.readFile(a,function(a){var b=a.target;b&&b.result?e.src=b.result:c(a)})},c=window.createObjectURL&&window||window.URL&&URL.revokeObjectURL&&URL||window.webkitURL&&webkitURL;b.detectSubsampling=function(a){var b=a.width,c=a.height,d,e;return b*c>1048576?(d=document.createElement("canvas"),d.width=d.height=1,e=d.getContext("2d"),e.drawImage(a,-b+1,0),e.getImageData(0,0,1,1).data[3]===0):!1},b.detectVerticalSquash=function(a,b){var c=document.createElement("canvas"),d=c.getContext("2d"),e,f,g,h,i;c.width=1,c.height=b,d.drawImage(a,0,0),e=d.getImageData(0,0,1,b).data,f=0,g=b,h=b;while(h>f)i=e[(h-1)*4+3],i===0?g=h:f=h,h=g+f>>1;return h/b},b.renderImageToCanvas=function(a,c,d,e){var f=a.width,g=a.height,h=c.getContext("2d"),i,j=1024,k=document.createElement("canvas"),l,m,n,o,p;h.save(),b.detectSubsampling(a)&&(f/=2,g/=2),i=b.detectVerticalSquash(a,g),k.width=k.height=j,l=k.getContext("2d"),m=0;while(mg?g-m:j,o=0;while(of?f-o:j,l.clearRect(0,0,j,j),l.drawImage(a,-o,-m),h.drawImage(k,0,0,p,n,Math.floor(o*d/f),Math.floor(m*e/g/i),Math.ceil(p*d/f),Math.ceil(n*e/g/i)),o+=j;m+=j}h.restore(),k=l=null},b.scale=function(a,c){c=c||{};var d=document.createElement("canvas"),e=a.width,f=a.height,g=Math.max((c.minWidth||e)/e,(c.minHeight||f)/f);return g>1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),g=Math.min((c.maxWidth||e)/e,(c.maxHeight||f)/f),g<1&&(e=parseInt(e*g,10),f=parseInt(f*g,10)),a.getContext||c.canvas&&d.getContext?(d.width=e,d.height=f,a._type==="image/jpeg"?b.renderImageToCanvas(a,d,e,f):d.getContext("2d").drawImage(a,0,0,e,f),d):(a.width=e,a.height=f,a)},b.createObjectURL=function(a){return c?c.createObjectURL(a):!1},b.revokeObjectURL=function(a){return c?c.revokeObjectURL(a):!1},b.readFile=function(a,b){if(window.FileReader&&FileReader.prototype.readAsDataURL){var c=new FileReader;return c.onload=c.onerror=b,c.readAsDataURL(a),c}return!1},typeof define=="function"&&define.amd?define(function(){return b}):a.loadImage=b})(this); -------------------------------------------------------------------------------- /staticfile/js/jquery.customSelect.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jquery.customSelect() - v0.4.1 3 | * http://adam.co/lab/jquery/customselect/ 4 | * 2013-05-13 5 | * 6 | * Copyright 2013 Adam Coulombe 7 | * @license http://www.opensource.org/licenses/mit-license.html MIT License 8 | * @license http://www.gnu.org/licenses/gpl.html GPL2 License 9 | */ 10 | (function(a){a.fn.extend({customSelect:function(c){if(typeof document.body.style.maxHeight==="undefined"){return this}var e={customClass:"customSelect",mapClass:true,mapStyle:true},c=a.extend(e,c),d=c.customClass,f=function(h,k){var g=h.find(":selected"),j=k.children(":first"),i=g.html()||" ";j.html(i);if(g.attr("disabled")){k.addClass(b("DisabledOption"))}else{k.removeClass(b("DisabledOption"))}setTimeout(function(){k.removeClass(b("Open"));a(document).off("mouseup."+b("Open"))},60)},b=function(g){return d+g};return this.each(function(){var g=a(this),i=a("").addClass(b("Inner")),h=a("");g.after(h.append(i));h.addClass(d);if(c.mapClass){h.addClass(g.attr("class"))}if(c.mapStyle){h.attr("style",g.attr("style"))}g.addClass("hasCustomSelect").on("update",function(){f(g,h);var k=parseInt(g.outerWidth(),10)-(parseInt(h.outerWidth(),10)-parseInt(h.width(),10));h.css({display:"inline-block"});var j=h.outerHeight();if(g.attr("disabled")){h.addClass(b("Disabled"))}else{h.removeClass(b("Disabled"))}i.css({width:k,display:"inline-block"});g.css({"-webkit-appearance":"menulist-button",width:h.outerWidth(),position:"absolute",opacity:0,height:j,fontSize:h.css("font-size")})}).on("change",function(){h.addClass(b("Changed"));f(g,h)}).on("keyup",function(j){if(!h.hasClass(b("Open"))){g.blur();g.focus()}else{if(j.which==13||j.which==27){f(g,h)}}}).on("mousedown",function(j){h.removeClass(b("Changed"))}).on("mouseup",function(j){if(!h.hasClass(b("Open"))){if(a("."+b("Open")).not(h).length>0&&typeof InstallTrigger!=="undefined"){g.focus()}else{h.addClass(b("Open"));j.stopPropagation();a(document).one("mouseup."+b("Open"),function(k){if(k.target!=g.get(0)&&a.inArray(k.target,g.find("*").get())<0){g.blur()}else{f(g,h)}})}}}).focus(function(){h.removeClass(b("Changed")).addClass(b("Focus"))}).blur(function(){h.removeClass(b("Focus")+" "+b("Open"))}).hover(function(){h.addClass(b("Hover"))},function(){h.removeClass(b("Hover"))}).trigger("update")})}})})(jQuery); -------------------------------------------------------------------------------- /staticfile/admin/css/responsive_rtl.css: -------------------------------------------------------------------------------- 1 | /* TABLETS */ 2 | 3 | @media (max-width: 1024px) { 4 | [dir="rtl"] .colMS { 5 | margin-right: 0; 6 | } 7 | 8 | [dir="rtl"] #user-tools { 9 | text-align: right; 10 | } 11 | 12 | [dir="rtl"] #changelist .actions label { 13 | padding-left: 10px; 14 | padding-right: 0; 15 | } 16 | 17 | [dir="rtl"] #changelist .actions select { 18 | margin-left: 0; 19 | margin-right: 15px; 20 | } 21 | 22 | [dir="rtl"] .change-list .filtered .results, 23 | [dir="rtl"] .change-list .filtered .paginator, 24 | [dir="rtl"] .filtered #toolbar, 25 | [dir="rtl"] .filtered div.xfull, 26 | [dir="rtl"] .filtered .actions { 27 | margin-right: 0; 28 | margin-left: 230px; 29 | } 30 | 31 | [dir="rtl"] .inline-group ul.tools a.add, 32 | [dir="rtl"] .inline-group div.add-row a, 33 | [dir="rtl"] .inline-group .tabular tr.add-row td a { 34 | padding: 8px 26px 8px 10px; 35 | background-position: calc(100% - 8px) 9px; 36 | } 37 | 38 | [dir="rtl"] .related-widget-wrapper-link + .selector { 39 | margin-right: 0; 40 | margin-left: 15px; 41 | } 42 | 43 | [dir="rtl"] .selector .selector-filter label { 44 | margin-right: 0; 45 | margin-left: 8px; 46 | } 47 | 48 | [dir="rtl"] .object-tools li { 49 | float: right; 50 | } 51 | 52 | [dir="rtl"] .object-tools li + li { 53 | margin-left: 0; 54 | margin-right: 15px; 55 | } 56 | 57 | [dir="rtl"] .dashboard .module table td a { 58 | padding-left: 0; 59 | padding-right: 16px; 60 | } 61 | } 62 | 63 | /* MOBILE */ 64 | 65 | @media (max-width: 767px) { 66 | [dir="rtl"] .change-list .filtered .results, 67 | [dir="rtl"] .change-list .filtered .paginator, 68 | [dir="rtl"] .filtered #toolbar, 69 | [dir="rtl"] .filtered div.xfull, 70 | [dir="rtl"] .filtered .actions { 71 | margin-left: 0; 72 | } 73 | 74 | [dir="rtl"] .aligned .add-another, 75 | [dir="rtl"] .aligned .related-lookup, 76 | [dir="rtl"] .aligned .datetimeshortcuts { 77 | margin-left: 0; 78 | margin-right: 15px; 79 | } 80 | 81 | [dir="rtl"] .aligned ul { 82 | margin-right: 0; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /staticfile/assets/bootstrap-colorpicker/css/colorpicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | Colorpicker for Bootstrap 3 | Copyright 2012 Stefan Petre 4 | Licensed under the Apache License v2.0 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | */ 7 | .colorpicker-saturation { width: 100px; height: 100px; background-image: url(../img/saturation.png); cursor: crosshair; float: left; } .colorpicker-saturation i { display: block; height: 5px; width: 5px; border: 1px solid #000; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; position: absolute; top: 0; left: 0; margin: -4px 0 0 -4px; } .colorpicker-saturation i b { display: block; height: 5px; width: 5px; border: 1px solid #fff; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; } .colorpicker-hue, .colorpicker-alpha { width: 15px; height: 100px; float: left; cursor: row-resize; margin-left: 4px; margin-bottom: 4px; } .colorpicker-hue i, .colorpicker-alpha i { display: block; height: 1px; background: #000; border-top: 1px solid #fff; position: absolute; top: 0; left: 0; width: 100%; margin-top: -1px; } .colorpicker-hue { background-image: url(../img/hue.png); } .colorpicker-alpha { background-image: url(../img/alpha.png); display: none; } .colorpicker { *zoom: 1; top: 0; left: 0; padding: 4px; min-width: 120px; margin-top: 1px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .colorpicker:before, .colorpicker:after { display: table; content: ""; } .colorpicker:after { clear: both; } .colorpicker:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 6px; } .colorpicker:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; position: absolute; top: -6px; left: 7px; } .colorpicker div { position: relative; } .colorpicker.alpha { min-width: 140px; } .colorpicker.alpha .colorpicker-alpha { display: block; } .colorpicker-color { height: 10px; margin-top: 5px; clear: both; background-image: url(../img/alpha.png); background-position: 0 100%; } .colorpicker-color div { height: 10px; } .input-append.color .add-on i, .input-prepend.color .add-on i { display: block; cursor: pointer; width: 16px; height: 16px; } -------------------------------------------------------------------------------- /staticfile/js/jquery.scrollTo.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2007-2013 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com 3 | * Dual licensed under MIT and GPL. 4 | * @author Ariel Flesler 5 | * @version 1.4.6 6 | */ 7 | ;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 8 | -------------------------------------------------------------------------------- /staticfile/admin/js/collapse.js: -------------------------------------------------------------------------------- 1 | /*global gettext*/ 2 | (function() { 3 | 'use strict'; 4 | var closestElem = function(elem, tagName) { 5 | if (elem.nodeName === tagName.toUpperCase()) { 6 | return elem; 7 | } 8 | if (elem.parentNode.nodeName === 'BODY') { 9 | return null; 10 | } 11 | return elem.parentNode && closestElem(elem.parentNode, tagName); 12 | }; 13 | 14 | window.addEventListener('load', function() { 15 | // Add anchor tag for Show/Hide link 16 | var fieldsets = document.querySelectorAll('fieldset.collapse'); 17 | for (var i = 0; i < fieldsets.length; i++) { 18 | var elem = fieldsets[i]; 19 | // Don't hide if fields in this fieldset have errors 20 | if (elem.querySelectorAll('div.errors').length === 0) { 21 | elem.classList.add('collapsed'); 22 | var h2 = elem.querySelector('h2'); 23 | var link = document.createElement('a'); 24 | link.setAttribute('id', 'fieldsetcollapser' + i); 25 | link.setAttribute('class', 'collapse-toggle'); 26 | link.setAttribute('href', '#'); 27 | link.textContent = gettext('Show'); 28 | h2.appendChild(document.createTextNode(' (')); 29 | h2.appendChild(link); 30 | h2.appendChild(document.createTextNode(')')); 31 | } 32 | } 33 | // Add toggle to hide/show anchor tag 34 | var toggleFunc = function(ev) { 35 | if (ev.target.matches('.collapse-toggle')) { 36 | ev.preventDefault(); 37 | ev.stopPropagation(); 38 | var fieldset = closestElem(ev.target, 'fieldset'); 39 | if (fieldset.classList.contains('collapsed')) { 40 | // Show 41 | ev.target.textContent = gettext('Hide'); 42 | fieldset.classList.remove('collapsed'); 43 | } else { 44 | // Hide 45 | ev.target.textContent = gettext('Show'); 46 | fieldset.classList.add('collapsed'); 47 | } 48 | } 49 | }; 50 | var inlineDivs = document.querySelectorAll('fieldset.module'); 51 | for (i = 0; i < inlineDivs.length; i++) { 52 | inlineDivs[i].addEventListener('click', toggleFunc); 53 | } 54 | }); 55 | })(); 56 | -------------------------------------------------------------------------------- /staticfile/assets/gritter/css/jquery.gritter.css: -------------------------------------------------------------------------------- 1 | /* the norm */ 2 | #gritter-notice-wrapper { 3 | position:fixed; 4 | top:20px; 5 | right:20px; 6 | width:301px; 7 | z-index:9999; 8 | } 9 | #gritter-notice-wrapper.top-left { 10 | left: 20px; 11 | right: auto; 12 | } 13 | #gritter-notice-wrapper.bottom-right { 14 | top: auto; 15 | left: auto; 16 | bottom: 20px; 17 | right: 20px; 18 | } 19 | #gritter-notice-wrapper.bottom-left { 20 | top: auto; 21 | right: auto; 22 | bottom: 20px; 23 | left: 20px; 24 | } 25 | .gritter-item-wrapper { 26 | position:relative; 27 | margin:0 0 10px 0; 28 | background:url('../images/ie-spacer.gif'); /* ie7/8 fix */ 29 | } 30 | .gritter-top { 31 | background:url(../images/gritter.png) no-repeat left -30px; 32 | height:10px; 33 | } 34 | .hover .gritter-top { 35 | background-position:right -30px; 36 | } 37 | .gritter-bottom { 38 | background:url(../images/gritter.png) no-repeat left bottom; 39 | height:8px; 40 | margin:0; 41 | } 42 | .hover .gritter-bottom { 43 | background-position: bottom right; 44 | } 45 | .gritter-item { 46 | display:block; 47 | background:url(../images/gritter.png) no-repeat left -40px; 48 | color:#eee; 49 | padding:2px 11px 8px 11px; 50 | font-size: 11px; 51 | font-family:verdana; 52 | } 53 | .hover .gritter-item { 54 | background-position:right -40px; 55 | } 56 | .gritter-item p { 57 | padding:0; 58 | margin:0; 59 | word-wrap:break-word; 60 | } 61 | .gritter-close { 62 | display:none; 63 | position:absolute; 64 | top:5px; 65 | left:3px; 66 | background:url(../images/gritter.png) no-repeat left top; 67 | cursor:pointer; 68 | width:30px; 69 | height:30px; 70 | } 71 | .gritter-title { 72 | font-size:14px; 73 | font-weight:bold; 74 | padding:0 0 7px 0; 75 | display:block; 76 | text-shadow:1px 1px 0 #000; /* Not supported by IE :( */ 77 | } 78 | .gritter-image { 79 | width:48px; 80 | height:48px; 81 | float:left; 82 | } 83 | .gritter-with-image, 84 | .gritter-without-image { 85 | padding:0; 86 | } 87 | .gritter-with-image { 88 | width:220px; 89 | float:right; 90 | } 91 | /* for the light (white) version of the gritter notice */ 92 | .gritter-light .gritter-item, 93 | .gritter-light .gritter-bottom, 94 | .gritter-light .gritter-top, 95 | .gritter-light .gritter-close { 96 | background-image: url(../images/gritter-light.png); 97 | color: #222; 98 | } 99 | .gritter-light .gritter-title { 100 | text-shadow: none; 101 | } 102 | -------------------------------------------------------------------------------- /apps/threat/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from apps.host.models import Host 3 | from django.contrib.auth.models import User 4 | # Create your models here. 5 | 6 | 7 | class FileMonitor(models.Model): 8 | """文件监控""" 9 | AVATOR = ( 10 | (0, '未读'), 11 | (1, '已读') 12 | ) 13 | hostname = models.ForeignKey(Host, on_delete=models.CASCADE, verbose_name='主机名', related_name='file') 14 | action = models.CharField(max_length=100, verbose_name='文件行为') 15 | atime = models.CharField(max_length=100, verbose_name='文件访问时间') 16 | ctime = models.CharField(max_length=100, verbose_name='权限修改时间') 17 | mtime = models.CharField(max_length=100, verbose_name='内容修改时间') 18 | sha1 = models.CharField(max_length=100, verbose_name='文件hash值', default='') 19 | size = models.CharField(max_length=100, verbose_name='文件大小') 20 | target_path = models.CharField(max_length=200, verbose_name='文件路径') 21 | uid = models.CharField(max_length=10, verbose_name='文件用户UID') 22 | gid = models.CharField(max_length=10, verbose_name='文件用户组GID') 23 | mode = models.CharField(max_length=10, verbose_name='文件权限') 24 | time = models.DateTimeField(verbose_name='添加时间', auto_now=True) 25 | active = models.IntegerField(verbose_name='消息状态', default=0, choices=AVATOR) 26 | 27 | class Meta: 28 | verbose_name = '文件监控' 29 | verbose_name_plural = verbose_name 30 | 31 | def __str__(self): 32 | return self.target_path 33 | 34 | 35 | class CVESerach(models.Model): 36 | """cve监控""" 37 | publish = models.CharField(max_length=50, verbose_name='更新时间') 38 | cvss = models.FloatField(verbose_name='评分(max=5.0)') 39 | cwe = models.CharField(max_length=20, verbose_name='CWE编号') 40 | cve = models.CharField(max_length=30, verbose_name='CVE编号') 41 | references = models.TextField(max_length=500, verbose_name='详情地址') 42 | summary = models.CharField(max_length=10000, verbose_name='漏洞描述') 43 | time = models.DateTimeField(verbose_name='添加时间', auto_now_add=True) 44 | 45 | class Meta: 46 | verbose_name = 'CVE监控' 47 | verbose_name_plural =verbose_name 48 | 49 | def __str__(self): 50 | return self.cve 51 | 52 | 53 | class KeyName(models.Model): 54 | """CVE筛选关键词""" 55 | user = models.ForeignKey(User, verbose_name='用户', on_delete=models.CASCADE) 56 | keyname = models.CharField(max_length=100, verbose_name='筛选关键词') 57 | 58 | class Meta: 59 | verbose_name = '筛选关键词' 60 | verbose_name_plural = verbose_name 61 | 62 | def __str__(self): 63 | return self.keyname -------------------------------------------------------------------------------- /staticfile/admin/js/actions.min.js: -------------------------------------------------------------------------------- 1 | (function(a){var f;a.fn.actions=function(e){var b=a.extend({},a.fn.actions.defaults,e),g=a(this),k=!1,l=function(){a(b.acrossClears).hide();a(b.acrossQuestions).show();a(b.allContainer).hide()},m=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()},n=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()},p=function(){n(); 2 | a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)},q=function(c){c?l():n();a(g).prop("checked",c).parent().parent().toggleClass(b.selectedClass,c)},h=function(){var c=a(g).filter(":checked").length,d=a(".action-counter").data("actionsIcnt");a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:d},!0));a(b.allToggle).prop("checked",function(){if(c===g.length){var a=!0;l()}else a=!1,p();return a})};a(b.counterContainer).show(); 3 | a(this).filter(":checked").each(function(c){a(this).parent().parent().toggleClass(b.selectedClass);h();1===a(b.acrossInput).val()&&m()});a(b.allToggle).show().on("click",function(){q(a(this).prop("checked"));h()});a("a",b.acrossQuestions).on("click",function(c){c.preventDefault();a(b.acrossInput).val(1);m()});a("a",b.acrossClears).on("click",function(c){c.preventDefault();a(b.allToggle).prop("checked",!1);p();q(0);h()});f=null;a(g).on("click",function(c){c||(c=window.event);var d=c.target?c.target: 4 | c.srcElement;if(f&&a.data(f)!==a.data(d)&&!0===c.shiftKey){var e=!1;a(f).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked);a(g).each(function(){if(a.data(this)===a.data(f)||a.data(this)===a.data(d))e=e?!1:!0;e&&a(this).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);f=d;h()});a("form#changelist-form table#result_list tr").on("change","td:gt(0) :input",function(){k=!0}); 5 | a('form#changelist-form button[name="index"]').on("click",function(a){if(k)return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."))});a('form#changelist-form input[name="_save"]').on("click",function(c){var d=!1;a("select option:selected",b.actionContainer).each(function(){a(this).val()&&(d=!0)});if(d)return k?confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.")): 6 | confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."))})};a.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"};a(document).ready(function(){var e= 7 | a("tr input.action-select");0 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /staticfile/admin/js/timeparse.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 'use strict'; 3 | var timeParsePatterns = [ 4 | // 9 5 | { 6 | re: /^\d{1,2}$/i, 7 | handler: function(bits) { 8 | if (bits[0].length === 1) { 9 | return '0' + bits[0] + ':00'; 10 | } else { 11 | return bits[0] + ':00'; 12 | } 13 | } 14 | }, 15 | // 13:00 16 | { 17 | re: /^\d{2}[:.]\d{2}$/i, 18 | handler: function(bits) { 19 | return bits[0].replace('.', ':'); 20 | } 21 | }, 22 | // 9:00 23 | { 24 | re: /^\d[:.]\d{2}$/i, 25 | handler: function(bits) { 26 | return '0' + bits[0].replace('.', ':'); 27 | } 28 | }, 29 | // 3 am / 3 a.m. / 3am 30 | { 31 | re: /^(\d+)\s*([ap])(?:.?m.?)?$/i, 32 | handler: function(bits) { 33 | var hour = parseInt(bits[1]); 34 | if (hour === 12) { 35 | hour = 0; 36 | } 37 | if (bits[2].toLowerCase() === 'p') { 38 | if (hour === 12) { 39 | hour = 0; 40 | } 41 | return (hour + 12) + ':00'; 42 | } else { 43 | if (hour < 10) { 44 | return '0' + hour + ':00'; 45 | } else { 46 | return hour + ':00'; 47 | } 48 | } 49 | } 50 | }, 51 | // 3.30 am / 3:15 a.m. / 3.00am 52 | { 53 | re: /^(\d+)[.:](\d{2})\s*([ap]).?m.?$/i, 54 | handler: function(bits) { 55 | var hour = parseInt(bits[1]); 56 | var mins = parseInt(bits[2]); 57 | if (mins < 10) { 58 | mins = '0' + mins; 59 | } 60 | if (hour === 12) { 61 | hour = 0; 62 | } 63 | if (bits[3].toLowerCase() === 'p') { 64 | if (hour === 12) { 65 | hour = 0; 66 | } 67 | return (hour + 12) + ':' + mins; 68 | } else { 69 | if (hour < 10) { 70 | return '0' + hour + ':' + mins; 71 | } else { 72 | return hour + ':' + mins; 73 | } 74 | } 75 | } 76 | }, 77 | // noon 78 | { 79 | re: /^no/i, 80 | handler: function(bits) { 81 | return '12:00'; 82 | } 83 | }, 84 | // midnight 85 | { 86 | re: /^mid/i, 87 | handler: function(bits) { 88 | return '00:00'; 89 | } 90 | } 91 | ]; 92 | 93 | function parseTimeString(s) { 94 | for (var i = 0; i < timeParsePatterns.length; i++) { 95 | var re = timeParsePatterns[i].re; 96 | var handler = timeParsePatterns[i].handler; 97 | var bits = re.exec(s); 98 | if (bits) { 99 | return handler(bits); 100 | } 101 | } 102 | return s; 103 | } 104 | 105 | window.parseTimeString = parseTimeString; 106 | })(); 107 | -------------------------------------------------------------------------------- /staticfile/js/sliders.js: -------------------------------------------------------------------------------- 1 | var Sliders = function () { 2 | 3 | // default sliders 4 | $("#default-slider").slider(); 5 | 6 | // snap inc 7 | $("#snap-inc-slider").slider({ 8 | value: 50, 9 | min: 0, 10 | max: 1000, 11 | step: 100, 12 | slide: function (event, ui) { 13 | $("#snap-inc-slider-amount").text("$" + ui.value); 14 | } 15 | }); 16 | 17 | $("#snap-inc-slider-amount").text("$" + $("#snap-inc-slider").slider("value")); 18 | 19 | // range slider 20 | $("#slider-range").slider({ 21 | range: true, 22 | min: 0, 23 | max: 500, 24 | values: [75, 300], 25 | slide: function (event, ui) { 26 | $("#slider-range-amount").text("$" + ui.values[0] + " - $" + ui.values[1]); 27 | } 28 | }); 29 | 30 | $("#slider-range-amount").text("$" + $("#slider-range").slider("values", 0) + " - $" + $("#slider-range").slider("values", 1)); 31 | 32 | //range max 33 | 34 | $("#slider-range-max").slider({ 35 | range: "max", 36 | min: 1, 37 | max: 10, 38 | value: 2, 39 | slide: function (event, ui) { 40 | $("#slider-range-max-amount").text(ui.value); 41 | } 42 | }); 43 | 44 | $("#slider-range-max-amount").text($("#slider-range-max").slider("value")); 45 | 46 | // range min 47 | $("#slider-range-min").slider({ 48 | range: "min", 49 | value: 37, 50 | min: 1, 51 | max: 700, 52 | slide: function (event, ui) { 53 | $("#slider-range-min-amount").text("$" + ui.value); 54 | } 55 | }); 56 | 57 | $("#slider-range-min-amount").text("$" + $("#slider-range-min").slider("value")); 58 | 59 | // 60 | // setup graphic EQ 61 | $( "#eq > span" ).each(function() { 62 | // read initial values from markup and remove that 63 | var value = parseInt( $( this ).text(), 10 ); 64 | $( this ).empty().slider({ 65 | value: value, 66 | range: "min", 67 | animate: true, 68 | orientation: "vertical" 69 | }); 70 | }); 71 | 72 | // bound to select 73 | 74 | var select = $( "#minbeds" ); 75 | var slider = $( "
" ).insertAfter( select ).slider({ 76 | min: 1, 77 | max: 6, 78 | range: "min", 79 | value: select[ 0 ].selectedIndex + 1, 80 | slide: function( event, ui ) { 81 | select[ 0 ].selectedIndex = ui.value - 1; 82 | } 83 | }); 84 | $( "#minbeds" ).change(function() { 85 | slider.slider( "value", this.selectedIndex + 1 ); 86 | }); 87 | 88 | // vertical slider 89 | $("#slider-vertical").slider({ 90 | orientation: "vertical", 91 | range: "min", 92 | min: 0, 93 | max: 100, 94 | value: 60, 95 | slide: function (event, ui) { 96 | $("#slider-vertical-amount").text(ui.value); 97 | } 98 | }); 99 | $("#slider-vertical-amount").text($("#slider-vertical").slider("value")); 100 | 101 | // vertical range sliders 102 | $("#slider-range-vertical").slider({ 103 | orientation: "vertical", 104 | range: true, 105 | values: [17, 67], 106 | slide: function (event, ui) { 107 | $("#slider-range-vertical-amount").text("$" + ui.values[0] + " - $" + ui.values[1]); 108 | } 109 | }); 110 | 111 | $("#slider-range-vertical-amount").text("$" + $("#slider-range-vertical").slider("values", 0) + " - $" + $("#slider-range-vertical").slider("values", 1)); 112 | 113 | 114 | }(); -------------------------------------------------------------------------------- /staticfile/js/morris-script.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | //morris chart 4 | 5 | $(function () { 6 | // data stolen from http://howmanyleft.co.uk/vehicle/jaguar_'e'_type 7 | var tax_data = [ 8 | {"period": "2011 Q3", "licensed": 3407, "sorned": 660}, 9 | {"period": "2011 Q2", "licensed": 3351, "sorned": 629}, 10 | {"period": "2011 Q1", "licensed": 3269, "sorned": 618}, 11 | {"period": "2010 Q4", "licensed": 3246, "sorned": 661}, 12 | {"period": "2009 Q4", "licensed": 3171, "sorned": 676}, 13 | {"period": "2008 Q4", "licensed": 3155, "sorned": 681}, 14 | {"period": "2007 Q4", "licensed": 3226, "sorned": 620}, 15 | {"period": "2006 Q4", "licensed": 3245, "sorned": null}, 16 | {"period": "2005 Q4", "licensed": 3289, "sorned": null} 17 | ]; 18 | Morris.Line({ 19 | element: 'hero-graph', 20 | data: tax_data, 21 | xkey: 'period', 22 | ykeys: ['licensed', 'sorned'], 23 | labels: ['Licensed', 'Off the road'], 24 | lineColors:['#8075c4','#6883a3'] 25 | }); 26 | 27 | Morris.Donut({ 28 | element: 'hero-donut', 29 | data: [ 30 | {label: 'Jam', value: 25 }, 31 | {label: 'Frosted', value: 40 }, 32 | {label: 'Custard', value: 25 }, 33 | {label: 'Sugar', value: 10 } 34 | ], 35 | colors: ['#41cac0', '#49e2d7', '#34a39b'], 36 | formatter: function (y) { return y + "%" } 37 | }); 38 | 39 | Morris.Area({ 40 | element: 'hero-area', 41 | data: [ 42 | {period: '2010 Q1', iphone: 2666, ipad: null, itouch: 2647}, 43 | {period: '2010 Q2', iphone: 2778, ipad: 2294, itouch: 2441}, 44 | {period: '2010 Q3', iphone: 4912, ipad: 1969, itouch: 2501}, 45 | {period: '2010 Q4', iphone: 3767, ipad: 3597, itouch: 5689}, 46 | {period: '2011 Q1', iphone: 6810, ipad: 1914, itouch: 2293}, 47 | {period: '2011 Q2', iphone: 5670, ipad: 4293, itouch: 1881}, 48 | {period: '2011 Q3', iphone: 4820, ipad: 3795, itouch: 1588}, 49 | {period: '2011 Q4', iphone: 15073, ipad: 5967, itouch: 5175}, 50 | {period: '2012 Q1', iphone: 10687, ipad: 4460, itouch: 2028}, 51 | {period: '2012 Q2', iphone: 8432, ipad: 5713, itouch: 1791} 52 | ], 53 | 54 | xkey: 'period', 55 | ykeys: ['iphone', 'ipad', 'itouch'], 56 | labels: ['iPhone', 'iPad', 'iPod Touch'], 57 | hideHover: 'auto', 58 | lineWidth: 1, 59 | pointSize: 5, 60 | lineColors: ['#4a8bc2', '#ff6c60', '#a9d86e'], 61 | fillOpacity: 0.5, 62 | smooth: true 63 | }); 64 | 65 | Morris.Bar({ 66 | element: 'hero-bar', 67 | data: [ 68 | {device: 'iPhone', geekbench: 136}, 69 | {device: 'iPhone 3G', geekbench: 137}, 70 | {device: 'iPhone 3GS', geekbench: 275}, 71 | {device: 'iPhone 4', geekbench: 380}, 72 | {device: 'iPhone 4S', geekbench: 655}, 73 | {device: 'iPhone 5', geekbench: 1571} 74 | ], 75 | xkey: 'device', 76 | ykeys: ['geekbench'], 77 | labels: ['Geekbench'], 78 | barRatio: 0.4, 79 | xLabelAngle: 35, 80 | hideHover: 'auto', 81 | barColors: ['#6883a3'] 82 | }); 83 | 84 | new Morris.Line({ 85 | element: 'examplefirst', 86 | xkey: 'year', 87 | ykeys: ['value'], 88 | labels: ['Value'], 89 | data: [ 90 | {year: '2008', value: 20}, 91 | {year: '2009', value: 10}, 92 | {year: '2010', value: 5}, 93 | {year: '2011', value: 5}, 94 | {year: '2012', value: 20} 95 | ] 96 | }); 97 | 98 | $('.code-example').each(function (index, el) { 99 | eval($(el).text()); 100 | }); 101 | }); 102 | 103 | }(); 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /staticfile/js/all-chartjs.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | 4 | var doughnutData = [ 5 | { 6 | value: 30, 7 | color:"#F7464A" 8 | }, 9 | { 10 | value : 50, 11 | color : "#46BFBD" 12 | }, 13 | { 14 | value : 100, 15 | color : "#FDB45C" 16 | }, 17 | { 18 | value : 40, 19 | color : "#949FB1" 20 | }, 21 | { 22 | value : 120, 23 | color : "#4D5360" 24 | } 25 | 26 | ]; 27 | var lineChartData = { 28 | labels : ["","","","","","",""], 29 | datasets : [ 30 | { 31 | fillColor : "rgba(220,220,220,0.5)", 32 | strokeColor : "rgba(220,220,220,1)", 33 | pointColor : "rgba(220,220,220,1)", 34 | pointStrokeColor : "#fff", 35 | data : [65,59,90,81,56,55,40] 36 | }, 37 | { 38 | fillColor : "rgba(151,187,205,0.5)", 39 | strokeColor : "rgba(151,187,205,1)", 40 | pointColor : "rgba(151,187,205,1)", 41 | pointStrokeColor : "#fff", 42 | data : [28,48,40,19,96,27,100] 43 | } 44 | ] 45 | 46 | }; 47 | var pieData = [ 48 | { 49 | value: 30, 50 | color:"#F38630" 51 | }, 52 | { 53 | value : 50, 54 | color : "#E0E4CC" 55 | }, 56 | { 57 | value : 100, 58 | color : "#69D2E7" 59 | } 60 | 61 | ]; 62 | var barChartData = { 63 | labels : ["January","February","March","April","May","June","July"], 64 | datasets : [ 65 | { 66 | fillColor : "rgba(220,220,220,0.5)", 67 | strokeColor : "rgba(220,220,220,1)", 68 | data : [65,59,90,81,56,55,40] 69 | }, 70 | { 71 | fillColor : "rgba(151,187,205,0.5)", 72 | strokeColor : "rgba(151,187,205,1)", 73 | data : [28,48,40,19,96,27,100] 74 | } 75 | ] 76 | 77 | }; 78 | var chartData = [ 79 | { 80 | value : Math.random(), 81 | color: "#D97041" 82 | }, 83 | { 84 | value : Math.random(), 85 | color: "#C7604C" 86 | }, 87 | { 88 | value : Math.random(), 89 | color: "#21323D" 90 | }, 91 | { 92 | value : Math.random(), 93 | color: "#9D9B7F" 94 | }, 95 | { 96 | value : Math.random(), 97 | color: "#7D4F6D" 98 | }, 99 | { 100 | value : Math.random(), 101 | color: "#584A5E" 102 | } 103 | ]; 104 | var radarChartData = { 105 | labels : ["","","","","","",""], 106 | datasets : [ 107 | { 108 | fillColor : "rgba(220,220,220,0.5)", 109 | strokeColor : "rgba(220,220,220,1)", 110 | pointColor : "rgba(220,220,220,1)", 111 | pointStrokeColor : "#fff", 112 | data : [65,59,90,81,56,55,40] 113 | }, 114 | { 115 | fillColor : "rgba(151,187,205,0.5)", 116 | strokeColor : "rgba(151,187,205,1)", 117 | pointColor : "rgba(151,187,205,1)", 118 | pointStrokeColor : "#fff", 119 | data : [28,48,40,19,96,27,100] 120 | } 121 | ] 122 | 123 | }; 124 | new Chart(document.getElementById("doughnut").getContext("2d")).Doughnut(doughnutData); 125 | new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData); 126 | new Chart(document.getElementById("radar").getContext("2d")).Radar(radarChartData); 127 | new Chart(document.getElementById("polarArea").getContext("2d")).PolarArea(chartData); 128 | new Chart(document.getElementById("bar").getContext("2d")).Bar(barChartData); 129 | new Chart(document.getElementById("pie").getContext("2d")).Pie(pieData); 130 | 131 | 132 | }(); -------------------------------------------------------------------------------- /staticfile/js/common-scripts.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | 4 | 5 | // sidebar dropdown menu 6 | 7 | jQuery('#sidebar .sub-menu > a').click(function () { 8 | var last = jQuery('.sub-menu.open', $('#sidebar')); 9 | last.removeClass("open"); 10 | jQuery('.arrow', last).removeClass("open"); 11 | jQuery('.sub', last).slideUp(200); 12 | var sub = jQuery(this).next(); 13 | if (sub.is(":visible")) { 14 | jQuery('.arrow', jQuery(this)).removeClass("open"); 15 | jQuery(this).parent().removeClass("open"); 16 | sub.slideUp(200); 17 | } else { 18 | jQuery('.arrow', jQuery(this)).addClass("open"); 19 | jQuery(this).parent().addClass("open"); 20 | sub.slideDown(200); 21 | } 22 | var o = ($(this).offset()); 23 | diff = 200 - o.top; 24 | if(diff>0) 25 | $("#sidebar").scrollTo("-="+Math.abs(diff),500); 26 | else 27 | $("#sidebar").scrollTo("+="+Math.abs(diff),500); 28 | }); 29 | 30 | // sidebar toggle 31 | 32 | 33 | $(function() { 34 | function responsiveView() { 35 | var wSize = $(window).width(); 36 | if (wSize <= 768) { 37 | $('#container').addClass('sidebar-close'); 38 | $('#sidebar > ul').hide(); 39 | } 40 | 41 | if (wSize > 768) { 42 | $('#container').removeClass('sidebar-close'); 43 | $('#sidebar > ul').show(); 44 | } 45 | } 46 | $(window).on('load', responsiveView); 47 | $(window).on('resize', responsiveView); 48 | }); 49 | 50 | $('.icon-reorder').click(function () { 51 | if ($('#sidebar > ul').is(":visible") === true) { 52 | $('#main-content').css({ 53 | 'margin-left': '0px' 54 | }); 55 | $('#sidebar').css({ 56 | 'margin-left': '-180px' 57 | }); 58 | $('#sidebar > ul').hide(); 59 | $("#container").addClass("sidebar-closed"); 60 | } else { 61 | $('#main-content').css({ 62 | 'margin-left': '180px' 63 | }); 64 | $('#sidebar > ul').show(); 65 | $('#sidebar').css({ 66 | 'margin-left': '0' 67 | }); 68 | $("#container").removeClass("sidebar-closed"); 69 | } 70 | }); 71 | 72 | // custom scrollbar 73 | $("#sidebar").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '3', cursorborderradius: '10px', background: '#404040', cursorborder: ''}); 74 | 75 | $("html").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', cursorborder: '', zindex: '1000'}); 76 | 77 | // widget tools 78 | 79 | jQuery('.widget .tools .icon-chevron-down').click(function () { 80 | var el = jQuery(this).parents(".widget").children(".widget-body"); 81 | if (jQuery(this).hasClass("icon-chevron-down")) { 82 | jQuery(this).removeClass("icon-chevron-down").addClass("icon-chevron-up"); 83 | el.slideUp(200); 84 | } else { 85 | jQuery(this).removeClass("icon-chevron-up").addClass("icon-chevron-down"); 86 | el.slideDown(200); 87 | } 88 | }); 89 | 90 | jQuery('.widget .tools .icon-remove').click(function () { 91 | jQuery(this).parents(".widget").parent().remove(); 92 | }); 93 | 94 | // tool tips 95 | 96 | $('.tooltips').tooltip(); 97 | 98 | // popovers 99 | 100 | $('.popovers').popover(); 101 | 102 | 103 | 104 | // custom bar chart 105 | 106 | if ($(".custom-bar-chart")) { 107 | $(".bar").each(function () { 108 | var i = $(this).find(".value").html(); 109 | $(this).find(".value").html(""); 110 | $(this).find(".value").animate({ 111 | height: i 112 | }, 2000) 113 | }) 114 | } 115 | 116 | 117 | //custom select box 118 | 119 | // $(function(){ 120 | // 121 | // $('select.styled').customSelect(); 122 | // 123 | // }); 124 | 125 | 126 | 127 | }(); -------------------------------------------------------------------------------- /staticfile/assets/bootstrap-datepicker/css/datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | Datepicker for Bootstrap 3 | Copyright 2012 Stefan Petre 4 | Licensed under the Apache License v2.0 5 | http://www.apache.org/licenses/LICENSE-2.0 6 | */ 7 | .datepicker { top: 0; left: 0; padding: 4px; margin-top: 1px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; /*.dow { border-top: 1px solid #ddd !important; }*/ } .datepicker:before { content: ''; display: inline-block; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 7px solid #ccc; border-bottom-color: rgba(0, 0, 0, 0.2); position: absolute; top: -7px; left: 6px; } .datepicker:after { content: ''; display: inline-block; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 6px solid #ffffff; position: absolute; top: -6px; left: 7px; } .datepicker > div { display: none; } .datepicker table { width: 100%; margin: 0; } .datepicker td, .datepicker th { text-align: center; width: 20px; height: 20px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker td.day:hover { background: #eeeeee; cursor: pointer; } .datepicker td.old, .datepicker td.new { color: #999999; } .datepicker td.active, .datepicker td.active:hover { background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker td.active:hover, .datepicker td.active:hover:hover, .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active:hover.active, .datepicker td.active.disabled, .datepicker td.active:hover.disabled, .datepicker td.active[disabled], .datepicker td.active:hover[disabled] { background-color: #0044cc; } .datepicker td.active:active, .datepicker td.active:hover:active, .datepicker td.active.active, .datepicker td.active:hover.active { background-color: #003399 \9; } .datepicker td span { display: block; width: 47px; height: 54px; line-height: 54px; float: left; margin: 2px; cursor: pointer; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .datepicker td span:hover { background: #eeeeee; } .datepicker td span.active { background-color: #006dcc; background-image: -moz-linear-gradient(top, #0088cc, #0044cc); background-image: -ms-linear-gradient(top, #0088cc, #0044cc); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); background-image: -o-linear-gradient(top, #0088cc, #0044cc); background-image: linear-gradient(top, #0088cc, #0044cc); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); border-color: #0044cc #0044cc #002a80; border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); color: #fff; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); } .datepicker td span.active:hover, .datepicker td span.active:active, .datepicker td span.active.active, .datepicker td span.active.disabled, .datepicker td span.active[disabled] { background-color: #0044cc; } .datepicker td span.active:active, .datepicker td span.active.active { background-color: #003399 \9; } .datepicker td span.old { color: #999999; } .datepicker th.switch { width: 145px; } .datepicker th.next, .datepicker th.prev { font-size: 19.5px; } .datepicker thead tr:first-child th { cursor: pointer; } .datepicker thead tr:first-child th:hover { background: #eeeeee; } .input-append.date .add-on i, .input-prepend.date .add-on i { display: block; cursor: pointer; width: 16px; height: 16px; } -------------------------------------------------------------------------------- /staticfile/js/dynamic-table.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | // begin first table 4 | $('#sample_1').dataTable({ 5 | "sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>", 6 | "sPaginationType": "bootstrap", 7 | "oLanguage": { 8 | "sLengthMenu": "_MENU_ records per page", 9 | "oPaginate": { 10 | "sPrevious": "Prev", 11 | "sNext": "Next" 12 | } 13 | }, 14 | "aoColumnDefs": [{ 15 | 'bSortable': false, 16 | 'aTargets': [0] 17 | }] 18 | }); 19 | 20 | jQuery('#sample_1 .group-checkable').change(function () { 21 | var set = jQuery(this).attr("data-set"); 22 | var checked = jQuery(this).is(":checked"); 23 | jQuery(set).each(function () { 24 | if (checked) { 25 | $(this).attr("checked", true); 26 | } else { 27 | $(this).attr("checked", false); 28 | } 29 | }); 30 | jQuery.uniform.update(set); 31 | }); 32 | 33 | jQuery('#sample_1_wrapper .dataTables_filter input').addClass("form-control"); // modify table search input 34 | jQuery('#sample_1_wrapper .dataTables_length select').addClass("form-control"); // modify table per page dropdown 35 | 36 | // begin second table 37 | $('#sample_2').dataTable({ 38 | "sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>", 39 | "sPaginationType": "bootstrap", 40 | "oLanguage": { 41 | "sLengthMenu": "_MENU_ per page", 42 | "oPaginate": { 43 | "sPrevious": "Prev", 44 | "sNext": "Next" 45 | } 46 | }, 47 | "aoColumnDefs": [{ 48 | 'bSortable': false, 49 | 'aTargets': [0] 50 | }] 51 | }); 52 | 53 | jQuery('#sample_2 .group-checkable').change(function () { 54 | var set = jQuery(this).attr("data-set"); 55 | var checked = jQuery(this).is(":checked"); 56 | jQuery(set).each(function () { 57 | if (checked) { 58 | $(this).attr("checked", true); 59 | } else { 60 | $(this).attr("checked", false); 61 | } 62 | }); 63 | jQuery.uniform.update(set); 64 | }); 65 | 66 | jQuery('#sample_2_wrapper .dataTables_filter input').addClass("form-control"); // modify table search input 67 | jQuery('#sample_2_wrapper .dataTables_length select').addClass("form-control"); // modify table per page dropdown 68 | 69 | // begin: third table 70 | $('#sample_3').dataTable({ 71 | "sDom": "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>", 72 | "sPaginationType": "bootstrap", 73 | "oLanguage": { 74 | "sLengthMenu": "_MENU_ per page", 75 | "oPaginate": { 76 | "sPrevious": "Prev", 77 | "sNext": "Next" 78 | } 79 | }, 80 | "aoColumnDefs": [{ 81 | 'bSortable': false, 82 | 'aTargets': [0] 83 | }] 84 | }); 85 | 86 | jQuery('#sample_3 .group-checkable').change(function () { 87 | var set = jQuery(this).attr("data-set"); 88 | var checked = jQuery(this).is(":checked"); 89 | jQuery(set).each(function () { 90 | if (checked) { 91 | $(this).attr("checked", true); 92 | } else { 93 | $(this).attr("checked", false); 94 | } 95 | }); 96 | jQuery.uniform.update(set); 97 | }); 98 | 99 | jQuery('#sample_3_wrapper .dataTables_filter input').addClass("form-control"); // modify table search input 100 | jQuery('#sample_3_wrapper .dataTables_length select').addClass("form-control"); // modify table per page dropdown 101 | 102 | 103 | 104 | }(); -------------------------------------------------------------------------------- /zerus/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for zerus project. 3 | 4 | Generated by 'django-admin startproject' using Django 3.0.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.0/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/3.0/ref/settings/ 11 | """ 12 | 13 | import os,sys 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | sys.path.insert(0, os.path.join(BASE_DIR, 'apps')) 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'u#6jkzw@@52wag%2cr+xc85h!7ihpp26@8d+(54-&4=6_xvo^_' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = False 27 | 28 | ALLOWED_HOSTS = ['*'] 29 | 30 | # Application definition 31 | 32 | INSTALLED_APPS = [ 33 | 'django.contrib.admin', 34 | 'django.contrib.auth', 35 | 'django.contrib.contenttypes', 36 | 'django.contrib.sessions', 37 | 'django.contrib.messages', 38 | 'django.contrib.staticfiles', 39 | 'apps.host', 40 | 'apps.logcat', 41 | 'apps.threat', 42 | 'django_apscheduler' 43 | ] 44 | 45 | MIDDLEWARE = [ 46 | 'django.middleware.security.SecurityMiddleware', 47 | 'django.contrib.sessions.middleware.SessionMiddleware', 48 | 'django.middleware.common.CommonMiddleware', 49 | 'django.middleware.csrf.CsrfViewMiddleware', 50 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 51 | 'django.contrib.messages.middleware.MessageMiddleware', 52 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 53 | ] 54 | 55 | ROOT_URLCONF = 'zerus.urls' 56 | 57 | TEMPLATES = [ 58 | { 59 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 60 | 'DIRS': [os.path.join(BASE_DIR, 'templates')] 61 | , 62 | 'APP_DIRS': True, 63 | 'OPTIONS': { 64 | 'context_processors': [ 65 | 'django.template.context_processors.debug', 66 | 'django.template.context_processors.request', 67 | 'django.contrib.auth.context_processors.auth', 68 | 'django.contrib.messages.context_processors.messages', 69 | ], 70 | }, 71 | }, 72 | ] 73 | 74 | WSGI_APPLICATION = 'zerus.wsgi.application' 75 | 76 | 77 | # Database 78 | # https://docs.djangoproject.com/en/3.0/ref/settings/#databases 79 | 80 | DATABASES = { 81 | 'default': { 82 | 'ENGINE': 'django.db.backends.sqlite3', 83 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 84 | } 85 | } 86 | 87 | # DATABASES = { 88 | # 'default': { 89 | # 'ENGINE': 'django.db.backends.mysql', 90 | # 'NAME': 'mysql', 91 | # 'USER': 'mysql', 92 | # 'PASSWORD': 'mysql', 93 | # 'HOST': '127.0.0.1', 94 | # 'PORT': '3306', 95 | # } 96 | # } 97 | 98 | 99 | # Password validation 100 | # https://docs.djangoproject.com/en/3.0/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.0/topics/i18n/ 120 | 121 | LANGUAGE_CODE = 'zh-hans' 122 | 123 | TIME_ZONE = 'Asia/Shanghai' 124 | 125 | USE_I18N = True 126 | 127 | USE_L10N = True 128 | 129 | USE_TZ = False 130 | 131 | 132 | # Static files (CSS, JavaScript, Images) 133 | # https://docs.djangoproject.com/en/3.0/howto/static-files/ 134 | 135 | STATIC_URL = '/static/' 136 | STATIC_ROOT = os.path.join(BASE_DIR, 'staticfile').replace('\\', '/') 137 | # STATICFILES_DIRS = [ 138 | # os.path.join(BASE_DIR, 'staticfile'), 139 | # ] 140 | 141 | LOGIN_URL = '/login/' -------------------------------------------------------------------------------- /staticfile/js/external-dragging-calendar.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | 4 | /* initialize the external events 5 | -----------------------------------------------------------------*/ 6 | 7 | $('#external-events div.external-event').each(function() { 8 | 9 | // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) 10 | // it doesn't need to have a start or end 11 | var eventObject = { 12 | title: $.trim($(this).text()) // use the element's text as the event title 13 | }; 14 | 15 | // store the Event Object in the DOM element so we can get to it later 16 | $(this).data('eventObject', eventObject); 17 | 18 | // make the event draggable using jQuery UI 19 | $(this).draggable({ 20 | zIndex: 999, 21 | revert: true, // will cause the event to go back to its 22 | revertDuration: 0 // original position after the drag 23 | }); 24 | 25 | }); 26 | 27 | 28 | /* initialize the calendar 29 | -----------------------------------------------------------------*/ 30 | 31 | var date = new Date(); 32 | var d = date.getDate(); 33 | var m = date.getMonth(); 34 | var y = date.getFullYear(); 35 | 36 | $('#calendar').fullCalendar({ 37 | header: { 38 | left: 'prev,next today', 39 | center: 'title', 40 | right: 'month,basicWeek,basicDay' 41 | }, 42 | editable: true, 43 | droppable: true, // this allows things to be dropped onto the calendar !!! 44 | drop: function(date, allDay) { // this function is called when something is dropped 45 | 46 | // retrieve the dropped element's stored Event Object 47 | var originalEventObject = $(this).data('eventObject'); 48 | 49 | // we need to copy it, so that multiple events don't have a reference to the same object 50 | var copiedEventObject = $.extend({}, originalEventObject); 51 | 52 | // assign it the date that was reported 53 | copiedEventObject.start = date; 54 | copiedEventObject.allDay = allDay; 55 | 56 | // render the event on the calendar 57 | // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) 58 | $('#calendar').fullCalendar('renderEvent', copiedEventObject, true); 59 | 60 | // is the "remove after drop" checkbox checked? 61 | if ($('#drop-remove').is(':checked')) { 62 | // if so, remove the element from the "Draggable Events" list 63 | $(this).remove(); 64 | } 65 | 66 | }, 67 | events: [ 68 | { 69 | title: 'All Day Event', 70 | start: new Date(y, m, 1) 71 | }, 72 | { 73 | title: 'Long Event', 74 | start: new Date(y, m, d-5), 75 | end: new Date(y, m, d-2) 76 | }, 77 | { 78 | id: 999, 79 | title: 'Repeating Event', 80 | start: new Date(y, m, d-3, 16, 0), 81 | allDay: false 82 | }, 83 | { 84 | id: 999, 85 | title: 'Repeating Event', 86 | start: new Date(y, m, d+4, 16, 0), 87 | allDay: false 88 | }, 89 | { 90 | title: 'Meeting', 91 | start: new Date(y, m, d, 10, 30), 92 | allDay: false 93 | }, 94 | { 95 | title: 'Lunch', 96 | start: new Date(y, m, d, 12, 0), 97 | end: new Date(y, m, d, 14, 0), 98 | allDay: false 99 | }, 100 | { 101 | title: 'Birthday Party', 102 | start: new Date(y, m, d+1, 19, 0), 103 | end: new Date(y, m, d+1, 22, 30), 104 | allDay: false 105 | }, 106 | { 107 | title: 'Click for Google', 108 | start: new Date(y, m, 28), 109 | end: new Date(y, m, 29), 110 | url: 'http://google.com/' 111 | } 112 | ] 113 | }); 114 | 115 | 116 | }(); -------------------------------------------------------------------------------- /staticfile/js/sparkline-chart.js: -------------------------------------------------------------------------------- 1 | var Script = function () { 2 | 3 | $(".sparkline").each(function(){ 4 | var $data = $(this).data(); 5 | 6 | $data.valueSpots = {'0:': $data.spotColor}; 7 | 8 | $(this).sparkline( $data.data || "html", $data, 9 | { 10 | tooltipFormat: '' + 11 | ' {{offset:names}} ({{percent.1}}%)' 12 | }); 13 | 14 | 15 | 16 | 17 | }); 18 | 19 | //sparkline chart 20 | 21 | $("#barchart").sparkline([5,3,6,7,5,6,4,2,3,4,6,8,9,10,8,6,5,7,6,5,4,7,4], { 22 | type: 'bar', 23 | height: '90', 24 | barWidth: 8, 25 | barSpacing: 5, 26 | barColor: '#fff' 27 | // tooltipFormat: '' + 28 | // ' {{offset:names}} ({{percent.1}}%)' 29 | 30 | }); 31 | 32 | 33 | $("#linechart").sparkline([1,5,3,7,9,3,6,4,7,9,7,6,2], { 34 | type: 'line', 35 | width: '300', 36 | height: '75', 37 | fillColor: '', 38 | lineColor: '#fff', 39 | lineWidth: 2, 40 | spotColor: '#fff', 41 | minSpotColor: '#fff', 42 | maxSpotColor: '#fff', 43 | highlightSpotColor: '#fff', 44 | highlightLineColor: '#ffffff', 45 | spotRadius: 4, 46 | highlightLineColor: '#ffffff' 47 | // tooltipFormat: '' + 48 | // ' {{offset:names}} ({{percent.1}}%)' 49 | 50 | 51 | 52 | }); 53 | 54 | $("#pie-chart").sparkline([2,1,1,1], { 55 | type: 'pie', 56 | width: '100', 57 | height: '100', 58 | borderColor: '#00bf00', 59 | sliceColors: ['#41CAC0', '#A8D76F', '#F8D347', '#EF6F66'] 60 | // tooltipFormat: '' + 61 | // ' {{offset:names}} ({{percent.1}}%)' 62 | }); 63 | 64 | //work progress bar 65 | 66 | $("#work-progress1").sparkline([5,6,7,5,9,6,4], { 67 | type: 'bar', 68 | height: '20', 69 | barWidth: 5, 70 | barSpacing: 2, 71 | barColor: '#5fbf00' 72 | // tooltipFormat: '' + 73 | // ' {{offset:names}} ({{percent.1}}%)' 74 | }); 75 | 76 | $("#work-progress2").sparkline([3,2,5,8,4,7,5], { 77 | type: 'bar', 78 | height: '22', 79 | barWidth: 5, 80 | barSpacing: 2, 81 | barColor: '#58c9f1' 82 | // tooltipFormat: '' + 83 | // ' {{offset:names}} ({{percent.1}}%)' 84 | }); 85 | 86 | $("#work-progress3").sparkline([1,6,9,3,4,8,5], { 87 | type: 'bar', 88 | height: '22', 89 | barWidth: 5, 90 | barSpacing: 2, 91 | barColor: '#8075c4' 92 | // tooltipFormat: '' + 93 | // ' {{offset:names}} ({{percent.1}}%)' 94 | }); 95 | 96 | $("#work-progress4").sparkline([9,4,9,6,7,4,3], { 97 | type: 'bar', 98 | height: '22', 99 | barWidth: 5, 100 | barSpacing: 2, 101 | barColor: '#ff6c60' 102 | // tooltipFormat: '' + 103 | // ' {{offset:names}} ({{percent.1}}%)' 104 | }); 105 | 106 | $("#work-progress5").sparkline([6,8,5,7,6,8,3], { 107 | type: 'bar', 108 | height: '22', 109 | barWidth: 5, 110 | barSpacing: 2, 111 | barColor: '#41cac0' 112 | // tooltipFormat: '' + 113 | // ' {{offset:names}} ({{percent.1}}%)' 114 | }); 115 | 116 | $("#pie-chart2").sparkline([2,1,1,1], { 117 | type: 'pie', 118 | width: '250', 119 | height: '125', 120 | sliceColors: ['#41CAC0', '#A8D76F', '#F8D347', '#EF6F66'] 121 | // tooltipFormat: '' + 122 | // ' {{offset:names}} ({{percent.1}}%)'}); 123 | 124 | }); 125 | 126 | }(); -------------------------------------------------------------------------------- /staticfile/js/gritter.js: -------------------------------------------------------------------------------- 1 | var Gritter = function () { 2 | 3 | $('#add-sticky').click(function(){ 4 | 5 | var unique_id = $.gritter.add({ 6 | // (string | mandatory) the heading of the notification 7 | title: 'This is a sticky notice!', 8 | // (string | mandatory) the text inside the notification 9 | text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et
magnis dis parturient montes, nascetur ridiculus mus.', 10 | // (string | optional) the image to display on the left 11 | image: 'img/avatar-mini.jpg', 12 | // (bool | optional) if you want it to fade out on its own or just sit there 13 | sticky: true, 14 | // (int | optional) the time you want it to be alive for before fading out 15 | time: '', 16 | // (string | optional) the class name you want to apply to that specific message 17 | class_name: 'my-sticky-class' 18 | }); 19 | 20 | // You can have it return a unique id, this can be used to manually remove it later using 21 | /* 22 | setTimeout(function(){ 23 | 24 | $.gritter.remove(unique_id, { 25 | fade: true, 26 | speed: 'slow' 27 | }); 28 | 29 | }, 6000) 30 | */ 31 | 32 | return false; 33 | 34 | }); 35 | 36 | $('#add-regular').click(function(){ 37 | 38 | $.gritter.add({ 39 | // (string | mandatory) the heading of the notification 40 | title: 'This is a regular notice!', 41 | // (string | mandatory) the text inside the notification 42 | text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', 43 | // (string | optional) the image to display on the left 44 | image: 'img/avatar-mini.jpg', 45 | // (bool | optional) if you want it to fade out on its own or just sit there 46 | sticky: false, 47 | // (int | optional) the time you want it to be alive for before fading out 48 | time: '' 49 | }); 50 | 51 | return false; 52 | 53 | }); 54 | 55 | $('#add-max').click(function(){ 56 | 57 | $.gritter.add({ 58 | // (string | mandatory) the heading of the notification 59 | title: 'This is a notice with a max of 3 on screen at one time!', 60 | // (string | mandatory) the text inside the notification 61 | text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.', 62 | // (string | optional) the image to display on the left 63 | image: 'img/avatar-mini.jpg', 64 | // (bool | optional) if you want it to fade out on its own or just sit there 65 | sticky: false, 66 | // (function) before the gritter notice is opened 67 | before_open: function(){ 68 | if($('.gritter-item-wrapper').length == 3) 69 | { 70 | // Returning false prevents a new gritter from opening 71 | return false; 72 | } 73 | } 74 | }); 75 | 76 | return false; 77 | 78 | }); 79 | 80 | $('#add-without-image').click(function(){ 81 | 82 | $.gritter.add({ 83 | // (string | mandatory) the heading of the notification 84 | title: 'This is a notice without an image!', 85 | // (string | mandatory) the text inside the notification 86 | text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.' 87 | }); 88 | 89 | return false; 90 | }); 91 | 92 | $('#add-gritter-light').click(function(){ 93 | 94 | $.gritter.add({ 95 | // (string | mandatory) the heading of the notification 96 | title: 'This is a light notification', 97 | // (string | mandatory) the text inside the notification 98 | text: 'Just add a "gritter-light" class_name to your $.gritter.add or globally to $.gritter.options.class_name', 99 | class_name: 'gritter-light' 100 | }); 101 | 102 | return false; 103 | }); 104 | 105 | $("#remove-all").click(function(){ 106 | 107 | $.gritter.removeAll(); 108 | return false; 109 | 110 | }); 111 | 112 | 113 | 114 | }(); -------------------------------------------------------------------------------- /staticfile/assets/data-tables/DT_bootstrap.js: -------------------------------------------------------------------------------- 1 | /* Set the defaults for DataTables initialisation */ 2 | $.extend( true, $.fn.dataTable.defaults, { 3 | "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", 4 | "sPaginationType": "bootstrap", 5 | "oLanguage": { 6 | "sLengthMenu": "_MENU_ records per page" 7 | } 8 | } ); 9 | 10 | 11 | /* Default class modification */ 12 | $.extend( $.fn.dataTableExt.oStdClasses, { 13 | "sWrapper": "dataTables_wrapper form-inline" 14 | } ); 15 | 16 | 17 | /* API method to get paging information */ 18 | $.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings ) 19 | { 20 | return { 21 | "iStart": oSettings._iDisplayStart, 22 | "iEnd": oSettings.fnDisplayEnd(), 23 | "iLength": oSettings._iDisplayLength, 24 | "iTotal": oSettings.fnRecordsTotal(), 25 | "iFilteredTotal": oSettings.fnRecordsDisplay(), 26 | "iPage": Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), 27 | "iTotalPages": Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength ) 28 | }; 29 | }; 30 | 31 | 32 | /* Bootstrap style pagination control */ 33 | $.extend( $.fn.dataTableExt.oPagination, { 34 | "bootstrap": { 35 | "fnInit": function( oSettings, nPaging, fnDraw ) { 36 | var oLang = oSettings.oLanguage.oPaginate; 37 | var fnClickHandler = function ( e ) { 38 | e.preventDefault(); 39 | if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) { 40 | fnDraw( oSettings ); 41 | } 42 | }; 43 | 44 | $(nPaging).addClass('pagination').append( 45 | '' 49 | ); 50 | var els = $('a', nPaging); 51 | $(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler ); 52 | $(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler ); 53 | }, 54 | 55 | "fnUpdate": function ( oSettings, fnDraw ) { 56 | var iListLength = 5; 57 | var oPaging = oSettings.oInstance.fnPagingInfo(); 58 | var an = oSettings.aanFeatures.p; 59 | var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2); 60 | 61 | if ( oPaging.iTotalPages < iListLength) { 62 | iStart = 1; 63 | iEnd = oPaging.iTotalPages; 64 | } 65 | else if ( oPaging.iPage <= iHalf ) { 66 | iStart = 1; 67 | iEnd = iListLength; 68 | } else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) { 69 | iStart = oPaging.iTotalPages - iListLength + 1; 70 | iEnd = oPaging.iTotalPages; 71 | } else { 72 | iStart = oPaging.iPage - iHalf + 1; 73 | iEnd = iStart + iListLength - 1; 74 | } 75 | 76 | for ( i=0, iLen=an.length ; i'+j+'') 84 | .insertBefore( $('li:last', an[i])[0] ) 85 | .bind('click', function (e) { 86 | e.preventDefault(); 87 | oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength; 88 | fnDraw( oSettings ); 89 | } ); 90 | } 91 | 92 | // Add / remove disabled classes from the static elements 93 | if ( oPaging.iPage === 0 ) { 94 | $('li:first', an[i]).addClass('disabled'); 95 | } else { 96 | $('li:first', an[i]).removeClass('disabled'); 97 | } 98 | 99 | if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) { 100 | $('li:last', an[i]).addClass('disabled'); 101 | } else { 102 | $('li:last', an[i]).removeClass('disabled'); 103 | } 104 | } 105 | } 106 | } 107 | } ); 108 | 109 | 110 | /* 111 | * TableTools Bootstrap compatibility 112 | * Required TableTools 2.1+ 113 | */ 114 | if ( $.fn.DataTable.TableTools ) { 115 | // Set the classes that TableTools uses to something suitable for Bootstrap 116 | $.extend( true, $.fn.DataTable.TableTools.classes, { 117 | "container": "DTTT btn-group", 118 | "buttons": { 119 | "normal": "btn", 120 | "disabled": "disabled" 121 | }, 122 | "collection": { 123 | "container": "DTTT_dropdown dropdown-menu", 124 | "buttons": { 125 | "normal": "", 126 | "disabled": "disabled" 127 | } 128 | }, 129 | "print": { 130 | "info": "DTTT_print_info modal" 131 | }, 132 | "select": { 133 | "row": "active" 134 | } 135 | } ); 136 | 137 | // Have the collection use a bootstrap compatible dropdown 138 | $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { 139 | "collection": { 140 | "container": "ul", 141 | "button": "li", 142 | "liner": "a" 143 | } 144 | } ); 145 | } -------------------------------------------------------------------------------- /staticfile/assets/bootstrap-daterangepicker/daterangepicker.css: -------------------------------------------------------------------------------- 1 | .daterangepicker.dropdown-menu { 2 | max-width: none; 3 | } 4 | 5 | .daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar { 6 | float: left; 7 | margin: 4px; 8 | } 9 | 10 | .daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar { 11 | float: right; 12 | margin: 4px; 13 | } 14 | 15 | .daterangepicker .ranges { 16 | width: 160px; 17 | text-align: left; 18 | } 19 | 20 | .daterangepicker .ranges .range_inputs>div { 21 | float: left; 22 | } 23 | 24 | .daterangepicker .ranges .range_inputs>div:nth-child(2) { 25 | padding-left: 11px; 26 | } 27 | 28 | .daterangepicker .calendar { 29 | display: none; 30 | max-width: 230px; 31 | } 32 | 33 | .daterangepicker .calendar th, .daterangepicker .calendar td { 34 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 35 | white-space: nowrap; 36 | text-align: center; 37 | } 38 | 39 | .daterangepicker .ranges label { 40 | color: #333; 41 | font-size: 11px; 42 | margin-bottom: 2px; 43 | text-transform: uppercase; 44 | text-shadow: 1px 1px 0 #fff; 45 | } 46 | 47 | .daterangepicker .ranges input { 48 | font-size: 11px; 49 | } 50 | 51 | .daterangepicker .ranges ul { 52 | list-style: none; 53 | margin: 0; 54 | padding: 0; 55 | } 56 | 57 | .daterangepicker .ranges li { 58 | font-size: 13px; 59 | background: #f5f5f5; 60 | border: 1px solid #f5f5f5; 61 | color: #08c; 62 | padding: 3px 12px; 63 | margin-bottom: 8px; 64 | -webkit-border-radius: 5px; 65 | -moz-border-radius: 5px; 66 | border-radius: 5px; 67 | cursor: pointer; 68 | } 69 | 70 | .daterangepicker .ranges li.active, .daterangepicker .ranges li:hover { 71 | background: #08c; 72 | border: 1px solid #08c; 73 | color: #fff; 74 | } 75 | 76 | .daterangepicker .calendar { 77 | border: 1px solid #ddd; 78 | padding: 4px; 79 | border-radius: 4px; 80 | background: #fff; 81 | } 82 | 83 | .daterangepicker { 84 | position: absolute; 85 | background: #fff; 86 | top: 100px; 87 | left: 20px; 88 | padding: 4px; 89 | margin-top: 1px; 90 | -webkit-border-radius: 4px; 91 | -moz-border-radius: 4px; 92 | border-radius: 4px; 93 | } 94 | 95 | .daterangepicker.opensleft:before { 96 | position: absolute; 97 | top: -7px; 98 | right: 9px; 99 | display: inline-block; 100 | border-right: 7px solid transparent; 101 | border-bottom: 7px solid #ccc; 102 | border-left: 7px solid transparent; 103 | border-bottom-color: rgba(0, 0, 0, 0.2); 104 | content: ''; 105 | } 106 | 107 | .daterangepicker.opensleft:after { 108 | position: absolute; 109 | top: -6px; 110 | right: 10px; 111 | display: inline-block; 112 | border-right: 6px solid transparent; 113 | border-bottom: 6px solid #fff; 114 | border-left: 6px solid transparent; 115 | content: ''; 116 | } 117 | 118 | .daterangepicker.opensright:before { 119 | position: absolute; 120 | top: -7px; 121 | left: 9px; 122 | display: inline-block; 123 | border-right: 7px solid transparent; 124 | border-bottom: 7px solid #ccc; 125 | border-left: 7px solid transparent; 126 | border-bottom-color: rgba(0, 0, 0, 0.2); 127 | content: ''; 128 | } 129 | 130 | .daterangepicker.opensright:after { 131 | position: absolute; 132 | top: -6px; 133 | left: 10px; 134 | display: inline-block; 135 | border-right: 6px solid transparent; 136 | border-bottom: 6px solid #fff; 137 | border-left: 6px solid transparent; 138 | content: ''; 139 | } 140 | 141 | .daterangepicker table { 142 | width: 100%; 143 | margin: 0; 144 | } 145 | 146 | .daterangepicker td, .daterangepicker th { 147 | text-align: center; 148 | width: 20px; 149 | height: 20px; 150 | -webkit-border-radius: 4px; 151 | -moz-border-radius: 4px; 152 | border-radius: 4px; 153 | cursor: pointer; 154 | white-space: nowrap; 155 | } 156 | 157 | .daterangepicker td.off { 158 | color: #999; 159 | } 160 | .daterangepicker td.disabled { 161 | color: #999; 162 | } 163 | 164 | .daterangepicker td.available:hover, .daterangepicker th.available:hover { 165 | background: #eee; 166 | } 167 | 168 | .daterangepicker td.active, .daterangepicker td.active:hover { 169 | background-color: #006dcc; 170 | background-image: -moz-linear-gradient(top, #0088cc, #0044cc); 171 | background-image: -ms-linear-gradient(top, #0088cc, #0044cc); 172 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); 173 | background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); 174 | background-image: -o-linear-gradient(top, #0088cc, #0044cc); 175 | background-image: linear-gradient(top, #0088cc, #0044cc); 176 | background-repeat: repeat-x; 177 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); 178 | border-color: #0044cc #0044cc #002a80; 179 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 180 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 181 | color: #fff; 182 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 183 | } 184 | 185 | .daterangepicker td.week, .daterangepicker th.week { 186 | font-size: 80%; 187 | color: #ccc; 188 | } 189 | -------------------------------------------------------------------------------- /staticfile/admin/css/rtl.css: -------------------------------------------------------------------------------- 1 | body { 2 | direction: rtl; 3 | } 4 | 5 | /* LOGIN */ 6 | 7 | .login .form-row { 8 | float: right; 9 | } 10 | 11 | .login .form-row label { 12 | float: right; 13 | padding-left: 0.5em; 14 | padding-right: 0; 15 | text-align: left; 16 | } 17 | 18 | .login .submit-row { 19 | clear: both; 20 | padding: 1em 9.4em 0 0; 21 | } 22 | 23 | /* GLOBAL */ 24 | 25 | th { 26 | text-align: right; 27 | } 28 | 29 | .module h2, .module caption { 30 | text-align: right; 31 | } 32 | 33 | .module ul, .module ol { 34 | margin-left: 0; 35 | margin-right: 1.5em; 36 | } 37 | 38 | .viewlink, .addlink, .changelink { 39 | padding-left: 0; 40 | padding-right: 16px; 41 | background-position: 100% 1px; 42 | } 43 | 44 | .deletelink { 45 | padding-left: 0; 46 | padding-right: 16px; 47 | background-position: 100% 1px; 48 | } 49 | 50 | .object-tools { 51 | float: left; 52 | } 53 | 54 | thead th:first-child, 55 | tfoot td:first-child { 56 | border-left: none; 57 | } 58 | 59 | /* LAYOUT */ 60 | 61 | #user-tools { 62 | right: auto; 63 | left: 0; 64 | text-align: left; 65 | } 66 | 67 | div.breadcrumbs { 68 | text-align: right; 69 | } 70 | 71 | #content-main { 72 | float: right; 73 | } 74 | 75 | #content-related { 76 | float: left; 77 | margin-left: -300px; 78 | margin-right: auto; 79 | } 80 | 81 | .colMS { 82 | margin-left: 300px; 83 | margin-right: 0; 84 | } 85 | 86 | /* SORTABLE TABLES */ 87 | 88 | table thead th.sorted .sortoptions { 89 | float: left; 90 | } 91 | 92 | thead th.sorted .text { 93 | padding-right: 0; 94 | padding-left: 42px; 95 | } 96 | 97 | /* dashboard styles */ 98 | 99 | .dashboard .module table td a { 100 | padding-left: .6em; 101 | padding-right: 16px; 102 | } 103 | 104 | /* changelists styles */ 105 | 106 | .change-list .filtered table { 107 | border-left: none; 108 | border-right: 0px none; 109 | } 110 | 111 | #changelist-filter { 112 | right: auto; 113 | left: 0; 114 | border-left: none; 115 | border-right: none; 116 | } 117 | 118 | .change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { 119 | margin-right: 0; 120 | margin-left: 280px; 121 | } 122 | 123 | #changelist-filter li.selected { 124 | border-left: none; 125 | padding-left: 10px; 126 | margin-left: 0; 127 | border-right: 5px solid #eaeaea; 128 | padding-right: 10px; 129 | margin-right: -15px; 130 | } 131 | 132 | .filtered .actions { 133 | margin-left: 280px; 134 | margin-right: 0; 135 | } 136 | 137 | #changelist table tbody td:first-child, #changelist table tbody th:first-child { 138 | border-right: none; 139 | border-left: none; 140 | } 141 | 142 | /* FORMS */ 143 | 144 | .aligned label { 145 | padding: 0 0 3px 1em; 146 | float: right; 147 | } 148 | 149 | .submit-row { 150 | text-align: left 151 | } 152 | 153 | .submit-row p.deletelink-box { 154 | float: right; 155 | } 156 | 157 | .submit-row input.default { 158 | margin-left: 0; 159 | } 160 | 161 | .vDateField, .vTimeField { 162 | margin-left: 2px; 163 | } 164 | 165 | .aligned .form-row input { 166 | margin-left: 5px; 167 | } 168 | 169 | form .aligned p.help, form .aligned div.help { 170 | clear: right; 171 | } 172 | 173 | form .aligned ul { 174 | margin-right: 163px; 175 | margin-left: 0; 176 | } 177 | 178 | form ul.inline li { 179 | float: right; 180 | padding-right: 0; 181 | padding-left: 7px; 182 | } 183 | 184 | input[type=submit].default, .submit-row input.default { 185 | float: left; 186 | } 187 | 188 | fieldset .fieldBox { 189 | float: right; 190 | margin-left: 20px; 191 | margin-right: 0; 192 | } 193 | 194 | .errorlist li { 195 | background-position: 100% 12px; 196 | padding: 0; 197 | } 198 | 199 | .errornote { 200 | background-position: 100% 12px; 201 | padding: 10px 12px; 202 | } 203 | 204 | /* WIDGETS */ 205 | 206 | .calendarnav-previous { 207 | top: 0; 208 | left: auto; 209 | right: 10px; 210 | } 211 | 212 | .calendarnav-next { 213 | top: 0; 214 | right: auto; 215 | left: 10px; 216 | } 217 | 218 | .calendar caption, .calendarbox h2 { 219 | text-align: center; 220 | } 221 | 222 | .selector { 223 | float: right; 224 | } 225 | 226 | .selector .selector-filter { 227 | text-align: right; 228 | } 229 | 230 | .inline-deletelink { 231 | float: left; 232 | } 233 | 234 | form .form-row p.datetime { 235 | overflow: hidden; 236 | } 237 | 238 | .related-widget-wrapper { 239 | float: right; 240 | } 241 | 242 | /* MISC */ 243 | 244 | .inline-related h2, .inline-group h2 { 245 | text-align: right 246 | } 247 | 248 | .inline-related h3 span.delete { 249 | padding-right: 20px; 250 | padding-left: inherit; 251 | left: 10px; 252 | right: inherit; 253 | float:left; 254 | } 255 | 256 | .inline-related h3 span.delete label { 257 | margin-left: inherit; 258 | margin-right: 2px; 259 | } 260 | 261 | /* IE7 specific bug fixes */ 262 | 263 | div.colM { 264 | position: relative; 265 | } 266 | 267 | .submit-row input { 268 | float: left; 269 | } 270 | -------------------------------------------------------------------------------- /apps/logcat/views.py: -------------------------------------------------------------------------------- 1 | import datetime 2 | from django.shortcuts import render 3 | from apps.host.models import Host 4 | from django.contrib.auth.models import User 5 | from django.contrib.auth.decorators import login_required 6 | # Create your views here. 7 | 8 | @login_required 9 | def system(request): 10 | """系统信息""" 11 | host = [] 12 | username = User.objects.get(username=request.user.username) 13 | hosts = Host.objects.filter(Auther=username) 14 | for h in hosts: 15 | sys = h.system_info.all() 16 | host.append(sys) 17 | mesnum = inbox(request) 18 | return render(request, 'system_table.html', locals()) 19 | 20 | @login_required 21 | def version(request): 22 | """系统版本""" 23 | os = [] 24 | username = User.objects.get(username=request.user.username) 25 | hosts = Host.objects.filter(Auther=username) 26 | for h in hosts: 27 | sys = h.os_version.all() 28 | os.append(sys) 29 | mesnum = inbox(request) 30 | return render(request, 'version_table.html', locals()) 31 | 32 | @login_required 33 | def memory(request): 34 | """内存信息""" 35 | memory = [] 36 | username = User.objects.get(username=request.user.username) 37 | hosts = Host.objects.filter(Auther=username) 38 | for h in hosts: 39 | sys = h.memory_info.all() 40 | memory.append(sys) 41 | mesnum = inbox(request) 42 | return render(request, 'memory_table.html', locals()) 43 | 44 | @login_required 45 | def user(request): 46 | """主机用户""" 47 | user = [] 48 | username = User.objects.get(username=request.user.username) 49 | hosts = Host.objects.filter(Auther=username) 50 | for h in hosts: 51 | sys = h.log_user.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 52 | user.append(sys) 53 | mesnum = inbox(request) 54 | return render(request, 'user_table.html', locals()) 55 | 56 | @login_required 57 | def processes(request): 58 | """主机进程""" 59 | processes = [] 60 | username = User.objects.get(username=request.user.username) 61 | hosts = Host.objects.filter(Auther=username) 62 | for h in hosts: 63 | sys = h.processes.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 64 | processes.append(sys) 65 | mesnum = inbox(request) 66 | return render(request, 'processes_table.html', locals()) 67 | 68 | @login_required 69 | def crontab(request): 70 | """定时任务""" 71 | crontab = [] 72 | username = User.objects.get(username=request.user.username) 73 | hosts = Host.objects.filter(Auther=username) 74 | for h in hosts: 75 | sys = h.crontab.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 76 | crontab.append(sys) 77 | mesnum = inbox(request) 78 | return render(request, 'crontab_table.html', locals()) 79 | 80 | @login_required 81 | def hidden(request): 82 | """隐藏文件""" 83 | hidden = [] 84 | username = User.objects.get(username=request.user.username) 85 | hosts = Host.objects.filter(Auther=username) 86 | for h in hosts: 87 | sys = h.hidden.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 88 | hidden.append(sys) 89 | mesnum = inbox(request) 90 | return render(request, 'hidden_table.html', locals()) 91 | 92 | @login_required 93 | def shell_tty(request): 94 | """shell连接""" 95 | shell = [] 96 | username = User.objects.get(username=request.user.username) 97 | hosts = Host.objects.filter(Auther=username) 98 | for h in hosts: 99 | sys = h.shell_tty.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 100 | shell.append(sys) 101 | mesnum = inbox(request) 102 | return render(request, 'shell_table.html', locals()) 103 | 104 | @login_required 105 | def open_port(request): 106 | """端口开放""" 107 | open = [] 108 | username = User.objects.get(username=request.user.username) 109 | hosts = Host.objects.filter(Auther=username) 110 | for h in hosts: 111 | sys = h.open_port.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 112 | open.append(sys) 113 | mesnum = inbox(request) 114 | return render(request, 'port_table.html', locals()) 115 | 116 | @login_required 117 | def bean_shell(request): 118 | """反弹shell""" 119 | bean = [] 120 | username = User.objects.get(username=request.user.username) 121 | hosts = Host.objects.filter(Auther=username) 122 | for h in hosts: 123 | sys = h.bean_shell.filter(time__gt=datetime.datetime.now()-datetime.timedelta(days=7)) 124 | bean.append(sys) 125 | mesnum = inbox(request) 126 | return render(request, 'bean_table.html', locals()) 127 | 128 | @login_required 129 | def inbox(request): 130 | """消息流""" 131 | username = User.objects.get(username=request.user.username) 132 | hosts = Host.objects.filter(Auther=username) 133 | mesnum = 0 134 | for h in hosts: 135 | num = h.log_user.filter(active=0).count() 136 | num = h.processes.filter(active=0).count() + num 137 | num = h.crontab.filter(active=0).count() + num 138 | num = h.hidden.filter(active=0).count() + num 139 | num = h.shell_tty.filter(active=0).count() + num 140 | num = h.open_port.filter(active=0).count() + num 141 | num = h.bean_shell.filter(active=0).count() + num 142 | num = h.file.filter(active=0).count() + num 143 | mesnum = mesnum + num 144 | return mesnum -------------------------------------------------------------------------------- /staticfile/admin/js/inlines.min.js: -------------------------------------------------------------------------------- 1 | var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,d,a){b instanceof String&&(b=String(b));for(var c=b.length,f=0;f'+a.addText+""),l=d.find("tr:last a")):(c.filter(":last").after('"),l=c.filter(":last").next().find("a")));l.on("click",function(d){d.preventDefault();d=b("#"+a.prefix+"-empty"); 6 | var c=d.clone(!0);c.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",a.prefix+"-"+h);c.is("tr")?c.children(":last").append('"):c.is("ul")||c.is("ol")?c.append('
  • '+a.deleteText+"
  • "):c.children(":first").append(''+a.deleteText+"");c.find("*").each(function(){f(this,a.prefix,g.val())});c.insertBefore(b(d)); 7 | b(g).val(parseInt(g.val(),10)+1);h+=1;""!==e.val()&&0>=e.val()-g.val()&&l.parent().hide();c.find("a."+a.deleteCssClass).on("click",function(d){d.preventDefault();c.remove();--h;a.removed&&a.removed(c);b(document).trigger("formset:removed",[c,a.prefix]);d=b("."+a.formCssClass);b("#id_"+a.prefix+"-TOTAL_FORMS").val(d.length);(""===e.val()||0 tr",b(d).tabularFormset(d,a.options)}})})})(django.jQuery); 14 | --------------------------------------------------------------------------------