├── __init__.py ├── scripts └── __init__.py ├── utils ├── __init__.py └── utils.py ├── static ├── .DS_Store ├── img │ ├── qq.png │ ├── .DS_Store │ ├── logo.png │ ├── favicon.ico │ └── shortcut.png ├── sb-admin-2 │ ├── vendor │ │ ├── font-awesome │ │ │ ├── less │ │ │ │ ├── extras.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── screen-reader.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── core.less │ │ │ │ ├── stacked.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── spinning.less │ │ │ │ ├── path.less │ │ │ │ ├── animated.less │ │ │ │ └── mixins.less │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── font-awesome.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _spinning.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _extras.scss │ │ │ │ └── _mixins.scss │ │ │ └── HELP-US-OUT.txt │ │ ├── datatables │ │ │ ├── images │ │ │ │ ├── favicon.ico │ │ │ │ ├── sort_asc.png │ │ │ │ ├── sort_both.png │ │ │ │ ├── sort_desc.png │ │ │ │ ├── Sorting icons.psd │ │ │ │ ├── sort_asc_disabled.png │ │ │ │ └── sort_desc_disabled.png │ │ │ ├── js │ │ │ │ ├── dataTables.bootstrap.min.js │ │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ │ ├── dataTables.foundation.min.js │ │ │ │ ├── dataTables.material.min.js │ │ │ │ ├── dataTables.semanticui.min.js │ │ │ │ ├── dataTables.uikit.min.js │ │ │ │ └── dataTables.jqueryui.min.js │ │ │ └── css │ │ │ │ ├── dataTables.material.min.css │ │ │ │ ├── dataTables.foundation.min.css │ │ │ │ ├── dataTables.semanticui.min.css │ │ │ │ ├── dataTables.material.css │ │ │ │ ├── dataTables.uikit.min.css │ │ │ │ ├── dataTables.semanticui.css │ │ │ │ └── dataTables.foundation.css │ │ ├── bootstrap │ │ │ └── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── morrisjs │ │ │ └── morris.css │ │ ├── metisMenu │ │ │ ├── metisMenu.min.css │ │ │ ├── metisMenu.css │ │ │ └── metisMenu.min.js │ │ ├── datatables-plugins │ │ │ └── dataTables.bootstrap.min.js │ │ ├── flot │ │ │ ├── jquery.flot.symbol.js │ │ │ └── jquery.flot.resize.js │ │ └── datatables-responsive │ │ │ └── dataTables.responsive.scss │ └── dist │ │ └── js │ │ ├── sb-admin-2.min.js │ │ └── sb-admin-2.js ├── bootstrap-tagsinput-latest │ └── dist │ │ ├── bootstrap-tagsinput.zip │ │ ├── bootstrap-tagsinput.less │ │ ├── bootstrap-tagsinput-angular.min.js │ │ ├── bootstrap-tagsinput.css │ │ ├── bootstrap-tagsinput-angular.min.js.map │ │ └── bootstrap-tagsinput-angular.js ├── bootstrap-datetimepicker │ └── js │ │ └── locales │ │ └── bootstrap-datetimepicker.zh-CN.js ├── bootstrap-select-1.13.1 │ └── dist │ │ └── js │ │ └── i18n │ │ ├── defaults-zh_CN.min.js │ │ ├── defaults-zh_TW.min.js │ │ ├── defaults-ja_JP.min.js │ │ ├── defaults-ko_KR.min.js │ │ ├── defaults-id_ID.min.js │ │ ├── defaults-cs_CZ.min.js │ │ ├── defaults-fa_IR.min.js │ │ ├── defaults-hu_HU.min.js │ │ ├── defaults-vi_VN.min.js │ │ ├── defaults-sl_SI.min.js │ │ ├── defaults-ua_UA.min.js │ │ ├── defaults-pt_BR.min.js │ │ ├── defaults-es_CL.min.js │ │ ├── defaults-es_ES.min.js │ │ ├── defaults-eu.min.js │ │ ├── defaults-nl_NL.min.js │ │ ├── defaults-pl_PL.min.js │ │ ├── defaults-et_EE.min.js │ │ ├── defaults-pt_PT.min.js │ │ ├── defaults-sk_SK.min.js │ │ ├── defaults-fi_FI.min.js │ │ ├── defaults-ru_RU.min.js │ │ ├── defaults-nb_NO.min.js │ │ ├── defaults-sv_SE.min.js │ │ ├── defaults-ro_RO.min.js │ │ ├── defaults-it_IT.min.js │ │ ├── defaults-tr_TR.min.js │ │ ├── defaults-da_DK.min.js │ │ ├── defaults-en_US.min.js │ │ ├── defaults-kh_KM.min.js │ │ ├── defaults-de_DE.min.js │ │ ├── defaults-fr_FR.min.js │ │ ├── defaults-bg_BG.min.js │ │ ├── defaults-hr_HR.min.js │ │ ├── defaults-lt_LT.min.js │ │ ├── defaults-ar_AR.min.js │ │ ├── defaults-zh_CN.js │ │ ├── defaults-zh_TW.js │ │ ├── defaults-ja_JP.js │ │ ├── defaults-id_ID.js │ │ ├── defaults-cs_CZ.js │ │ ├── defaults-pt_PT.js │ │ ├── defaults-ua_UA.js │ │ ├── defaults-es_CL.js │ │ ├── defaults-es_ES.js │ │ ├── defaults-eu.js │ │ ├── defaults-pt_BR.js │ │ ├── defaults-fa_IR.js │ │ ├── defaults-nl_NL.js │ │ ├── defaults-pl_PL.js │ │ ├── defaults-sk_SK.js │ │ ├── defaults-ru_RU.js │ │ ├── defaults-ko_KR.js │ │ ├── defaults-ro_RO.js │ │ ├── defaults-sl_SI.js │ │ ├── defaults-vi_VN.js │ │ ├── defaults-hu_HU.js │ │ ├── defaults-it_IT.js │ │ ├── defaults-et_EE.js │ │ ├── defaults-sv_SE.js │ │ ├── defaults-en_US.js │ │ ├── defaults-da_DK.js │ │ ├── defaults-fi_FI.js │ │ ├── defaults-nb_NO.js │ │ ├── defaults-kh_KM.js │ │ ├── defaults-tr_TR.js │ │ ├── defaults-de_DE.js │ │ ├── defaults-fr_FR.js │ │ ├── defaults-bg_BG.js │ │ ├── defaults-hr_HR.js │ │ ├── defaults-lt_LT.js │ │ └── defaults-ar_AR.js └── bootstrap-table │ └── dist │ └── bootstrap-table-zh-CN.js ├── .gitignore ├── handlers ├── __init__.py ├── html.py ├── history.py ├── logout.py ├── dashboard.py ├── profile.py ├── monitor_report.py ├── host_logfile.py ├── match_regex.py ├── auditlog.py └── path.py ├── requirements.txt ├── .gitattributes ├── LICENSE ├── urls.py ├── start.py ├── settings.py ├── templates └── auditlog.html └── tables.sql /__init__.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/5/5. 2 | 3 | -------------------------------------------------------------------------------- /scripts/__init__.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/6/19. -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2019/6/25. 2 | 3 | -------------------------------------------------------------------------------- /static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/.DS_Store -------------------------------------------------------------------------------- /static/img/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/img/qq.png -------------------------------------------------------------------------------- /static/img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/img/.DS_Store -------------------------------------------------------------------------------- /static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/img/logo.png -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/shortcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/img/shortcut.png -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/extras.less: -------------------------------------------------------------------------------- 1 | // Extras 2 | // -------------------------- 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | __pycache__ 3 | *.DS_Store 4 | *.idea 5 | static/sb-admin-2/pages 6 | scripts/monitors.py -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/favicon.ico -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/sort_asc.png -------------------------------------------------------------------------------- /handlers/__init__.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/5/5. 2 | import os 3 | import sys 4 | sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/sort_both.png -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/sort_desc.png -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/Sorting icons.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/Sorting icons.psd -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/bootstrap-tagsinput-latest/dist/bootstrap-tagsinput.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/bootstrap-tagsinput-latest/dist/bootstrap-tagsinput.zip -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/datatables/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyMySQL==0.7.11 2 | tornado==5.0.2 3 | urllib3==1.22 4 | requests==2.18.4 5 | paramiko==2.4.1 6 | Jinja2==2.9.6 7 | pyldap==2.4.37 8 | gevent==1.3.4 9 | APScheduler==3.5.1 -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olajowon/loggrove/HEAD/static/sb-admin-2/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | static/bootstrap-datetimepicker/* linguist-vendored 2 | static/bootstrap-select-1.13.1/* linguist-vendored 3 | static/bootstrap-table/* linguist-vendored 4 | static/highcharts-6.1.0/* linguist-vendored 5 | static/img/* linguist-vendored 6 | static/sb-admin-2/* linguist-vendored 7 | templates/* linguist-vendored -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/morrisjs/morris.css: -------------------------------------------------------------------------------- 1 | .morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0} 2 | .morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0} 3 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /static/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Simplified Chinese translation for bootstrap-datetimepicker 3 | * Yuan Cheung 4 | */ 5 | ;(function($){ 6 | $.fn.datetimepicker.dates['zh-CN'] = { 7 | days: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"], 8 | daysShort: ["周日", "周一", "周二", "周三", "周四", "周五", "周六", "周日"], 9 | daysMin: ["日", "一", "二", "三", "四", "五", "六", "日"], 10 | months: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], 11 | monthsShort: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], 12 | today: "今天", 13 | suffix: [], 14 | meridiem: ["上午", "下午"] 15 | }; 16 | }(jQuery)); 17 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-zh_CN.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"没有选中任何项",noneResultsText:"没有找到匹配项",countSelectedText:"选中{1}中的{0}项",maxOptionsText:["超出限制 (最多选择{n}项)","组选择超出限制(最多选择{n}组)"],multipleSeparator:", ",selectAllText:"全选",deselectAllText:"取消全选"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-zh_TW.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"沒有選取任何項目",noneResultsText:"沒有找到符合的結果",countSelectedText:"已經選取{0}個項目",maxOptionsText:["超過限制 (最多選擇{n}項)","超過限制(最多選擇{n}組)"],selectAllText:"選取全部",deselectAllText:"全部取消",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | @-webkit-keyframes fa-spin { 10 | 0% { 11 | -webkit-transform: rotate(0deg); 12 | transform: rotate(0deg); 13 | } 14 | 100% { 15 | -webkit-transform: rotate(359deg); 16 | transform: rotate(359deg); 17 | } 18 | } 19 | 20 | @keyframes fa-spin { 21 | 0% { 22 | -webkit-transform: rotate(0deg); 23 | transform: rotate(0deg); 24 | } 25 | 100% { 26 | -webkit-transform: rotate(359deg); 27 | transform: rotate(359deg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | @-webkit-keyframes fa-spin { 10 | 0% { 11 | -webkit-transform: rotate(0deg); 12 | transform: rotate(0deg); 13 | } 14 | 100% { 15 | -webkit-transform: rotate(359deg); 16 | transform: rotate(359deg); 17 | } 18 | } 19 | 20 | @keyframes fa-spin { 21 | 0% { 22 | -webkit-transform: rotate(0deg); 23 | transform: rotate(0deg); 24 | } 25 | 100% { 26 | -webkit-transform: rotate(359deg); 27 | transform: rotate(359deg); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ja_JP.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"何もが選択した",noneResultsText:"'{0}'が結果を返さない",countSelectedText:"{0}/{1}が選択した",maxOptionsText:["限界は達した({n}{var}最大)","限界をグループは達した({n}{var}最大)",["アイテム","アイテム"]],selectAllText:"全部を選択する",deselectAllText:"何も選択しない",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /handlers/html.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/5/17. 2 | 3 | from .base import permission, BaseRequestHandler 4 | 5 | 6 | class Handler(BaseRequestHandler): 7 | @permission() 8 | def get(self, uri=None): 9 | html_map = dict( 10 | logfiles='logfile.html', 11 | read='read.html', 12 | keepread='keepread.html', 13 | charts='chart.html', 14 | auditlogs='auditlog.html', 15 | users='user.html' 16 | ) 17 | html = html_map.get(uri) if uri else 'dashboard.html' 18 | self.render(html, **{'requser': self.requser}) 19 | 20 | 21 | class LoginHander(BaseRequestHandler): 22 | def get(self): 23 | next_uri = self.get_argument('next', '/') 24 | self.render('login.html', **{'next': next_uri}) 25 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ko_KR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"항목을 선택해주세요",noneResultsText:"{0} 검색 결과가 없습니다",countSelectedText:function(a,b){return"{0}개를 선택하였습니다"},maxOptionsText:function(a,b){return["{n}개까지 선택 가능합니다","해당 그룹은 {n}개까지 선택 가능합니다"]},selectAllText:"전체선택",deselectAllText:"전체해제",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /handlers/history.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/6/8. 2 | 3 | from .base import BaseRequestHandler, permission 4 | 5 | class Handler(BaseRequestHandler): 6 | @permission() 7 | def get(self): 8 | response_data = self._query() 9 | self._write(response_data) 10 | 11 | def _query(self): 12 | self.cursor.execute(self.select_sql, self.requser['id']) 13 | results = self.cursor.dictfetchall() 14 | return dict(code=200, msg='Query Successful', data=results) 15 | 16 | select_sql = ''' 17 | SELECT 18 | uri, 19 | method, 20 | date_format(record_time, "%%Y-%%m-%%d %%H:%%i:%%s") as record_time 21 | FROM 22 | auditlog 23 | WHERE 24 | user_id=%s 25 | ORDER BY -record_time 26 | LIMIT 100 27 | ''' -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-id_ID.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Tidak ada yang dipilih",noneResultsText:"Tidak ada yang cocok {0}",countSelectedText:"{0} terpilih",maxOptionsText:["Mencapai batas (maksimum {n})","Mencapai batas grup (maksimum {n})"],selectAllText:"Pilih Semua",deselectAllText:"Hapus Semua",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/metisMenu/metisMenu.min.css: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.1.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumus 7 | * Under MIT License 8 | */ 9 | 10 | .arrow{float:right;line-height:1.42857}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"} -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-cs_CZ.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic není vybráno",noneResultsText:"Žádné výsledky {0}",countSelectedText:"Označeno {0} z {1}",maxOptionsText:["Limit překročen ({n} {var} max)","Limit skupiny překročen ({n} {var} max)",["položek","položka"]],multipleSeparator:", ",selectAllText:"Vybrat Vše",deselectAllText:"Odznačit Vše"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-fa_IR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"چیزی انتخاب نشده است",noneResultsText:"هیج مشابهی برای {0} پیدا نشد",countSelectedText:"{0} از {1} مورد انتخاب شده",maxOptionsText:["بیشتر ممکن نیست {حداکثر {n} عدد}","بیشتر ممکن نیست {حداکثر {n} عدد}"],selectAllText:"انتخاب همه",deselectAllText:"انتخاب هیچ کدام",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-hu_HU.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Válasszon!",noneResultsText:"Nincs találat {0}",countSelectedText:function(a,b){return"{0} elem kiválasztva"},maxOptionsText:function(a,b){return["Legfeljebb {n} elem választható","A csoportban legfeljebb {n} elem választható"]},selectAllText:"Mind",deselectAllText:"Egyik sem",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-vi_VN.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Chưa chọn",noneResultsText:"Không có kết quả cho {0}",countSelectedText:function(a,b){return"{0} mục đã chọn"},maxOptionsText:function(a,b){return["Không thể chọn (giới hạn {n} mục)","Không thể chọn (giới hạn {n} mục)"]},selectAllText:"Chọn tất cả",deselectAllText:"Bỏ chọn",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-sl_SI.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nič izbranega",noneResultsText:"Ni zadetkov za {0}",countSelectedText:"{0} od {1} izbranih",maxOptionsText:function(a,b){return["Omejitev dosežena (max. izbranih: {n})","Omejitev skupine dosežena (max. izbranih: {n})"]},selectAllText:"Izberi vse",deselectAllText:"Počisti izbor",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ua_UA.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нічого не вибрано",noneResultsText:"Збігів не знайдено {0}",countSelectedText:"Вибрано {0} із {1}",maxOptionsText:["Досягнута межа ({n} {var} максимум)","Досягнута межа в групі ({n} {var} максимум)",["items","item"]],multipleSeparator:", ",selectAllText:"Вибрати все",deselectAllText:"Скасувати вибір усі"}}(a)}); -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-pt_BR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo {0}",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (máx. {n} {var})","Limite do grupo excedido (máx. {n} {var})",["itens","item"]],multipleSeparator:", ",selectAllText:"Selecionar Todos",deselectAllText:"Desmarcar Todos"}}(a)}); -------------------------------------------------------------------------------- /static/sb-admin-2/dist/js/sb-admin-2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){var i=50,n=this.window.innerWidth>0?this.window.innerWidth:this.screen.width;n<768?($("div.navbar-collapse").addClass("collapse"),i=100):$("div.navbar-collapse").removeClass("collapse");var e=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1;e-=i,e<1&&(e=1),e>i&&$("#page-wrapper").css("min-height",e+"px")});for(var i=window.location,n=$("ul.nav a").filter(function(){return this.href==i}).addClass("active").parent();;){if(!n.is("li"))break;n=n.parent().addClass("in").parent()}}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-es_CL.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"No hay selección",noneResultsText:"No hay resultados {0}",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],multipleSeparator:", ",selectAllText:"Seleccionar Todos",deselectAllText:"Desmarcar Todos"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-es_ES.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"No hay selección",noneResultsText:"No hay resultados {0}",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],multipleSeparator:", ",selectAllText:"Seleccionar Todos",deselectAllText:"Desmarcar Todos"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-eu.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hautapenik ez",noneResultsText:"Emaitzarik ez {0}",countSelectedText:"{1}(e)tik {0} hautatuta",maxOptionsText:["Mugara iritsita ({n} {var} gehienez)","Taldearen mugara iritsita ({n} {var} gehienez)",["elementu","elementu"]],multipleSeparator:", ",selectAllText:"Hautatu Guztiak",deselectAllText:"Desautatu Guztiak"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-nl_NL.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Niets geselecteerd",noneResultsText:"Geen resultaten gevonden voor {0}",countSelectedText:"{0} van {1} geselecteerd",maxOptionsText:["Limiet bereikt ({n} {var} max)","Groep limiet bereikt ({n} {var} max)",["items","item"]],selectAllText:"Alles selecteren",deselectAllText:"Alles deselecteren",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-pl_PL.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic nie zaznaczono",noneResultsText:"Brak wyników wyszukiwania {0}",countSelectedText:"Zaznaczono {0} z {1}",maxOptionsText:["Osiągnięto limit ({n} {var} max)","Limit grupy osiągnięty ({n} {var} max)",["elementy","element"]],selectAllText:"Zaznacz wszystkie",deselectAllText:"Odznacz wszystkie",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-et_EE.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Valikut pole tehtud",noneResultsText:"Otsingule {0} ei ole vasteid",countSelectedText:function(a,b){return 1==a?"{0} item selected":"{0} items selected"},maxOptionsText:function(a,b){return["Limiit on {n} max","Globaalne limiit on {n} max"]},selectAllText:"Vali kõik",deselectAllText:"Tühista kõik",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-pt_PT.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nenhum seleccionado",noneResultsText:"Sem resultados contendo {0}",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite ultrapassado (máx. {n} {var})","Limite de seleções ultrapassado (máx. {n} {var})",["itens","item"]],multipleSeparator:", ",selectAllText:"Selecionar Tudo",deselectAllText:"Desmarcar Todos"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-sk_SK.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Vyberte zo zoznamu",noneResultsText:"Pre výraz {0} neboli nájdené žiadne výsledky",countSelectedText:"Vybrané {0} z {1}",maxOptionsText:["Limit prekročený ({n} {var} max)","Limit skupiny prekročený ({n} {var} max)",["položiek","položka"]],selectAllText:"Vybrať všetky",deselectAllText:"Zrušiť výber",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-fi_FI.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ei valintoja",noneResultsText:"Ei hakutuloksia {0}",countSelectedText:function(a,b){return 1==a?"{0} valittu":"{0} valitut"},maxOptionsText:function(a,b){return["Valintojen maksimimäärä ({n} saavutettu)","Ryhmän maksimimäärä ({n} saavutettu)"]},selectAllText:"Valitse kaikki",deselectAllText:"Poista kaikki",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ru_RU.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ничего не выбрано",noneResultsText:"Совпадений не найдено {0}",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["Достигнут предел ({n} {var} максимум)","Достигнут предел в группе ({n} {var} максимум)",["шт.","шт."]],doneButtonText:"Закрыть",selectAllText:"Выбрать все",deselectAllText:"Отменить все",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-nb_NO.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ingen valgt",noneResultsText:"Søket gir ingen treff {0}",countSelectedText:function(a,b){return 1==a?"{0} alternativ valgt":"{0} alternativer valgt"},maxOptionsText:function(a,b){return["Grense nådd (maks {n} valg)","Grense for grupper nådd (maks {n} grupper)"]},selectAllText:"Merk alle",deselectAllText:"Fjern alle",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /handlers/logout.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/6/4. 2 | 3 | from .base import BaseRequestHandler 4 | import logging 5 | 6 | logger = logging.getLogger() 7 | 8 | 9 | class Handler(BaseRequestHandler): 10 | def post(self): 11 | response_data = self.logout() 12 | self._write(response_data) 13 | 14 | def logout(self): 15 | if self.session: 16 | try: 17 | with self.transaction(): 18 | self.cursor.execute(self.delete_session_sql, self.session.get('session_id')) 19 | except Exception as e: 20 | logger.error('Logout failed: %s' % str(e)) 21 | return dict(code=500, msg='Logout failed') 22 | if self.session_id: 23 | self.clear_cookie('session_id') 24 | return dict(code=200, msg='Logout successful') 25 | 26 | delete_session_sql = 'DELETE FROM session WHERE session_id=%s' -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-sv_SE.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Inget valt",noneResultsText:"Inget sökresultat matchar {0}",countSelectedText:function(a,b){return 1===a?"{0} alternativ valt":"{0} alternativ valda"},maxOptionsText:function(a,b){return["Gräns uppnåd (max {n} alternativ)","Gräns uppnåd (max {n} gruppalternativ)"]},selectAllText:"Markera alla",deselectAllText:"Avmarkera alla",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ro_RO.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={doneButtonText:"Închide",noneSelectedText:"Nu a fost selectat nimic",noneResultsText:"Nu există niciun rezultat {0}",countSelectedText:"{0} din {1} selectat(e)",maxOptionsText:["Limita a fost atinsă ({n} {var} max)","Limita de grup a fost atinsă ({n} {var} max)",["iteme","item"]],selectAllText:"Selectează toate",deselectAllText:"Deselectează toate",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-it_IT.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nessuna selezione",noneResultsText:"Nessun risultato per {0}",countSelectedText:function(a,b){return 1==a?"Selezionato {0} di {1}":"Selezionati {0} di {1}"},maxOptionsText:["Limite raggiunto ({n} {var} max)","Limite del gruppo raggiunto ({n} {var} max)",["elementi","elemento"]],multipleSeparator:", ",selectAllText:"Seleziona Tutto",deselectAllText:"Deseleziona Tutto"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-tr_TR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hiçbiri seçilmedi",noneResultsText:"Hiçbir sonuç bulunamadı {0}",countSelectedText:function(a,b){return"{0} öğe seçildi"},maxOptionsText:function(a,b){return[1==a?"Limit aşıldı (maksimum {n} sayıda öğe )":"Limit aşıldı (maksimum {n} sayıda öğe)","Grup limiti aşıldı (maksimum {n} sayıda öğe)"]},selectAllText:"Tümünü Seç",deselectAllText:"Seçiniz",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-da_DK.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Intet valgt",noneResultsText:"Ingen resultater fundet {0}",countSelectedText:function(a,b){return"{0} valgt"},maxOptionsText:function(a,b){return[1==a?"Begrænsning nået (max {n} valgt)":"Begrænsning nået (max {n} valgte)",1==b?"Gruppe-begrænsning nået (max {n} valgt)":"Gruppe-begrænsning nået (max {n} valgte)"]},selectAllText:"Markér alle",deselectAllText:"Afmarkér alle",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-en_US.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nothing selected",noneResultsText:"No results match {0}",countSelectedText:function(a,b){return 1==a?"{0} item selected":"{0} items selected"},maxOptionsText:function(a,b){return[1==a?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==b?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-kh_KM.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"មិនមានអ្វីបានជ្រើសរើស",noneResultsText:"មិនមានលទ្ធផល {0}",countSelectedText:function(a,b){return"{0} ធាតុដែលបានជ្រើស"},maxOptionsText:function(a,b){return[1==a?"ឈានដល់ដែនកំណត់ ( {n} ធាតុអតិបរមា)":"អតិបរមាឈានដល់ដែនកំណត់ ( {n} ធាតុ)",1==b?"ដែនកំណត់ក្រុមឈានដល់ ( {n} អតិបរមាធាតុ)":"អតិបរមាក្រុមឈានដល់ដែនកំណត់ ( {n} ធាតុ)"]},selectAllText:"ជ្រើស​យក​ទាំងអស់",deselectAllText:"មិនជ្រើស​យក​ទាំងអស",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-de_DE.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Bitte wählen...",noneResultsText:"Keine Ergebnisse für {0}",countSelectedText:function(a,b){return 1==a?"{0} Element ausgewählt":"{0} Elemente ausgewählt"},maxOptionsText:function(a,b){return[1==a?"Limit erreicht ({n} Element max.)":"Limit erreicht ({n} Elemente max.)",1==b?"Gruppen-Limit erreicht ({n} Element max.)":"Gruppen-Limit erreicht ({n} Elemente max.)"]},selectAllText:"Alles auswählen",deselectAllText:"Nichts auswählen",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-fr_FR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Aucune sélection",noneResultsText:"Aucun résultat pour {0}",countSelectedText:function(a,b){return a>1?"{0} éléments sélectionnés":"{0} élément sélectionné"},maxOptionsText:function(a,b){return[a>1?"Limite atteinte ({n} éléments max)":"Limite atteinte ({n} élément max)",b>1?"Limite du groupe atteinte ({n} éléments max)":"Limite du groupe atteinte ({n} élément max)"]},multipleSeparator:", ",selectAllText:"Tout sélectionner",deselectAllText:"Tout désélectionner"}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-bg_BG.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нищо избрано",noneResultsText:"Няма резултат за {0}",countSelectedText:function(a,b){return 1==a?"{0} избран елемент":"{0} избрани елемента"},maxOptionsText:function(a,b){return[1==a?"Лимита е достигнат ({n} елемент максимум)":"Лимита е достигнат ({n} елемента максимум)",1==b?"Груповия лимит е достигнат ({n} елемент максимум)":"Груповия лимит е достигнат ({n} елемента максимум)"]},selectAllText:"Избери всички",deselectAllText:"Размаркирай всички",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-hr_HR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Odaberite stavku",noneResultsText:"Nema rezultata pretrage {0}",countSelectedText:function(a,b){return 1==a?"{0} stavka selektirana":"{0} stavke selektirane"},maxOptionsText:function(a,b){return[1==a?"Limit je postignut ({n} stvar maximalno)":"Limit je postignut ({n} stavke maksimalno)",1==b?"Grupni limit je postignut ({n} stvar maksimalno)":"Grupni limit je postignut ({n} stavke maksimalno)"]},selectAllText:"Selektiraj sve",deselectAllText:"Deselektiraj sve",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-lt_LT.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Niekas nepasirinkta",noneResultsText:"Niekas nesutapo su {0}",countSelectedText:function(a,b){return 1==a?"{0} elementas pasirinktas":"{0} elementai(-ų) pasirinkta"},maxOptionsText:function(a,b){return[1==a?"Pasiekta riba ({n} elementas daugiausiai)":"Riba pasiekta ({n} elementai(-ų) daugiausiai)",1==b?"Grupės riba pasiekta ({n} elementas daugiausiai)":"Grupės riba pasiekta ({n} elementai(-ų) daugiausiai)"]},selectAllText:"Pasirinkti visus",deselectAllText:"Atmesti visus",multipleSeparator:", "}}(a)}); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 OlaJowon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ar_AR.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof module&&module.exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){/*! 8 | * Translated default messages for bootstrap-select. 9 | * Locale: AR (Arabic) 10 | * Author: Yasser Lotfy 11 | */ 12 | !function(a){a.fn.selectpicker.defaults={noneSelectedText:"لم يتم إختيار شئ",noneResultsText:"لا توجد نتائج مطابقة لـ {0}",countSelectedText:function(a,b){return 1==a?"{0} خيار تم إختياره":"{0} خيارات تمت إختيارها"},maxOptionsText:function(a,b){return[1==a?"تخطى الحد المسموح ({n} خيار بحد أقصى)":"تخطى الحد المسموح ({n} خيارات بحد أقصى)",1==b?"تخطى الحد المسموح للمجموعة ({n} خيار بحد أقصى)":"تخطى الحد المسموح للمجموعة ({n} خيارات بحد أقصى)"]},selectAllText:"إختيار الجميع",deselectAllText:"إلغاء إختيار الجميع",multipleSeparator:"، "}}(a)}); -------------------------------------------------------------------------------- /handlers/dashboard.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/6/8. 2 | 3 | from .base import BaseRequestHandler, permission 4 | import datetime 5 | import tornado 6 | 7 | 8 | class Handler(BaseRequestHandler): 9 | @permission() 10 | @tornado.web.asynchronous 11 | @tornado.gen.coroutine 12 | def get(self): 13 | response_data = yield tornado.gen.Task(self._summary) 14 | self._write(response_data) 15 | 16 | @tornado.gen.coroutine 17 | def _summary(self): 18 | now_str_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M') 19 | self.cursor.execute(self.select_sql, now_str_time) 20 | results = self.cursor.dictfetchall() 21 | return dict(code=200, msg='Query Successful', data=results) 22 | 23 | select_sql = ''' 24 | SELECT * FROM 25 | (SELECT count(id) as logfile_count FROM logfile) t1, 26 | (SELECT count(*) as host_count FROM (SELECT count(id) FROM logfile_host GROUP BY host) t2) t3, 27 | (SELECT count(id) as monitor_item_count FROM monitor_item) t4, 28 | (SELECT count(id) as user_count FROM user) t5, 29 | (SELECT count(DISTINCT user_id) as online_user_count FROM session WHERE expire_time>%s) t6 30 | ''' 31 | -------------------------------------------------------------------------------- /static/bootstrap-tagsinput-latest/dist/bootstrap-tagsinput.less: -------------------------------------------------------------------------------- 1 | .bootstrap-tagsinput { 2 | background-color: #fff; 3 | border: 1px solid #ccc; 4 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 5 | display: inline-block; 6 | padding: 4px 6px; 7 | margin-bottom: 10px; 8 | color: #555; 9 | vertical-align: middle; 10 | border-radius: 4px; 11 | max-width: 100%; 12 | line-height: 22px; 13 | cursor: text; 14 | 15 | input { 16 | border: none; 17 | box-shadow: none; 18 | outline: none; 19 | background-color: transparent; 20 | padding: 0; 21 | margin: 0; 22 | width: auto !important; 23 | max-width: inherit; 24 | 25 | &:focus { 26 | border: none; 27 | box-shadow: none; 28 | } 29 | } 30 | 31 | .tag { 32 | margin-right: 2px; 33 | color: white; 34 | 35 | [data-role="remove"] { 36 | margin-left:8px; 37 | cursor:pointer; 38 | &:after{ 39 | content: "x"; 40 | padding:0px 2px; 41 | } 42 | &:hover { 43 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 44 | &:active { 45 | box-shadow: inset 0 3px 5px rgba(0,0,0,0.125); 46 | } 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-zh_CN.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: '没有选中任何项', 27 | noneResultsText: '没有找到匹配项', 28 | countSelectedText: '选中{1}中的{0}项', 29 | maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'], 30 | multipleSeparator: ', ', 31 | selectAllText: '全选', 32 | deselectAllText: '取消全选' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-zh_TW.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: '沒有選取任何項目', 27 | noneResultsText: '沒有找到符合的結果', 28 | countSelectedText: '已經選取{0}個項目', 29 | maxOptionsText: ['超過限制 (最多選擇{n}項)', '超過限制(最多選擇{n}組)'], 30 | selectAllText: '選取全部', 31 | deselectAllText: '全部取消', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ja_JP.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: '何もが選択した', 27 | noneResultsText: '\'{0}\'が結果を返さない', 28 | countSelectedText: '{0}/{1}が選択した', 29 | maxOptionsText: ['限界は達した({n}{var}最大)', '限界をグループは達した({n}{var}最大)', ['アイテム', 'アイテム']], 30 | selectAllText: '全部を選択する', 31 | deselectAllText: '何も選択しない', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/metisMenu/metisMenu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.1.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumus 7 | * Under MIT License 8 | */ 9 | .arrow { 10 | float: right; 11 | line-height: 1.42857; 12 | } 13 | 14 | .glyphicon.arrow:before { 15 | content: "\e079"; 16 | } 17 | 18 | .active > a > .glyphicon.arrow:before { 19 | content: "\e114"; 20 | } 21 | 22 | 23 | /* 24 | * Require Font-Awesome 25 | * http://fortawesome.github.io/Font-Awesome/ 26 | */ 27 | 28 | 29 | .fa.arrow:before { 30 | content: "\f104"; 31 | } 32 | 33 | .active > a > .fa.arrow:before { 34 | content: "\f107"; 35 | } 36 | 37 | .plus-times { 38 | float: right; 39 | } 40 | 41 | .fa.plus-times:before { 42 | content: "\f067"; 43 | } 44 | 45 | .active > a > .fa.plus-times { 46 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); 47 | -webkit-transform: rotate(45deg); 48 | -moz-transform: rotate(45deg); 49 | -ms-transform: rotate(45deg); 50 | -o-transform: rotate(45deg); 51 | transform: rotate(45deg); 52 | } 53 | 54 | .plus-minus { 55 | float: right; 56 | } 57 | 58 | .fa.plus-minus:before { 59 | content: "\f067"; 60 | } 61 | 62 | .active > a > .fa.plus-minus:before { 63 | content: "\f068"; 64 | } -------------------------------------------------------------------------------- /handlers/profile.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2018/6/8. 2 | 3 | from .base import BaseRequestHandler, permission 4 | 5 | 6 | class Handler(BaseRequestHandler): 7 | @permission() 8 | def get(self): 9 | response_data = self._query() 10 | self._write(response_data) 11 | 12 | def _query(self): 13 | select_arg = (self.requser['id'], self.session['session_id']) 14 | self.cursor.execute(self.select_sql, select_arg) 15 | results = self.cursor.dictfetchall() 16 | return dict(code=200, msg='Query Successful', data=results) 17 | 18 | select_sql = ''' 19 | SELECT 20 | * 21 | FROM 22 | ( 23 | SELECT 24 | id, 25 | username, 26 | fullname, 27 | email, 28 | role, 29 | status, 30 | date_format(join_time, "%%Y-%%m-%%d %%H:%%i:%%s") as join_time 31 | FROM 32 | user 33 | WHERE 34 | id=%s 35 | ) t1, 36 | ( 37 | SELECT 38 | date_format(create_time, "%%Y-%%m-%%d %%H:%%i:%%s") as login_time, 39 | date_format(expire_time, "%%Y-%%m-%%d %%H:%%i:%%s") as expire_time 40 | FROM 41 | session 42 | WHERE 43 | session_id=%s 44 | ) t2 45 | ''' -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-id_ID.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Tidak ada yang dipilih', 27 | noneResultsText: 'Tidak ada yang cocok {0}', 28 | countSelectedText: '{0} terpilih', 29 | maxOptionsText: ['Mencapai batas (maksimum {n})', 'Mencapai batas grup (maksimum {n})'], 30 | selectAllText: 'Pilih Semua', 31 | deselectAllText: 'Hapus Semua', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-cs_CZ.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Nic není vybráno', 27 | noneResultsText: 'Žádné výsledky {0}', 28 | countSelectedText: 'Označeno {0} z {1}', 29 | maxOptionsText: ['Limit překročen ({n} {var} max)', 'Limit skupiny překročen ({n} {var} max)', ['položek', 'položka']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Vybrat Vše', 32 | deselectAllText: 'Odznačit Vše' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-pt_PT.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Nenhum seleccionado', 27 | noneResultsText: 'Sem resultados contendo {0}', 28 | countSelectedText: 'Selecionado {0} de {1}', 29 | maxOptionsText: ['Limite ultrapassado (máx. {n} {var})', 'Limite de seleções ultrapassado (máx. {n} {var})', ['itens', 'item']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Selecionar Tudo', 32 | deselectAllText: 'Desmarcar Todos' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ua_UA.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Нічого не вибрано', 27 | noneResultsText: 'Збігів не знайдено {0}', 28 | countSelectedText: 'Вибрано {0} із {1}', 29 | maxOptionsText: ['Досягнута межа ({n} {var} максимум)', 'Досягнута межа в групі ({n} {var} максимум)', ['items', 'item']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Вибрати все', 32 | deselectAllText: 'Скасувати вибір усі' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-es_CL.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'No hay selección', 27 | noneResultsText: 'No hay resultados {0}', 28 | countSelectedText: 'Seleccionados {0} de {1}', 29 | maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Seleccionar Todos', 32 | deselectAllText: 'Desmarcar Todos' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-es_ES.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'No hay selección', 27 | noneResultsText: 'No hay resultados {0}', 28 | countSelectedText: 'Seleccionados {0} de {1}', 29 | maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Seleccionar Todos', 32 | deselectAllText: 'Desmarcar Todos' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-eu.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Hautapenik ez', 27 | noneResultsText: 'Emaitzarik ez {0}', 28 | countSelectedText: '{1}(e)tik {0} hautatuta', 29 | maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu', 'elementu']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Hautatu Guztiak', 32 | deselectAllText: 'Desautatu Guztiak' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-pt_BR.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Nada selecionado', 27 | noneResultsText: 'Nada encontrado contendo {0}', 28 | countSelectedText: 'Selecionado {0} de {1}', 29 | maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']], 30 | multipleSeparator: ', ', 31 | selectAllText: 'Selecionar Todos', 32 | deselectAllText: 'Desmarcar Todos' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-fa_IR.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'چیزی انتخاب نشده است', 27 | noneResultsText: 'هیج مشابهی برای {0} پیدا نشد', 28 | countSelectedText: "{0} از {1} مورد انتخاب شده", 29 | maxOptionsText: ['بیشتر ممکن نیست {حداکثر {n} عدد}', 'بیشتر ممکن نیست {حداکثر {n} عدد}'], 30 | selectAllText: 'انتخاب همه', 31 | deselectAllText: 'انتخاب هیچ کدام', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-nl_NL.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Niets geselecteerd', 27 | noneResultsText: 'Geen resultaten gevonden voor {0}', 28 | countSelectedText: '{0} van {1} geselecteerd', 29 | maxOptionsText: ['Limiet bereikt ({n} {var} max)', 'Groep limiet bereikt ({n} {var} max)', ['items', 'item']], 30 | selectAllText: 'Alles selecteren', 31 | deselectAllText: 'Alles deselecteren', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-pl_PL.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Nic nie zaznaczono', 27 | noneResultsText: 'Brak wyników wyszukiwania {0}', 28 | countSelectedText: 'Zaznaczono {0} z {1}', 29 | maxOptionsText: ['Osiągnięto limit ({n} {var} max)', 'Limit grupy osiągnięty ({n} {var} max)', ['elementy', 'element']], 30 | selectAllText: 'Zaznacz wszystkie', 31 | deselectAllText: 'Odznacz wszystkie', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-sk_SK.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Vyberte zo zoznamu', 27 | noneResultsText: 'Pre výraz {0} neboli nájdené žiadne výsledky', 28 | countSelectedText: 'Vybrané {0} z {1}', 29 | maxOptionsText: ['Limit prekročený ({n} {var} max)', 'Limit skupiny prekročený ({n} {var} max)', ['položiek', 'položka']], 30 | selectAllText: 'Vybrať všetky', 31 | deselectAllText: 'Zrušiť výber', 32 | multipleSeparator: ', ' 33 | }; 34 | })(jQuery); 35 | 36 | 37 | })); 38 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ru_RU.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Ничего не выбрано', 27 | noneResultsText: 'Совпадений не найдено {0}', 28 | countSelectedText: 'Выбрано {0} из {1}', 29 | maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['шт.', 'шт.']], 30 | doneButtonText: 'Закрыть', 31 | selectAllText: 'Выбрать все', 32 | deselectAllText: 'Отменить все', 33 | multipleSeparator: ', ' 34 | }; 35 | })(jQuery); 36 | 37 | 38 | })); 39 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_extras.scss: -------------------------------------------------------------------------------- 1 | /* EXTRAS 2 | * -------------------------- */ 3 | 4 | /* Stacked and layered icon */ 5 | 6 | /* Animated rotating icon */ 7 | .#{$fa-css-prefix}-spin { 8 | -webkit-animation: spin 2s infinite linear; 9 | -moz-animation: spin 2s infinite linear; 10 | -o-animation: spin 2s infinite linear; 11 | animation: spin 2s infinite linear; 12 | } 13 | 14 | @-moz-keyframes spin { 15 | 0% { -moz-transform: rotate(0deg); } 16 | 100% { -moz-transform: rotate(359deg); } 17 | } 18 | @-webkit-keyframes spin { 19 | 0% { -webkit-transform: rotate(0deg); } 20 | 100% { -webkit-transform: rotate(359deg); } 21 | } 22 | @-o-keyframes spin { 23 | 0% { -o-transform: rotate(0deg); } 24 | 100% { -o-transform: rotate(359deg); } 25 | } 26 | @-ms-keyframes spin { 27 | 0% { -ms-transform: rotate(0deg); } 28 | 100% { -ms-transform: rotate(359deg); } 29 | } 30 | @keyframes spin { 31 | 0% { transform: rotate(0deg); } 32 | 100% { transform: rotate(359deg); } 33 | } 34 | 35 | 36 | // Icon rotations & flipping 37 | // ------------------------- 38 | 39 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 40 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 41 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 42 | 43 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 44 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 45 | -------------------------------------------------------------------------------- /static/bootstrap-table/dist/bootstrap-table-zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap Table Chinese translation 3 | * Author: Zhixin Wen 4 | */ 5 | (function ($) { 6 | 'use strict'; 7 | 8 | $.fn.bootstrapTable.locales['zh-CN'] = { 9 | formatLoadingMessage: function () { 10 | return '加载数据中,请稍等...'; 11 | }, 12 | formatRecordsPerPage: function (pageNumber) { 13 | return '每页 ' + pageNumber + ' 条'; 14 | }, 15 | formatShowingRows: function (pageFrom, pageTo, totalRows) { 16 | return '第 ' + pageFrom + ' 至 ' + pageTo + ' 条,共 ' + totalRows + ' 条。'; 17 | }, 18 | formatSearch: function () { 19 | return '搜索...'; 20 | }, 21 | formatNoMatches: function () { 22 | return '无相关数据'; 23 | }, 24 | formatPaginationSwitch: function () { 25 | return '隐藏/显示分页'; 26 | }, 27 | formatRefresh: function () { 28 | return '刷新'; 29 | }, 30 | formatToggle: function () { 31 | return '切换'; 32 | }, 33 | formatColumns: function () { 34 | return '列'; 35 | }, 36 | formatExport: function () { 37 | return '导出数据'; 38 | }, 39 | formatClearFilters: function () { 40 | return '清空过滤'; 41 | } 42 | }; 43 | 44 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']); 45 | 46 | })(jQuery); 47 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ko_KR.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: '항목을 선택해주세요', 27 | noneResultsText: '{0} 검색 결과가 없습니다', 28 | countSelectedText: function (numSelected, numTotal) { 29 | return "{0}개를 선택하였습니다"; 30 | }, 31 | maxOptionsText: function (numAll, numGroup) { 32 | return [ 33 | '{n}개까지 선택 가능합니다', 34 | '해당 그룹은 {n}개까지 선택 가능합니다' 35 | ]; 36 | }, 37 | selectAllText: '전체선택', 38 | deselectAllText: '전체해제', 39 | multipleSeparator: ', ' 40 | }; 41 | })(jQuery); 42 | 43 | 44 | })); 45 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ro_RO.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | doneButtonText: 'Închide', 27 | noneSelectedText: 'Nu a fost selectat nimic', 28 | noneResultsText: 'Nu există niciun rezultat {0}', 29 | countSelectedText: '{0} din {1} selectat(e)', 30 | maxOptionsText: ['Limita a fost atinsă ({n} {var} max)', 'Limita de grup a fost atinsă ({n} {var} max)', ['iteme', 'item']], 31 | selectAllText: 'Selectează toate', 32 | deselectAllText: 'Deselectează toate', 33 | multipleSeparator: ', ' 34 | }; 35 | })(jQuery); 36 | 37 | 38 | })); 39 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-sl_SI.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Nič izbranega', 27 | noneResultsText: 'Ni zadetkov za {0}', 28 | countSelectedText: '{0} od {1} izbranih', 29 | maxOptionsText: function (numAll, numGroup) { 30 | return [ 31 | 'Omejitev dosežena (max. izbranih: {n})', 32 | 'Omejitev skupine dosežena (max. izbranih: {n})' 33 | ]; 34 | }, 35 | selectAllText: 'Izberi vse', 36 | deselectAllText: 'Počisti izbor', 37 | multipleSeparator: ', ' 38 | }; 39 | })(jQuery); 40 | 41 | 42 | })); 43 | -------------------------------------------------------------------------------- /static/bootstrap-tagsinput-latest/dist/bootstrap-tagsinput-angular.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * bootstrap-tagsinput v0.6.1 by Tim Schlechter 3 | * 4 | */ 5 | 6 | angular.module("bootstrap-tagsinput",[]).directive("bootstrapTagsinput",[function(){function a(a,b){return b?angular.isFunction(a.$parent[b])?a.$parent[b]:function(a){return a[b]}:void 0}return{restrict:"EA",scope:{model:"=ngModel"},template:"",replace:!1,link:function(b,c,d){$(function(){angular.isArray(b.model)||(b.model=[]);var e=$("select",c),f=d.typeaheadSource?d.typeaheadSource.split("."):null,g=f?f.length>1?b.$parent[f[0]][f[1]]:b.$parent[f[0]]:null;e.tagsinput(b.$parent[d.options||""]||{typeahead:{source:angular.isFunction(g)?g:null},itemValue:a(b,d.itemvalue),itemText:a(b,d.itemtext),confirmKeys:a(b,d.confirmkeys)?JSON.parse(d.confirmkeys):[13],tagClass:angular.isFunction(b.$parent[d.tagclass])?b.$parent[d.tagclass]:function(a){return d.tagclass}});for(var h=0;h 1) ? "{0} éléments sélectionnés" : "{0} élément sélectionné"; 30 | }, 31 | maxOptionsText: function (numAll, numGroup) { 32 | return [ 33 | (numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)', 34 | (numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)' 35 | ]; 36 | }, 37 | multipleSeparator: ', ', 38 | selectAllText: 'Tout sélectionner', 39 | deselectAllText: 'Tout désélectionner', 40 | }; 41 | })(jQuery); 42 | 43 | 44 | })); 45 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-bg_BG.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Нищо избрано', 27 | noneResultsText: 'Няма резултат за {0}', 28 | countSelectedText: function (numSelected, numTotal) { 29 | return (numSelected == 1) ? "{0} избран елемент" : "{0} избрани елемента"; 30 | }, 31 | maxOptionsText: function (numAll, numGroup) { 32 | return [ 33 | (numAll == 1) ? 'Лимита е достигнат ({n} елемент максимум)' : 'Лимита е достигнат ({n} елемента максимум)', 34 | (numGroup == 1) ? 'Груповия лимит е достигнат ({n} елемент максимум)' : 'Груповия лимит е достигнат ({n} елемента максимум)' 35 | ]; 36 | }, 37 | selectAllText: 'Избери всички', 38 | deselectAllText: 'Размаркирай всички', 39 | multipleSeparator: ', ' 40 | }; 41 | })(jQuery); 42 | 43 | 44 | })); 45 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-hr_HR.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Odaberite stavku', 27 | noneResultsText: 'Nema rezultata pretrage {0}', 28 | countSelectedText: function (numSelected, numTotal) { 29 | return (numSelected == 1) ? "{0} stavka selektirana" : "{0} stavke selektirane"; 30 | }, 31 | maxOptionsText: function (numAll, numGroup) { 32 | return [ 33 | (numAll == 1) ? 'Limit je postignut ({n} stvar maximalno)' : 'Limit je postignut ({n} stavke maksimalno)', 34 | (numGroup == 1) ? 'Grupni limit je postignut ({n} stvar maksimalno)' : 'Grupni limit je postignut ({n} stavke maksimalno)' 35 | ]; 36 | }, 37 | selectAllText: 'Selektiraj sve', 38 | deselectAllText: 'Deselektiraj sve', 39 | multipleSeparator: ', ' 40 | }; 41 | })(jQuery); 42 | 43 | 44 | })); 45 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-lt_LT.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | (function ($) { 25 | $.fn.selectpicker.defaults = { 26 | noneSelectedText: 'Niekas nepasirinkta', 27 | noneResultsText: 'Niekas nesutapo su {0}', 28 | countSelectedText: function (numSelected, numTotal) { 29 | return (numSelected == 1) ? "{0} elementas pasirinktas" : "{0} elementai(-ų) pasirinkta"; 30 | }, 31 | maxOptionsText: function (numAll, numGroup) { 32 | return [ 33 | (numAll == 1) ? 'Pasiekta riba ({n} elementas daugiausiai)' : 'Riba pasiekta ({n} elementai(-ų) daugiausiai)', 34 | (numGroup == 1) ? 'Grupės riba pasiekta ({n} elementas daugiausiai)' : 'Grupės riba pasiekta ({n} elementai(-ų) daugiausiai)' 35 | ]; 36 | }, 37 | selectAllText: 'Pasirinkti visus', 38 | deselectAllText: 'Atmesti visus', 39 | multipleSeparator: ', ' 40 | }; 41 | })(jQuery); 42 | 43 | 44 | })); 45 | -------------------------------------------------------------------------------- /handlers/monitor_report.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2019/7/28. 2 | 3 | from .base import BaseRequestHandler 4 | import json 5 | import logging 6 | 7 | logger = logging.getLogger() 8 | 9 | 10 | def report_valid(func): 11 | def _wrapper(self): 12 | error = {} 13 | host = self.get_argument('host', '') 14 | counts = self.get_argument('counts', '') 15 | 16 | if not host: 17 | error['host'] = 'Required' 18 | 19 | if not counts: 20 | error['counts'] = 'Required' 21 | else: 22 | try: 23 | counts = json.loads(counts) 24 | except: 25 | error['counts'] = 'Must JSON' 26 | 27 | if error: 28 | return dict(code=400, msg='Bad POST data', error=error) 29 | 30 | self.reqdata = dict( 31 | host=host, 32 | counts=counts, 33 | ) 34 | return func(self) 35 | 36 | return _wrapper 37 | 38 | 39 | class Handler(BaseRequestHandler): 40 | def post(self): 41 | response_data = self._report() 42 | self._write(response_data) 43 | 44 | @report_valid 45 | def _report(self): 46 | try: 47 | inserts = self.reqdata['counts'] 48 | with self.transaction(): 49 | self.cursor.executemany(self.insert_sql, inserts) 50 | except Exception as e: 51 | logger.error('Report failed[%s]: %s' % (self.reqdata['host'], str(e))) 52 | return dict(code=500, msg='Report failed') 53 | else: 54 | return dict(code=200, msg='Report successful') 55 | 56 | insert_sql = ''' 57 | INSERT INTO 58 | monitor_count (logfile_id, host, monitor_item_id, count, count_time) 59 | VALUES 60 | (%s, %s, %s, %s, %s) 61 | ''' 62 | -------------------------------------------------------------------------------- /static/sb-admin-2/dist/js/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function() { 7 | $('#side-menu').metisMenu(); 8 | }); 9 | 10 | //Loads the correct sidebar on window load, 11 | //collapses the sidebar on window resize. 12 | // Sets the min-height of #page-wrapper to window size 13 | $(function() { 14 | $(window).bind("load resize", function() { 15 | var topOffset = 50; 16 | var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 17 | if (width < 768) { 18 | $('div.navbar-collapse').addClass('collapse'); 19 | topOffset = 100; // 2-row-menu 20 | } else { 21 | $('div.navbar-collapse').removeClass('collapse'); 22 | } 23 | 24 | var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 25 | height = height - topOffset; 26 | if (height < 1) height = 1; 27 | if (height > topOffset) { 28 | $("#page-wrapper").css("min-height", (height) + "px"); 29 | } 30 | }); 31 | 32 | var url = window.location; 33 | // var element = $('ul.nav a').filter(function() { 34 | // return this.href == url; 35 | // }).addClass('active').parent().parent().addClass('in').parent(); 36 | var element = $('ul.nav a').filter(function() { 37 | return this.href == url; 38 | }).addClass('active').parent(); 39 | 40 | while (true) { 41 | if (element.is('li')) { 42 | element = element.parent().addClass('in').parent(); 43 | } else { 44 | break; 45 | } 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /handlers/host_logfile.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2019/7/26. 2 | 3 | from .base import BaseRequestHandler 4 | import logging 5 | 6 | logger = logging.getLogger() 7 | 8 | def get_valid(func): 9 | def _wrapper(self): 10 | error = {} 11 | host = self.get_argument('host', '') 12 | 13 | if not host: 14 | error['host'] = 'Required' 15 | 16 | if error: 17 | self._write({'code': 400, 'msg': 'Bad GET param', 'error': error}) 18 | return 19 | 20 | self.reqdata = dict(host=host) 21 | 22 | return func(self) 23 | return _wrapper 24 | 25 | 26 | class Handler(BaseRequestHandler): 27 | @get_valid 28 | def get(self): 29 | host_logfiles = [] 30 | host = self.reqdata.get('host') 31 | try: 32 | self.cursor.execute(self.select_logfile_sql, host) 33 | logfiles = self.cursor.dictfetchall() 34 | for logfile in logfiles: 35 | self.cursor.execute(self.select_monitor_sql, logfile['id']) 36 | monitor_items = self.cursor.dictfetchall() 37 | logfile['monitor_items'] = monitor_items 38 | host_logfiles.append(logfile) 39 | except Exception as e: 40 | response_data = dict(code=500, msg='Query failed', detail=str(e)) 41 | else: 42 | response_data = dict(code=200, msg='Query successful', data=host_logfiles) 43 | self._write(response_data) 44 | 45 | select_logfile_sql = '''SELECT t2.id as id, t2.path as path, t2.name as name, t2.monitor_choice as monitor_choice 46 | FROM logfile_host t1, logfile t2 WHERE t1.host=%s and t1.logfile_id=t2.id 47 | ''' 48 | 49 | select_monitor_sql = '''SELECT id, name, match_regex, alert, intervals, expression, webhook 50 | FROM monitor_item WHERE logfile_id=%s 51 | ''' -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /static/bootstrap-select-1.13.1/dist/js/i18n/defaults-ar_AR.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.13.1 (https://developer.snapappointments.com/bootstrap-select) 3 | * 4 | * Copyright 2012-2018 SnapAppointments, LLC 5 | * Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | 8 | (function (root, factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD. Register as an anonymous module unless amdModuleId is set 11 | define(["jquery"], function (a0) { 12 | return (factory(a0)); 13 | }); 14 | } else if (typeof module === 'object' && module.exports) { 15 | // Node. Does not work with strict CommonJS, but 16 | // only CommonJS-like environments that support module.exports, 17 | // like Node. 18 | module.exports = factory(require("jquery")); 19 | } else { 20 | factory(root["jQuery"]); 21 | } 22 | }(this, function (jQuery) { 23 | 24 | /*! 25 | * Translated default messages for bootstrap-select. 26 | * Locale: AR (Arabic) 27 | * Author: Yasser Lotfy 28 | */ 29 | (function ($) { 30 | $.fn.selectpicker.defaults = { 31 | noneSelectedText: 'لم يتم إختيار شئ', 32 | noneResultsText: 'لا توجد نتائج مطابقة لـ {0}', 33 | countSelectedText: function (numSelected, numTotal) { 34 | return (numSelected == 1) ? "{0} خيار تم إختياره" : "{0} خيارات تمت إختيارها"; 35 | }, 36 | maxOptionsText: function (numAll, numGroup) { 37 | return [ 38 | (numAll == 1) ? 'تخطى الحد المسموح ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح ({n} خيارات بحد أقصى)', 39 | (numGroup == 1) ? 'تخطى الحد المسموح للمجموعة ({n} خيار بحد أقصى)' : 'تخطى الحد المسموح للمجموعة ({n} خيارات بحد أقصى)' 40 | ]; 41 | }, 42 | selectAllText: 'إختيار الجميع', 43 | deselectAllText: 'إلغاء إختيار الجميع', 44 | multipleSeparator: '، ' 45 | }; 46 | })(jQuery); 47 | 48 | 49 | })); 50 | -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/metisMenu/metisMenu.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.1.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumus 7 | * Under MIT License 8 | */ 9 | !function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document); -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /handlers/match_regex.py: -------------------------------------------------------------------------------- 1 | # Created by zhouwang on 2019/7/17. 2 | 3 | from .base import BaseRequestHandler, permission 4 | import pymysql 5 | import logging 6 | 7 | logger = logging.getLogger() 8 | 9 | def get_valid(func): 10 | def _wrapper(self): 11 | error = {} 12 | logfile = self.get_argument('logfile', '') 13 | match = self.get_argument('match', '') 14 | 15 | if not logfile: 16 | error['logfile'] = 'Required' 17 | else: 18 | if logfile.isnumeric(): 19 | select_sql = 'SELECT * FROM logfile WHERE id="%s"' % (int(logfile)) 20 | else: 21 | select_sql = 'SELECT * FROM logfile WHERE name="%s"' % pymysql.escape_string(logfile) 22 | self.cursor.execute(select_sql) 23 | logfile = self.cursor.dictfetchone() 24 | if not logfile: 25 | error['logfile'] = 'Not exist' 26 | 27 | if error: 28 | self._write(dict(code=400, msg='Bad GET param', error=error)) 29 | return 30 | 31 | self.reqdata = dict( 32 | logfile=logfile, 33 | match=match, 34 | ) 35 | 36 | return func(self) 37 | return _wrapper 38 | 39 | 40 | class Handler(BaseRequestHandler): 41 | @permission() 42 | @get_valid 43 | def get(self, *args, **kwargs): 44 | self.select_sql = 'SELECT match_regex FROM monitor_item WHERE logfile_id=%d' % \ 45 | self.reqdata['logfile']['id'] 46 | self.select_sql += (' AND match_regex like "%%%s%%"' % self.reqdata['match'] 47 | if self.reqdata['match'] else '') 48 | 49 | self.cursor.execute(self.select_sql) 50 | results = self.cursor.fetchall() 51 | match_regex = [result[0] for result in results] 52 | response_data = dict(code=200, msg='Query Successful', data=match_regex) 53 | return self._write(response_data) -------------------------------------------------------------------------------- /static/sb-admin-2/vendor/datatables-plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(){var f=function(c,b){c.extend(!0,b.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});b.ext.renderer.pageButton.bootstrap=function(g,f,p,k,h,l){var q=new b.Api(g),r=g.oClasses,i=g.oLanguage.oPaginate,d,e,o=function(b,f){var j,m,n,a,k=function(a){a.preventDefault(); 6 | c(a.currentTarget).hasClass("disabled")||q.page(a.data.action).draw(!1)};j=0;for(m=f.length;j",{"class":r.sPageButton+" "+ 7 | e,"aria-controls":g.sTableId,tabindex:g.iTabIndex,id:0===p&&"string"===typeof a?g.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),g.oApi._fnBindAction(n,{action:a},k))}};o(c(f).empty().html('