├── README.md ├── static ├── favicon.ico ├── audio │ └── alarm.wav ├── favicons │ ├── add.ico │ ├── block.ico │ ├── pass.ico │ ├── delete.ico │ ├── update.ico │ ├── root │ │ ├── baidu.com.ico │ │ ├── lol.qq.com.ico │ │ ├── 192.168.1.1.ico │ │ ├── www.baidu.com.ico │ │ └── www.douyu.com.ico │ └── huangcc │ │ ├── 172.16.4.206.ico │ │ ├── 192.168.124.66.ico │ │ ├── 192.168.197.247.ico │ │ └── 192.168.26.233.ico ├── images │ ├── arrows.png │ ├── owl-login.png │ ├── sort_asc.png │ ├── sort_both.png │ ├── sort_desc.png │ ├── owl-login-arm.png │ ├── sort_asc_disabled.png │ └── sort_desc_disabled.png ├── font-awesome │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── less │ │ ├── fixed-width.less │ │ ├── core.less │ │ ├── rotated-flipped.less │ │ ├── bordered-pulled.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── font-awesome.less │ │ ├── stacked.less │ │ ├── path.less │ │ ├── mixins.less │ │ ├── spinning.less │ │ └── variables.less │ └── scss │ │ ├── _fixed-width.scss │ │ ├── _core.scss │ │ ├── _bordered-pulled.scss │ │ ├── _larger.scss │ │ ├── _rotated-flipped.scss │ │ ├── _list.scss │ │ ├── font-awesome.scss │ │ ├── _stacked.scss │ │ ├── _path.scss │ │ ├── _mixins.scss │ │ ├── _spinning.scss │ │ └── _variables.scss ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── css │ ├── font-icons │ │ ├── font_1475839079_8399725.eot │ │ ├── font_1475839079_8399725.ttf │ │ ├── font_1475839079_8399725.woff │ │ └── style.css │ ├── main.css │ ├── sb-admin.css │ ├── flex-css-layout.min.css │ ├── bootstrap-table.css │ └── bootstrap-select.min.css ├── data │ └── format.json └── js │ ├── sb-admin.js │ ├── login.js │ ├── locale │ └── bootstrap-table-zh-CN.js │ ├── plugins │ └── metisMenu │ │ └── jquery.metisMenu.js │ └── extensions │ ├── export │ └── bootstrap-table-export.js │ ├── toolbar │ └── bootstrap-table-toolbar.js │ └── multiple-sort │ └── bootstrap-table-multiple-sort.js ├── templates ├── monitors.html ├── deluser.html ├── adduser.html ├── updateuser.html ├── base.html ├── login.html ├── webs.html ├── opmonitors.html └── showtasklist.html ├── login_cati.py ├── login_centron.py ├── login_nagios.py ├── login_nagios3.py └── myutils.py /README.md: -------------------------------------------------------------------------------- 1 | # My First Flask App 2 | collect others web pages info and show it in one page 3 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicon.ico -------------------------------------------------------------------------------- /static/audio/alarm.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/audio/alarm.wav -------------------------------------------------------------------------------- /static/favicons/add.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/add.ico -------------------------------------------------------------------------------- /static/favicons/block.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/block.ico -------------------------------------------------------------------------------- /static/favicons/pass.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/pass.ico -------------------------------------------------------------------------------- /static/images/arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/arrows.png -------------------------------------------------------------------------------- /static/favicons/delete.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/delete.ico -------------------------------------------------------------------------------- /static/favicons/update.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/update.ico -------------------------------------------------------------------------------- /static/images/owl-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/owl-login.png -------------------------------------------------------------------------------- /static/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/sort_asc.png -------------------------------------------------------------------------------- /static/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/sort_both.png -------------------------------------------------------------------------------- /static/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/sort_desc.png -------------------------------------------------------------------------------- /static/images/owl-login-arm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/owl-login-arm.png -------------------------------------------------------------------------------- /static/favicons/root/baidu.com.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/root/baidu.com.ico -------------------------------------------------------------------------------- /static/favicons/root/lol.qq.com.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/root/lol.qq.com.ico -------------------------------------------------------------------------------- /static/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /static/favicons/root/192.168.1.1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/root/192.168.1.1.ico -------------------------------------------------------------------------------- /static/favicons/root/www.baidu.com.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/root/www.baidu.com.ico -------------------------------------------------------------------------------- /static/favicons/root/www.douyu.com.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/root/www.douyu.com.ico -------------------------------------------------------------------------------- /static/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /static/favicons/huangcc/172.16.4.206.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/huangcc/172.16.4.206.ico -------------------------------------------------------------------------------- /static/favicons/huangcc/192.168.124.66.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/huangcc/192.168.124.66.ico -------------------------------------------------------------------------------- /static/favicons/huangcc/192.168.197.247.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/huangcc/192.168.197.247.ico -------------------------------------------------------------------------------- /static/favicons/huangcc/192.168.26.233.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/favicons/huangcc/192.168.26.233.ico -------------------------------------------------------------------------------- /static/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/css/font-icons/font_1475839079_8399725.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/css/font-icons/font_1475839079_8399725.eot -------------------------------------------------------------------------------- /static/css/font-icons/font_1475839079_8399725.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/css/font-icons/font_1475839079_8399725.ttf -------------------------------------------------------------------------------- /static/css/font-icons/font_1475839079_8399725.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/css/font-icons/font_1475839079_8399725.woff -------------------------------------------------------------------------------- /static/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/huangchuchuan/FirstFlask/master/static/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/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/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/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /static/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /static/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 | -------------------------------------------------------------------------------- /static/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 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /static/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 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /static/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/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/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 | -------------------------------------------------------------------------------- /static/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/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/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.0.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 "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /static/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.0.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 "spinning"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /static/data/format.json: -------------------------------------------------------------------------------- 1 | { 2 | "sProcessing": "处理中...", 3 | "sLengthMenu": "_MENU_ 记录/页", 4 | "sZeroRecords": "没有匹配的记录", 5 | "sInfo": "显示第 _START_ 至 _END_ 项记录,共 _TOTAL_ 项", 6 | "sInfoEmpty": "显示第 0 至 0 项记录,共 0 项", 7 | "sInfoFiltered": "(由 _MAX_ 项记录过滤)", 8 | "sInfoPostFix": "", 9 | "sSearch": "过滤:", 10 | "sUrl": "", 11 | "oPaginate": { 12 | "sFirst": "首页", 13 | "sPrevious": "上页", 14 | "sNext": "下页", 15 | "sLast": "末页" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /static/js/sb-admin.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | $('#side-menu').metisMenu(); 4 | 5 | }); 6 | 7 | //Loads the correct sidebar on window load, 8 | //collapses the sidebar on window resize. 9 | $(function() { 10 | $(window).bind("load resize", function() { 11 | width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 12 | if (width < 768) { 13 | $('div.sidebar-collapse').addClass('collapse') 14 | } else { 15 | $('div.sidebar-collapse').removeClass('collapse') 16 | } 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /static/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/js/login.js: -------------------------------------------------------------------------------- 1 | 2 | window.addEventListener('load',function () { 3 | var form = { 4 | data:{ 5 | nickname:'', 6 | password:'' 7 | }, 8 | }; 9 | form.loginOwl = document.getElementById('login-owl'); 10 | form.password = document.getElementById('password'); 11 | form.nickname = document.getElementById('username'); 12 | form.password.addEventListener('focus',function(){ 13 | form.loginOwl.className = 'password'; 14 | }) 15 | form.password.addEventListener('blur',function(){ 16 | form.loginOwl.className = ''; 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /static/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/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.woff?v=@{fa-version}') format('woff'), 9 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 10 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /static/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.woff?v=#{$fa-version}') format('woff'), 9 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 10 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 11 | //src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /static/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /static/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon-rotate($degrees, $rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); 6 | -webkit-transform: rotate($degrees); 7 | -moz-transform: rotate($degrees); 8 | -ms-transform: rotate($degrees); 9 | -o-transform: rotate($degrees); 10 | transform: rotate($degrees); 11 | } 12 | 13 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation); 15 | -webkit-transform: scale($horiz, $vert); 16 | -moz-transform: scale($horiz, $vert); 17 | -ms-transform: scale($horiz, $vert); 18 | -o-transform: scale($horiz, $vert); 19 | transform: scale($horiz, $vert); 20 | } 21 | -------------------------------------------------------------------------------- /static/font-awesome/less/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @-ms-keyframes spin { 24 | 0% { -ms-transform: rotate(0deg); } 25 | 100% { -ms-transform: rotate(359deg); } 26 | } 27 | @keyframes spin { 28 | 0% { transform: rotate(0deg); } 29 | 100% { transform: rotate(359deg); } 30 | } 31 | -------------------------------------------------------------------------------- /static/font-awesome/scss/_spinning.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @-ms-keyframes spin { 24 | 0% { -ms-transform: rotate(0deg); } 25 | 100% { -ms-transform: rotate(359deg); } 26 | } 27 | @keyframes spin { 28 | 0% { transform: rotate(0deg); } 29 | 100% { transform: rotate(359deg); } 30 | } 31 | -------------------------------------------------------------------------------- /static/js/locale/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/js/plugins/metisMenu/jquery.metisMenu.js: -------------------------------------------------------------------------------- 1 | ;(function ($, window, document, undefined) { 2 | 3 | var pluginName = "metisMenu", 4 | defaults = { 5 | toggle: true 6 | }; 7 | 8 | function Plugin(element, options) { 9 | this.element = element; 10 | this.settings = $.extend({}, defaults, options); 11 | this._defaults = defaults; 12 | this._name = pluginName; 13 | this.init(); 14 | } 15 | 16 | Plugin.prototype = { 17 | init: function () { 18 | 19 | var $this = $(this.element), 20 | $toggle = this.settings.toggle; 21 | 22 | $this.find('li.active').has('ul').children('ul').addClass('collapse in'); 23 | $this.find('li').not('.active').has('ul').children('ul').addClass('collapse'); 24 | 25 | $this.find('li').has('ul').children('a').on('click', function (e) { 26 | e.preventDefault(); 27 | 28 | $(this).parent('li').toggleClass('active').children('ul').collapse('toggle'); 29 | 30 | if ($toggle) { 31 | $(this).parent('li').siblings().removeClass('active').children('ul.in').collapse('hide'); 32 | } 33 | }); 34 | } 35 | }; 36 | 37 | $.fn[ pluginName ] = function (options) { 38 | return this.each(function () { 39 | if (!$.data(this, "plugin_" + pluginName)) { 40 | $.data(this, "plugin_" + pluginName, new Plugin(this, options)); 41 | } 42 | }); 43 | }; 44 | 45 | })(jQuery, window, document); 46 | -------------------------------------------------------------------------------- /templates/monitors.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block myhead %} 3 | 4 | {% endblock %} 5 | {% block content %} 6 |
7 | {% with messages = get_flashed_messages() %} 8 | {% if messages %} 9 | {% for message in messages %} 10 | {% if message[0]=='*' %} 11 | 15 | {% else %} 16 | 20 | {% endif %} 21 | {% endfor %} 22 | {% endif %} 23 | {% endwith %} 24 | 25 | {% if all_message_num > 0 %} 26 | {% if set_alarm == 1 %} 27 |
28 | 29 | 30 |
31 | 32 | {% else %} 33 |
34 | 35 | 36 |
37 | {% endif %} 38 | {% endif %} 39 | 40 | {{ tables }} 41 | 42 |
43 | {% endblock %} 44 | {% block myscript %} 45 | 46 | 47 | 48 | 49 | 50 | {% endblock %} -------------------------------------------------------------------------------- /templates/deluser.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 |
4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 | {% for message in messages %} 7 | {% if message[0]=='*' %} 8 | 12 | {% else %} 13 | 17 | {% endif %} 18 | {% endfor %} 19 | {% endif %} 20 | {% endwith %} 21 | 22 |
23 |
24 |
25 | {{ form.csrf_token }} 26 |
27 | 28 |
29 | {{ form.user_list(class="form-control selectpicker show-tick", autofocus=True) }} 30 |
31 |
32 |
33 | 34 |
35 | {{ form.password(class="form-control", placeholder="必须填写该用户密码", required=True) }} 36 |
37 |
38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 | {% endblock %} 46 | {% block myscript %} 47 | 48 | 49 | 50 | 51 | 52 | {% endblock %} -------------------------------------------------------------------------------- /templates/adduser.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 |
4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 | {% for message in messages %} 7 | {% if message[0]=='*' %} 8 | 12 | {% else %} 13 | 17 | {% endif %} 18 | {% endfor %} 19 | {% endif %} 20 | {% endwith %} 21 | 22 |
23 |
24 |
25 | {{ form.csrf_token }} 26 |
27 | 28 |
29 | {{ form.username(class="form-control", type="text", placeholder="请输入用户名", required=True, autofocus=True) }} 30 |
31 |
32 |
33 | 34 |
35 | {{ form.password1(class="form-control", placeholder="请输入密码", required=True) }} 36 |
37 |
38 |
39 | 40 |
41 | {{ form.password2(class="form-control", placeholder="请再次输入密码", required=True) }} 42 |
43 |
44 |
45 | 46 |
47 |
48 |
49 |
50 |
51 | {% endblock %} -------------------------------------------------------------------------------- /templates/updateuser.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 |
4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 | {% for message in messages %} 7 | {% if message[0]=='*' %} 8 | 12 | {% else %} 13 | 17 | {% endif %} 18 | {% endfor %} 19 | {% endif %} 20 | {% endwith %} 21 | 22 |
23 |
24 |
25 | {{ form.csrf_token }} 26 |
27 | 28 |
29 | {{ form.user_list(class="form-control selectpicker show-tick", autofocus=True) }} 30 |
31 |
32 |
33 | 34 |
35 | {{ form.username(class="form-control", type="text", placeholder="不填写表示不更新", autofocus=True) }} 36 |
37 |
38 |
39 | 40 |
41 | {{ form.password(class="form-control", placeholder="必须填写旧密码", required=True) }} 42 |
43 |
44 |
45 | 46 |
47 | {{ form.password1(class="form-control", placeholder="不填写表示不更新") }} 48 |
49 |
50 |
51 | 52 |
53 | {{ form.password2(class="form-control", placeholder="不填写表示不更新") }} 54 |
55 |
56 |
57 | 58 |
59 |
60 |
61 |
62 |
63 | {% endblock %} 64 | {% block myscript %} 65 | 66 | 67 | 68 | 69 | 70 | {% endblock %} -------------------------------------------------------------------------------- /login_cati.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import requests 4 | import json 5 | import re 6 | 7 | MYTIMEOUT = 3 8 | 9 | def test_cati(url, username, password): 10 | try: 11 | params = { 12 | 'login_username': username, 13 | 'login_password': password, 14 | 'action': 'login' 15 | } 16 | 17 | s = requests.session() 18 | myheader = { 19 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 20 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 21 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 22 | } 23 | s.get(url, headers=myheader, timeout=MYTIMEOUT) 24 | r = s.post(url, data=params, headers=myheader, timeout=MYTIMEOUT) 25 | 26 | if r.status_code != 200: 27 | return False 28 | else: 29 | results = re.findall('(Console)', r.text.replace('\n', '')) 30 | if len(results) > 0: 31 | return True 32 | return False 33 | except: 34 | return False 35 | 36 | 37 | def login_cati(url, username, password): 38 | params = { 39 | 'login_username': username, 40 | 'login_password': password, 41 | 'action': 'login' 42 | } 43 | 44 | s = requests.session() 45 | myheader = { 46 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 47 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 48 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 49 | } 50 | s.get(url, headers=myheader, timeout=MYTIMEOUT) 51 | s.post(url, data=params, headers=myheader, timeout=MYTIMEOUT) 52 | 53 | # check hosts status 54 | cati_host_url = url + '/plugins/npc/npc.php?module=hosts&action=getHosts&p_state=not_ok' 55 | cati_host_response = s.post(cati_host_url, headers=myheader, timeout=MYTIMEOUT).text 56 | cati_host_json = json.loads( 57 | cati_host_response) # {u'response': {u'value': {u'items': [], u'version': 1, u'total_count': 0}}} 58 | cati_host_items = cati_host_json['response']['value']['items'] 59 | cati_host = [] 60 | 61 | for cati_host_item in cati_host_items: 62 | host = cati_host_item['host_name'] 63 | status = cati_host_item['state_type'] 64 | last_check = cati_host_item['last_check'] 65 | info = cati_host_item['output'] 66 | cati_host.append((host, status, last_check, info)) 67 | 68 | # check service status 69 | cati_service_url = url + '/plugins/npc/npc.php?module=services&action=getServices&p_state=not_ok' 70 | cati_service_response = s.post(cati_service_url, headers=myheader, timeout=MYTIMEOUT).text 71 | cati_service_json = json.loads( 72 | cati_service_response) # {u'response': {u'value': {u'items': [], u'version': 1, u'total_count': 0}}} 73 | 74 | cati_service_items = cati_service_json['response']['value']['items'] 75 | 76 | cati_service = [] 77 | for cati_service_item in cati_service_items: 78 | host = cati_service_item['host_name'] 79 | service = cati_service_item['service_description'] 80 | status = cati_service_item['state_type'] 81 | lastcheck = cati_service_item['last_check'] 82 | info = cati_service_item['output'] 83 | cati_service.append((host, service, status, lastcheck, info)) 84 | 85 | cati_results = { 86 | 'service': cati_service, # [(host,service,status,last_check,info)] 87 | 'host': cati_host # [(host, status, last_check, info)] 88 | } 89 | return cati_results 90 | 91 | if __name__ == '__main__': 92 | url = 'http://*.*.*.*/cacti' 93 | user = 'admin' 94 | password = '*****' 95 | print login_cati(url, user, password) 96 | pass 97 | -------------------------------------------------------------------------------- /login_centron.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | import requests 5 | import re 6 | 7 | MYTIMEOUT = 3 8 | 9 | 10 | def test_centron(url, username, password): 11 | try: 12 | s = requests.session() 13 | myheader = { 14 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 15 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 16 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 17 | } 18 | 19 | s.get(url, headers=myheader, timeout=MYTIMEOUT) 20 | 21 | params = { 22 | 'useralias': username, 23 | 'password': password, 24 | 'submit': 'Connect >>' 25 | } 26 | 27 | r = s.post(url + '/index.php', headers=myheader, data=params, timeout=MYTIMEOUT) 28 | if r.status_code != 200: 29 | # print r.status_code 30 | return False 31 | else: 32 | results = re.findall('"(AjaxBankBasic)"', r.text.replace('\n', '')) 33 | # print results 34 | if len(results) > 0: 35 | return True 36 | return False 37 | except: 38 | return False 39 | 40 | 41 | def login_centron(url, username, password): 42 | s = requests.session() 43 | myheader = { 44 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 45 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 46 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 47 | } 48 | 49 | r = s.get(url, headers=myheader, timeout=MYTIMEOUT) 50 | sid = r.cookies['PHPSESSID'] 51 | 52 | params = { 53 | 'useralias': username, 54 | 'password': password, 55 | 'submit': 'Connect >>' 56 | } 57 | 58 | r = s.post(url + '/index.php', headers=myheader, data=params, timeout=MYTIMEOUT) 59 | 60 | # service 61 | critical_url = url + '/include/monitoring/status/Services/xml/ndo/serviceXML.php?&sid=' + sid \ 62 | + '&search=&search_host=&search_output=&num=0&limit=30&sort_type=last_state_change&order=ASC' \ 63 | '&date_time_format_status=d/m/Y%20H:i:s&o=svc_unhandled&p=20215&host_name=&nc=0&criticality=0' 64 | criticle_xml = s.get(critical_url, headers=myheader, timeout=MYTIMEOUT).text 65 | re_num_rows = re.findall('', criticle_xml) 66 | re_host = re.findall('', criticle_xml) 67 | re_service = re.findall('', criticle_xml) 68 | re_status = re.findall('', criticle_xml) 69 | re_duration = re.findall('', criticle_xml) 70 | re_lastcheck = re.findall('', criticle_xml) 71 | re_info = re.findall('', criticle_xml) 72 | num_rows = int(re_num_rows[0][0]) 73 | 74 | centron_service = [] # [(host, service, status, duration, lastcheck, info)] status=CRITICAL/WARNING 75 | for i in range(0, num_rows): 76 | centron_service.append((re_host[i], re_service[i], re_status[i], 77 | re_duration[i], re_lastcheck[i], re_info[i])) 78 | 79 | # host 80 | critical_url = url + '/include/monitoring/status/Hosts/xml/ndo/hostXML.php?sid=' + sid \ 81 | + '&search=&num=0&limit=30&sort_type=last_state_change&order=ASC' \ 82 | '&date_time_format_status=d/m/Y%20H:i:s&o=h_unhandled&p=20105&time=1479795993&criticality=0' 83 | criticle_xml = s.get(critical_url, headers=myheader, timeout=MYTIMEOUT).text 84 | re_num_rows = re.findall('', criticle_xml) 85 | re_host = re.findall('', criticle_xml) 86 | re_status = re.findall('', criticle_xml) 87 | re_duration = re.findall('', criticle_xml) 88 | re_lastcheck = re.findall('', criticle_xml) 89 | re_info = re.findall('', criticle_xml) 90 | num_rows = int(re_num_rows[0][0]) 91 | 92 | centron_host = [] # [(host, status, duration, lastcheck, info)] status=CRITICAL/WARNING 93 | for i in range(0, num_rows): 94 | centron_host.append((re_host[i], re_status[i], re_duration[i], re_lastcheck[i], re_info[i])) 95 | 96 | centron_results = { 97 | 'service': centron_service, # [(host, service, status, duration, last_check, info)] 98 | 'host': centron_host # [(host, status, duration, last_check, info)] 99 | } 100 | 101 | return centron_results 102 | 103 | 104 | if __name__ == '__main__': 105 | url = 'http://*.*.*.*/centreon' 106 | username = 'admin' 107 | password = '*****' 108 | print login_centron(url, username, password) 109 | -------------------------------------------------------------------------------- /login_nagios.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import requests 4 | import base64 5 | from urlparse import * 6 | import re 7 | 8 | MYTIMEOUT = 3 9 | 10 | def get_url_root(url): 11 | r = urlparse(url) 12 | 13 | if r.scheme: 14 | scheme = r.scheme 15 | root = r.netloc 16 | weburl = url 17 | else: 18 | scheme = 'http' 19 | root = r.path 20 | weburl = scheme + '://' + url 21 | return root, scheme, weburl 22 | 23 | 24 | def test_nagios(url, username, password): 25 | try: 26 | s = requests.session() 27 | auth = username + ':' + password 28 | auth = base64.b64encode(auth) 29 | 30 | myheader = { 31 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 32 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 33 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 34 | 'Authorization': 'Basic ' + auth 35 | } 36 | 37 | r = s.get(url, headers=myheader, timeout=MYTIMEOUT) 38 | if r.status_code != 200: 39 | return False 40 | else: 41 | results = re.findall('(Nagios.*?)', r.text.replace('\n', '')) 42 | if len(results) > 0: 43 | return True 44 | else: 45 | return False 46 | except: 47 | return False 48 | 49 | 50 | def login_nagios(url, username, password): 51 | s = requests.session() 52 | auth = username + ':' + password 53 | auth = base64.b64encode(auth) 54 | myheader = { 55 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 56 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 57 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 58 | 'Authorization': 'Basic '+auth 59 | } 60 | s.get(url, headers=myheader, timeout=MYTIMEOUT) 61 | root, scheme, weburl = get_url_root(url) 62 | # get services data 63 | service_url = scheme + '://' + root +'/nagios/cgi-bin/status.cgi?host=all&servicestatustypes=28&limit=0' 64 | all_text = s.get(service_url, headers=myheader, timeout=MYTIMEOUT).text.replace('\n', '') 65 | all_text = all_text.replace('\n', '') 66 | # host_pattern = "(.*?)" 67 | host_pattern = "(Nagios.*?)', r.text.replace('\n', '')) 42 | if len(results) > 0: 43 | return True 44 | else: 45 | return False 46 | except: 47 | return False 48 | 49 | 50 | def login_nagios3(url, username, password): 51 | s = requests.session() 52 | auth = username + ':' + password 53 | auth = base64.b64encode(auth) 54 | myheader = { 55 | 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,image/webp,*/*;q=0.8', 56 | 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 ' 57 | '(KHTML, like Gecko) Chrome/36.0.1979.0 Safari/537.36', 58 | 'Authorization': 'Basic '+auth 59 | } 60 | s.get(url, headers=myheader, timeout=MYTIMEOUT) 61 | root, scheme, weburl = get_url_root(url) 62 | # get services data 63 | service_url = scheme + '://' + root +'/nagios3/cgi-bin/status.cgi?host=all&servicestatustypes=28&limit=0' 64 | all_text = s.get(service_url, headers=myheader, timeout=MYTIMEOUT).text.replace('\n', '') 65 | all_text = all_text.replace('\n', '') 66 | # host_pattern = "(.*?)" 67 | host_pattern = " 3 | * extensions: https://github.com/kayalshri/tableExport.jquery.plugin 4 | */ 5 | 6 | (function ($) { 7 | 'use strict'; 8 | var sprintf = $.fn.bootstrapTable.utils.sprintf; 9 | 10 | var TYPE_NAME = { 11 | json: 'JSON', 12 | xml: 'XML', 13 | png: 'PNG', 14 | csv: 'CSV', 15 | txt: 'TXT', 16 | sql: 'SQL', 17 | doc: 'MS-Word', 18 | excel: 'MS-Excel', 19 | powerpoint: 'MS-Powerpoint', 20 | pdf: 'PDF' 21 | }; 22 | 23 | $.extend($.fn.bootstrapTable.defaults, { 24 | showExport: false, 25 | exportDataType: 'basic', // basic, all, selected 26 | // 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf' 27 | exportTypes: ['json', 'xml', 'csv', 'txt', 'doc', 'excel'], 28 | exportOptions: {} 29 | }); 30 | 31 | $.extend($.fn.bootstrapTable.defaults.icons, { 32 | export: 'glyphicon-export icon-share' 33 | }); 34 | 35 | $.extend($.fn.bootstrapTable.locales, { 36 | formatExport: function () { 37 | return 'Export data'; 38 | } 39 | }); 40 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales); 41 | 42 | var BootstrapTable = $.fn.bootstrapTable.Constructor, 43 | _initToolbar = BootstrapTable.prototype.initToolbar; 44 | 45 | BootstrapTable.prototype.initToolbar = function () { 46 | this.showToolbar = this.options.showExport; 47 | 48 | _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); 49 | 50 | if (this.options.showExport) { 51 | var that = this, 52 | $btnGroup = this.$toolbar.find('>.btn-group'), 53 | $export = $btnGroup.find('div.export'); 54 | 55 | if (!$export.length) { 56 | $export = $([ 57 | '
', 58 | '', 67 | '', 69 | '
'].join('')).appendTo($btnGroup); 70 | 71 | var $menu = $export.find('.dropdown-menu'), 72 | exportTypes = this.options.exportTypes; 73 | 74 | if (typeof this.options.exportTypes === 'string') { 75 | var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(','); 76 | 77 | exportTypes = []; 78 | $.each(types, function (i, value) { 79 | exportTypes.push(value.slice(1, -1)); 80 | }); 81 | } 82 | $.each(exportTypes, function (i, type) { 83 | if (TYPE_NAME.hasOwnProperty(type)) { 84 | $menu.append(['
  • ', 85 | '', 86 | TYPE_NAME[type], 87 | '', 88 | '
  • '].join('')); 89 | } 90 | }); 91 | 92 | $menu.find('li').click(function () { 93 | var type = $(this).data('type'), 94 | doExport = function () { 95 | that.$el.tableExport($.extend({}, that.options.exportOptions, { 96 | type: type, 97 | escape: false 98 | })); 99 | }; 100 | 101 | if (that.options.exportDataType === 'all' && that.options.pagination) { 102 | that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () { 103 | doExport(); 104 | that.togglePagination(); 105 | }); 106 | that.togglePagination(); 107 | } else if (that.options.exportDataType === 'selected') { 108 | var data = that.getData(1), 109 | selectedData = that.getAllSelections(); 110 | that.load(selectedData); 111 | doExport(); 112 | // fix the data format bugs 113 | //var total_value = data.length; 114 | //data = {total:total_value, rows: data}; 115 | that.updatePagination(); 116 | } else { 117 | doExport(); 118 | } 119 | }); 120 | } 121 | } 122 | }; 123 | })(jQuery); 124 | -------------------------------------------------------------------------------- /templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {% block myhead %}{% endblock %} 10 | 11 | {{ title }} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
    28 | 29 | 101 | 102 |
    103 |
    104 |
    105 |

    {{ page_header }}

    106 |
    107 | 108 |
    109 | 110 | {{ page_body }} 111 | {% block content %}{% endblock %} 112 |
    113 | 114 | 115 |
    116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | {% block myscript %}{% endblock %} 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 登录 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
    21 | 102 |
    103 | 104 | {##} 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /static/css/main.css: -------------------------------------------------------------------------------- 1 | /* custom font icons */ 2 | @import "./font-icons/style.css"; 3 | 4 | /*@import "./iconfont.css";*/ 5 | @font-face { 6 | font-family: 'iconfont'; 7 | src: url('./font-icons/font_1475839079_8399725.eot'); /* IE9*/ 8 | src: url('./font-icons/font_1475839079_8399725.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ 9 | url('./font-icons/font_1475839079_8399725.woff') format('woff'), /* chrome、firefox */ 10 | url('./font-icons/font_1475839079_8399725.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/ 11 | url('./font-icons/font_1475839079_8399725.svg#iconfont') format('svg'); /* iOS 4.1- */ 12 | } 13 | 14 | a { 15 | color: rgba(34, 131, 201, 0.83); 16 | text-decoration: none; 17 | } 18 | 19 | a:hover { 20 | color: #ff4081; 21 | text-decoration: none; 22 | } 23 | *{ 24 | box-sizing:border-box; 25 | -moz-box-sizing:border-box; /* Firefox */ 26 | -webkit-box-sizing:border-box; /* Safari */ 27 | } 28 | 29 | html { 30 | font-family: 'Roboto', "Helvetica Neue",Helvetica,"Segoe UI",Arial,"Microsoft YaHei",FreeSans,Arimo,"Droid Sans","wenquanyi micro hei",sans-serif; 31 | -webkit-font-smoothing: antialiased; 32 | height: 100%; 33 | width: 100%; 34 | } 35 | 36 | body { 37 | background: #f5f6f9; 38 | height: 100%; 39 | width: 100%; 40 | } 41 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td { 42 | font-family: 'Roboto', "Helvetica Neue",Helvetica,"Segoe UI",Arial,"Microsoft YaHei",FreeSans,Arimo,"Droid Sans","wenquanyi micro hei",sans-serif !important; 43 | } 44 | 45 | html, body, h1, h2, h3, h4, h5, h6, ul, li { 46 | margin: 0; 47 | padding: 0; 48 | } 49 | 50 | body { 51 | font-size: 15px; 52 | line-height: 24px; 53 | } 54 | .muidocs-checkbox-example { 55 | position: 'absolute'; 56 | border: 2px solid #FF9800; 57 | background-color: #4CAF50; 58 | } 59 | input,button,textarea{ 60 | outline: none; 61 | } 62 | /*Layout Settings*/ 63 | 64 | 65 | /*My Own Settings*/ 66 | #App{ 67 | height: 100%; 68 | width: 100%; 69 | } 70 | div::-webkit-scrollbar{ 71 | width: 5px; 72 | height: 5px; 73 | } 74 | div::-webkit-scrollbar-thumb 75 | { 76 | border-radius: 9px; 77 | -webkit-box-shadow: inset 0 0 3px #888; 78 | box-shadow: inset 0 0 3px #888; 79 | background-color: #999; 80 | } 81 | 82 | 83 | /* login & sign up */ 84 | 85 | 86 | .login-container{ 87 | width: 100%; 88 | height: 100%; 89 | overflow: visible; 90 | background: #eee; 91 | } 92 | .login{ 93 | max-width: 400px; 94 | height: 227px; 95 | width: 90%; 96 | position: relative; 97 | overflow: visible; 98 | } 99 | .wx-login-form{ 100 | overflow: visible; 101 | } 102 | #login-owl{ 103 | width: 211px; 104 | height: 108px; 105 | top:-100px; 106 | left:50%; 107 | margin-left: -111px; 108 | position: absolute; 109 | background: url('../images/owl-login.png') no-repeat; 110 | } 111 | .login-hand,.login-hand-r,.login-hand-focus,.login-hand-r-focus{ 112 | width: 34px; 113 | height: 34px; 114 | background: #472d20; 115 | border-radius: 40px; 116 | -webkit-transform: scaleY(0.6); 117 | transform: scaleY(0.6); 118 | position: absolute; 119 | -webkit-transition: all 0.3s ease-out; 120 | transition: all 0.3s ease-out; 121 | } 122 | .login-hand{ 123 | left: 14px; 124 | bottom: -8px; 125 | } 126 | .login-hand-r{ 127 | left: 170px; 128 | bottom: -8px; 129 | } 130 | .password>.login-hand-focus{ 131 | -webkit-transform: translateY(-20px) translateX(50px) scale(0.7); 132 | transform: translateY(-20px) translateX(50px) scale(0.7); 133 | left: 14px; 134 | bottom: -8px; 135 | } 136 | .password>.login-hand-r-focus{ 137 | -webkit-transform: translateY(-20px) translateX(-50px) scale(0.7); 138 | transform: translateY(-20px) translateX(-50px) scale(0.7); 139 | left: 170px; 140 | bottom: -8px; 141 | } 142 | .login-arms{ 143 | position: absolute; 144 | width: 100%; 145 | top: 58px; 146 | height: 41px; 147 | overflow: hidden; 148 | } 149 | .login-arm,.login-arm-r,.login-arm-r-focus,.login-arm-focus{ 150 | width: 40px; 151 | height: 65px; 152 | position: absolute; 153 | background: url('../images/owl-login-arm.png'); 154 | -webkit-transition: all 0.3s ease-out; 155 | transition: all 0.3s ease-out; 156 | } 157 | .login-arm{ 158 | -webkit-transform: rotate(-20deg); 159 | transform: rotate(-20deg); 160 | left: 20px; 161 | top: 40px; 162 | } 163 | .login-arm-r{ 164 | -webkit-transform: rotate(20deg) scaleX(-1); 165 | transform: rotate(20deg) scaleX(-1); 166 | left: 158px; 167 | top: 40px; 168 | } 169 | .password>.login-arms>.login-arm-focus{ 170 | -webkit-transform: translateY(-40px) translateX(40px); 171 | transform: translateY(-40px) translateX(40px); 172 | left: 20px; 173 | top: 40px; 174 | } 175 | .password>.login-arms>.login-arm-r-focus{ 176 | -webkit-transform: translateY(-40px) translateX(-40px) scaleX(-1); 177 | transform: translateY(-40px) translateX(-40px) scaleX(-1); 178 | left: 158px; 179 | top: 40px; 180 | } 181 | .login-pad{ 182 | padding: 30px; 183 | background: white; 184 | } 185 | .login-controls{ 186 | margin-bottom: 10px; 187 | position: relative; 188 | } 189 | .login-control-label{ 190 | position: absolute; 191 | left: 13px; 192 | top: 10px; 193 | color: #777; 194 | font-family:"iconfont"; 195 | font-size:16px; 196 | font-style:normal; 197 | } 198 | .login input{ 199 | padding: 9px 6px 9px 40px; 200 | height: auto; 201 | color: #444; 202 | } 203 | .login-form-control{ 204 | display: block; 205 | width: 100%; 206 | font-size: 1.1rem; 207 | background-color: white; 208 | border: 1px solid #cccccc; 209 | border-radius: 4px; 210 | } 211 | .login-alert-form-control{ 212 | display: block; 213 | width: 100%; 214 | font-size: 1.1rem; 215 | border-radius: 4px; 216 | } 217 | .login-actions{ 218 | border-top: 1px solid #e4e4e4; 219 | background: #f7f7f7; 220 | padding: 15px 30px; 221 | text-align: right; 222 | } 223 | .login-actions a{ 224 | color: #777; 225 | } 226 | .login-actions a:hover{ 227 | color: #2283c9; 228 | } 229 | .login-btn{ 230 | background: #2283c9; 231 | color: #fff; 232 | padding: 6px 12px; 233 | border: 1px solid transparent; 234 | display: inline-block; 235 | font-size: 1.1rem; 236 | border-radius: 4px; 237 | } 238 | .login-btn-disabled{ 239 | background: #777 !important; 240 | } 241 | .login-error-input{ 242 | border: 1px solid rgba(255, 0, 0, 0.6) !important; 243 | box-shadow: 0 0 5px 1px rgba(255, 0, 0, 0.6); 244 | } -------------------------------------------------------------------------------- /static/css/font-icons/style.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'material-ui-icons'; 3 | src: url('fonts/material-ui-icons.eot'); 4 | } 5 | @font-face { 6 | font-family: 'material-ui-icons'; 7 | src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMghi/NsAAAC8AAAAYGNtYXDMfszDAAABHAAAAGRnYXNwAAAAEAAAAYAAAAAIZ2x5Zp6RlyoAAAGIAAAELGhlYWQDHAqpAAAFtAAAADZoaGVhA+IB8AAABewAAAAkaG10eBcAAroAAAYQAAAAPGxvY2EFugcGAAAGTAAAACBtYXhwABUAUgAABmwAAAAgbmFtZT0DC0MAAAaMAAABn3Bvc3QAAwAAAAAILAAAACAAAwIAAZAABQAAAUwBZgAAAEcBTAFmAAAA9QAZAIQAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADmJQHg/+AAIAHgACAAAAABAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEAFAAAAAQABAAAwAAAAEAIOYH5gvmEOYl//3//wAAAAAAIOYA5gvmEOYl//3//wAB/+MaBBoBGf0Z6QADAAEAAAAAAAAAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAABQBAABUBwAGVAAkADgATABcAGwAAEzMnBzMVIxc3IzczFSM1NTMVIzU3FzM1AzczFatAVlVAQFVWQCrr6+vrJyqaxCqaAUBVVdVWVlUrK1UqKlYrK/7VKysAAAABAEAAFQHAAZUAJAAANx4BFzc+ARceATMyFh0BFAYjIi4CNTQ2OwEyFhUUFhcWBg8BjRdJLS8EDAYRJxQIDQ0IS4ViOQ0ISwkMBwUCAgUv7y1IFy4FAwIGBwwJSgkNOWOESwkMDAkUJhIGCwUvAAAAAwAAAGsCAAFVABoAJwA0AAABIgYVFBYXIz4BNTQmIyIGFRQWMyEyNjU0JiMFIiY1NDYzMhYVFAYjISImNTQ2MzIWFRQGIwGLMUUPDGAMD0UxMEVFMAEWMEVFMP7qHysrHx8sLB8BFh8sLB8fKysfAVVEMRUmEBAmFTFERDExREQxMUTALB8fLCwfHywsHx8sLB8fLAAAAAABAIAAgAGAAR4ABQAAAQcnBxc3AWJiYh6AgAEeYmIegIAAAAABACsAFQHVAasACQAAJRcnNy8BDwEXBwEAhCN0mTw8mXQjZVCWZQ2Ojg1llgAAAAABACsAKwHVAZUACgAANzUzFTM1MycHMxXVVmpA1dVAK4CAqsDAqgAAAgArAAAB1QGrABQAHwAAASIOAhUUHgIzMj4CNTQuAiMTJwc3Jz8BHwEHFwEALE46ISE6TiwsTjohITpOLFpaWhhQaSkpaVAYAasiOk4sLE45IiI5TiwsTjoi/qo3N2dFCWFhCUVnAAACABUAFQHrAcAABAAiAAA3MxEjESU0JisBNzU0Ji8BBw4BHQEUFjsBMjY/AT4BPQEjNxVWVgHWGRKHFQUEF4wGBxkSwA0VBUEBAgEBFQEA/wDrEhlhBwcLBRaNBRAJ1RIZDwuXAwgEKQIAAAABAMsAawE1AUAAAgAAPwEny2pqa2prAAACAC0AAgHUAaoABwATAAABFTMuAycHDgEVFBYzMjY3IzUBANQEJTpJKCtQWG5PSGoIzwGq1ShKOSUFMAlrSE9tWVDPAAEALAAHAdQBpABPAAABIg4CFRQWFxY2NTwBNQYmMS4BMSY2MR4BMRY2Nz4BNy4BNTQ2Ny4BNzAWFz4BMzIWFz4BMRYGBx4BFRQGBx4BFRwBFRQWNz4BNTQuAiMBACxNOiFSPwgGLBsIEA4PEBEOJwkBCAQjPQsKAQUIHB8NGg4OGg0fGwkFAQoLPSQGCQYIP1IhOk0sAaQhOk0sRm4VAggEBBYNCSITDAoDARQZAwQKDgQEKD0SHAsEHhYBFAMEBAMUARYeBAscEj0oBAUTDxUgBQQIAhVuRixNOiEAAAAAAQAAAAEAAJWo+pJfDzz1AAsCAAAAAADQ/uT2AAAAAND+5PYAAAAAAgABwAAAAAgAAgAAAAAAAAABAAAB4P/gAAACAAAAAAACAAABAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAEAAAACAABAAgAAQAIAAAACAACAAgAAKwIAACsCAAArAgAAFQIAAMsCAAAtAgAALAAAAAAACgAUAB4ATACEANAA4gD6AQ4BQgF4AYQBpgIWAAEAAAAPAFAABQAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAiAAAAAQAAAAAAAgAOAI0AAQAAAAAAAwAiADgAAQAAAAAABAAiAJsAAQAAAAAABQAWACIAAQAAAAAABgARAFoAAQAAAAAACgA0AL0AAwABBAkAAQAiAAAAAwABBAkAAgAOAI0AAwABBAkAAwAiADgAAwABBAkABAAiAJsAAwABBAkABQAWACIAAwABBAkABgAiAGsAAwABBAkACgA0AL0AbQBhAHQAZQByAGkAYQBsAC0AdQBpAC0AaQBjAG8AbgBzAFYAZQByAHMAaQBvAG4AIAAxAC4AMABtAGEAdABlAHIAaQBhAGwALQB1AGkALQBpAGMAbwBuAHNtYXRlcmlhbC11aS1pY29ucwBtAGEAdABlAHIAaQBhAGwALQB1AGkALQBpAGMAbwBuAHMAUgBlAGcAdQBsAGEAcgBtAGEAdABlAHIAaQBhAGwALQB1AGkALQBpAGMAbwBuAHMARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'), 8 | url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAiYAAsAAAAACEwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgCGL822NtYXAAAAFoAAAAZAAAAGTMfszDZ2FzcAAAAcwAAAAIAAAACAAAABBnbHlmAAAB1AAABCwAAAQsnpGXKmhlYWQAAAYAAAAANgAAADYDHAqpaGhlYQAABjgAAAAkAAAAJAPiAfBobXR4AAAGXAAAADwAAAA8FwACumxvY2EAAAaYAAAAIAAAACAFugcGbWF4cAAABrgAAAAgAAAAIAAVAFJuYW1lAAAG2AAAAZ8AAAGfPQMLQ3Bvc3QAAAh4AAAAIAAAACAAAwAAAAMCAAGQAAUAAAFMAWYAAABHAUwBZgAAAPUAGQCEAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA5iUB4P/gACAB4AAgAAAAAQAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABABQAAAAEAAQAAMAAAABACDmB+YL5hDmJf/9//8AAAAAACDmAOYL5hDmJf/9//8AAf/jGgQaARn9GekAAwABAAAAAAAAAAAAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAUAQAAVAcABlQAJAA4AEwAXABsAABMzJwczFSMXNyM3MxUjNTUzFSM1NxczNQM3MxWrQFZVQEBVVkAq6+vr6ycqmsQqmgFAVVXVVlZVKytVKipWKyv+1SsrAAAAAQBAABUBwAGVACQAADceARc3PgEXHgEzMhYdARQGIyIuAjU0NjsBMhYVFBYXFgYPAY0XSS0vBAwGEScUCA0NCEuFYjkNCEsJDAcFAgIFL+8tSBcuBQMCBgcMCUoJDTljhEsJDAwJFCYSBgsFLwAAAAMAAABrAgABVQAaACcANAAAASIGFRQWFyM+ATU0JiMiBhUUFjMhMjY1NCYjBSImNTQ2MzIWFRQGIyEiJjU0NjMyFhUUBiMBizFFDwxgDA9FMTBFRTABFjBFRTD+6h8rKx8fLCwfARYfLCwfHysrHwFVRDEVJhAQJhUxREQxMUREMTFEwCwfHywsHx8sLB8fLCwfHywAAAAAAQCAAIABgAEeAAUAAAEHJwcXNwFiYmIegIABHmJiHoCAAAAAAQArABUB1QGrAAkAACUXJzcvAQ8BFwcBAIQjdJk8PJl0I2VQlmUNjo4NZZYAAAAAAQArACsB1QGVAAoAADc1MxUzNTMnBzMV1VZqQNXVQCuAgKrAwKoAAAIAKwAAAdUBqwAUAB8AAAEiDgIVFB4CMzI+AjU0LgIjEycHNyc/AR8BBxcBACxOOiEhOk4sLE46ISE6TixaWloYUGkpKWlQGAGrIjpOLCxOOSIiOU4sLE46Iv6qNzdnRQlhYQlFZwAAAgAVABUB6wHAAAQAIgAANzMRIxElNCYrATc1NCYvAQcOAR0BFBY7ATI2PwE+AT0BIzcVVlYB1hkShxUFBBeMBgcZEsANFQVBAQIBARUBAP8A6xIZYQcHCwUWjQUQCdUSGQ8LlwMIBCkCAAAAAQDLAGsBNQFAAAIAAD8BJ8tqamtqawAAAgAtAAIB1AGqAAcAEwAAARUzLgMnBw4BFRQWMzI2NyM1AQDUBCU6SSgrUFhuT0hqCM8BqtUoSjklBTAJa0hPbVlQzwABACwABwHUAaQATwAAASIOAhUUFhcWNjU8ATUGJjEuATEmNjEeATEWNjc+ATcuATU0NjcuATcwFhc+ATMyFhc+ATEWBgceARUUBgceARUcARUUFjc+ATU0LgIjAQAsTTohUj8IBiwbCBAODxARDicJAQgEIz0LCgEFCBwfDRoODhoNHxsJBQEKCz0kBgkGCD9SITpNLAGkITpNLEZuFQIIBAQWDQkiEwwKAwEUGQMECg4EBCg9EhwLBB4WARQDBAQDFAEWHgQLHBI9KAQFEw8VIAUECAIVbkYsTTohAAAAAAEAAAABAACVqPqSXw889QALAgAAAAAA0P7k9gAAAADQ/uT2AAAAAAIAAcAAAAAIAAIAAAAAAAAAAQAAAeD/4AAAAgAAAAAAAgAAAQAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAABAAAAAgAAQAIAAEACAAAAAgAAgAIAACsCAAArAgAAKwIAABUCAADLAgAALQIAACwAAAAAAAoAFAAeAEwAhADQAOIA+gEOAUIBeAGEAaYCFgABAAAADwBQAAUAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEAIgAAAAEAAAAAAAIADgCNAAEAAAAAAAMAIgA4AAEAAAAAAAQAIgCbAAEAAAAAAAUAFgAiAAEAAAAAAAYAEQBaAAEAAAAAAAoANAC9AAMAAQQJAAEAIgAAAAMAAQQJAAIADgCNAAMAAQQJAAMAIgA4AAMAAQQJAAQAIgCbAAMAAQQJAAUAFgAiAAMAAQQJAAYAIgBrAAMAAQQJAAoANAC9AG0AYQB0AGUAcgBpAGEAbAAtAHUAaQAtAGkAYwBvAG4AcwBWAGUAcgBzAGkAbwBuACAAMQAuADAAbQBhAHQAZQByAGkAYQBsAC0AdQBpAC0AaQBjAG8AbgBzbWF0ZXJpYWwtdWktaWNvbnMAbQBhAHQAZQByAGkAYQBsAC0AdQBpAC0AaQBjAG8AbgBzAFIAZQBnAHUAbABhAHIAbQBhAHQAZQByAGkAYQBsAC0AdQBpAC0AaQBjAG8AbgBzAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | 13 | [class^="muidocs-icon-"], [class*=" muidocs-icon-"] { 14 | font-family: 'material-ui-icons'; 15 | speak: none; 16 | font-style: normal; 17 | font-weight: normal; 18 | font-variant: normal; 19 | text-transform: none; 20 | line-height: 1; 21 | 22 | /* Better Font Rendering =========== */ 23 | -webkit-font-smoothing: antialiased; 24 | -moz-osx-font-smoothing: grayscale; 25 | } 26 | 27 | .muidocs-icon-communication-phone:before { 28 | content: "\e601"; 29 | } 30 | 31 | .muidocs-icon-communication-voicemail:before { 32 | content: "\e602"; 33 | } 34 | 35 | .muidocs-icon-navigation-expand-more:before { 36 | content: "\e603"; 37 | } 38 | 39 | .muidocs-icon-action-grade:before { 40 | content: "\e604"; 41 | } 42 | 43 | .muidocs-icon-action-home:before { 44 | content: "\e605"; 45 | } 46 | 47 | .muidocs-icon-action-stars:before { 48 | content: "\e606"; 49 | } 50 | 51 | .muidocs-icon-action-thumb-up:before { 52 | content: "\e607"; 53 | } 54 | 55 | .muidocs-icon-custom-sort:before { 56 | content: "\e600"; 57 | } 58 | 59 | .muidocs-icon-custom-github:before { 60 | content: "\e625"; 61 | } 62 | 63 | .muidocs-icon-custom-arrow-drop-right:before { 64 | content: "\e60b"; 65 | } 66 | 67 | .muidocs-icon-custom-pie:before { 68 | content: "\e610"; 69 | } 70 | 71 | -------------------------------------------------------------------------------- /static/css/sb-admin.css: -------------------------------------------------------------------------------- 1 | /* Global Styles */ 2 | 3 | /* ------------------------------- */ 4 | 5 | body { 6 | padding-top: 100px; 7 | background-color: #f8f8f8; 8 | } 9 | 10 | @media(min-width:768px) { 11 | body { 12 | padding-top: 50px; 13 | } 14 | } 15 | 16 | /* Wrappers */ 17 | 18 | /* ------------------------------- */ 19 | 20 | #wrapper { 21 | width: 100%; 22 | } 23 | 24 | #page-wrapper { 25 | padding: 0 15px; 26 | min-height: 568px; 27 | background-color: #fff; 28 | } 29 | 30 | @media(min-width:768px) { 31 | #page-wrapper { 32 | position: inherit; 33 | margin: 0 0 0 250px; 34 | padding: 0 30px; 35 | min-height: 1300px; 36 | border-left: 1px solid #e7e7e7; 37 | } 38 | } 39 | 40 | /* Navigation */ 41 | 42 | /* ------------------------------- */ 43 | 44 | /* Top Right Navigation Dropdown Styles */ 45 | 46 | .navbar-top-links li { 47 | display: inline-block; 48 | } 49 | 50 | .navbar-top-links li:last-child { 51 | margin-right: 15px; 52 | } 53 | 54 | .navbar-top-links li a { 55 | padding: 15px; 56 | min-height: 50px; 57 | } 58 | 59 | .navbar-top-links .dropdown-menu li { 60 | display: block; 61 | } 62 | 63 | .navbar-top-links .dropdown-menu li:last-child { 64 | margin-right: 0; 65 | } 66 | 67 | .navbar-top-links .dropdown-menu li a { 68 | padding: 3px 20px; 69 | min-height: 0; 70 | } 71 | 72 | .navbar-top-links .dropdown-menu li a div { 73 | white-space: normal; 74 | } 75 | 76 | .navbar-top-links .dropdown-messages, 77 | .navbar-top-links .dropdown-tasks, 78 | .navbar-top-links .dropdown-alerts { 79 | width: 310px; 80 | min-width: 0; 81 | } 82 | 83 | .navbar-top-links .dropdown-messages { 84 | margin-left: 5px; 85 | } 86 | 87 | .navbar-top-links .dropdown-tasks { 88 | margin-left: -59px; 89 | } 90 | 91 | .navbar-top-links .dropdown-alerts { 92 | margin-left: -123px; 93 | } 94 | 95 | .navbar-top-links .dropdown-user { 96 | right: 0; 97 | left: auto; 98 | } 99 | 100 | /* Sidebar Menu Styles */ 101 | 102 | .navbar-static-side ul li { 103 | border-bottom: 1px solid #e7e7e7; 104 | } 105 | 106 | .sidebar-search { 107 | padding: 15px; 108 | } 109 | 110 | .arrow { 111 | float: right; 112 | } 113 | 114 | .fa.arrow:before { 115 | content: "\f104"; 116 | } 117 | 118 | .active > a > .fa.arrow:before { 119 | content: "\f107"; 120 | } 121 | 122 | .nav-second-level li, 123 | .nav-third-level li { 124 | border-bottom: none !important; 125 | } 126 | 127 | .nav-second-level li a { 128 | padding-left: 37px; 129 | } 130 | 131 | .nav-third-level li a { 132 | padding-left: 52px; 133 | } 134 | 135 | @media(min-width:768px) { 136 | .navbar-static-side { 137 | z-index: 1; 138 | position: absolute; 139 | width: 250px; 140 | margin-top: 51px; 141 | } 142 | 143 | .navbar-top-links .dropdown-messages, 144 | .navbar-top-links .dropdown-tasks, 145 | .navbar-top-links .dropdown-alerts { 146 | margin-left: auto; 147 | } 148 | } 149 | 150 | @media(max-height:600px) and (max-width:767px) { 151 | .sidebar-collapse { 152 | max-height: 300px; 153 | overflow-y: scroll; 154 | } 155 | } 156 | 157 | @media(max-height:400px) and (max-width:767px) { 158 | .sidebar-collapse { 159 | max-height: 200px; 160 | overflow-y: scroll; 161 | } 162 | } 163 | 164 | /* Buttons */ 165 | 166 | /* ------------------------------- */ 167 | 168 | .btn-outline { 169 | color: inherit; 170 | background-color: transparent; 171 | transition: all .5s; 172 | } 173 | 174 | .btn-primary.btn-outline { 175 | color: #428bca; 176 | } 177 | 178 | .btn-success.btn-outline { 179 | color: #5cb85c; 180 | } 181 | 182 | .btn-info.btn-outline { 183 | color: #5bc0de; 184 | } 185 | 186 | .btn-warning.btn-outline { 187 | color: #f0ad4e; 188 | } 189 | 190 | .btn-danger.btn-outline { 191 | color: #d9534f; 192 | } 193 | 194 | .btn-primary.btn-outline:hover, 195 | .btn-success.btn-outline:hover, 196 | .btn-info.btn-outline:hover, 197 | .btn-warning.btn-outline:hover, 198 | .btn-danger.btn-outline:hover { 199 | color: #fff; 200 | } 201 | 202 | /* Pages */ 203 | 204 | /* ------------------------------- */ 205 | 206 | /* Dashboard Chat */ 207 | 208 | .chat { 209 | margin: 0; 210 | padding: 0; 211 | list-style: none; 212 | } 213 | 214 | .chat li { 215 | margin-bottom: 10px; 216 | padding-bottom: 5px; 217 | border-bottom: 1px dotted #B3A9A9; 218 | } 219 | 220 | .chat li.left .chat-body { 221 | margin-left: 60px; 222 | } 223 | 224 | .chat li.right .chat-body { 225 | margin-right: 60px; 226 | } 227 | 228 | .chat li .chat-body p { 229 | margin: 0; 230 | color: #777777; 231 | } 232 | 233 | .panel .slidedown .glyphicon, 234 | .chat .glyphicon { 235 | margin-right: 5px; 236 | } 237 | 238 | .chat-panel .panel-body { 239 | height: 350px; 240 | overflow-y: scroll; 241 | } 242 | 243 | /* Login Page */ 244 | 245 | .login-panel { 246 | margin-top: 25%; 247 | } 248 | 249 | /* Flot Chart Containers */ 250 | 251 | .flot-chart { 252 | display: block; 253 | height: 400px; 254 | } 255 | 256 | .flot-chart-content { 257 | width: 100%; 258 | height: 100%; 259 | } 260 | 261 | /* DataTables Overrides */ 262 | 263 | table.dataTable thead .sorting, 264 | table.dataTable thead .sorting_asc, 265 | table.dataTable thead .sorting_desc, 266 | table.dataTable thead .sorting_asc_disabled, 267 | table.dataTable thead .sorting_desc_disabled { 268 | background: transparent; 269 | } 270 | 271 | table.dataTable thead .sorting_asc:after { 272 | content: "\f0de"; 273 | float: right; 274 | font-family: fontawesome; 275 | } 276 | 277 | table.dataTable thead .sorting_desc:after { 278 | content: "\f0dd"; 279 | float: right; 280 | font-family: fontawesome; 281 | } 282 | 283 | table.dataTable thead .sorting:after { 284 | content: "\f0dc"; 285 | float: right; 286 | font-family: fontawesome; 287 | color: rgba(50,50,50,.5); 288 | } 289 | 290 | /* Circle Buttons */ 291 | 292 | .btn-circle { 293 | width: 30px; 294 | height: 30px; 295 | padding: 6px 0; 296 | border-radius: 15px; 297 | text-align: center; 298 | font-size: 12px; 299 | line-height: 1.428571429; 300 | } 301 | 302 | .btn-circle.btn-lg { 303 | width: 50px; 304 | height: 50px; 305 | padding: 10px 16px; 306 | border-radius: 25px; 307 | font-size: 18px; 308 | line-height: 1.33; 309 | } 310 | 311 | .btn-circle.btn-xl { 312 | width: 70px; 313 | height: 70px; 314 | padding: 10px 16px; 315 | border-radius: 35px; 316 | font-size: 24px; 317 | line-height: 1.33; 318 | } 319 | 320 | .show-grid [class^="col-"] { 321 | padding-top: 10px; 322 | padding-bottom: 10px; 323 | border: 1px solid #ddd; 324 | background-color: #eee !important; 325 | } 326 | 327 | .show-grid { 328 | margin: 15px 0; 329 | } 330 | 331 | .url-icon { 332 | width: 70px; 333 | height: 70px; 334 | } -------------------------------------------------------------------------------- /static/css/flex-css-layout.min.css: -------------------------------------------------------------------------------- 1 | [flex], [flex] > *, [flex] > [flex] { 2 | overflow: hidden 3 | } 4 | 5 | [flex] { 6 | display: -webkit-box; 7 | display: -webkit-flex; 8 | display: -ms-flexbox; 9 | display: flex 10 | } 11 | 12 | [flex] > * { 13 | display: block 14 | } 15 | 16 | [flex] > [flex] { 17 | display: -webkit-box; 18 | display: -webkit-flex; 19 | display: -ms-flexbox; 20 | display: flex 21 | } 22 | 23 | [flex~="dir:left"] { 24 | -webkit-box-orient: horizontal; 25 | -webkit-box-direction: normal; 26 | -webkit-flex-direction: row; 27 | -ms-flex-direction: row; 28 | flex-direction: row 29 | } 30 | 31 | [flex~="dir:right"] { 32 | -webkit-box-orient: horizontal; 33 | -webkit-box-direction: reverse; 34 | -webkit-flex-direction: row-reverse; 35 | -ms-flex-direction: row-reverse; 36 | flex-direction: row-reverse 37 | } 38 | 39 | [flex~="dir:top"] { 40 | -webkit-box-orient: vertical; 41 | -webkit-box-direction: normal; 42 | -webkit-flex-direction: column; 43 | -ms-flex-direction: column; 44 | flex-direction: column 45 | } 46 | 47 | [flex~="dir:bottom"] { 48 | -webkit-box-orient: vertical; 49 | -webkit-box-direction: reverse; 50 | -webkit-flex-direction: column-reverse; 51 | -ms-flex-direction: column-reverse; 52 | flex-direction: column-reverse 53 | } 54 | 55 | [flex~="main:left"] { 56 | -webkit-box-pack: start; 57 | -webkit-justify-content: flex-start; 58 | -ms-flex-pack: start; 59 | justify-content: flex-start 60 | } 61 | 62 | [flex~="main:right"] { 63 | -webkit-box-pack: end; 64 | -webkit-justify-content: flex-end; 65 | -ms-flex-pack: end; 66 | justify-content: flex-end 67 | } 68 | 69 | [flex~="main:justify"] { 70 | -webkit-box-pack: justify; 71 | -webkit-justify-content: space-between; 72 | -ms-flex-pack: justify; 73 | justify-content: space-between 74 | } 75 | 76 | [flex~="main:center"] { 77 | -webkit-box-pack: center; 78 | -webkit-justify-content: center; 79 | -ms-flex-pack: center; 80 | justify-content: center 81 | } 82 | 83 | [flex~="cross:top"] { 84 | -webkit-box-align: start; 85 | -webkit-align-items: flex-start; 86 | -ms-flex-align: start; 87 | -ms-grid-row-align: flex-start; 88 | align-items: flex-start 89 | } 90 | 91 | [flex~="cross:bottom"] { 92 | -webkit-box-align: end; 93 | -webkit-align-items: flex-end; 94 | -ms-flex-align: end; 95 | -ms-grid-row-align: flex-end; 96 | align-items: flex-end 97 | } 98 | 99 | [flex~="cross:center"] { 100 | -webkit-box-align: center; 101 | -webkit-align-items: center; 102 | -ms-flex-align: center; 103 | -ms-grid-row-align: center; 104 | align-items: center 105 | } 106 | 107 | [flex~="cross:baseline"] { 108 | -webkit-box-align: baseline; 109 | -webkit-align-items: baseline; 110 | -ms-flex-align: baseline; 111 | -ms-grid-row-align: baseline; 112 | align-items: baseline 113 | } 114 | 115 | [flex~="cross:stretch"] { 116 | -webkit-box-align: stretch; 117 | -webkit-align-items: stretch; 118 | -ms-flex-align: stretch; 119 | -ms-grid-row-align: stretch; 120 | align-items: stretch 121 | } 122 | 123 | [flex~="box:mean"] > *, [flex~="box:first"] > *, [flex~="box:last"] > *, [flex~="box:justify"] > * { 124 | width: 0; 125 | height: auto; 126 | -webkit-box-flex: 1; 127 | -webkit-flex-grow: 1; 128 | -ms-flex-positive: 1; 129 | flex-grow: 1; 130 | -webkit-flex-shrink: 1; 131 | -ms-flex-negative: 1; 132 | flex-shrink: 1 133 | } 134 | 135 | [flex~="box:first"] > :first-child, [flex~="box:last"] > :last-child, [flex~="box:justify"] > :first-child, [flex~="box:justify"] > :last-child { 136 | width: auto; 137 | -webkit-box-flex: 0; 138 | -webkit-flex-grow: 0; 139 | -ms-flex-positive: 0; 140 | flex-grow: 0; 141 | -webkit-flex-shrink: 0; 142 | -ms-flex-negative: 0; 143 | flex-shrink: 0 144 | } 145 | 146 | [flex~="dir:top"][flex~="box:mean"] > *, [flex~="dir:top"][flex~="box:first"] > *, [flex~="dir:top"][flex~="box:last"] > *, [flex~="dir:top"][flex~="box:justify"] > *, [flex~="dir:bottom"][flex~="box:mean"] > *, [flex~="dir:bottom"][flex~="box:first"] > *, [flex~="dir:bottom"][flex~="box:last"] > *, [flex~="dir:bottom"][flex~="box:justify"] > * { 147 | width: auto; 148 | height: 0; 149 | -webkit-box-flex: 1; 150 | -webkit-flex-grow: 1; 151 | -ms-flex-positive: 1; 152 | flex-grow: 1; 153 | -webkit-flex-shrink: 1; 154 | -ms-flex-negative: 1; 155 | flex-shrink: 1 156 | } 157 | 158 | [flex~="dir:top"][flex~="box:first"] > :first-child, [flex~="dir:top"][flex~="box:last"] > :last-child, [flex~="dir:top"][flex~="box:justify"] > :first-child, [flex~="dir:top"][flex~="box:justify"] > :last-child, [flex~="dir:bottom"][flex~="box:first"] > :first-child, [flex~="dir:bottom"][flex~="box:last"] > :last-child, [flex~="dir:bottom"][flex~="box:justify"] > :first-child [flex~="dir:bottom"][flex~="box:justify"] > :last-child { 159 | height: auto; 160 | -webkit-box-flex: 0; 161 | -webkit-flex-grow: 0; 162 | -ms-flex-positive: 0; 163 | flex-grow: 0; 164 | -webkit-flex-shrink: 0; 165 | -ms-flex-negative: 0; 166 | flex-shrink: 0 167 | } 168 | 169 | [flex-box="0"] { 170 | -webkit-box-flex: 0; 171 | -webkit-flex-grow: 0; 172 | -ms-flex-positive: 0; 173 | flex-grow: 0; 174 | -webkit-flex-shrink: 0; 175 | -ms-flex-negative: 0; 176 | flex-shrink: 0 177 | } 178 | 179 | [flex-box="1"] { 180 | -webkit-box-flex: 1; 181 | -webkit-flex-grow: 1; 182 | -ms-flex-positive: 1; 183 | flex-grow: 1; 184 | -webkit-flex-shrink: 1; 185 | -ms-flex-negative: 1; 186 | flex-shrink: 1 187 | } 188 | 189 | [flex-box="2"] { 190 | -webkit-box-flex: 2; 191 | -webkit-flex-grow: 2; 192 | -ms-flex-positive: 2; 193 | flex-grow: 2; 194 | -webkit-flex-shrink: 2; 195 | -ms-flex-negative: 2; 196 | flex-shrink: 2 197 | } 198 | 199 | [flex-box="3"] { 200 | -webkit-box-flex: 3; 201 | -webkit-flex-grow: 3; 202 | -ms-flex-positive: 3; 203 | flex-grow: 3; 204 | -webkit-flex-shrink: 3; 205 | -ms-flex-negative: 3; 206 | flex-shrink: 3 207 | } 208 | 209 | [flex-box="4"] { 210 | -webkit-box-flex: 4; 211 | -webkit-flex-grow: 4; 212 | -ms-flex-positive: 4; 213 | flex-grow: 4; 214 | -webkit-flex-shrink: 4; 215 | -ms-flex-negative: 4; 216 | flex-shrink: 4 217 | } 218 | 219 | [flex-box="5"] { 220 | -webkit-box-flex: 5; 221 | -webkit-flex-grow: 5; 222 | -ms-flex-positive: 5; 223 | flex-grow: 5; 224 | -webkit-flex-shrink: 5; 225 | -ms-flex-negative: 5; 226 | flex-shrink: 5 227 | } 228 | 229 | [flex-box="6"] { 230 | -webkit-box-flex: 6; 231 | -webkit-flex-grow: 6; 232 | -ms-flex-positive: 6; 233 | flex-grow: 6; 234 | -webkit-flex-shrink: 6; 235 | -ms-flex-negative: 6; 236 | flex-shrink: 6 237 | } 238 | 239 | [flex-box="7"] { 240 | -webkit-box-flex: 7; 241 | -webkit-flex-grow: 7; 242 | -ms-flex-positive: 7; 243 | flex-grow: 7; 244 | -webkit-flex-shrink: 7; 245 | -ms-flex-negative: 7; 246 | flex-shrink: 7 247 | } 248 | 249 | [flex-box="8"] { 250 | -webkit-box-flex: 8; 251 | -webkit-flex-grow: 8; 252 | -ms-flex-positive: 8; 253 | flex-grow: 8; 254 | -webkit-flex-shrink: 8; 255 | -ms-flex-negative: 8; 256 | flex-shrink: 8 257 | } 258 | 259 | [flex-box="9"] { 260 | -webkit-box-flex: 9; 261 | -webkit-flex-grow: 9; 262 | -ms-flex-positive: 9; 263 | flex-grow: 9; 264 | -webkit-flex-shrink: 9; 265 | -ms-flex-negative: 9; 266 | flex-shrink: 9 267 | } 268 | 269 | [flex-box="10"] { 270 | -webkit-box-flex: 10; 271 | -webkit-flex-grow: 10; 272 | -ms-flex-positive: 10; 273 | flex-grow: 10; 274 | -webkit-flex-shrink: 10; 275 | -ms-flex-negative: 10; 276 | flex-shrink: 10 277 | } -------------------------------------------------------------------------------- /static/css/bootstrap-table.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @author zhixin wen 3 | * version: 1.11.0 4 | * https://github.com/wenzhixin/bootstrap-table/ 5 | */ 6 | 7 | .bootstrap-table .table { 8 | margin-bottom: 0 !important; 9 | border-bottom: 1px solid #dddddd; 10 | border-collapse: collapse !important; 11 | border-radius: 1px; 12 | } 13 | 14 | .bootstrap-table .table:not(.table-condensed), 15 | .bootstrap-table .table:not(.table-condensed) > tbody > tr > th, 16 | .bootstrap-table .table:not(.table-condensed) > tfoot > tr > th, 17 | .bootstrap-table .table:not(.table-condensed) > thead > tr > td, 18 | .bootstrap-table .table:not(.table-condensed) > tbody > tr > td, 19 | .bootstrap-table .table:not(.table-condensed) > tfoot > tr > td { 20 | padding: 8px; 21 | } 22 | 23 | .bootstrap-table .table.table-no-bordered > thead > tr > th, 24 | .bootstrap-table .table.table-no-bordered > tbody > tr > td { 25 | border-right: 2px solid transparent; 26 | } 27 | 28 | .bootstrap-table .table.table-no-bordered > tbody > tr > td:last-child { 29 | border-right: none; 30 | } 31 | 32 | .fixed-table-container { 33 | position: relative; 34 | clear: both; 35 | border: 1px solid #dddddd; 36 | border-radius: 4px; 37 | -webkit-border-radius: 4px; 38 | -moz-border-radius: 4px; 39 | } 40 | 41 | .fixed-table-container.table-no-bordered { 42 | border: 1px solid transparent; 43 | } 44 | 45 | .fixed-table-footer, 46 | .fixed-table-header { 47 | overflow: hidden; 48 | } 49 | 50 | .fixed-table-footer { 51 | border-top: 1px solid #dddddd; 52 | } 53 | 54 | .fixed-table-body { 55 | overflow-x: auto; 56 | overflow-y: auto; 57 | height: 100%; 58 | } 59 | 60 | .fixed-table-container table { 61 | width: 100%; 62 | } 63 | 64 | .fixed-table-container thead th { 65 | height: 0; 66 | padding: 0; 67 | margin: 0; 68 | border-left: 1px solid #dddddd; 69 | } 70 | 71 | .fixed-table-container thead th:focus { 72 | outline: 0 solid transparent; 73 | } 74 | 75 | .fixed-table-container thead th:first-child { 76 | border-left: none; 77 | border-top-left-radius: 4px; 78 | -webkit-border-top-left-radius: 4px; 79 | -moz-border-radius-topleft: 4px; 80 | } 81 | 82 | .fixed-table-container thead th .th-inner, 83 | .fixed-table-container tbody td .th-inner { 84 | padding: 8px; 85 | line-height: 24px; 86 | vertical-align: top; 87 | overflow: hidden; 88 | text-overflow: ellipsis; 89 | white-space: nowrap; 90 | } 91 | 92 | .fixed-table-container thead th .sortable { 93 | cursor: pointer; 94 | background-position: right; 95 | background-repeat: no-repeat; 96 | padding-right: 30px; 97 | } 98 | 99 | .fixed-table-container thead th .both { 100 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC'); 101 | } 102 | 103 | .fixed-table-container thead th .asc { 104 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg=='); 105 | } 106 | 107 | .fixed-table-container thead th .desc { 108 | background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= '); 109 | } 110 | 111 | .fixed-table-container th.detail { 112 | width: 30px; 113 | } 114 | 115 | .fixed-table-container tbody td { 116 | border-left: 1px solid #dddddd; 117 | } 118 | 119 | .fixed-table-container tbody tr:first-child td { 120 | border-top: none; 121 | } 122 | 123 | .fixed-table-container tbody td:first-child { 124 | border-left: none; 125 | } 126 | 127 | /* the same color with .active */ 128 | .fixed-table-container tbody .selected td { 129 | background-color: #f5f5f5; 130 | } 131 | 132 | .fixed-table-container .bs-checkbox { 133 | text-align: center; 134 | } 135 | 136 | .fixed-table-container .bs-checkbox .th-inner { 137 | padding: 8px 0; 138 | } 139 | 140 | .fixed-table-container input[type="radio"], 141 | .fixed-table-container input[type="checkbox"] { 142 | margin: 0 auto !important; 143 | } 144 | 145 | .fixed-table-container .no-records-found { 146 | text-align: center; 147 | } 148 | 149 | .fixed-table-pagination div.pagination, 150 | .fixed-table-pagination .pagination-detail { 151 | margin-top: 10px; 152 | margin-bottom: 10px; 153 | } 154 | 155 | .fixed-table-pagination div.pagination .pagination { 156 | margin: 0; 157 | } 158 | 159 | .fixed-table-pagination .pagination a { 160 | padding: 6px 12px; 161 | line-height: 1.428571429; 162 | } 163 | 164 | .fixed-table-pagination .pagination-info { 165 | line-height: 34px; 166 | margin-right: 5px; 167 | } 168 | 169 | .fixed-table-pagination .btn-group { 170 | position: relative; 171 | display: inline-block; 172 | vertical-align: middle; 173 | } 174 | 175 | .fixed-table-pagination .dropup .dropdown-menu { 176 | margin-bottom: 0; 177 | } 178 | 179 | .fixed-table-pagination .page-list { 180 | display: inline-block; 181 | } 182 | 183 | .fixed-table-toolbar .columns-left { 184 | margin-right: 5px; 185 | } 186 | 187 | .fixed-table-toolbar .columns-right { 188 | margin-left: 5px; 189 | } 190 | 191 | .fixed-table-toolbar .columns label { 192 | display: block; 193 | padding: 3px 20px; 194 | clear: both; 195 | font-weight: normal; 196 | line-height: 1.428571429; 197 | } 198 | 199 | .fixed-table-toolbar .bs-bars, 200 | .fixed-table-toolbar .search, 201 | .fixed-table-toolbar .columns { 202 | position: relative; 203 | margin-top: 10px; 204 | margin-bottom: 10px; 205 | line-height: 34px; 206 | } 207 | 208 | .fixed-table-pagination li.disabled a { 209 | pointer-events: none; 210 | cursor: default; 211 | } 212 | 213 | .fixed-table-loading { 214 | display: none; 215 | position: absolute; 216 | top: 42px; 217 | right: 0; 218 | bottom: 0; 219 | left: 0; 220 | z-index: 99; 221 | background-color: #fff; 222 | text-align: center; 223 | } 224 | 225 | .fixed-table-body .card-view .title { 226 | font-weight: bold; 227 | display: inline-block; 228 | min-width: 30%; 229 | text-align: left !important; 230 | } 231 | 232 | /* support bootstrap 2 */ 233 | .fixed-table-body thead th .th-inner { 234 | box-sizing: border-box; 235 | } 236 | 237 | .table th, .table td { 238 | vertical-align: middle; 239 | box-sizing: border-box; 240 | } 241 | 242 | .fixed-table-toolbar .dropdown-menu { 243 | text-align: left; 244 | max-height: 300px; 245 | overflow: auto; 246 | } 247 | 248 | .fixed-table-toolbar .btn-group > .btn-group { 249 | display: inline-block; 250 | margin-left: -1px !important; 251 | } 252 | 253 | .fixed-table-toolbar .btn-group > .btn-group > .btn { 254 | border-radius: 0; 255 | } 256 | 257 | .fixed-table-toolbar .btn-group > .btn-group:first-child > .btn { 258 | border-top-left-radius: 4px; 259 | border-bottom-left-radius: 4px; 260 | } 261 | 262 | .fixed-table-toolbar .btn-group > .btn-group:last-child > .btn { 263 | border-top-right-radius: 4px; 264 | border-bottom-right-radius: 4px; 265 | } 266 | 267 | .bootstrap-table .table > thead > tr > th { 268 | vertical-align: bottom; 269 | border-bottom: 1px solid #ddd; 270 | } 271 | 272 | /* support bootstrap 3 */ 273 | .bootstrap-table .table thead > tr > th { 274 | padding: 0; 275 | margin: 0; 276 | } 277 | 278 | .bootstrap-table .fixed-table-footer tbody > tr > td { 279 | padding: 0 !important; 280 | } 281 | 282 | .bootstrap-table .fixed-table-footer .table { 283 | border-bottom: none; 284 | border-radius: 0; 285 | padding: 0 !important; 286 | } 287 | 288 | .pull-right .dropdown-menu { 289 | right: 0; 290 | left: auto; 291 | } 292 | 293 | /* calculate scrollbar width */ 294 | p.fixed-table-scroll-inner { 295 | width: 100%; 296 | height: 200px; 297 | } 298 | 299 | div.fixed-table-scroll-outer { 300 | top: 0; 301 | left: 0; 302 | visibility: hidden; 303 | width: 200px; 304 | height: 150px; 305 | overflow: hidden; 306 | } 307 | -------------------------------------------------------------------------------- /templates/webs.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 |
    4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 | {% for message in messages %} 7 | {% if message[0]=='*' %} 8 | 12 | {% else %} 13 | 17 | {% endif %} 18 | {% endfor %} 19 | {% endif %} 20 | {% endwith %} 21 | 22 |
    23 | 31 | 32 | {{ urls }} 33 | 34 | 35 | 69 | 70 | 96 | 97 | 137 | 138 | 139 |
    140 |
    141 | {% endblock %} 142 | {% block myscript %} 143 | 144 | 145 | 146 | 147 | 148 | {% endblock %} -------------------------------------------------------------------------------- /static/css/bootstrap-select.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap-select v1.10.0 (http://silviomoreto.github.io/bootstrap-select) 3 | * 4 | * Copyright 2013-2016 bootstrap-select 5 | * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) 6 | */ 7 | select.bs-select-hidden, select.selectpicker { 8 | display: none !important 9 | } 10 | 11 | .bootstrap-select { 12 | width: 220px \9 13 | } 14 | 15 | .bootstrap-select > .dropdown-toggle { 16 | width: 100%; 17 | padding-right: 25px; 18 | z-index: 1 19 | } 20 | 21 | .bootstrap-select > select { 22 | position: absolute !important; 23 | bottom: 0; 24 | left: 50%; 25 | display: block !important; 26 | width: .5px !important; 27 | height: 100% !important; 28 | padding: 0 !important; 29 | opacity: 0 !important; 30 | border: none 31 | } 32 | 33 | .bootstrap-select > select.mobile-device { 34 | top: 0; 35 | left: 0; 36 | display: block !important; 37 | width: 100% !important; 38 | z-index: 2 39 | } 40 | 41 | .error .bootstrap-select .dropdown-toggle, .has-error .bootstrap-select .dropdown-toggle { 42 | border-color: #b94a48 43 | } 44 | 45 | .bootstrap-select.fit-width { 46 | width: auto !important 47 | } 48 | 49 | .bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) { 50 | width: 220px 51 | } 52 | 53 | .bootstrap-select .dropdown-toggle:focus { 54 | outline: thin dotted #333 !important; 55 | outline: 5px auto -webkit-focus-ring-color !important; 56 | outline-offset: -2px 57 | } 58 | 59 | .bootstrap-select.form-control { 60 | margin-bottom: 0; 61 | padding: 0; 62 | border: none 63 | } 64 | 65 | .bootstrap-select.form-control:not([class*=col-]) { 66 | width: 100% 67 | } 68 | 69 | .bootstrap-select.form-control.input-group-btn { 70 | z-index: auto 71 | } 72 | 73 | .bootstrap-select.btn-group:not(.input-group-btn), .bootstrap-select.btn-group[class*=col-] { 74 | float: none; 75 | display: inline-block; 76 | margin-left: 0 77 | } 78 | 79 | .bootstrap-select.btn-group.dropdown-menu-right, .bootstrap-select.btn-group[class*=col-].dropdown-menu-right, .row .bootstrap-select.btn-group[class*=col-].dropdown-menu-right { 80 | float: right 81 | } 82 | 83 | .form-group .bootstrap-select.btn-group, .form-horizontal .bootstrap-select.btn-group, .form-inline .bootstrap-select.btn-group { 84 | margin-bottom: 0 85 | } 86 | 87 | .form-group-lg .bootstrap-select.btn-group.form-control, .form-group-sm .bootstrap-select.btn-group.form-control { 88 | padding: 0 89 | } 90 | 91 | .form-inline .bootstrap-select.btn-group .form-control { 92 | width: 100% 93 | } 94 | 95 | .bootstrap-select.btn-group.disabled, .bootstrap-select.btn-group > .disabled { 96 | cursor: not-allowed 97 | } 98 | 99 | .bootstrap-select.btn-group.disabled:focus, .bootstrap-select.btn-group > .disabled:focus { 100 | outline: 0 !important 101 | } 102 | 103 | .bootstrap-select.btn-group.bs-container { 104 | position: absolute 105 | } 106 | 107 | .bootstrap-select.btn-group.bs-container .dropdown-menu { 108 | z-index: 1060 109 | } 110 | 111 | .bootstrap-select.btn-group .dropdown-toggle .filter-option { 112 | display: inline-block; 113 | overflow: hidden; 114 | width: 100%; 115 | text-align: left 116 | } 117 | 118 | .bootstrap-select.btn-group .dropdown-toggle .caret { 119 | position: absolute; 120 | top: 50%; 121 | right: 12px; 122 | margin-top: -2px; 123 | vertical-align: middle 124 | } 125 | 126 | .bootstrap-select.btn-group[class*=col-] .dropdown-toggle { 127 | width: 100% 128 | } 129 | 130 | .bootstrap-select.btn-group .dropdown-menu { 131 | min-width: 100%; 132 | -webkit-box-sizing: border-box; 133 | -moz-box-sizing: border-box; 134 | box-sizing: border-box 135 | } 136 | 137 | .bootstrap-select.btn-group .dropdown-menu.inner { 138 | position: static; 139 | float: none; 140 | border: 0; 141 | padding: 0; 142 | margin: 0; 143 | border-radius: 0; 144 | -webkit-box-shadow: none; 145 | box-shadow: none 146 | } 147 | 148 | .bootstrap-select.btn-group .dropdown-menu li { 149 | position: relative 150 | } 151 | 152 | .bootstrap-select.btn-group .dropdown-menu li.active small { 153 | color: #fff 154 | } 155 | 156 | .bootstrap-select.btn-group .dropdown-menu li.disabled a { 157 | cursor: not-allowed 158 | } 159 | 160 | .bootstrap-select.btn-group .dropdown-menu li a { 161 | cursor: pointer; 162 | -webkit-user-select: none; 163 | -moz-user-select: none; 164 | -ms-user-select: none; 165 | user-select: none 166 | } 167 | 168 | .bootstrap-select.btn-group .dropdown-menu li a.opt { 169 | position: relative; 170 | padding-left: 2.25em 171 | } 172 | 173 | .bootstrap-select.btn-group .dropdown-menu li a span.check-mark { 174 | display: none 175 | } 176 | 177 | .bootstrap-select.btn-group .dropdown-menu li a span.text { 178 | display: inline-block 179 | } 180 | 181 | .bootstrap-select.btn-group .dropdown-menu li small { 182 | padding-left: .5em 183 | } 184 | 185 | .bootstrap-select.btn-group .dropdown-menu .notify { 186 | position: absolute; 187 | bottom: 5px; 188 | width: 96%; 189 | margin: 0 2%; 190 | min-height: 26px; 191 | padding: 3px 5px; 192 | background: #f5f5f5; 193 | border: 1px solid #e3e3e3; 194 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); 195 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); 196 | pointer-events: none; 197 | opacity: .9; 198 | -webkit-box-sizing: border-box; 199 | -moz-box-sizing: border-box; 200 | box-sizing: border-box 201 | } 202 | 203 | .bootstrap-select.btn-group .no-results { 204 | padding: 3px; 205 | background: #f5f5f5; 206 | margin: 0 5px; 207 | white-space: nowrap 208 | } 209 | 210 | .bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option { 211 | position: static 212 | } 213 | 214 | .bootstrap-select.btn-group.fit-width .dropdown-toggle .caret { 215 | position: static; 216 | top: auto; 217 | margin-top: -1px 218 | } 219 | 220 | .bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark { 221 | position: absolute; 222 | display: inline-block; 223 | right: 15px; 224 | margin-top: 5px 225 | } 226 | 227 | .bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text { 228 | margin-right: 34px 229 | } 230 | 231 | .bootstrap-select.show-menu-arrow.open > .dropdown-toggle { 232 | z-index: 1061 233 | } 234 | 235 | .bootstrap-select.show-menu-arrow .dropdown-toggle:before { 236 | content: ''; 237 | border-left: 7px solid transparent; 238 | border-right: 7px solid transparent; 239 | border-bottom: 7px solid rgba(204, 204, 204, .2); 240 | position: absolute; 241 | bottom: -4px; 242 | left: 9px; 243 | display: none 244 | } 245 | 246 | .bootstrap-select.show-menu-arrow .dropdown-toggle:after { 247 | content: ''; 248 | border-left: 6px solid transparent; 249 | border-right: 6px solid transparent; 250 | border-bottom: 6px solid #fff; 251 | position: absolute; 252 | bottom: -4px; 253 | left: 10px; 254 | display: none 255 | } 256 | 257 | .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before { 258 | bottom: auto; 259 | top: -3px; 260 | border-top: 7px solid rgba(204, 204, 204, .2); 261 | border-bottom: 0 262 | } 263 | 264 | .bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after { 265 | bottom: auto; 266 | top: -3px; 267 | border-top: 6px solid #fff; 268 | border-bottom: 0 269 | } 270 | 271 | .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before { 272 | right: 12px; 273 | left: auto 274 | } 275 | 276 | .bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after { 277 | right: 13px; 278 | left: auto 279 | } 280 | 281 | .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after, .bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before { 282 | display: block 283 | } 284 | 285 | .bs-actionsbox, .bs-donebutton, .bs-searchbox { 286 | padding: 4px 8px 287 | } 288 | 289 | .bs-actionsbox { 290 | width: 100%; 291 | -webkit-box-sizing: border-box; 292 | -moz-box-sizing: border-box; 293 | box-sizing: border-box 294 | } 295 | 296 | .bs-actionsbox .btn-group button { 297 | width: 50% 298 | } 299 | 300 | .bs-donebutton { 301 | float: left; 302 | width: 100%; 303 | -webkit-box-sizing: border-box; 304 | -moz-box-sizing: border-box; 305 | box-sizing: border-box 306 | } 307 | 308 | .bs-donebutton .btn-group button { 309 | width: 100% 310 | } 311 | 312 | .bs-searchbox + .bs-actionsbox { 313 | padding: 0 8px 4px 314 | } 315 | 316 | .bs-searchbox .form-control { 317 | margin-bottom: 0; 318 | width: 100%; 319 | float: none 320 | } -------------------------------------------------------------------------------- /static/js/extensions/toolbar/bootstrap-table-toolbar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author: aperez 3 | * @version: v2.0.0 4 | * 5 | * @update Dennis Hernández 6 | */ 7 | 8 | !function($) { 9 | 'use strict'; 10 | 11 | var firstLoad = false; 12 | 13 | var sprintf = $.fn.bootstrapTable.utils.sprintf; 14 | 15 | var showAvdSearch = function(pColumns, searchTitle, searchText, that) { 16 | if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) { 17 | var vModal = sprintf("
    ", "_" + that.options.idTable); 18 | vModal += "
    "; 19 | vModal += "
    "; 20 | vModal += "
    "; 21 | vModal += " "; 22 | vModal += sprintf("

    %s

    ", searchTitle); 23 | vModal += "
    "; 24 | vModal += "
    "; 25 | vModal += sprintf("
    ", "_" + that.options.idTable); 26 | vModal += "
    "; 27 | vModal += "
    "; 28 | vModal += "
    "; 29 | vModal += "
    "; 30 | vModal += "
    "; 31 | 32 | $("body").append($(vModal)); 33 | 34 | var vFormAvd = createFormAvd(pColumns, searchText, that), 35 | timeoutId = 0;; 36 | 37 | $('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join('')); 38 | 39 | $('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) { 40 | clearTimeout(timeoutId); 41 | timeoutId = setTimeout(function () { 42 | that.onColumnAdvancedSearch(event); 43 | }, that.options.searchTimeOut); 44 | }); 45 | 46 | $("#btnCloseAvd" + "_" + that.options.idTable).click(function() { 47 | $("#avdSearchModal" + "_" + that.options.idTable).modal('hide'); 48 | }); 49 | 50 | $("#avdSearchModal" + "_" + that.options.idTable).modal(); 51 | } else { 52 | $("#avdSearchModal" + "_" + that.options.idTable).modal(); 53 | } 54 | }; 55 | 56 | var createFormAvd = function(pColumns, searchText, that) { 57 | var htmlForm = []; 58 | htmlForm.push(sprintf('
    ', that.options.idForm, that.options.actionForm)); 59 | for (var i in pColumns) { 60 | var vObjCol = pColumns[i]; 61 | if (!vObjCol.checkbox && vObjCol.visible && vObjCol.searchable) { 62 | htmlForm.push('
    '); 63 | htmlForm.push(sprintf('', vObjCol.title)); 64 | htmlForm.push('
    '); 65 | htmlForm.push(sprintf('', vObjCol.field, vObjCol.title, vObjCol.field)); 66 | htmlForm.push('
    '); 67 | htmlForm.push('
    '); 68 | } 69 | } 70 | 71 | htmlForm.push('
    '); 72 | htmlForm.push('
    '); 73 | htmlForm.push(sprintf('', "_" + that.options.idTable, searchText)); 74 | 75 | // htmlForm.push(sprintf(' ', '清空')); 76 | htmlForm.push('
    '); 77 | htmlForm.push('
    '); 78 | 79 | htmlForm.push('
    '); 80 | 81 | return htmlForm; 82 | }; 83 | 84 | $.extend($.fn.bootstrapTable.defaults, { 85 | advancedSearch: false, 86 | idForm: 'advancedSearch', 87 | actionForm: '', 88 | idTable: undefined, 89 | onColumnAdvancedSearch: function (field, text) { 90 | return false; 91 | } 92 | }); 93 | 94 | $.extend($.fn.bootstrapTable.defaults.icons, { 95 | //advancedSearchIcon: 'glyphicon-chevron-down' 96 | advancedSearchIcon: 'glyphicon-search' 97 | }); 98 | 99 | $.extend($.fn.bootstrapTable.Constructor.EVENTS, { 100 | 'column-advanced-search.bs.table': 'onColumnAdvancedSearch' 101 | }); 102 | 103 | $.extend($.fn.bootstrapTable.locales, { 104 | formatAdvancedSearch: function() { 105 | //return 'Advanced search'; 106 | return '高级搜索'; 107 | }, 108 | formatAdvancedCloseButton: function() { 109 | //return "Close"; 110 | return '完成'; 111 | } 112 | }); 113 | 114 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales); 115 | 116 | var BootstrapTable = $.fn.bootstrapTable.Constructor, 117 | _initToolbar = BootstrapTable.prototype.initToolbar, 118 | _load = BootstrapTable.prototype.load, 119 | _initSearch = BootstrapTable.prototype.initSearch; 120 | 121 | BootstrapTable.prototype.initToolbar = function() { 122 | _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); 123 | 124 | if (!this.options.search) { 125 | return; 126 | } 127 | 128 | if (!this.options.advancedSearch) { 129 | return; 130 | } 131 | 132 | if (!this.options.idTable) { 133 | return; 134 | } 135 | 136 | var that = this, 137 | html = []; 138 | 139 | //html.push(sprintf('
    ', this.options.buttonsAlign, this.options.buttonsAlign)); 140 | html.push(sprintf('
    '); 143 | 144 | that.$toolbar.find('>.btn-group').first().append(html.join('')); 145 | //that.$toolbar.prepend(html.join('')); 146 | 147 | that.$toolbar.find('button[name="advancedSearch"]') 148 | .off('click').on('click', function() { 149 | showAvdSearch(that.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that); 150 | }); 151 | }; 152 | 153 | BootstrapTable.prototype.load = function(data) { 154 | _load.apply(this, Array.prototype.slice.apply(arguments)); 155 | 156 | if (!this.options.advancedSearch) { 157 | return; 158 | } 159 | 160 | if (typeof this.options.idTable === 'undefined') { 161 | return; 162 | } else { 163 | if (!firstLoad) { 164 | var height = parseInt($(".bootstrap-table").height()); 165 | height += 10; 166 | $("#" + this.options.idTable).bootstrapTable("resetView", {height: height}); 167 | firstLoad = true; 168 | } 169 | } 170 | }; 171 | 172 | BootstrapTable.prototype.initSearch = function () { 173 | _initSearch.apply(this, Array.prototype.slice.apply(arguments)); 174 | 175 | if (!this.options.advancedSearch) { 176 | return; 177 | } 178 | 179 | var that = this; 180 | var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial; 181 | 182 | this.data = fp ? $.grep(this.data, function (item, i) { 183 | for (var key in fp) { 184 | var fval = fp[key].toLowerCase(); 185 | var value = item[key]; 186 | value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, 187 | that.header.formatters[$.inArray(key, that.header.fields)], 188 | [value, item, i], value); 189 | 190 | if (!($.inArray(key, that.header.fields) !== -1 && 191 | (typeof value === 'string' || typeof value === 'number') && 192 | (value + '').toLowerCase().indexOf(fval) !== -1)) { 193 | return false; 194 | } 195 | } 196 | return true; 197 | }) : this.data; 198 | }; 199 | 200 | BootstrapTable.prototype.onColumnAdvancedSearch = function (event) { 201 | var text = $.trim($(event.currentTarget).val()); 202 | var $field = $(event.currentTarget)[0].id; 203 | 204 | if ($.isEmptyObject(this.filterColumnsPartial)) { 205 | this.filterColumnsPartial = {}; 206 | } 207 | if (text) { 208 | this.filterColumnsPartial[$field] = text; 209 | } else { 210 | delete this.filterColumnsPartial[$field]; 211 | } 212 | 213 | this.options.pageNumber = 1; 214 | this.onSearch(event); 215 | this.updatePagination(); 216 | this.trigger('column-advanced-search', $field, text); 217 | }; 218 | }(jQuery); 219 | -------------------------------------------------------------------------------- /myutils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from urlparse import * 3 | import requests 4 | import re 5 | import shutil 6 | import urllib 7 | import hashlib 8 | import os 9 | # import ssl 10 | 11 | 12 | def get_url_root(url): 13 | r = urlparse(url) 14 | 15 | if r.scheme: 16 | scheme = r.scheme 17 | root = r.netloc 18 | weburl = url 19 | else: 20 | scheme = 'http' 21 | root = r.path 22 | weburl = scheme + '://' + url 23 | return root, scheme, weburl 24 | 25 | 26 | def extra_url_ico(url, filepath): 27 | imgUrl = '' 28 | ispass = True 29 | 30 | myhead = { 31 | 'User-Agent': 'Mozilla/5.0 (Windws NT 10.0;WOW64;rv:48.0) Gecko/20100101 Firefox/48.0', 32 | 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 33 | 'Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3', 34 | 'Accept-Encoding': 'gzip,deflate', 35 | 'Upgrade-Insecure-Requests': '1', 36 | } 37 | 38 | r = urlparse(url) 39 | 40 | if r.scheme: 41 | scheme = r.scheme 42 | root = r.netloc 43 | else: 44 | scheme = 'http' 45 | root = r.path 46 | 47 | flag = False 48 | try: 49 | s = requests.session() 50 | r = s.get(url, headers=myhead, verify=False) 51 | rtext = r.text 52 | p = 'shortcut icon.*?href="(.*?)"' 53 | result = re.findall(p, rtext) 54 | if len(result) > 0: 55 | weburl = result[0] 56 | else: 57 | p = 'icon.*?href="(.*?)"' 58 | result = re.findall(p, rtext) 59 | weburl = result[0] 60 | 61 | # weburlfix = weburl[0:4] 62 | # # print weburlfix 63 | # if weburlfix == 'http': 64 | # imgUrl = weburl 65 | # # print imgUrl 66 | # else: 67 | # imgUrl = scheme+"://"+root+weburl 68 | # print imgUrl 69 | if url[-1] != '/': 70 | if weburl[0] != '/': 71 | weburl = '/' + weburl 72 | imgUrl = url + weburl 73 | print imgUrl 74 | 75 | flag = True 76 | except Exception as e: 77 | print e 78 | ispass = False 79 | 80 | if not flag: 81 | try: 82 | imgUrl = scheme + '://' + root + '/favicon.ico' 83 | print imgUrl 84 | r = s.get(imgUrl, stream=True, headers=myhead, verify=False) 85 | if r.status_code == 200: 86 | flag = True 87 | except: 88 | ispass = False 89 | 90 | if not ispass: 91 | try: 92 | weburl = 'images/favicon.ico' 93 | if url[-1] != '/': 94 | weburl = '/' + weburl 95 | imgUrl = url + weburl 96 | print imgUrl 97 | r = s.get(imgUrl, stream=True, headers=myhead, verify=False) 98 | if r.status_code == 200: 99 | flag = True 100 | ispass = True 101 | except: 102 | ispass = False 103 | if flag: 104 | try: 105 | # context = ssl._create_unverified_context() 106 | # urllib.urlretrieve(imgUrl, filepath+"/" + root + '.ico', context=context) 107 | r = s.get(imgUrl, stream=True, headers=myhead, verify=False) 108 | with open(filepath+"/" + root + '.ico', "wb") as f: 109 | for chunk in r.iter_content(chunk_size=1024): 110 | if chunk: 111 | f.write(chunk) 112 | 113 | except Exception as e: 114 | flag = False 115 | if not flag: 116 | if ispass: 117 | shutil.copy(filepath+'/../pass.ico', filepath+"/" + root + '.ico') 118 | else: 119 | shutil.copy(filepath+'/../block.ico', filepath+"/" + root + '.ico') 120 | 121 | 122 | def tranUnicode2Utf(data): 123 | if data[0] == 'u' and data[1] == '\'': 124 | data_decode = data[2:-1].decode('unicode-escape') 125 | else: 126 | data_decode = data 127 | return data_decode 128 | 129 | 130 | def encrypt_password(password): 131 | encrypt = hashlib.md5() 132 | encrypt.update(password) 133 | return encrypt.hexdigest() 134 | 135 | 136 | def create_user_dir(username, filepath): 137 | try: 138 | dirname = filepath + '/' + username.strip() 139 | if not os.path.isdir(dirname): 140 | os.mkdir(dirname) 141 | return True 142 | except Exception as e: 143 | print e 144 | return False 145 | 146 | 147 | def delete_user_dir(username, filepath): 148 | try: 149 | dirname = filepath + '/' + username.strip() 150 | if os.path.isdir(dirname): 151 | shutil.rmtree(dirname) 152 | return True 153 | except Exception as e: 154 | print e 155 | return False 156 | 157 | 158 | def update_user_dir(old_username, new_username, filepath): 159 | try: 160 | old_dirname = filepath + '/' + old_username.strip() 161 | new_dirname = filepath + '/' + new_username.strip() 162 | if os.path.isdir(old_dirname): 163 | os.rename(old_dirname, new_dirname) 164 | return True 165 | except Exception as e: 166 | print e 167 | return False 168 | 169 | 170 | def get_nagios_tmplate(): 171 | # [(host,service,status,check_time,duration,info)] 172 | nagios_service_table = ''' 173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | %s 187 |

    %s - 服务状态

    主机服务状态上次检查持续时间信息
    188 |
    189 | ''' # id,url,aliname, 190 | 191 | nagios_service_tr_tp = ''' 192 | 193 | %s 194 | %s 195 | %s 196 | %s 197 | %s 198 | %s 199 | 200 | ''' # active/success/warning/danger,host,service,status,lcheck,duration,info 201 | 202 | nagios_host_table = ''' 203 |
    204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | %s 216 |

    %s - 主机状态

    主机状态上次检查持续时间信息
    217 |
    218 | ''' # id,url,aliname, 219 | 220 | nagios_host_tr_tp = ''' 221 | 222 | %s 223 | %s 224 | %s 225 | %s 226 | %s 227 | 228 | ''' # active/success/warning/danger,host,service,status,lcheck,duration,info 229 | 230 | return nagios_service_table, nagios_service_tr_tp, nagios_host_table, nagios_host_tr_tp 231 | 232 | 233 | def get_cati_tmplate(): 234 | # [(host, service, status, last_check, info)] 235 | cati_service_table = ''' 236 |
    237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | %s 249 |

    %s - 服务状态

    主机服务状态上次检查信息
    250 |
    251 | ''' # id,url,aliname, 252 | 253 | cati_service_tr_tp = ''' 254 | 255 | %s 256 | %s 257 | %s 258 | %s 259 | %s 260 | 261 | ''' # active/success/warning/danger,host,service,status,lcheck,info 262 | 263 | cati_host_table = ''' 264 |
    265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | %s 276 |

    %s - 主机状态

    主机状态上次检查信息
    277 |
    278 | ''' # id,url,aliname, 279 | 280 | cati_host_tr_tp = ''' 281 | 282 | %s 283 | %s 284 | %s 285 | %s 286 | 287 | ''' # active/success/warning/danger,host,status,lcheck,info 288 | 289 | return cati_service_table, cati_service_tr_tp, cati_host_table, cati_host_tr_tp 290 | 291 | 292 | def get_collapse_tp(): 293 | collapse_tp = ''' 294 |
    295 |
    296 |

    297 | 299 | %s %s 300 | 301 |

    302 |
    303 |
    304 |
    305 | %s 306 |
    307 |
    308 |
    309 | ''' # id,aliname,num,id, 310 | return collapse_tp 311 | 312 | 313 | def judge_url_connect(url): 314 | try: 315 | requests.get(url, timeout=1) 316 | return True 317 | except: 318 | return False 319 | -------------------------------------------------------------------------------- /templates/opmonitors.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 |
    5 | {% with messages = get_flashed_messages() %} 6 | {% if messages %} 7 | {% for message in messages %} 8 | {% if message[0]=='*' %} 9 | 13 | {% else %} 14 | 18 | {% endif %} 19 | {% endfor %} 20 | {% endif %} 21 | {% endwith %} 22 | 23 |
    24 | 32 | 33 | {% if show_del_update == True %} 34 | 42 | 50 | {% endif %} 51 | 52 |
    53 | 54 | 55 | 104 | 105 | 130 | 131 | 132 | 187 |
    188 | {% endblock %} 189 | {% block myscript %} 190 | 191 | 192 | 193 | 194 | 195 | {% endblock %} -------------------------------------------------------------------------------- /static/font-awesome/less/variables.less: -------------------------------------------------------------------------------- 1 | // Variables 2 | // -------------------------- 3 | 4 | @fa-font-path: "../fonts"; 5 | //@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts"; // for referencing Bootstrap CDN font files directly 6 | @fa-css-prefix: fa; 7 | @fa-version: "4.0.3"; 8 | @fa-border-color: #eee; 9 | @fa-inverse: #fff; 10 | @fa-li-width: (30em / 14); 11 | 12 | @fa-var-glass: "\f000"; 13 | @fa-var-music: "\f001"; 14 | @fa-var-search: "\f002"; 15 | @fa-var-envelope-o: "\f003"; 16 | @fa-var-heart: "\f004"; 17 | @fa-var-star: "\f005"; 18 | @fa-var-star-o: "\f006"; 19 | @fa-var-user: "\f007"; 20 | @fa-var-film: "\f008"; 21 | @fa-var-th-large: "\f009"; 22 | @fa-var-th: "\f00a"; 23 | @fa-var-th-list: "\f00b"; 24 | @fa-var-check: "\f00c"; 25 | @fa-var-times: "\f00d"; 26 | @fa-var-search-plus: "\f00e"; 27 | @fa-var-search-minus: "\f010"; 28 | @fa-var-power-off: "\f011"; 29 | @fa-var-signal: "\f012"; 30 | @fa-var-cog: "\f013"; 31 | @fa-var-trash-o: "\f014"; 32 | @fa-var-home: "\f015"; 33 | @fa-var-file-o: "\f016"; 34 | @fa-var-clock-o: "\f017"; 35 | @fa-var-road: "\f018"; 36 | @fa-var-download: "\f019"; 37 | @fa-var-arrow-circle-o-down: "\f01a"; 38 | @fa-var-arrow-circle-o-up: "\f01b"; 39 | @fa-var-inbox: "\f01c"; 40 | @fa-var-play-circle-o: "\f01d"; 41 | @fa-var-repeat: "\f01e"; 42 | @fa-var-refresh: "\f021"; 43 | @fa-var-list-alt: "\f022"; 44 | @fa-var-lock: "\f023"; 45 | @fa-var-flag: "\f024"; 46 | @fa-var-headphones: "\f025"; 47 | @fa-var-volume-off: "\f026"; 48 | @fa-var-volume-down: "\f027"; 49 | @fa-var-volume-up: "\f028"; 50 | @fa-var-qrcode: "\f029"; 51 | @fa-var-barcode: "\f02a"; 52 | @fa-var-tag: "\f02b"; 53 | @fa-var-tags: "\f02c"; 54 | @fa-var-book: "\f02d"; 55 | @fa-var-bookmark: "\f02e"; 56 | @fa-var-print: "\f02f"; 57 | @fa-var-camera: "\f030"; 58 | @fa-var-font: "\f031"; 59 | @fa-var-bold: "\f032"; 60 | @fa-var-italic: "\f033"; 61 | @fa-var-text-height: "\f034"; 62 | @fa-var-text-width: "\f035"; 63 | @fa-var-align-left: "\f036"; 64 | @fa-var-align-center: "\f037"; 65 | @fa-var-align-right: "\f038"; 66 | @fa-var-align-justify: "\f039"; 67 | @fa-var-list: "\f03a"; 68 | @fa-var-outdent: "\f03b"; 69 | @fa-var-indent: "\f03c"; 70 | @fa-var-video-camera: "\f03d"; 71 | @fa-var-picture-o: "\f03e"; 72 | @fa-var-pencil: "\f040"; 73 | @fa-var-map-marker: "\f041"; 74 | @fa-var-adjust: "\f042"; 75 | @fa-var-tint: "\f043"; 76 | @fa-var-pencil-square-o: "\f044"; 77 | @fa-var-share-square-o: "\f045"; 78 | @fa-var-check-square-o: "\f046"; 79 | @fa-var-arrows: "\f047"; 80 | @fa-var-step-backward: "\f048"; 81 | @fa-var-fast-backward: "\f049"; 82 | @fa-var-backward: "\f04a"; 83 | @fa-var-play: "\f04b"; 84 | @fa-var-pause: "\f04c"; 85 | @fa-var-stop: "\f04d"; 86 | @fa-var-forward: "\f04e"; 87 | @fa-var-fast-forward: "\f050"; 88 | @fa-var-step-forward: "\f051"; 89 | @fa-var-eject: "\f052"; 90 | @fa-var-chevron-left: "\f053"; 91 | @fa-var-chevron-right: "\f054"; 92 | @fa-var-plus-circle: "\f055"; 93 | @fa-var-minus-circle: "\f056"; 94 | @fa-var-times-circle: "\f057"; 95 | @fa-var-check-circle: "\f058"; 96 | @fa-var-question-circle: "\f059"; 97 | @fa-var-info-circle: "\f05a"; 98 | @fa-var-crosshairs: "\f05b"; 99 | @fa-var-times-circle-o: "\f05c"; 100 | @fa-var-check-circle-o: "\f05d"; 101 | @fa-var-ban: "\f05e"; 102 | @fa-var-arrow-left: "\f060"; 103 | @fa-var-arrow-right: "\f061"; 104 | @fa-var-arrow-up: "\f062"; 105 | @fa-var-arrow-down: "\f063"; 106 | @fa-var-share: "\f064"; 107 | @fa-var-expand: "\f065"; 108 | @fa-var-compress: "\f066"; 109 | @fa-var-plus: "\f067"; 110 | @fa-var-minus: "\f068"; 111 | @fa-var-asterisk: "\f069"; 112 | @fa-var-exclamation-circle: "\f06a"; 113 | @fa-var-gift: "\f06b"; 114 | @fa-var-leaf: "\f06c"; 115 | @fa-var-fire: "\f06d"; 116 | @fa-var-eye: "\f06e"; 117 | @fa-var-eye-slash: "\f070"; 118 | @fa-var-exclamation-triangle: "\f071"; 119 | @fa-var-plane: "\f072"; 120 | @fa-var-calendar: "\f073"; 121 | @fa-var-random: "\f074"; 122 | @fa-var-comment: "\f075"; 123 | @fa-var-magnet: "\f076"; 124 | @fa-var-chevron-up: "\f077"; 125 | @fa-var-chevron-down: "\f078"; 126 | @fa-var-retweet: "\f079"; 127 | @fa-var-shopping-cart: "\f07a"; 128 | @fa-var-folder: "\f07b"; 129 | @fa-var-folder-open: "\f07c"; 130 | @fa-var-arrows-v: "\f07d"; 131 | @fa-var-arrows-h: "\f07e"; 132 | @fa-var-bar-chart-o: "\f080"; 133 | @fa-var-twitter-square: "\f081"; 134 | @fa-var-facebook-square: "\f082"; 135 | @fa-var-camera-retro: "\f083"; 136 | @fa-var-key: "\f084"; 137 | @fa-var-cogs: "\f085"; 138 | @fa-var-comments: "\f086"; 139 | @fa-var-thumbs-o-up: "\f087"; 140 | @fa-var-thumbs-o-down: "\f088"; 141 | @fa-var-star-half: "\f089"; 142 | @fa-var-heart-o: "\f08a"; 143 | @fa-var-sign-out: "\f08b"; 144 | @fa-var-linkedin-square: "\f08c"; 145 | @fa-var-thumb-tack: "\f08d"; 146 | @fa-var-external-link: "\f08e"; 147 | @fa-var-sign-in: "\f090"; 148 | @fa-var-trophy: "\f091"; 149 | @fa-var-github-square: "\f092"; 150 | @fa-var-upload: "\f093"; 151 | @fa-var-lemon-o: "\f094"; 152 | @fa-var-phone: "\f095"; 153 | @fa-var-square-o: "\f096"; 154 | @fa-var-bookmark-o: "\f097"; 155 | @fa-var-phone-square: "\f098"; 156 | @fa-var-twitter: "\f099"; 157 | @fa-var-facebook: "\f09a"; 158 | @fa-var-github: "\f09b"; 159 | @fa-var-unlock: "\f09c"; 160 | @fa-var-credit-card: "\f09d"; 161 | @fa-var-rss: "\f09e"; 162 | @fa-var-hdd-o: "\f0a0"; 163 | @fa-var-bullhorn: "\f0a1"; 164 | @fa-var-bell: "\f0f3"; 165 | @fa-var-certificate: "\f0a3"; 166 | @fa-var-hand-o-right: "\f0a4"; 167 | @fa-var-hand-o-left: "\f0a5"; 168 | @fa-var-hand-o-up: "\f0a6"; 169 | @fa-var-hand-o-down: "\f0a7"; 170 | @fa-var-arrow-circle-left: "\f0a8"; 171 | @fa-var-arrow-circle-right: "\f0a9"; 172 | @fa-var-arrow-circle-up: "\f0aa"; 173 | @fa-var-arrow-circle-down: "\f0ab"; 174 | @fa-var-globe: "\f0ac"; 175 | @fa-var-wrench: "\f0ad"; 176 | @fa-var-tasks: "\f0ae"; 177 | @fa-var-filter: "\f0b0"; 178 | @fa-var-briefcase: "\f0b1"; 179 | @fa-var-arrows-alt: "\f0b2"; 180 | @fa-var-users: "\f0c0"; 181 | @fa-var-link: "\f0c1"; 182 | @fa-var-cloud: "\f0c2"; 183 | @fa-var-flask: "\f0c3"; 184 | @fa-var-scissors: "\f0c4"; 185 | @fa-var-files-o: "\f0c5"; 186 | @fa-var-paperclip: "\f0c6"; 187 | @fa-var-floppy-o: "\f0c7"; 188 | @fa-var-square: "\f0c8"; 189 | @fa-var-bars: "\f0c9"; 190 | @fa-var-list-ul: "\f0ca"; 191 | @fa-var-list-ol: "\f0cb"; 192 | @fa-var-strikethrough: "\f0cc"; 193 | @fa-var-underline: "\f0cd"; 194 | @fa-var-table: "\f0ce"; 195 | @fa-var-magic: "\f0d0"; 196 | @fa-var-truck: "\f0d1"; 197 | @fa-var-pinterest: "\f0d2"; 198 | @fa-var-pinterest-square: "\f0d3"; 199 | @fa-var-google-plus-square: "\f0d4"; 200 | @fa-var-google-plus: "\f0d5"; 201 | @fa-var-money: "\f0d6"; 202 | @fa-var-caret-down: "\f0d7"; 203 | @fa-var-caret-up: "\f0d8"; 204 | @fa-var-caret-left: "\f0d9"; 205 | @fa-var-caret-right: "\f0da"; 206 | @fa-var-columns: "\f0db"; 207 | @fa-var-sort: "\f0dc"; 208 | @fa-var-sort-asc: "\f0dd"; 209 | @fa-var-sort-desc: "\f0de"; 210 | @fa-var-envelope: "\f0e0"; 211 | @fa-var-linkedin: "\f0e1"; 212 | @fa-var-undo: "\f0e2"; 213 | @fa-var-gavel: "\f0e3"; 214 | @fa-var-tachometer: "\f0e4"; 215 | @fa-var-comment-o: "\f0e5"; 216 | @fa-var-comments-o: "\f0e6"; 217 | @fa-var-bolt: "\f0e7"; 218 | @fa-var-sitemap: "\f0e8"; 219 | @fa-var-umbrella: "\f0e9"; 220 | @fa-var-clipboard: "\f0ea"; 221 | @fa-var-lightbulb-o: "\f0eb"; 222 | @fa-var-exchange: "\f0ec"; 223 | @fa-var-cloud-download: "\f0ed"; 224 | @fa-var-cloud-upload: "\f0ee"; 225 | @fa-var-user-md: "\f0f0"; 226 | @fa-var-stethoscope: "\f0f1"; 227 | @fa-var-suitcase: "\f0f2"; 228 | @fa-var-bell-o: "\f0a2"; 229 | @fa-var-coffee: "\f0f4"; 230 | @fa-var-cutlery: "\f0f5"; 231 | @fa-var-file-text-o: "\f0f6"; 232 | @fa-var-building-o: "\f0f7"; 233 | @fa-var-hospital-o: "\f0f8"; 234 | @fa-var-ambulance: "\f0f9"; 235 | @fa-var-medkit: "\f0fa"; 236 | @fa-var-fighter-jet: "\f0fb"; 237 | @fa-var-beer: "\f0fc"; 238 | @fa-var-h-square: "\f0fd"; 239 | @fa-var-plus-square: "\f0fe"; 240 | @fa-var-angle-double-left: "\f100"; 241 | @fa-var-angle-double-right: "\f101"; 242 | @fa-var-angle-double-up: "\f102"; 243 | @fa-var-angle-double-down: "\f103"; 244 | @fa-var-angle-left: "\f104"; 245 | @fa-var-angle-right: "\f105"; 246 | @fa-var-angle-up: "\f106"; 247 | @fa-var-angle-down: "\f107"; 248 | @fa-var-desktop: "\f108"; 249 | @fa-var-laptop: "\f109"; 250 | @fa-var-tablet: "\f10a"; 251 | @fa-var-mobile: "\f10b"; 252 | @fa-var-circle-o: "\f10c"; 253 | @fa-var-quote-left: "\f10d"; 254 | @fa-var-quote-right: "\f10e"; 255 | @fa-var-spinner: "\f110"; 256 | @fa-var-circle: "\f111"; 257 | @fa-var-reply: "\f112"; 258 | @fa-var-github-alt: "\f113"; 259 | @fa-var-folder-o: "\f114"; 260 | @fa-var-folder-open-o: "\f115"; 261 | @fa-var-smile-o: "\f118"; 262 | @fa-var-frown-o: "\f119"; 263 | @fa-var-meh-o: "\f11a"; 264 | @fa-var-gamepad: "\f11b"; 265 | @fa-var-keyboard-o: "\f11c"; 266 | @fa-var-flag-o: "\f11d"; 267 | @fa-var-flag-checkered: "\f11e"; 268 | @fa-var-terminal: "\f120"; 269 | @fa-var-code: "\f121"; 270 | @fa-var-reply-all: "\f122"; 271 | @fa-var-mail-reply-all: "\f122"; 272 | @fa-var-star-half-o: "\f123"; 273 | @fa-var-location-arrow: "\f124"; 274 | @fa-var-crop: "\f125"; 275 | @fa-var-code-fork: "\f126"; 276 | @fa-var-chain-broken: "\f127"; 277 | @fa-var-question: "\f128"; 278 | @fa-var-info: "\f129"; 279 | @fa-var-exclamation: "\f12a"; 280 | @fa-var-superscript: "\f12b"; 281 | @fa-var-subscript: "\f12c"; 282 | @fa-var-eraser: "\f12d"; 283 | @fa-var-puzzle-piece: "\f12e"; 284 | @fa-var-microphone: "\f130"; 285 | @fa-var-microphone-slash: "\f131"; 286 | @fa-var-shield: "\f132"; 287 | @fa-var-calendar-o: "\f133"; 288 | @fa-var-fire-extinguisher: "\f134"; 289 | @fa-var-rocket: "\f135"; 290 | @fa-var-maxcdn: "\f136"; 291 | @fa-var-chevron-circle-left: "\f137"; 292 | @fa-var-chevron-circle-right: "\f138"; 293 | @fa-var-chevron-circle-up: "\f139"; 294 | @fa-var-chevron-circle-down: "\f13a"; 295 | @fa-var-html5: "\f13b"; 296 | @fa-var-css3: "\f13c"; 297 | @fa-var-anchor: "\f13d"; 298 | @fa-var-unlock-alt: "\f13e"; 299 | @fa-var-bullseye: "\f140"; 300 | @fa-var-ellipsis-h: "\f141"; 301 | @fa-var-ellipsis-v: "\f142"; 302 | @fa-var-rss-square: "\f143"; 303 | @fa-var-play-circle: "\f144"; 304 | @fa-var-ticket: "\f145"; 305 | @fa-var-minus-square: "\f146"; 306 | @fa-var-minus-square-o: "\f147"; 307 | @fa-var-level-up: "\f148"; 308 | @fa-var-level-down: "\f149"; 309 | @fa-var-check-square: "\f14a"; 310 | @fa-var-pencil-square: "\f14b"; 311 | @fa-var-external-link-square: "\f14c"; 312 | @fa-var-share-square: "\f14d"; 313 | @fa-var-compass: "\f14e"; 314 | @fa-var-caret-square-o-down: "\f150"; 315 | @fa-var-caret-square-o-up: "\f151"; 316 | @fa-var-caret-square-o-right: "\f152"; 317 | @fa-var-eur: "\f153"; 318 | @fa-var-gbp: "\f154"; 319 | @fa-var-usd: "\f155"; 320 | @fa-var-inr: "\f156"; 321 | @fa-var-jpy: "\f157"; 322 | @fa-var-rub: "\f158"; 323 | @fa-var-krw: "\f159"; 324 | @fa-var-btc: "\f15a"; 325 | @fa-var-file: "\f15b"; 326 | @fa-var-file-text: "\f15c"; 327 | @fa-var-sort-alpha-asc: "\f15d"; 328 | @fa-var-sort-alpha-desc: "\f15e"; 329 | @fa-var-sort-amount-asc: "\f160"; 330 | @fa-var-sort-amount-desc: "\f161"; 331 | @fa-var-sort-numeric-asc: "\f162"; 332 | @fa-var-sort-numeric-desc: "\f163"; 333 | @fa-var-thumbs-up: "\f164"; 334 | @fa-var-thumbs-down: "\f165"; 335 | @fa-var-youtube-square: "\f166"; 336 | @fa-var-youtube: "\f167"; 337 | @fa-var-xing: "\f168"; 338 | @fa-var-xing-square: "\f169"; 339 | @fa-var-youtube-play: "\f16a"; 340 | @fa-var-dropbox: "\f16b"; 341 | @fa-var-stack-overflow: "\f16c"; 342 | @fa-var-instagram: "\f16d"; 343 | @fa-var-flickr: "\f16e"; 344 | @fa-var-adn: "\f170"; 345 | @fa-var-bitbucket: "\f171"; 346 | @fa-var-bitbucket-square: "\f172"; 347 | @fa-var-tumblr: "\f173"; 348 | @fa-var-tumblr-square: "\f174"; 349 | @fa-var-long-arrow-down: "\f175"; 350 | @fa-var-long-arrow-up: "\f176"; 351 | @fa-var-long-arrow-left: "\f177"; 352 | @fa-var-long-arrow-right: "\f178"; 353 | @fa-var-apple: "\f179"; 354 | @fa-var-windows: "\f17a"; 355 | @fa-var-android: "\f17b"; 356 | @fa-var-linux: "\f17c"; 357 | @fa-var-dribbble: "\f17d"; 358 | @fa-var-skype: "\f17e"; 359 | @fa-var-foursquare: "\f180"; 360 | @fa-var-trello: "\f181"; 361 | @fa-var-female: "\f182"; 362 | @fa-var-male: "\f183"; 363 | @fa-var-gittip: "\f184"; 364 | @fa-var-sun-o: "\f185"; 365 | @fa-var-moon-o: "\f186"; 366 | @fa-var-archive: "\f187"; 367 | @fa-var-bug: "\f188"; 368 | @fa-var-vk: "\f189"; 369 | @fa-var-weibo: "\f18a"; 370 | @fa-var-renren: "\f18b"; 371 | @fa-var-pagelines: "\f18c"; 372 | @fa-var-stack-exchange: "\f18d"; 373 | @fa-var-arrow-circle-o-right: "\f18e"; 374 | @fa-var-arrow-circle-o-left: "\f190"; 375 | @fa-var-caret-square-o-left: "\f191"; 376 | @fa-var-dot-circle-o: "\f192"; 377 | @fa-var-wheelchair: "\f193"; 378 | @fa-var-vimeo-square: "\f194"; 379 | @fa-var-try: "\f195"; 380 | @fa-var-plus-square-o: "\f196"; 381 | 382 | -------------------------------------------------------------------------------- /static/font-awesome/scss/_variables.scss: -------------------------------------------------------------------------------- 1 | // Variables 2 | // -------------------------- 3 | 4 | $fa-font-path: "../fonts" !default; 5 | //$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts" !default; // for referencing Bootstrap CDN font files directly 6 | $fa-css-prefix: fa !default; 7 | $fa-version: "4.0.3" !default; 8 | $fa-border-color: #eee !default; 9 | $fa-inverse: #fff !default; 10 | $fa-li-width: (30em / 14) !default; 11 | 12 | $fa-var-glass: "\f000"; 13 | $fa-var-music: "\f001"; 14 | $fa-var-search: "\f002"; 15 | $fa-var-envelope-o: "\f003"; 16 | $fa-var-heart: "\f004"; 17 | $fa-var-star: "\f005"; 18 | $fa-var-star-o: "\f006"; 19 | $fa-var-user: "\f007"; 20 | $fa-var-film: "\f008"; 21 | $fa-var-th-large: "\f009"; 22 | $fa-var-th: "\f00a"; 23 | $fa-var-th-list: "\f00b"; 24 | $fa-var-check: "\f00c"; 25 | $fa-var-times: "\f00d"; 26 | $fa-var-search-plus: "\f00e"; 27 | $fa-var-search-minus: "\f010"; 28 | $fa-var-power-off: "\f011"; 29 | $fa-var-signal: "\f012"; 30 | $fa-var-cog: "\f013"; 31 | $fa-var-trash-o: "\f014"; 32 | $fa-var-home: "\f015"; 33 | $fa-var-file-o: "\f016"; 34 | $fa-var-clock-o: "\f017"; 35 | $fa-var-road: "\f018"; 36 | $fa-var-download: "\f019"; 37 | $fa-var-arrow-circle-o-down: "\f01a"; 38 | $fa-var-arrow-circle-o-up: "\f01b"; 39 | $fa-var-inbox: "\f01c"; 40 | $fa-var-play-circle-o: "\f01d"; 41 | $fa-var-repeat: "\f01e"; 42 | $fa-var-refresh: "\f021"; 43 | $fa-var-list-alt: "\f022"; 44 | $fa-var-lock: "\f023"; 45 | $fa-var-flag: "\f024"; 46 | $fa-var-headphones: "\f025"; 47 | $fa-var-volume-off: "\f026"; 48 | $fa-var-volume-down: "\f027"; 49 | $fa-var-volume-up: "\f028"; 50 | $fa-var-qrcode: "\f029"; 51 | $fa-var-barcode: "\f02a"; 52 | $fa-var-tag: "\f02b"; 53 | $fa-var-tags: "\f02c"; 54 | $fa-var-book: "\f02d"; 55 | $fa-var-bookmark: "\f02e"; 56 | $fa-var-print: "\f02f"; 57 | $fa-var-camera: "\f030"; 58 | $fa-var-font: "\f031"; 59 | $fa-var-bold: "\f032"; 60 | $fa-var-italic: "\f033"; 61 | $fa-var-text-height: "\f034"; 62 | $fa-var-text-width: "\f035"; 63 | $fa-var-align-left: "\f036"; 64 | $fa-var-align-center: "\f037"; 65 | $fa-var-align-right: "\f038"; 66 | $fa-var-align-justify: "\f039"; 67 | $fa-var-list: "\f03a"; 68 | $fa-var-outdent: "\f03b"; 69 | $fa-var-indent: "\f03c"; 70 | $fa-var-video-camera: "\f03d"; 71 | $fa-var-picture-o: "\f03e"; 72 | $fa-var-pencil: "\f040"; 73 | $fa-var-map-marker: "\f041"; 74 | $fa-var-adjust: "\f042"; 75 | $fa-var-tint: "\f043"; 76 | $fa-var-pencil-square-o: "\f044"; 77 | $fa-var-share-square-o: "\f045"; 78 | $fa-var-check-square-o: "\f046"; 79 | $fa-var-arrows: "\f047"; 80 | $fa-var-step-backward: "\f048"; 81 | $fa-var-fast-backward: "\f049"; 82 | $fa-var-backward: "\f04a"; 83 | $fa-var-play: "\f04b"; 84 | $fa-var-pause: "\f04c"; 85 | $fa-var-stop: "\f04d"; 86 | $fa-var-forward: "\f04e"; 87 | $fa-var-fast-forward: "\f050"; 88 | $fa-var-step-forward: "\f051"; 89 | $fa-var-eject: "\f052"; 90 | $fa-var-chevron-left: "\f053"; 91 | $fa-var-chevron-right: "\f054"; 92 | $fa-var-plus-circle: "\f055"; 93 | $fa-var-minus-circle: "\f056"; 94 | $fa-var-times-circle: "\f057"; 95 | $fa-var-check-circle: "\f058"; 96 | $fa-var-question-circle: "\f059"; 97 | $fa-var-info-circle: "\f05a"; 98 | $fa-var-crosshairs: "\f05b"; 99 | $fa-var-times-circle-o: "\f05c"; 100 | $fa-var-check-circle-o: "\f05d"; 101 | $fa-var-ban: "\f05e"; 102 | $fa-var-arrow-left: "\f060"; 103 | $fa-var-arrow-right: "\f061"; 104 | $fa-var-arrow-up: "\f062"; 105 | $fa-var-arrow-down: "\f063"; 106 | $fa-var-share: "\f064"; 107 | $fa-var-expand: "\f065"; 108 | $fa-var-compress: "\f066"; 109 | $fa-var-plus: "\f067"; 110 | $fa-var-minus: "\f068"; 111 | $fa-var-asterisk: "\f069"; 112 | $fa-var-exclamation-circle: "\f06a"; 113 | $fa-var-gift: "\f06b"; 114 | $fa-var-leaf: "\f06c"; 115 | $fa-var-fire: "\f06d"; 116 | $fa-var-eye: "\f06e"; 117 | $fa-var-eye-slash: "\f070"; 118 | $fa-var-exclamation-triangle: "\f071"; 119 | $fa-var-plane: "\f072"; 120 | $fa-var-calendar: "\f073"; 121 | $fa-var-random: "\f074"; 122 | $fa-var-comment: "\f075"; 123 | $fa-var-magnet: "\f076"; 124 | $fa-var-chevron-up: "\f077"; 125 | $fa-var-chevron-down: "\f078"; 126 | $fa-var-retweet: "\f079"; 127 | $fa-var-shopping-cart: "\f07a"; 128 | $fa-var-folder: "\f07b"; 129 | $fa-var-folder-open: "\f07c"; 130 | $fa-var-arrows-v: "\f07d"; 131 | $fa-var-arrows-h: "\f07e"; 132 | $fa-var-bar-chart-o: "\f080"; 133 | $fa-var-twitter-square: "\f081"; 134 | $fa-var-facebook-square: "\f082"; 135 | $fa-var-camera-retro: "\f083"; 136 | $fa-var-key: "\f084"; 137 | $fa-var-cogs: "\f085"; 138 | $fa-var-comments: "\f086"; 139 | $fa-var-thumbs-o-up: "\f087"; 140 | $fa-var-thumbs-o-down: "\f088"; 141 | $fa-var-star-half: "\f089"; 142 | $fa-var-heart-o: "\f08a"; 143 | $fa-var-sign-out: "\f08b"; 144 | $fa-var-linkedin-square: "\f08c"; 145 | $fa-var-thumb-tack: "\f08d"; 146 | $fa-var-external-link: "\f08e"; 147 | $fa-var-sign-in: "\f090"; 148 | $fa-var-trophy: "\f091"; 149 | $fa-var-github-square: "\f092"; 150 | $fa-var-upload: "\f093"; 151 | $fa-var-lemon-o: "\f094"; 152 | $fa-var-phone: "\f095"; 153 | $fa-var-square-o: "\f096"; 154 | $fa-var-bookmark-o: "\f097"; 155 | $fa-var-phone-square: "\f098"; 156 | $fa-var-twitter: "\f099"; 157 | $fa-var-facebook: "\f09a"; 158 | $fa-var-github: "\f09b"; 159 | $fa-var-unlock: "\f09c"; 160 | $fa-var-credit-card: "\f09d"; 161 | $fa-var-rss: "\f09e"; 162 | $fa-var-hdd-o: "\f0a0"; 163 | $fa-var-bullhorn: "\f0a1"; 164 | $fa-var-bell: "\f0f3"; 165 | $fa-var-certificate: "\f0a3"; 166 | $fa-var-hand-o-right: "\f0a4"; 167 | $fa-var-hand-o-left: "\f0a5"; 168 | $fa-var-hand-o-up: "\f0a6"; 169 | $fa-var-hand-o-down: "\f0a7"; 170 | $fa-var-arrow-circle-left: "\f0a8"; 171 | $fa-var-arrow-circle-right: "\f0a9"; 172 | $fa-var-arrow-circle-up: "\f0aa"; 173 | $fa-var-arrow-circle-down: "\f0ab"; 174 | $fa-var-globe: "\f0ac"; 175 | $fa-var-wrench: "\f0ad"; 176 | $fa-var-tasks: "\f0ae"; 177 | $fa-var-filter: "\f0b0"; 178 | $fa-var-briefcase: "\f0b1"; 179 | $fa-var-arrows-alt: "\f0b2"; 180 | $fa-var-users: "\f0c0"; 181 | $fa-var-link: "\f0c1"; 182 | $fa-var-cloud: "\f0c2"; 183 | $fa-var-flask: "\f0c3"; 184 | $fa-var-scissors: "\f0c4"; 185 | $fa-var-files-o: "\f0c5"; 186 | $fa-var-paperclip: "\f0c6"; 187 | $fa-var-floppy-o: "\f0c7"; 188 | $fa-var-square: "\f0c8"; 189 | $fa-var-bars: "\f0c9"; 190 | $fa-var-list-ul: "\f0ca"; 191 | $fa-var-list-ol: "\f0cb"; 192 | $fa-var-strikethrough: "\f0cc"; 193 | $fa-var-underline: "\f0cd"; 194 | $fa-var-table: "\f0ce"; 195 | $fa-var-magic: "\f0d0"; 196 | $fa-var-truck: "\f0d1"; 197 | $fa-var-pinterest: "\f0d2"; 198 | $fa-var-pinterest-square: "\f0d3"; 199 | $fa-var-google-plus-square: "\f0d4"; 200 | $fa-var-google-plus: "\f0d5"; 201 | $fa-var-money: "\f0d6"; 202 | $fa-var-caret-down: "\f0d7"; 203 | $fa-var-caret-up: "\f0d8"; 204 | $fa-var-caret-left: "\f0d9"; 205 | $fa-var-caret-right: "\f0da"; 206 | $fa-var-columns: "\f0db"; 207 | $fa-var-sort: "\f0dc"; 208 | $fa-var-sort-asc: "\f0dd"; 209 | $fa-var-sort-desc: "\f0de"; 210 | $fa-var-envelope: "\f0e0"; 211 | $fa-var-linkedin: "\f0e1"; 212 | $fa-var-undo: "\f0e2"; 213 | $fa-var-gavel: "\f0e3"; 214 | $fa-var-tachometer: "\f0e4"; 215 | $fa-var-comment-o: "\f0e5"; 216 | $fa-var-comments-o: "\f0e6"; 217 | $fa-var-bolt: "\f0e7"; 218 | $fa-var-sitemap: "\f0e8"; 219 | $fa-var-umbrella: "\f0e9"; 220 | $fa-var-clipboard: "\f0ea"; 221 | $fa-var-lightbulb-o: "\f0eb"; 222 | $fa-var-exchange: "\f0ec"; 223 | $fa-var-cloud-download: "\f0ed"; 224 | $fa-var-cloud-upload: "\f0ee"; 225 | $fa-var-user-md: "\f0f0"; 226 | $fa-var-stethoscope: "\f0f1"; 227 | $fa-var-suitcase: "\f0f2"; 228 | $fa-var-bell-o: "\f0a2"; 229 | $fa-var-coffee: "\f0f4"; 230 | $fa-var-cutlery: "\f0f5"; 231 | $fa-var-file-text-o: "\f0f6"; 232 | $fa-var-building-o: "\f0f7"; 233 | $fa-var-hospital-o: "\f0f8"; 234 | $fa-var-ambulance: "\f0f9"; 235 | $fa-var-medkit: "\f0fa"; 236 | $fa-var-fighter-jet: "\f0fb"; 237 | $fa-var-beer: "\f0fc"; 238 | $fa-var-h-square: "\f0fd"; 239 | $fa-var-plus-square: "\f0fe"; 240 | $fa-var-angle-double-left: "\f100"; 241 | $fa-var-angle-double-right: "\f101"; 242 | $fa-var-angle-double-up: "\f102"; 243 | $fa-var-angle-double-down: "\f103"; 244 | $fa-var-angle-left: "\f104"; 245 | $fa-var-angle-right: "\f105"; 246 | $fa-var-angle-up: "\f106"; 247 | $fa-var-angle-down: "\f107"; 248 | $fa-var-desktop: "\f108"; 249 | $fa-var-laptop: "\f109"; 250 | $fa-var-tablet: "\f10a"; 251 | $fa-var-mobile: "\f10b"; 252 | $fa-var-circle-o: "\f10c"; 253 | $fa-var-quote-left: "\f10d"; 254 | $fa-var-quote-right: "\f10e"; 255 | $fa-var-spinner: "\f110"; 256 | $fa-var-circle: "\f111"; 257 | $fa-var-reply: "\f112"; 258 | $fa-var-github-alt: "\f113"; 259 | $fa-var-folder-o: "\f114"; 260 | $fa-var-folder-open-o: "\f115"; 261 | $fa-var-smile-o: "\f118"; 262 | $fa-var-frown-o: "\f119"; 263 | $fa-var-meh-o: "\f11a"; 264 | $fa-var-gamepad: "\f11b"; 265 | $fa-var-keyboard-o: "\f11c"; 266 | $fa-var-flag-o: "\f11d"; 267 | $fa-var-flag-checkered: "\f11e"; 268 | $fa-var-terminal: "\f120"; 269 | $fa-var-code: "\f121"; 270 | $fa-var-reply-all: "\f122"; 271 | $fa-var-mail-reply-all: "\f122"; 272 | $fa-var-star-half-o: "\f123"; 273 | $fa-var-location-arrow: "\f124"; 274 | $fa-var-crop: "\f125"; 275 | $fa-var-code-fork: "\f126"; 276 | $fa-var-chain-broken: "\f127"; 277 | $fa-var-question: "\f128"; 278 | $fa-var-info: "\f129"; 279 | $fa-var-exclamation: "\f12a"; 280 | $fa-var-superscript: "\f12b"; 281 | $fa-var-subscript: "\f12c"; 282 | $fa-var-eraser: "\f12d"; 283 | $fa-var-puzzle-piece: "\f12e"; 284 | $fa-var-microphone: "\f130"; 285 | $fa-var-microphone-slash: "\f131"; 286 | $fa-var-shield: "\f132"; 287 | $fa-var-calendar-o: "\f133"; 288 | $fa-var-fire-extinguisher: "\f134"; 289 | $fa-var-rocket: "\f135"; 290 | $fa-var-maxcdn: "\f136"; 291 | $fa-var-chevron-circle-left: "\f137"; 292 | $fa-var-chevron-circle-right: "\f138"; 293 | $fa-var-chevron-circle-up: "\f139"; 294 | $fa-var-chevron-circle-down: "\f13a"; 295 | $fa-var-html5: "\f13b"; 296 | $fa-var-css3: "\f13c"; 297 | $fa-var-anchor: "\f13d"; 298 | $fa-var-unlock-alt: "\f13e"; 299 | $fa-var-bullseye: "\f140"; 300 | $fa-var-ellipsis-h: "\f141"; 301 | $fa-var-ellipsis-v: "\f142"; 302 | $fa-var-rss-square: "\f143"; 303 | $fa-var-play-circle: "\f144"; 304 | $fa-var-ticket: "\f145"; 305 | $fa-var-minus-square: "\f146"; 306 | $fa-var-minus-square-o: "\f147"; 307 | $fa-var-level-up: "\f148"; 308 | $fa-var-level-down: "\f149"; 309 | $fa-var-check-square: "\f14a"; 310 | $fa-var-pencil-square: "\f14b"; 311 | $fa-var-external-link-square: "\f14c"; 312 | $fa-var-share-square: "\f14d"; 313 | $fa-var-compass: "\f14e"; 314 | $fa-var-caret-square-o-down: "\f150"; 315 | $fa-var-caret-square-o-up: "\f151"; 316 | $fa-var-caret-square-o-right: "\f152"; 317 | $fa-var-eur: "\f153"; 318 | $fa-var-gbp: "\f154"; 319 | $fa-var-usd: "\f155"; 320 | $fa-var-inr: "\f156"; 321 | $fa-var-jpy: "\f157"; 322 | $fa-var-rub: "\f158"; 323 | $fa-var-krw: "\f159"; 324 | $fa-var-btc: "\f15a"; 325 | $fa-var-file: "\f15b"; 326 | $fa-var-file-text: "\f15c"; 327 | $fa-var-sort-alpha-asc: "\f15d"; 328 | $fa-var-sort-alpha-desc: "\f15e"; 329 | $fa-var-sort-amount-asc: "\f160"; 330 | $fa-var-sort-amount-desc: "\f161"; 331 | $fa-var-sort-numeric-asc: "\f162"; 332 | $fa-var-sort-numeric-desc: "\f163"; 333 | $fa-var-thumbs-up: "\f164"; 334 | $fa-var-thumbs-down: "\f165"; 335 | $fa-var-youtube-square: "\f166"; 336 | $fa-var-youtube: "\f167"; 337 | $fa-var-xing: "\f168"; 338 | $fa-var-xing-square: "\f169"; 339 | $fa-var-youtube-play: "\f16a"; 340 | $fa-var-dropbox: "\f16b"; 341 | $fa-var-stack-overflow: "\f16c"; 342 | $fa-var-instagram: "\f16d"; 343 | $fa-var-flickr: "\f16e"; 344 | $fa-var-adn: "\f170"; 345 | $fa-var-bitbucket: "\f171"; 346 | $fa-var-bitbucket-square: "\f172"; 347 | $fa-var-tumblr: "\f173"; 348 | $fa-var-tumblr-square: "\f174"; 349 | $fa-var-long-arrow-down: "\f175"; 350 | $fa-var-long-arrow-up: "\f176"; 351 | $fa-var-long-arrow-left: "\f177"; 352 | $fa-var-long-arrow-right: "\f178"; 353 | $fa-var-apple: "\f179"; 354 | $fa-var-windows: "\f17a"; 355 | $fa-var-android: "\f17b"; 356 | $fa-var-linux: "\f17c"; 357 | $fa-var-dribbble: "\f17d"; 358 | $fa-var-skype: "\f17e"; 359 | $fa-var-foursquare: "\f180"; 360 | $fa-var-trello: "\f181"; 361 | $fa-var-female: "\f182"; 362 | $fa-var-male: "\f183"; 363 | $fa-var-gittip: "\f184"; 364 | $fa-var-sun-o: "\f185"; 365 | $fa-var-moon-o: "\f186"; 366 | $fa-var-archive: "\f187"; 367 | $fa-var-bug: "\f188"; 368 | $fa-var-vk: "\f189"; 369 | $fa-var-weibo: "\f18a"; 370 | $fa-var-renren: "\f18b"; 371 | $fa-var-pagelines: "\f18c"; 372 | $fa-var-stack-exchange: "\f18d"; 373 | $fa-var-arrow-circle-o-right: "\f18e"; 374 | $fa-var-arrow-circle-o-left: "\f190"; 375 | $fa-var-caret-square-o-left: "\f191"; 376 | $fa-var-dot-circle-o: "\f192"; 377 | $fa-var-wheelchair: "\f193"; 378 | $fa-var-vimeo-square: "\f194"; 379 | $fa-var-try: "\f195"; 380 | $fa-var-plus-square-o: "\f196"; 381 | 382 | -------------------------------------------------------------------------------- /static/js/extensions/multiple-sort/bootstrap-table-multiple-sort.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author Nadim Basalamah 3 | * @version: v1.1.0 4 | * https://github.com/dimbslmh/bootstrap-table/tree/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js 5 | * Modification: ErwannNevou 6 | */ 7 | 8 | (function($) { 9 | 'use strict'; 10 | 11 | var isSingleSort = false; 12 | 13 | var showSortModal = function(that) { 14 | var _selector = that.$sortModal.selector, 15 | _id = _selector.substr(1); 16 | 17 | if (!$(_id).hasClass("modal")) { 18 | var sModal = '
    '; 37 | sModal += ' '; 38 | sModal += ' '; 39 | sModal += ' '; 40 | sModal += ' '; 41 | sModal += ' '; 42 | sModal += ' '; 43 | sModal += ' '; 44 | sModal += ' '; 45 | sModal += '
    ' + that.options.formatColumn() + '
    ' + that.options.formatOrder() + '
    '; 46 | sModal += ' '; 47 | sModal += ' '; 48 | sModal += ' '; 49 | sModal += ' '; 53 | sModal += ' '; 54 | sModal += ' '; 55 | sModal += ' '; 56 | 57 | $('body').append($(sModal)); 58 | 59 | that.$sortModal = $(_selector); 60 | var $rows = that.$sortModal.find('tbody > tr'); 61 | 62 | that.$sortModal.off('click', '#add').on('click', '#add', function() { 63 | var total = that.$sortModal.find('.multi-sort-name:first option').length, 64 | current = that.$sortModal.find('tbody tr').length; 65 | 66 | if (current < total) { 67 | current++; 68 | that.addLevel(); 69 | that.setButtonStates(); 70 | } 71 | }); 72 | 73 | that.$sortModal.off('click', '#delete').on('click', '#delete', function() { 74 | var total = that.$sortModal.find('.multi-sort-name:first option').length, 75 | current = that.$sortModal.find('tbody tr').length; 76 | 77 | if (current > 1 && current <= total) { 78 | current--; 79 | that.$sortModal.find('tbody tr:last').remove(); 80 | that.setButtonStates(); 81 | } 82 | }); 83 | 84 | that.$sortModal.off('click', '.btn-primary').on('click', '.btn-primary', function() { 85 | var $rows = that.$sortModal.find('tbody > tr'), 86 | $alert = that.$sortModal.find('div.alert'), 87 | fields = [], 88 | results = []; 89 | 90 | 91 | that.options.sortPriority = $.map($rows, function(row) { 92 | var $row = $(row), 93 | name = $row.find('.multi-sort-name').val(), 94 | order = $row.find('.multi-sort-order').val(); 95 | 96 | fields.push(name); 97 | 98 | return { 99 | sortName: name, 100 | sortOrder: order 101 | }; 102 | }); 103 | 104 | var sorted_fields = fields.sort(); 105 | 106 | for (var i = 0; i < fields.length - 1; i++) { 107 | if (sorted_fields[i + 1] == sorted_fields[i]) { 108 | results.push(sorted_fields[i]); 109 | } 110 | } 111 | 112 | if (results.length > 0) { 113 | if ($alert.length === 0) { 114 | $alert = ''; 115 | $($alert).insertBefore(that.$sortModal.find('.bars')); 116 | } 117 | } else { 118 | if ($alert.length === 1) { 119 | $($alert).remove(); 120 | } 121 | 122 | that.$sortModal.modal('hide'); 123 | that.options.sortName = ''; 124 | 125 | if (that.options.sidePagination === 'server') { 126 | 127 | that.options.queryParams = function(params) { 128 | params.multiSort = that.options.sortPriority; 129 | return params; 130 | }; 131 | 132 | that.initServer(that.options.silentSort); 133 | return; 134 | } 135 | 136 | that.onMultipleSort(); 137 | 138 | } 139 | }); 140 | 141 | if (that.options.sortPriority === null || that.options.sortPriority.length === 0) { 142 | if (that.options.sortName) { 143 | that.options.sortPriority = [{ 144 | sortName: that.options.sortName, 145 | sortOrder: that.options.sortOrder 146 | }]; 147 | } 148 | } 149 | 150 | if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) { 151 | if ($rows.length < that.options.sortPriority.length && typeof that.options.sortPriority === 'object') { 152 | for (var i = 0; i < that.options.sortPriority.length; i++) { 153 | that.addLevel(i, that.options.sortPriority[i]); 154 | } 155 | } 156 | } else { 157 | that.addLevel(0); 158 | } 159 | 160 | that.setButtonStates(); 161 | } 162 | }; 163 | 164 | $.extend($.fn.bootstrapTable.defaults, { 165 | showMultiSort: false, 166 | sortPriority: null, 167 | onMultipleSort: function() { 168 | return false; 169 | } 170 | }); 171 | 172 | $.extend($.fn.bootstrapTable.defaults.icons, { 173 | sort: 'glyphicon-sort', 174 | plus: 'glyphicon-plus', 175 | minus: 'glyphicon-minus' 176 | }); 177 | 178 | $.extend($.fn.bootstrapTable.Constructor.EVENTS, { 179 | 'multiple-sort.bs.table': 'onMultipleSort' 180 | }); 181 | 182 | $.extend($.fn.bootstrapTable.locales, { 183 | formatMultipleSort: function() { 184 | return '多维排序'; 185 | }, 186 | formatAddLevel: function() { 187 | return '增加维数'; 188 | }, 189 | formatDeleteLevel: function() { 190 | return '删除维数'; 191 | }, 192 | formatColumn: function() { 193 | return '所选列'; 194 | }, 195 | formatOrder: function() { 196 | return '顺序'; 197 | }, 198 | formatSortBy: function() { 199 | return 'Sort by'; 200 | }, 201 | formatThenBy: function() { 202 | return 'Then by'; 203 | }, 204 | formatSort: function() { 205 | return '排序'; 206 | }, 207 | formatCancel: function() { 208 | return '取消'; 209 | }, 210 | formatDuplicateAlertTitle: function() { 211 | return '检测到冲突项!'; 212 | }, 213 | formatDuplicateAlertDescription: function() { 214 | return '请移除或更改冲突项.'; 215 | }, 216 | formatSortOrders: function() { 217 | return { 218 | asc: '升序', 219 | desc: '降序' 220 | }; 221 | } 222 | }); 223 | 224 | $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales); 225 | 226 | var BootstrapTable = $.fn.bootstrapTable.Constructor, 227 | _initToolbar = BootstrapTable.prototype.initToolbar; 228 | 229 | BootstrapTable.prototype.initToolbar = function() { 230 | this.showToolbar = true; 231 | var that = this, 232 | sortModalId = '#sortModal_' + this.$el.attr('id'); 233 | this.$sortModal = $(sortModalId); 234 | 235 | _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); 236 | 237 | if (this.options.showMultiSort) { 238 | var $btnGroup = this.$toolbar.find('>.btn-group').first(), 239 | $multiSortBtn = this.$toolbar.find('div.multi-sort'); 240 | 241 | if (!$multiSortBtn.length) { 242 | $multiSortBtn = ' '; 245 | 246 | $btnGroup.append($multiSortBtn); 247 | 248 | showSortModal(that); 249 | } 250 | 251 | this.$el.on('sort.bs.table', function() { 252 | isSingleSort = true; 253 | }); 254 | 255 | this.$el.on('multiple-sort.bs.table', function() { 256 | isSingleSort = false; 257 | }); 258 | 259 | this.$el.on('load-success.bs.table', function() { 260 | if (!isSingleSort && that.options.sortPriority !== null && typeof that.options.sortPriority === 'object') { 261 | that.onMultipleSort(); 262 | } 263 | }); 264 | 265 | this.$el.on('column-switch.bs.table', function(field, checked) { 266 | for (var i = 0; i < that.options.sortPriority.length; i++) { 267 | if (that.options.sortPriority[i].sortName === checked) { 268 | that.options.sortPriority.splice(i, 1); 269 | } 270 | } 271 | 272 | that.assignSortableArrows(); 273 | that.$sortModal.remove(); 274 | showSortModal(that); 275 | }); 276 | 277 | this.$el.on('reset-view.bs.table', function() { 278 | if (!isSingleSort && that.options.sortPriority !== null && typeof that.options.sortPriority === 'object') { 279 | that.assignSortableArrows(); 280 | } 281 | }); 282 | } 283 | }; 284 | 285 | BootstrapTable.prototype.onMultipleSort = function() { 286 | var that = this; 287 | 288 | var cmp = function(x, y) { 289 | return x > y ? 1 : x < y ? -1 : 0; 290 | }; 291 | 292 | var arrayCmp = function(a, b) { 293 | var arr1 = [], 294 | arr2 = []; 295 | 296 | for (var i = 0; i < that.options.sortPriority.length; i++) { 297 | var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1, 298 | aa = a[that.options.sortPriority[i].sortName], 299 | bb = b[that.options.sortPriority[i].sortName]; 300 | 301 | if (aa === undefined || aa === null) { 302 | aa = ''; 303 | } 304 | if (bb === undefined || bb === null) { 305 | bb = ''; 306 | } 307 | if ($.isNumeric(aa) && $.isNumeric(bb)) { 308 | aa = parseFloat(aa); 309 | bb = parseFloat(bb); 310 | } 311 | if (typeof aa !== 'string') { 312 | aa = aa.toString(); 313 | } 314 | 315 | arr1.push( 316 | order * cmp(aa, bb)); 317 | arr2.push( 318 | order * cmp(bb, aa)); 319 | } 320 | 321 | return cmp(arr1, arr2); 322 | }; 323 | 324 | this.data.sort(function(a, b) { 325 | return arrayCmp(a, b); 326 | }); 327 | 328 | this.initBody(); 329 | this.assignSortableArrows(); 330 | this.trigger('multiple-sort'); 331 | }; 332 | 333 | BootstrapTable.prototype.addLevel = function(index, sortPriority) { 334 | var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy(); 335 | 336 | this.$sortModal.find('tbody') 337 | .append($('') 338 | .append($('').text(text)) 339 | .append($('').append($(''))) 341 | ); 342 | 343 | var $multiSortName = this.$sortModal.find('.multi-sort-name').last(), 344 | $multiSortOrder = this.$sortModal.find('.multi-sort-order').last(); 345 | 346 | $.each(this.columns, function(i, column) { 347 | if (column.sortable === false || column.visible === false) { 348 | return true; 349 | } 350 | $multiSortName.append(''); 351 | }); 352 | 353 | $.each(this.options.formatSortOrders(), function(value, order) { 354 | $multiSortOrder.append(''); 355 | }); 356 | 357 | if (sortPriority !== undefined) { 358 | $multiSortName.find('option[value="' + sortPriority.sortName + '"]').attr("selected", true); 359 | $multiSortOrder.find('option[value="' + sortPriority.sortOrder + '"]').attr("selected", true); 360 | } 361 | }; 362 | 363 | BootstrapTable.prototype.assignSortableArrows = function() { 364 | var that = this, 365 | headers = that.$header.find('th'); 366 | 367 | for (var i = 0; i < headers.length; i++) { 368 | for (var c = 0; c < that.options.sortPriority.length; c++) { 369 | if ($(headers[i]).data('field') === that.options.sortPriority[c].sortName) { 370 | $(headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder); 371 | } 372 | } 373 | } 374 | }; 375 | 376 | BootstrapTable.prototype.setButtonStates = function() { 377 | var total = this.$sortModal.find('.multi-sort-name:first option').length, 378 | current = this.$sortModal.find('tbody tr').length; 379 | 380 | if (current == total) { 381 | this.$sortModal.find('#add').attr('disabled', 'disabled'); 382 | } 383 | if (current > 1) { 384 | this.$sortModal.find('#delete').removeAttr('disabled'); 385 | } 386 | if (current < total) { 387 | this.$sortModal.find('#add').removeAttr('disabled'); 388 | } 389 | if (current == 1) { 390 | this.$sortModal.find('#delete').attr('disabled', 'disabled'); 391 | } 392 | }; 393 | })(jQuery); 394 | -------------------------------------------------------------------------------- /templates/showtasklist.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block content %} 3 |
    4 | {% with messages = get_flashed_messages() %} 5 | {% if messages %} 6 | {% for message in messages %} 7 | {% if message[0]=='*' %} 8 | 13 | {% else %} 14 | 19 | {% endif %} 20 | {% endfor %} 21 | {% endif %} 22 | {% endwith %} 23 | 24 |
    25 |
    26 |
    27 |
    28 | 33 |
    34 |
    35 | 37 |
    38 |
    39 | 40 |
    41 | 42 |
    43 | 44 |
    45 | 46 | 62 | 63 | 108 | 109 | 134 | 135 |
    136 |
    137 |
    138 | {% endblock %} 139 | 140 | {% block myscript %} 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 448 | {% endblock %} --------------------------------------------------------------------------------