├── asset ├── __init__.py ├── migrations │ └── __init__.py ├── tests.py ├── apps.py ├── admin.py ├── urls.py └── forms.py ├── deploy ├── __init__.py ├── migrations │ └── __init__.py ├── tests.py ├── admin.py ├── apps.py ├── urls.py └── forms.py ├── devops ├── __init__.py ├── asgi.py ├── routing.py ├── wsgi.py ├── urls.py └── consumers.py ├── user ├── __init__.py ├── migrations │ └── __init__.py ├── templatetags │ ├── __init__.py │ ├── myinclusion.py │ └── myfilter.py ├── admin.py ├── tests.py ├── apps.py ├── urls.py ├── templates │ └── registration │ │ ├── login.html │ │ └── base.html └── forms.py ├── dbadmin ├── __init__.py ├── migrations │ └── __init__.py ├── tests.py ├── admin.py ├── apps.py ├── urls.py ├── forms.py └── models.py ├── sysadmin ├── __init__.py ├── migrations │ └── __init__.py ├── admin.py ├── tests.py ├── apps.py ├── forms.py ├── urls.py └── models.py ├── demo ├── demo.gif ├── tailf.gif ├── codedeploy.gif └── database.gif ├── conf ├── saltconfig │ └── nodegroup.conf.example └── settings.conf.example ├── static ├── images │ ├── img.jpg │ ├── inbox.png │ ├── media.jpg │ ├── paypal.png │ ├── prod-1.jpg │ ├── prod-2.jpg │ ├── prod-3.jpg │ ├── prod-4.jpg │ ├── prod-5.jpg │ ├── user.png │ ├── visa.png │ ├── avatar2.jpg │ ├── cropper.jpg │ ├── favicon.ico │ ├── loading.gif │ ├── picture.jpg │ ├── mastercard.png │ ├── back_disabled.png │ ├── back_enabled.png │ ├── american-express.png │ ├── forward_disabled.png │ ├── forward_enabled.png │ ├── back_enabled_hover.png │ ├── icon │ │ ├── details_close.png │ │ └── details_open.png │ └── forward_enabled_hover.png ├── webssh │ ├── img │ │ └── favicon.png │ ├── css │ │ └── fullscreen.min.css │ └── js │ │ ├── fullscreen.min.js │ │ └── main.js ├── vendors │ ├── pnotify │ │ ├── pnotify.buttons.css │ │ ├── pnotify.nonblock.css │ │ ├── pnotify.css │ │ └── pnotify.nonblock.js │ ├── iCheck │ │ ├── skins │ │ │ ├── flat │ │ │ │ ├── aero.png │ │ │ │ ├── blue.png │ │ │ │ ├── flat.png │ │ │ │ ├── grey.png │ │ │ │ ├── pink.png │ │ │ │ ├── red.png │ │ │ │ ├── aero@2x.png │ │ │ │ ├── blue@2x.png │ │ │ │ ├── flat@2x.png │ │ │ │ ├── green.png │ │ │ │ ├── grey@2x.png │ │ │ │ ├── orange.png │ │ │ │ ├── pink@2x.png │ │ │ │ ├── purple.png │ │ │ │ ├── red@2x.png │ │ │ │ ├── yellow.png │ │ │ │ ├── green@2x.png │ │ │ │ ├── orange@2x.png │ │ │ │ ├── purple@2x.png │ │ │ │ ├── yellow@2x.png │ │ │ │ ├── flat.css │ │ │ │ ├── red.css │ │ │ │ ├── aero.css │ │ │ │ ├── blue.css │ │ │ │ ├── grey.css │ │ │ │ ├── pink.css │ │ │ │ ├── green.css │ │ │ │ ├── orange.css │ │ │ │ ├── purple.css │ │ │ │ └── yellow.css │ │ │ ├── line │ │ │ │ ├── line.png │ │ │ │ ├── line@2x.png │ │ │ │ ├── line.css │ │ │ │ ├── red.css │ │ │ │ ├── aero.css │ │ │ │ ├── blue.css │ │ │ │ ├── grey.css │ │ │ │ ├── pink.css │ │ │ │ ├── green.css │ │ │ │ ├── orange.css │ │ │ │ ├── purple.css │ │ │ │ └── yellow.css │ │ │ ├── minimal │ │ │ │ ├── aero.png │ │ │ │ ├── blue.png │ │ │ │ ├── grey.png │ │ │ │ ├── pink.png │ │ │ │ ├── red.png │ │ │ │ ├── green.png │ │ │ │ ├── orange.png │ │ │ │ ├── purple.png │ │ │ │ ├── red@2x.png │ │ │ │ ├── yellow.png │ │ │ │ ├── aero@2x.png │ │ │ │ ├── blue@2x.png │ │ │ │ ├── green@2x.png │ │ │ │ ├── grey@2x.png │ │ │ │ ├── minimal.png │ │ │ │ ├── orange@2x.png │ │ │ │ ├── pink@2x.png │ │ │ │ ├── purple@2x.png │ │ │ │ ├── yellow@2x.png │ │ │ │ ├── minimal@2x.png │ │ │ │ ├── minimal.css │ │ │ │ ├── red.css │ │ │ │ ├── aero.css │ │ │ │ ├── blue.css │ │ │ │ ├── grey.css │ │ │ │ ├── pink.css │ │ │ │ ├── green.css │ │ │ │ ├── orange.css │ │ │ │ ├── purple.css │ │ │ │ └── yellow.css │ │ │ ├── square │ │ │ │ ├── aero.png │ │ │ │ ├── blue.png │ │ │ │ ├── green.png │ │ │ │ ├── grey.png │ │ │ │ ├── pink.png │ │ │ │ ├── red.png │ │ │ │ ├── aero@2x.png │ │ │ │ ├── blue@2x.png │ │ │ │ ├── grey@2x.png │ │ │ │ ├── orange.png │ │ │ │ ├── pink@2x.png │ │ │ │ ├── purple.png │ │ │ │ ├── red@2x.png │ │ │ │ ├── square.png │ │ │ │ ├── yellow.png │ │ │ │ ├── green@2x.png │ │ │ │ ├── orange@2x.png │ │ │ │ ├── purple@2x.png │ │ │ │ ├── square@2x.png │ │ │ │ ├── yellow@2x.png │ │ │ │ ├── square.css │ │ │ │ ├── red.css │ │ │ │ ├── aero.css │ │ │ │ ├── blue.css │ │ │ │ ├── grey.css │ │ │ │ ├── pink.css │ │ │ │ ├── green.css │ │ │ │ ├── orange.css │ │ │ │ ├── purple.css │ │ │ │ └── yellow.css │ │ │ ├── futurico │ │ │ │ ├── futurico.png │ │ │ │ ├── futurico@2x.png │ │ │ │ └── futurico.css │ │ │ ├── polaris │ │ │ │ ├── polaris.png │ │ │ │ ├── polaris@2x.png │ │ │ │ └── polaris.css │ │ │ └── all.css │ │ ├── bower.json │ │ ├── .bower.json │ │ └── icheck.jquery.json │ ├── font-awesome │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── fixed-width.less │ │ │ ├── screen-reader.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── core.less │ │ │ ├── stacked.less │ │ │ ├── font-awesome.less │ │ │ ├── bordered-pulled.less │ │ │ ├── rotated-flipped.less │ │ │ ├── path.less │ │ │ ├── animated.less │ │ │ └── mixins.less │ │ ├── scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _core.scss │ │ │ ├── font-awesome.scss │ │ │ ├── _stacked.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _path.scss │ │ │ ├── _animated.scss │ │ │ └── _mixins.scss │ │ ├── HELP-US-OUT.txt │ │ ├── .gitignore │ │ ├── bower.json │ │ ├── .npmignore │ │ └── .bower.json │ ├── jquery-ui │ │ └── images │ │ │ ├── ui-icons_444444_256x240.png │ │ │ ├── ui-icons_555555_256x240.png │ │ │ ├── ui-icons_777620_256x240.png │ │ │ ├── ui-icons_777777_256x240.png │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ └── ui-icons_ffffff_256x240.png │ ├── bootstrap │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── js │ │ │ └── npm.js │ │ └── .bower.json │ ├── google-code-prettify │ │ └── prettify.min.css │ ├── jquery-notifyjs │ │ └── styles │ │ │ └── metro │ │ │ ├── notify-metro.css │ │ │ └── notify-metro.js │ ├── bootstrap-table │ │ └── js │ │ │ └── bootstrap-table-zh-CN.min.js │ ├── datatables.net-bs │ │ └── js │ │ │ └── dataTables.bootstrap.min.js │ ├── bootstrap-progressbar │ │ └── bootstrap-progressbar.min.js │ └── ion.rangeSlider │ │ └── css │ │ └── ion.rangeSlider.skinFlat.css ├── custom │ └── images │ │ ├── loading.gif │ │ ├── back_disabled.png │ │ ├── back_enabled.png │ │ ├── forward_disabled.png │ │ ├── forward_enabled.png │ │ ├── back_enabled_hover.png │ │ └── forward_enabled_hover.png └── others │ └── css │ └── bootstrapValidator.min.css ├── utils ├── __init__.py ├── ldapauth.py ├── tar_file.py ├── mydb.py ├── mongo_api.py ├── jenkins_job.py └── config_parser.py ├── .gitattributes ├── templates ├── base │ ├── footer.html │ └── top_navigation.html ├── tags │ ├── tag_user_minions.html │ ├── tag_users.html │ ├── tag_minions.html │ └── tag_permissions.html └── user │ └── user_profile.html ├── .gitignore ├── manage.py ├── README.md ├── requirements.txt └── control.sh /asset/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deploy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /devops/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /user/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dbadmin/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sysadmin/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /asset/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /user/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dbadmin/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /deploy/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sysadmin/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /user/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /demo/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/demo/demo.gif -------------------------------------------------------------------------------- /demo/tailf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/demo/tailf.gif -------------------------------------------------------------------------------- /asset/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /conf/saltconfig/nodegroup.conf.example: -------------------------------------------------------------------------------- 1 | nodegroups: 2 | asd: 'L@devops-client01' 3 | -------------------------------------------------------------------------------- /dbadmin/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /demo/codedeploy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/demo/codedeploy.gif -------------------------------------------------------------------------------- /demo/database.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/demo/database.gif -------------------------------------------------------------------------------- /deploy/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /user/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /user/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /dbadmin/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /deploy/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /static/images/img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/img.jpg -------------------------------------------------------------------------------- /sysadmin/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /sysadmin/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /static/images/inbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/inbox.png -------------------------------------------------------------------------------- /static/images/media.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/media.jpg -------------------------------------------------------------------------------- /static/images/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/paypal.png -------------------------------------------------------------------------------- /static/images/prod-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/prod-1.jpg -------------------------------------------------------------------------------- /static/images/prod-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/prod-2.jpg -------------------------------------------------------------------------------- /static/images/prod-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/prod-3.jpg -------------------------------------------------------------------------------- /static/images/prod-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/prod-4.jpg -------------------------------------------------------------------------------- /static/images/prod-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/prod-5.jpg -------------------------------------------------------------------------------- /static/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/user.png -------------------------------------------------------------------------------- /static/images/visa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/visa.png -------------------------------------------------------------------------------- /static/images/avatar2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/avatar2.jpg -------------------------------------------------------------------------------- /static/images/cropper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/cropper.jpg -------------------------------------------------------------------------------- /static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/favicon.ico -------------------------------------------------------------------------------- /static/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/loading.gif -------------------------------------------------------------------------------- /static/images/picture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/picture.jpg -------------------------------------------------------------------------------- /static/images/mastercard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/mastercard.png -------------------------------------------------------------------------------- /static/webssh/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/webssh/img/favicon.png -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 17-8-17 上午9:15 3 | # @Author : Wang Chao 4 | -------------------------------------------------------------------------------- /static/images/back_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/back_disabled.png -------------------------------------------------------------------------------- /static/images/back_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/back_enabled.png -------------------------------------------------------------------------------- /static/vendors/pnotify/pnotify.buttons.css: -------------------------------------------------------------------------------- 1 | .ui-pnotify-closer,.ui-pnotify-sticker{float:right;margin-left:.2em} -------------------------------------------------------------------------------- /asset/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AssetConfig(AppConfig): 5 | name = 'asset' 6 | -------------------------------------------------------------------------------- /static/custom/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/loading.gif -------------------------------------------------------------------------------- /static/images/american-express.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/american-express.png -------------------------------------------------------------------------------- /static/images/forward_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/forward_disabled.png -------------------------------------------------------------------------------- /static/images/forward_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/forward_enabled.png -------------------------------------------------------------------------------- /user/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class UserConfig(AppConfig): 5 | name = 'user' 6 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=python 2 | *.css linguist-language=python 3 | *.html linguist-language=python 4 | -------------------------------------------------------------------------------- /deploy/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DeployConfig(AppConfig): 5 | name = 'deploy' 6 | -------------------------------------------------------------------------------- /static/images/back_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/back_enabled_hover.png -------------------------------------------------------------------------------- /static/images/icon/details_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/icon/details_close.png -------------------------------------------------------------------------------- /static/images/icon/details_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/icon/details_open.png -------------------------------------------------------------------------------- /dbadmin/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DbadminConfig(AppConfig): 5 | name = 'dbadmin' 6 | -------------------------------------------------------------------------------- /static/custom/images/back_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/back_disabled.png -------------------------------------------------------------------------------- /static/custom/images/back_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/back_enabled.png -------------------------------------------------------------------------------- /static/images/forward_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/images/forward_enabled_hover.png -------------------------------------------------------------------------------- /sysadmin/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class SysadminConfig(AppConfig): 5 | name = 'sysadmin' 6 | -------------------------------------------------------------------------------- /static/custom/images/forward_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/forward_disabled.png -------------------------------------------------------------------------------- /static/custom/images/forward_enabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/forward_enabled.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/aero.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/blue.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/flat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/flat.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/grey.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/pink.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/red.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/line/line.png -------------------------------------------------------------------------------- /static/custom/images/back_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/back_enabled_hover.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/aero@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/blue@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/flat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/flat@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/green.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/grey@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/orange.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/pink@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/purple.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/red@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/yellow.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/line@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/line/line@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/aero.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/blue.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/grey.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/pink.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/red.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/aero.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/blue.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/green.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/grey.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/pink.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/red.png -------------------------------------------------------------------------------- /static/custom/images/forward_enabled_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/custom/images/forward_enabled_hover.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/green@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/orange@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/purple@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/flat/yellow@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/green.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/orange.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/purple.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/red@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/yellow.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/aero@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/blue@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/grey@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/orange.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/pink@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/purple.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/red@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/square.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/yellow.png -------------------------------------------------------------------------------- /static/vendors/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/futurico/futurico.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/futurico/futurico.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/aero@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/blue@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/green@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/grey@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/minimal.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/orange@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/pink@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/purple@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/yellow@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/polaris/polaris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/polaris/polaris.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/green@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/orange@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/purple@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/square@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/square@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/square/yellow@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/minimal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/minimal/minimal@2x.png -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/polaris/polaris@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/polaris/polaris@2x.png -------------------------------------------------------------------------------- /static/vendors/pnotify/pnotify.nonblock.css: -------------------------------------------------------------------------------- 1 | .ui-pnotify.ui-pnotify-nonblock-fade{opacity:.2}.ui-pnotify.ui-pnotify-nonblock-hide{display:none!important} -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/futurico/futurico@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/iCheck/skins/futurico/futurico@2x.png -------------------------------------------------------------------------------- /static/vendors/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/vendors/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/vendors/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/vendors/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /static/vendors/jquery-ui/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/jquery-ui/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /static/vendors/jquery-ui/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/jquery-ui/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /static/vendors/jquery-ui/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/jquery-ui/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /static/vendors/jquery-ui/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/jquery-ui/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /static/vendors/jquery-ui/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/jquery-ui/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /static/vendors/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /static/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ntuwang/devops/HEAD/static/vendors/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /static/webssh/css/fullscreen.min.css: -------------------------------------------------------------------------------- 1 | .xterm.fullscreen{position:fixed;top:0;bottom:0;left:0;right:0;width:auto;height:auto;z-index:255} 2 | /*# sourceMappingURL=fullscreen.min.css.map */ -------------------------------------------------------------------------------- /static/vendors/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/vendors/font-awesome/less/screen-reader.less: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { .sr-only(); } 5 | .sr-only-focusable { .sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /static/vendors/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/vendors/font-awesome/scss/_screen-reader.scss: -------------------------------------------------------------------------------- 1 | // Screen Readers 2 | // ------------------------- 3 | 4 | .sr-only { @include sr-only(); } 5 | .sr-only-focusable { @include sr-only-focusable(); } 6 | -------------------------------------------------------------------------------- /templates/base/footer.html: -------------------------------------------------------------------------------- 1 |
2 | SIMPLTON - Based on Template by Colorlib 3 |
4 |
-------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python 2 | __pycache__/ 3 | *.py[cod] 4 | *.log 5 | *.sqlite3 6 | .idea 7 | */migrations/*.py 8 | !__init__.py 9 | devops/settings_local.py 10 | devops/settings.py 11 | *.conf 12 | *.ini 13 | .vscode 14 | todolist.md 15 | nohup.out 16 | *.DS_Store 17 | logs/ 18 | -------------------------------------------------------------------------------- /static/others/css/bootstrapValidator.min.css: -------------------------------------------------------------------------------- 1 | .bv-form .help-block{margin-bottom:0}.bv-form .tooltip-inner{text-align:left}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442}.bv-form .bv-icon-no-label{top:0}.bv-form .bv-icon-input-group{top:0;z-index:100} -------------------------------------------------------------------------------- /devops/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI entrypoint. Configures Django and then runs the application 3 | defined in the ASGI_APPLICATION setting. 4 | """ 5 | 6 | import os 7 | import django 8 | from channels.routing import get_default_application 9 | 10 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "chain.settings") 11 | django.setup() 12 | application = get_default_application() -------------------------------------------------------------------------------- /static/vendors/font-awesome/HELP-US-OUT.txt: -------------------------------------------------------------------------------- 1 | I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project, 2 | Fort Awesome (https://fortawesome.com). It makes it easy to put the perfect icons on your website. Choose from our awesome, 3 | comprehensive icon sets or copy and paste your own. 4 | 5 | Please. Check it out. 6 | 7 | -Dave Gandy 8 | -------------------------------------------------------------------------------- /utils/ldapauth.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 17-8-24 下午2:53 3 | # @Author : Wang Chao 4 | 5 | 6 | from django.conf import settings 7 | 8 | 9 | def ldap_connection(username, password): 10 | conn = ldap.initialize(settings.LDAP_PROVIDER_URL) 11 | try: 12 | conn.simple_bind_s('uid={0},{1}'.format(username, settings.LDAP_BASE_DC), password) 13 | return 1 14 | except: 15 | return 0 16 | -------------------------------------------------------------------------------- /templates/tags/tag_user_minions.html: -------------------------------------------------------------------------------- 1 | {% if list_type == 'single' %} 2 | 6 | {% endif %} 7 | {% for tgt in tgt_list %} 8 | 9 | {% endfor %} 10 | 11 | -------------------------------------------------------------------------------- /devops/routing.py: -------------------------------------------------------------------------------- 1 | from channels.auth import AuthMiddlewareStack 2 | from channels.routing import URLRouter, ProtocolTypeRouter 3 | from django.urls import path 4 | 5 | from .consumers import EchoConsumer 6 | 7 | application = ProtocolTypeRouter({ 8 | "websocket": AuthMiddlewareStack( 9 | URLRouter([ 10 | path(r"ws/", EchoConsumer), 11 | # path(r"stats/", StatsConsumer), 12 | ]) 13 | ) 14 | }) 15 | -------------------------------------------------------------------------------- /static/webssh/js/fullscreen.min.js: -------------------------------------------------------------------------------- 1 | !function(e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("../../xterm")):"function"==typeof define?define(["../../xterm"],e):e(window.Terminal)}(function(e){var t={};return t.toggleFullScreen=function(e,t){var n;n=void 0===t?e.element.classList.contains("fullscreen")?"remove":"add":t?"add":"remove",e.element.classList[n]("fullscreen")},e.prototype.toggleFullscreen=function(e){t.toggleFullScreen(this,e)},t}); -------------------------------------------------------------------------------- /static/vendors/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 | -------------------------------------------------------------------------------- /devops/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for devops project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "devops.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /static/vendors/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/vendors/font-awesome/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.egg-info 3 | *.db 4 | *.db.old 5 | *.swp 6 | *.db-journal 7 | 8 | .coverage 9 | .DS_Store 10 | .installed.cfg 11 | _gh_pages/* 12 | 13 | .idea/* 14 | .svn/* 15 | src/website/static/* 16 | src/website/media/* 17 | 18 | bin 19 | cfcache 20 | develop-eggs 21 | dist 22 | downloads 23 | eggs 24 | parts 25 | tmp 26 | .sass-cache 27 | node_modules 28 | 29 | src/website/settingslocal.py 30 | stunnel.log 31 | 32 | .ruby-version 33 | .bundle 34 | -------------------------------------------------------------------------------- /static/vendors/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/vendors/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/vendors/font-awesome/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "font-awesome", 3 | "description": "Font Awesome", 4 | "keywords": [], 5 | "homepage": "http://fontawesome.io", 6 | "dependencies": {}, 7 | "devDependencies": {}, 8 | "license": ["OFL-1.1", "MIT", "CC-BY-3.0"], 9 | "main": [ 10 | "less/font-awesome.less", 11 | "scss/font-awesome.scss" 12 | ], 13 | "ignore": [ 14 | "*/.*", 15 | "*.json", 16 | "src", 17 | "*.yml", 18 | "Gemfile", 19 | "Gemfile.lock", 20 | "*.md" 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | @import "screen-reader"; 19 | -------------------------------------------------------------------------------- /dbadmin/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from dbadmin import views as dviews 4 | 5 | # app_name = 'dbadmin' 6 | 7 | urlpatterns = [ 8 | 9 | url(r'^database_list/$', dviews.database_list, name='database_list'), 10 | url(r'^db_metadata/$', dviews.db_metadata, name='db_metadata'), 11 | url(r'^get_table_list/$', dviews.get_table_list, name='get_table_list'), 12 | 13 | url(r'^db_add/$', dviews.db_manage, name='db_add'), 14 | url(r'^db_edit/(?P[\w-]+)/(?P\d+)/$', dviews.db_manage, name='db_manage'), 15 | 16 | ] 17 | -------------------------------------------------------------------------------- /static/vendors/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /conf/settings.conf.example: -------------------------------------------------------------------------------- 1 | [deploy] 2 | backup_count=10 3 | user=root 4 | key_file=/root/.ssh/xxxxx.key 5 | 6 | 7 | [jenkins] 8 | url=http://xxxx.xxx.xxx:8080/jenkins 9 | ip =xx.xxx.xxx.xx 10 | work_base=/root/.jenkins/workspace/ 11 | username= 12 | password= 13 | 14 | 15 | [saltstack] 16 | url=http://xxxx.xxx.xxx.xx:8000 17 | username= 18 | password= 19 | 20 | 21 | [aliyun] 22 | accessKeyId= 23 | accessSecret= 24 | 25 | 26 | [webssh] 27 | ip= 28 | port= 29 | username= 30 | password= 31 | 32 | [dba] 33 | username= 34 | password= 35 | 36 | [file_base_url] 37 | url=http://127.0.0.1:8080/ 38 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "devops.settings") 7 | try: 8 | from django.core.management import execute_from_command_line 9 | except ImportError as exc: 10 | raise ImportError( 11 | "Couldn't import Django. Are you sure it's installed and " 12 | "available on your PYTHONPATH environment variable? Did you " 13 | "forget to activate a virtual environment?" 14 | ) from exc 15 | execute_from_command_line(sys.argv) 16 | -------------------------------------------------------------------------------- /static/vendors/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/vendors/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/vendors/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | @import "screen-reader.less"; 19 | -------------------------------------------------------------------------------- /sysadmin/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from sysadmin.models import * 3 | 4 | 5 | class SaltGroupForm(forms.ModelForm): 6 | class Meta: 7 | model = SaltGroup 8 | fields = ('nickname',) 9 | widgets = { 10 | 'nickname': forms.TextInput(attrs={'class': 'form-control'}), 11 | } 12 | 13 | 14 | class SaltFileForm(forms.Form): 15 | file_path = forms.FileField(label=u'选择文件', ) 16 | remote_path = forms.CharField(label=u'远程路径', widget=forms.TextInput(attrs={'class': 'form-control'})) 17 | remark = forms.CharField(label=u'备注', widget=forms.TextInput(attrs={'class': 'form-control'})) 18 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/.npmignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.egg-info 3 | *.db 4 | *.db.old 5 | *.swp 6 | *.db-journal 7 | 8 | .coverage 9 | .DS_Store 10 | .installed.cfg 11 | _gh_pages/* 12 | 13 | .idea/* 14 | .svn/* 15 | src/website/static/* 16 | src/website/media/* 17 | 18 | bin 19 | cfcache 20 | develop-eggs 21 | dist 22 | downloads 23 | eggs 24 | parts 25 | tmp 26 | .sass-cache 27 | node_modules 28 | 29 | src/website/settingslocal.py 30 | stunnel.log 31 | 32 | .ruby-version 33 | 34 | # don't need these in the npm package. 35 | src/ 36 | _config.yml 37 | bower.json 38 | component.json 39 | composer.json 40 | CONTRIBUTING.md 41 | Gemfile 42 | Gemfile.lock 43 | -------------------------------------------------------------------------------- /user/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | from django.contrib.auth import views as djviews 3 | from . import views as uviews 4 | 5 | # app_name = 'user' 6 | 7 | urlpatterns = [ 8 | url(r'^$', uviews.index, name='index'), 9 | url(r'^accounts/login/$', uviews.login, name='login'), 10 | url(r'^accounts/logout/$', uviews.logout, {'next_page': '/'}, name='logout'), 11 | url(r'^user/list/$', uviews.user_list, name='user_list'), 12 | url(r'^user/add/$', uviews.user_manage, name='user_add'), 13 | url(r'^user/manage/(?P[\w-]+)/(?P\d+)/$', uviews.user_manage, name='user_manage'), 14 | url(r'^log_audit/$', uviews.log_audit, name='log_audit'), 15 | ] 16 | -------------------------------------------------------------------------------- /static/vendors/google-code-prettify/prettify.min.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /static/vendors/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .@{fa-css-prefix}-pull-left { float: left; } 11 | .@{fa-css-prefix}-pull-right { float: right; } 12 | 13 | .@{fa-css-prefix} { 14 | &.@{fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.@{fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .@{fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .#{$fa-css-prefix}-pull-left { float: left; } 11 | .#{$fa-css-prefix}-pull-right { float: right; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.#{$fa-css-prefix}-pull-left { margin-right: .3em; } 15 | &.#{$fa-css-prefix}-pull-right { margin-left: .3em; } 16 | } 17 | 18 | /* Deprecated as of 4.4.0 */ 19 | .pull-right { float: right; } 20 | .pull-left { float: left; } 21 | 22 | .#{$fa-css-prefix} { 23 | &.pull-left { margin-right: .3em; } 24 | &.pull-right { margin-left: .3em; } 25 | } 26 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # devops (持续更新中) 2 | 3 | demo(只是个空架子 大部分功能没开放出来,等权限完成后再打开) 4 | 5 | 地址 http://121.199.79.74 6 | 7 | 用户名 admin 8 | 9 | 密码 ASDasd!@#123 10 | 11 | #### 项目介绍 12 | devops 自动化运维平台--一站式满足需求 13 | 14 | 功能点(按顺序实现): 15 | * CMDB 16 | * webssh √ 17 | * 用户管理 √ 18 | * 日志审计 √ 19 | * 远程命令/脚本 20 | * 文件分发 √ 21 | * 环境部署 22 | * 代码发布管理 23 | * 数据库管理 24 | * DNS管理 √ 25 | * 权限细分 26 | * 接口管理 27 | * 定时任务管理 28 | * 监控管理 29 | * 容器管理 30 | * WEB 日志 √ 31 | * 开放REST API 32 | 33 | 34 | #### 工具依赖 35 | * Django2 36 | * Python3 37 | ### 安装部署(未完待续,不要上生产) 38 | * 搭建salt-api,jenkins,git环境 39 | * 搭建redis,mysql环境 40 | * 修改配置文件(devops/settings.py && conf/example) 41 | * 启动django项目 42 | * 启动web ssh 43 | #### 参与贡献 44 | 45 | 项目前后端借鉴了很多开源项目,做了个集成,有需求或者建议,请提交issue 46 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /asset/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from asset.models import ServerAsset, AssetLoginUser 3 | from guardian.admin import GuardedModelAdmin 4 | 5 | 6 | class ServerAssetAdmin(GuardedModelAdmin): 7 | search_fields = ('hostname', 'nodename', 'public_ip') # 定义搜索框以哪些字段可以搜索 8 | list_display = ('hostname', 'private_ip', 'public_ip', 'os', 'owner', 'user') # 每行的显示信息 9 | list_display_links = ('hostname', 'owner', 'user') # 设置哪些字段可以点击进入编辑界面 10 | list_filter = ("hostname", 'os') 11 | 12 | 13 | class AssetLoginUserAdmin(GuardedModelAdmin): 14 | search_fields = ('username', 'ctime',) 15 | list_display = ('username', 'ps') 16 | list_display_links = ('username',) 17 | list_filter = ('username',) 18 | 19 | 20 | admin.site.register(ServerAsset, ServerAssetAdmin) 21 | admin.site.register(AssetLoginUser, AssetLoginUserAdmin) 22 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /dbadmin/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import DBInfo 3 | 4 | 5 | class DBInfoForm(forms.ModelForm): 6 | class Meta: 7 | model = DBInfo 8 | fields = '__all__' 9 | widgets = { 10 | 'db_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 11 | 'db_ip': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 12 | 'db_port': forms.TextInput(attrs={'type':'number','class': 'form-control', 'required': 'required'}), 13 | 'status': forms.Select(attrs={'type':'number','class': 'form-control', 'required': 'required'}), 14 | 'comment': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 15 | 'user':forms.Select(attrs={'type':'number','class': 'form-control', 'required': 'required'}), 16 | 17 | } 18 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "font-awesome", 3 | "description": "Font Awesome", 4 | "keywords": [], 5 | "homepage": "http://fontawesome.io", 6 | "dependencies": {}, 7 | "devDependencies": {}, 8 | "license": [ 9 | "OFL-1.1", 10 | "MIT", 11 | "CC-BY-3.0" 12 | ], 13 | "main": [ 14 | "less/font-awesome.less", 15 | "scss/font-awesome.scss" 16 | ], 17 | "ignore": [ 18 | "*/.*", 19 | "*.json", 20 | "src", 21 | "*.yml", 22 | "Gemfile", 23 | "Gemfile.lock", 24 | "*.md" 25 | ], 26 | "version": "4.6.3", 27 | "_release": "4.6.3", 28 | "_resolution": { 29 | "type": "version", 30 | "tag": "v4.6.3", 31 | "commit": "0f618911b105195c931ec5d5bef425a2a2806cab" 32 | }, 33 | "_source": "https://github.com/FortAwesome/Font-Awesome.git", 34 | "_target": "^4.6.1", 35 | "_originalSource": "fontawesome" 36 | } -------------------------------------------------------------------------------- /static/vendors/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /deploy/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from deploy import views as dviews 4 | 5 | # app_name = 'asset' 6 | 7 | urlpatterns = [ 8 | 9 | url(r'^project_list/$', dviews.project_list, name='project_list'), 10 | url(r'^project/add/$', dviews.project_manage, name='project_add'), 11 | url(r'^project/edit/(?P[\w-]+)/(?P\d+)/$', dviews.project_manage, name='project_manage'), 12 | url(r'^deploy_list/$', dviews.code_deploy_list, name='code_deploy_list'), 13 | url(r'^deploy_add/$', dviews.code_deploy_manage, name='code_deploy_add'), 14 | url(r'^deploy_manage/(?P[\w-]+)/(?P\d+)/$', dviews.code_deploy_manage, name='code_deploy_manage'), 15 | url(r'^jenkins_manage_detail/(?P[\w-]+)/(?P[\w-]+)/$', dviews.jenkins_manage, name='jenkins_manage_detail'), 16 | url(r'^jenkins_manage/(?P[\w-]+)/$', dviews.jenkins_manage, name='jenkins_manage'), 17 | 18 | ] 19 | -------------------------------------------------------------------------------- /static/vendors/iCheck/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iCheck", 3 | "version": "1.0.2", 4 | "description": "Highly customizable checkboxes and radio buttons (jQuery & Zepto)", 5 | "keywords": [ 6 | "icheck", 7 | "checkbox", 8 | "radio", 9 | "input", 10 | "field", 11 | "form", 12 | "custom", 13 | "replacement", 14 | "accessibility", 15 | "skins", 16 | "ui", 17 | "checked", 18 | "disabled", 19 | "indeterminate" 20 | ], 21 | "main": [ 22 | "./icheck.min.js" 23 | ], 24 | "dependencies": { 25 | "jquery": ">=1.7" 26 | }, 27 | "ignore": [ 28 | ".gitignore", 29 | "CHANGELOG.md", 30 | "README.md", 31 | "demo/" 32 | ], 33 | "license": "MIT", 34 | "authors": [ 35 | { 36 | "name": "Damir Sultanov", 37 | "email": "info@fronteed.com", 38 | "homepage": "http://fronteed.com/" 39 | } 40 | ], 41 | "homepage": "http://fronteed.com/iCheck/" 42 | } 43 | -------------------------------------------------------------------------------- /templates/base/top_navigation.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 5 |
6 | 7 |
    8 |
  • 9 | 11 | {{ request.user.username }} 12 | 13 | 14 |
      15 |
    • Profile
    • 16 |
    • Log Out 17 |
    18 |
  • 19 | 20 |
21 |
22 |
23 | -------------------------------------------------------------------------------- /user/templatetags/myinclusion.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf8 3 | # @Time : 17-8-11 上午11:16 4 | # @Author : Wang Chao 5 | 6 | from django import template 7 | from django.db.models import Q 8 | 9 | from sysadmin.models import SaltHost, SaltGroup 10 | from user.models import Users 11 | 12 | register = template.Library() 13 | 14 | 15 | def show_groups(pk, user_type): 16 | ''' 17 | 远程命令、模块部署及文件管理中显示所有分组 18 | ''' 19 | group_dict = {} 20 | if user_type: 21 | group_dict = {i['groupname']: i['nickname'] for i in SaltGroup.objects.values('groupname', 'nickname')} 22 | else: 23 | d = Users.objects.get(pk=pk).department 24 | group_dict = {i['groupname']: i['nickname'] for d in Users.objects.get(pk=pk).department.all() 25 | for i in d.saltgroup_department_set.values('groupname', 'nickname')} 26 | 27 | return {'group_dict': sorted(list(set(group_dict.items())))} 28 | 29 | 30 | register.inclusion_tag('tag_user_departments.html')(show_groups) 31 | -------------------------------------------------------------------------------- /user/templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'registration/base.html' %} 2 | {% load myfilter %} 3 | {% block content %} 4 | {% if user.is_authenticated %} 5 | 6 | {% endif %} 7 | {% for i in form %} 8 | {{ i|add_class:"form-control" }} 9 | {% endfor %} 10 | {% if form.errors %} 11 |
用户名或密码错误!
12 | {% endif %} 13 | 14 |
15 | 16 |
17 |
18 | 19 |
20 |
21 | 22 |
23 |
24 | 25 | 忘记密码? 26 | 27 |
28 | 29 |
30 |
31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /asset/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | from django.urls import path 3 | from asset import views as aviews 4 | 5 | # app_name = 'asset' 6 | 7 | urlpatterns = [ 8 | 9 | url(r'^server_info/$', aviews.get_server_asset_info, name='server_info'), 10 | url(r'^server/edit/(?P\d+)/(?P[\w-]+)/$', aviews.server_asset_manage, name='server_manage'), 11 | url(r'^owner_list/$', aviews.owner_list, name='owner_list'), 12 | url(r'^owner/add/$', aviews.owner_manage, name='owner_add'), 13 | url(r'^owner/edit/(?P\d+)/(?P[\w-]+)/$', aviews.owner_manage, name='owner_manage'), 14 | url(r'^cloud_list/$', aviews.cloud_asset_list, name='cloud_asset_list'), 15 | url(r'^cloud/add/$', aviews.cloud_asset_manage, name='cloud_add'), 16 | url(r'^server/add/$', aviews.server_asset_manage, name='server_add'), 17 | url(r'^cloud/edit/(?P\d+)/(?P[\w-]+)/$', aviews.cloud_asset_manage, name='cloud_manage'), 18 | 19 | url(r'^asset_web_ssh/$', aviews.asset_web_ssh, name='asset_web_ssh'), 20 | 21 | ] 22 | -------------------------------------------------------------------------------- /utils/tar_file.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf8 -*- 2 | ## http://zhujiangtao.com/?p=579 3 | 4 | import os,tarfile 5 | 6 | def make_tar(folder_to_tar,dst_folder,compression='bz2'): 7 | '''将folder_to_tar文件夹按照compression压缩格式,打包到dst_folder目录下 8 | 默认使用bz2压缩,如果指定compression=None,则表示只打包不压缩''' 9 | 10 | #是否需要压缩 11 | if compression: #压缩 12 | dst_ext = '.'+compression #打包后文件的后缀名 13 | else: 14 | dst_ext='' 15 | 16 | #文件夹名称 17 | fold_name = os.path.basename(folder_to_tar) 18 | 19 | #打包的文件名称 20 | dst_name = '%s.tar%s'%(fold_name,dst_ext)#fold_name.tar.bz2 21 | 22 | #打包的文件全路径 23 | dst_path = os.path.join(dst_folder,dst_name) #dst_folder/fold_name.tar.bz2 24 | 25 | if compression: 26 | dst_cmp = ':'+compression #:bz2 :gz 等表示压缩格式 27 | else: 28 | dst_cmp = '' 29 | 30 | #打开一个tar文件 31 | tar = tarfile.TarFile.open(dst_path, 'w'+dst_cmp) 32 | 33 | #向tar文件中添加要打包的文件 34 | tar.add(folder_to_tar,fold_name)#打包该目录 35 | 36 | #关闭tar文件 37 | tar.close() 38 | 39 | #返回打包文件全路径 40 | return dst_path 41 | -------------------------------------------------------------------------------- /static/vendors/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 2" 33 | }, 34 | "version": "3.3.6", 35 | "_release": "3.3.6", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.3.6", 39 | "commit": "81df608a40bf0629a1dc08e584849bb1e43e0b7a" 40 | }, 41 | "_source": "https://github.com/twbs/bootstrap.git", 42 | "_target": "^3.3.6", 43 | "_originalSource": "bootstrap" 44 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "iCheck", 3 | "version": "1.0.2", 4 | "description": "Highly customizable checkboxes and radio buttons (jQuery & Zepto)", 5 | "keywords": [ 6 | "icheck", 7 | "checkbox", 8 | "radio", 9 | "input", 10 | "field", 11 | "form", 12 | "custom", 13 | "replacement", 14 | "accessibility", 15 | "skins", 16 | "ui", 17 | "checked", 18 | "disabled", 19 | "indeterminate" 20 | ], 21 | "main": [ 22 | "./icheck.min.js" 23 | ], 24 | "dependencies": { 25 | "jquery": ">=1.7" 26 | }, 27 | "ignore": [ 28 | ".gitignore", 29 | "CHANGELOG.md", 30 | "README.md", 31 | "demo/" 32 | ], 33 | "license": "MIT", 34 | "authors": [ 35 | { 36 | "name": "Damir Sultanov", 37 | "email": "info@fronteed.com", 38 | "homepage": "http://fronteed.com/" 39 | } 40 | ], 41 | "homepage": "http://fronteed.com/iCheck/", 42 | "_release": "1.0.2", 43 | "_resolution": { 44 | "type": "version", 45 | "tag": "1.0.2", 46 | "commit": "8a6eb37bd7dab1e843c1b630c91c6398ff409d05" 47 | }, 48 | "_source": "https://github.com/fronteed/iCheck.git", 49 | "_target": "^1.0.2", 50 | "_originalSource": "icheck" 51 | } -------------------------------------------------------------------------------- /utils/mydb.py: -------------------------------------------------------------------------------- 1 | import pymysql 2 | from pymysql.cursors import DictCursor 3 | 4 | 5 | class MysqlConn: 6 | def __init__(self, host_ip, port_num, db_name, db_user, db_pass, conn=0,cursorclass=None): 7 | if not cursorclass: 8 | self.connection = pymysql.connect(host=host_ip, port=port_num, user=db_user, passwd=db_pass, db=db_name, charset='utf8') 9 | else: 10 | self.connection = pymysql.connect(host=host_ip, port=port_num, user=db_user, passwd=db_pass, db=db_name, 11 | charset='utf8',cursorclass=DictCursor) 12 | self.cursor = self.connection.cursor() 13 | self.conn = conn 14 | 15 | def __iter__(self): 16 | for item in self.cursor: 17 | yield item 18 | 19 | def __enter__(self): 20 | if self.conn: 21 | return self.connection 22 | else: 23 | return self.cursor 24 | 25 | def __exit__(self, ext_type, exc_value, traceback): 26 | self.cursor.close() 27 | if isinstance(exc_value, Exception): 28 | self.connection.rollback() 29 | else: 30 | self.connection.commit() 31 | self.connection.close() 32 | 33 | 34 | if __name__ == '__main__': 35 | pass -------------------------------------------------------------------------------- /dbadmin/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from asset.models import AssetLoginUser 3 | 4 | # Create your models here. 5 | 6 | 7 | class DBInfo(models.Model): 8 | 9 | STATUS_LIST = ( 10 | (0, 'online'), 11 | (1, 'offline') 12 | ) 13 | db_name = models.CharField(max_length=100, blank=True, null=True, verbose_name='DB名称') 14 | db_ip = models.GenericIPAddressField(blank=True, null=True, verbose_name='实例IP') 15 | db_port = models.IntegerField(default=3306, verbose_name='实例端口') 16 | status = models.IntegerField(default=0, choices=STATUS_LIST, verbose_name='实例状态') 17 | comment = models.TextField(blank=True, null=True, verbose_name='描述') 18 | ctime = models.DateTimeField(auto_now_add=True, verbose_name='创建时间') 19 | utime = models.DateTimeField(auto_now_add=True, verbose_name='更新时间') 20 | user = models.ForeignKey(AssetLoginUser, blank=True, null=True, verbose_name=u'登录用户', on_delete=models.CASCADE) 21 | 22 | def __str__(self): 23 | return self.db_name 24 | 25 | class Meta: 26 | ordering = ['-id'] 27 | verbose_name = u'数据库' 28 | verbose_name_plural = u'DB管理' 29 | permissions = ( 30 | ('view_db', u'查看DB'), 31 | ('manage_db', u'管理DB') 32 | ) -------------------------------------------------------------------------------- /templates/tags/tag_users.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

所有用户

4 | 9 |
10 | 11 |
12 | 13 | 14 | 15 | 16 |
17 | 18 |
19 |

已选用户

20 | 27 |
-------------------------------------------------------------------------------- /templates/tags/tag_minions.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

所有主机

4 | 9 |
10 | 11 |
12 | 13 | 14 | 15 | 16 |
17 | 18 |
19 |

已选主机

20 | 27 |
-------------------------------------------------------------------------------- /devops/urls.py: -------------------------------------------------------------------------------- 1 | """devops URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/2.0/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: path('', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.urls import include, path 14 | 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) 15 | """ 16 | from django.contrib import admin 17 | from django.urls import path, include,re_path 18 | from django.conf.urls import url 19 | from django.http import HttpResponse 20 | urlpatterns = [ 21 | path('admin/', admin.site.urls,name='admin'), 22 | path(r'', include('user.urls')), 23 | path(r'asset/', include('asset.urls')), 24 | path(r'sysadmin/', include('sysadmin.urls')), 25 | path(r'deploy/', include('deploy.urls')), 26 | path(r'dbadmin/', include('dbadmin.urls')), 27 | url(r'^robots\.txt$', lambda r: HttpResponse('User-agent: *\nDisallow: /admin', content_type='text/plain')), 28 | ] 29 | -------------------------------------------------------------------------------- /user/templatetags/myfilter.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf8 3 | # @Time : 17-8-11 上午11:16 4 | # @Author : Wang Chao 5 | 6 | from django import template 7 | from django.contrib.auth.models import Group 8 | from user.models import Users 9 | from django.db.models import Q 10 | from django.shortcuts import get_object_or_404 11 | 12 | register = template.Library() 13 | 14 | @register.filter(name='add_class') 15 | def add_class(value, arg): 16 | return value.as_widget(attrs={'class': arg, 'required':'required'}) 17 | 18 | @register.filter(name='group_minions') 19 | def minions(value): 20 | ''' 21 | 分组列表中显示所有主机 22 | ''' 23 | 24 | try: 25 | group_minions = value.minions.all() 26 | return group_minions 27 | except: 28 | return '' 29 | 30 | @register.filter(name='group_users') 31 | def all_users(group): 32 | ''' 33 | 分组列表中显示所有主机 34 | ''' 35 | 36 | try: 37 | #all_users = group.user_set.all() 38 | all_users = Users.objects.filter(group=group) 39 | return all_users 40 | except: 41 | return '' 42 | 43 | @register.filter(name='is_super') 44 | def user_is_super(pk): 45 | ''' 46 | 是否为超级用户 47 | ''' 48 | if pk: 49 | return Users.objects.get(pk=pk).is_superuser 50 | else: 51 | return None -------------------------------------------------------------------------------- /utils/mongo_api.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 2018/8/19下午4:29 3 | # @Author : Wang Chao 4 | 5 | # Written with pymongo-3.4 6 | # Documentation: http://docs.mongodb.org/ecosystem/drivers/python/ 7 | # A python script connecting to a MongoDB given a MongoDB Connection URI. 8 | 9 | import sys 10 | import pymongo 11 | 12 | 13 | class MongoApi(): 14 | def __init__(self, uri, collection): 15 | self.client = pymongo.MongoClient(uri) 16 | self.db = self.client.get_database() 17 | self.collection = self.db[collection] 18 | 19 | def find(self, query=None): 20 | # 查一个collection 21 | if query: 22 | array = self.collection.find(query) 23 | else: 24 | array = self.collection.find() 25 | 26 | f_list = [x for x in array] 27 | 28 | return f_list 29 | 30 | def create(self, data): 31 | # 添加文档 32 | self.collection.insert_many(data) 33 | 34 | def delete(self, query): 35 | self.collection.delete_many(query) 36 | 37 | def drop(self): 38 | self.collection.drop() 39 | 40 | def close(self): 41 | self.client.close() 42 | 43 | 44 | def main(): 45 | uri = "xxxxxxxxxxxxxxxxxxxx" 46 | m = MongoApi(uri, 'credentinal') 47 | m.drop() 48 | m = MongoApi(uri, 'credential') 49 | m.find() 50 | # m.drop() 51 | m.close() 52 | 53 | 54 | if __name__ == '__main__': 55 | main() 56 | -------------------------------------------------------------------------------- /static/vendors/jquery-notifyjs/styles/metro/notify-metro.css: -------------------------------------------------------------------------------- 1 | .notifyjs-metro-base { 2 | position: relative; 3 | min-height: 52px; 4 | min-width: 250px; 5 | color:#444; 6 | border-radius: 3px; 7 | -webkit-border-radius: 3px; 8 | box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2); 9 | } 10 | 11 | .notifyjs-metro-base .image { 12 | display: table; 13 | position: absolute; 14 | height: auto; 15 | width: auto; 16 | left: 25px; 17 | top: 50%; 18 | font-size: 24px; 19 | -moz-transform: translate(-50%, -50%); 20 | -ms-transform: translate(-50%, -50%); 21 | -o-transform: translate(-50%, -50%); 22 | -webkit-transform: translate(-50%, -50%); 23 | transform: translate(-50%, -50%); 24 | } 25 | 26 | .notifyjs-metro-base .text-wrapper { 27 | display: inline-block; 28 | vertical-align: top; 29 | text-align: left; 30 | margin: 10px 10px 10px 52px; 31 | clear: both; 32 | 33 | } 34 | 35 | .notifyjs-metro-base .title { 36 | font-size: 15px; 37 | line-height: 20px; 38 | margin-bottom: 5px; 39 | font-weight: bold; 40 | font-family: 'Open Sans'; 41 | } 42 | 43 | .notifyjs-metro-base .text { 44 | font-size: 12px; 45 | font-weight: normal; 46 | max-width: 360px; 47 | vertical-align: middle; 48 | 49 | } 50 | 51 | .notifyjs-metro-nonspaced{ 52 | min-height: 22px; 53 | } 54 | 55 | .notifyjs-metro-nonspaced .text-wrapper{ 56 | margin: 5px 5px 8px 8px; 57 | } -------------------------------------------------------------------------------- /sysadmin/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import url 2 | 3 | from sysadmin import views as oviews 4 | 5 | # app_name = 'asset' 6 | 7 | urlpatterns = [ 8 | 9 | url(r'^file_manage/upload/$', oviews.file_upload, name='file_manage'), 10 | url(r'^remote_execution/$', oviews.remote_execution, name='remote_execution'), 11 | url(r'^dns/list/$', oviews.aliyun_dns_list, name='aliyun_dns_list'), 12 | 13 | url(r'^web_term/$', oviews.web_term, name='web_term'), 14 | url(r'^web_log/$', oviews.web_log, name='web_log'), 15 | 16 | url(r'^salt_key_list/$', oviews.salt_key_list, name='salt_key_list'), 17 | url(r'^salt_key_import/$', oviews.salt_key_import, name='salt_key_import'), 18 | url(r'^salt_key_manage/$', oviews.salt_key_manage, name='salt_key_manage'), 19 | url(r'^salt_group_list/$', oviews.salt_group_list, name='salt_group_list'), 20 | url(r'^salt_group_manage/add/$', oviews.salt_group_manage, name='salt_group_add'), 21 | url(r'^salt_group_manage/delete$', oviews.salt_group_manage, name='salt_group_delete'), 22 | url(r'^salt_group_manage/(?P\d+)/edit/$', oviews.salt_group_manage, name='salt_group_edit'), 23 | 24 | url(r'^task_list/$', oviews.salt_task_list, name='task_list'), 25 | url(r'^salt_history_list/$', oviews.salt_history_list, name='salt_history_list'), 26 | url(r'^task_check/$', oviews.salt_task_check, name='task_check'), 27 | url(r'^task_running/$', oviews.salt_task_running, name='task_running'), 28 | ] 29 | -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/flat.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin flat skin, black 2 | ----------------------------------- */ 3 | .icheckbox_flat, 4 | .iradio_flat { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(flat.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat, 48 | .iradio_flat { 49 | background-image: url(flat@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, red 2 | ----------------------------------- */ 3 | .icheckbox_flat-red, 4 | .iradio_flat-red { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(red.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-red { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-red.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-red.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-red.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-red { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-red.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-red.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-red.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-red, 48 | .iradio_flat-red { 49 | background-image: url(red@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_flat-aero, 4 | .iradio_flat-aero { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(aero.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-aero { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-aero.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-aero.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-aero.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-aero { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-aero.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-aero.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-aero.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-aero, 48 | .iradio_flat-aero { 49 | background-image: url(aero@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_flat-blue, 4 | .iradio_flat-blue { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(blue.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-blue { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-blue.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-blue.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-blue.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-blue { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-blue.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-blue.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-blue.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-blue, 48 | .iradio_flat-blue { 49 | background-image: url(blue@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_flat-grey, 4 | .iradio_flat-grey { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(grey.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-grey { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-grey.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-grey.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-grey.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-grey { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-grey.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-grey.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-grey.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-grey, 48 | .iradio_flat-grey { 49 | background-image: url(grey@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_flat-pink, 4 | .iradio_flat-pink { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(pink.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-pink { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-pink.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-pink.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-pink.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-pink { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-pink.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-pink.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-pink.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-pink, 48 | .iradio_flat-pink { 49 | background-image: url(pink@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/futurico/futurico.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Futurico skin 2 | ----------------------------------- */ 3 | .icheckbox_futurico, 4 | .iradio_futurico { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 16px; 11 | height: 17px; 12 | background: url(futurico.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_futurico { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_futurico.checked { 21 | background-position: -18px 0; 22 | } 23 | .icheckbox_futurico.disabled { 24 | background-position: -36px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_futurico.checked.disabled { 28 | background-position: -54px 0; 29 | } 30 | 31 | .iradio_futurico { 32 | background-position: -72px 0; 33 | } 34 | .iradio_futurico.checked { 35 | background-position: -90px 0; 36 | } 37 | .iradio_futurico.disabled { 38 | background-position: -108px 0; 39 | cursor: default; 40 | } 41 | .iradio_futurico.checked.disabled { 42 | background-position: -126px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_futurico, 48 | .iradio_futurico { 49 | background-image: url(futurico@2x.png); 50 | -webkit-background-size: 144px 19px; 51 | background-size: 144px 19px; 52 | } 53 | } -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | aioredis==1.0.0 2 | aliyun-python-sdk-core-v3==2.9.3 3 | aliyunsdkcore==1.0.3 4 | appnope==0.1.0 5 | asgiref==2.3.0 6 | asn1crypto==0.24.0 7 | async-timeout==2.0.1 8 | attrs==18.2.0 9 | autobahn==18.12.1 10 | Automat==0.7.0 11 | backcall==0.1.0 12 | bcrypt==3.1.5 13 | blessings==1.7 14 | bpython==0.17.1 15 | certifi==2018.11.29 16 | cffi==1.11.5 17 | channels==2.0.2 18 | channels-redis==2.1.0 19 | chardet==3.0.4 20 | configparser==3.5.0 21 | constantly==15.1.0 22 | cryptography==2.4.2 23 | curtsies==0.3.0 24 | daphne==2.2.4 25 | decorator==4.3.0 26 | Django==2.0.6 27 | django-guardian==1.4.9 28 | fabric==2.4.0 29 | greenlet==0.4.15 30 | hiredis==0.3.1 31 | hyperlink==18.0.0 32 | idna==2.8 33 | incremental==17.5.0 34 | invoke==1.2.0 35 | ipython==7.2.0 36 | ipython-genutils==0.2.0 37 | jedi==0.13.2 38 | Jinja2==2.10 39 | MarkupSafe==1.1.0 40 | msgpack==0.5.6 41 | multi-key-dict==2.0.3 42 | paramiko==2.4.2 43 | parso==0.3.1 44 | pbr==5.1.1 45 | pexpect==4.6.0 46 | pickleshare==0.7.5 47 | prompt-toolkit==2.0.7 48 | ptyprocess==0.6.0 49 | pyasn1==0.4.4 50 | pycparser==2.19 51 | pycrypto==2.6.1 52 | pycryptodome==3.7.2 53 | Pygments==2.3.1 54 | PyHamcrest==1.9.0 55 | PyMySQL==0.9.3 56 | PyNaCl==1.3.0 57 | jenkinsapi==0.3.8 58 | pytz==2018.7 59 | PyYAML==4.2b4 60 | pyzmq==17.1.2 61 | redis==3.0.1 62 | requests==2.21.0 63 | six==1.12.0 64 | tornado==4.5.3 65 | traitlets==4.3.2 66 | Twisted==18.9.0 67 | txaio==18.8.1 68 | typing==3.6.6 69 | urllib3==1.24.1 70 | wcwidth==0.1.7 71 | webssh==0.7.3 72 | zope.interface==4.6.0 73 | pymongo==3.7.2 74 | djangorestframework==3.9.2 -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, green 2 | ----------------------------------- */ 3 | .icheckbox_flat-green, 4 | .iradio_flat-green { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(green.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-green { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-green.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-green.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-green.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-green { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-green.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-green.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-green.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-green, 48 | .iradio_flat-green { 49 | background-image: url(green@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/bootstrap-table/js/bootstrap-table-zh-CN.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3). 3 | * 4 | * @version v1.13.0 5 | * @homepage http://bootstrap-table.wenzhixin.net.cn 6 | * @author wenzhixin (http://wenzhixin.net.cn/) 7 | * @license MIT 8 | */ 9 | 10 | (function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableZhCN={exports:{}}.exports}})(this,function(){'use strict';(function(a){a.fn.bootstrapTable.locales['zh-CN']={formatLoadingMessage:function(){return'\u6B63\u5728\u52AA\u529B\u5730\u52A0\u8F7D\u6570\u636E\u4E2D\uFF0C\u8BF7\u7A0D\u5019\u2026\u2026'},formatRecordsPerPage:function(a){return'\u6BCF\u9875\u663E\u793A '+a+' \u6761\u8BB0\u5F55'},formatShowingRows:function(a,b,c){return'\u663E\u793A\u7B2C '+a+' \u5230\u7B2C '+b+' \u6761\u8BB0\u5F55\uFF0C\u603B\u5171 '+c+' \u6761\u8BB0\u5F55'},formatSearch:function(){return'\u641C\u7D22'},formatNoMatches:function(){return'\u6CA1\u6709\u627E\u5230\u5339\u914D\u7684\u8BB0\u5F55'},formatPaginationSwitch:function(){return'\u9690\u85CF/\u663E\u793A\u5206\u9875'},formatRefresh:function(){return'\u5237\u65B0'},formatToggle:function(){return'\u5207\u6362'},formatColumns:function(){return'\u5217'},formatExport:function(){return'\u5BFC\u51FA\u6570\u636E'},formatClearFilters:function(){return'\u6E05\u7A7A\u8FC7\u6EE4'}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales['zh-CN'])})(jQuery)}); -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_flat-orange, 4 | .iradio_flat-orange { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(orange.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-orange { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-orange.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-orange.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-orange.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-orange { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-orange.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-orange.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-orange.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-orange, 48 | .iradio_flat-orange { 49 | background-image: url(orange@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_flat-purple, 4 | .iradio_flat-purple { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(purple.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-purple { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-purple.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-purple.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-purple.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-purple { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-purple.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-purple.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-purple.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-purple, 48 | .iradio_flat-purple { 49 | background-image: url(purple@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/flat/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Flat skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_flat-yellow, 4 | .iradio_flat-yellow { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 20px; 11 | height: 20px; 12 | background: url(yellow.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_flat-yellow { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_flat-yellow.checked { 21 | background-position: -22px 0; 22 | } 23 | .icheckbox_flat-yellow.disabled { 24 | background-position: -44px 0; 25 | cursor: default; 26 | } 27 | .icheckbox_flat-yellow.checked.disabled { 28 | background-position: -66px 0; 29 | } 30 | 31 | .iradio_flat-yellow { 32 | background-position: -88px 0; 33 | } 34 | .iradio_flat-yellow.checked { 35 | background-position: -110px 0; 36 | } 37 | .iradio_flat-yellow.disabled { 38 | background-position: -132px 0; 39 | cursor: default; 40 | } 41 | .iradio_flat-yellow.checked.disabled { 42 | background-position: -154px 0; 43 | } 44 | 45 | /* HiDPI support */ 46 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 47 | .icheckbox_flat-yellow, 48 | .iradio_flat-yellow { 49 | background-image: url(yellow@2x.png); 50 | -webkit-background-size: 176px 22px; 51 | background-size: 176px 22px; 52 | } 53 | } -------------------------------------------------------------------------------- /deploy/forms.py: -------------------------------------------------------------------------------- 1 | from django import forms 2 | from .models import Projects,Deploys 3 | 4 | 5 | class ProjectsForm(forms.ModelForm): 6 | class Meta: 7 | model = Projects 8 | fields = '__all__' 9 | widgets = { 10 | 'name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 11 | 'jenkins_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 12 | 'target_path': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 13 | 'deploy_path': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 14 | 'version': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 15 | 'remote_history_dir': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 16 | 'before_deploy': forms.TextInput(attrs={'class': 'form-control'}), 17 | 'after_deploy': forms.TextInput(attrs={'class': 'form-control'}), 18 | } 19 | 20 | 21 | class DeploysForm(forms.ModelForm): 22 | class Meta: 23 | model = Deploys 24 | fields = ('project','version','pkg_name','host') 25 | widgets = { 26 | 'project': forms.Select(attrs={'class': 'form-control', 'required': 'required'}), 27 | 'version': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 28 | 'pkg_name': forms.TextInput(attrs={'class': 'form-control', 'required': 'required'}), 29 | 'host': forms.Select(attrs={'class': 'form-control', 'required': 'required'}), 30 | } 31 | -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/square.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, black 2 | ----------------------------------- */ 3 | .icheckbox_square, 4 | .iradio_square { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(square.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square, 54 | .iradio_square { 55 | background-image: url(square@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/polaris/polaris.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Polaris skin 2 | ----------------------------------- */ 3 | .icheckbox_polaris, 4 | .iradio_polaris { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 29px; 11 | height: 29px; 12 | background: url(polaris.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_polaris { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_polaris.hover { 21 | background-position: -31px 0; 22 | } 23 | .icheckbox_polaris.checked { 24 | background-position: -62px 0; 25 | } 26 | .icheckbox_polaris.disabled { 27 | background-position: -93px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_polaris.checked.disabled { 31 | background-position: -124px 0; 32 | } 33 | 34 | .iradio_polaris { 35 | background-position: -155px 0; 36 | } 37 | .iradio_polaris.hover { 38 | background-position: -186px 0; 39 | } 40 | .iradio_polaris.checked { 41 | background-position: -217px 0; 42 | } 43 | .iradio_polaris.disabled { 44 | background-position: -248px 0; 45 | cursor: default; 46 | } 47 | .iradio_polaris.checked.disabled { 48 | background-position: -279px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_polaris, 54 | .iradio_polaris { 55 | background-image: url(polaris@2x.png); 56 | -webkit-background-size: 310px 31px; 57 | background-size: 310px 31px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/minimal.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, black 2 | ----------------------------------- */ 3 | .icheckbox_minimal, 4 | .iradio_minimal { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(minimal.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal, 54 | .iradio_minimal { 55 | background-image: url(minimal@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, red 2 | ----------------------------------- */ 3 | .icheckbox_square-red, 4 | .iradio_square-red { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(red.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-red { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-red.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-red.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-red.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-red.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-red { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-red.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-red.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-red.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-red.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-red, 54 | .iradio_square-red { 55 | background-image: url(red@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, red 2 | ----------------------------------- */ 3 | .icheckbox_minimal-red, 4 | .iradio_minimal-red { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(red.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-red { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-red.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-red.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-red.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-red.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-red { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-red.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-red.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-red.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-red.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-red, 54 | .iradio_minimal-red { 55 | background-image: url(red@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_square-aero, 4 | .iradio_square-aero { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(aero.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-aero { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-aero.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-aero.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-aero.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-aero.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-aero { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-aero.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-aero.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-aero.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-aero.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-aero, 54 | .iradio_square-aero { 55 | background-image: url(aero@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_square-blue, 4 | .iradio_square-blue { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(blue.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-blue { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-blue.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-blue.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-blue.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-blue.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-blue { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-blue.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-blue.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-blue.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-blue.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-blue, 54 | .iradio_square-blue { 55 | background-image: url(blue@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_square-grey, 4 | .iradio_square-grey { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(grey.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-grey { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-grey.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-grey.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-grey.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-grey.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-grey { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-grey.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-grey.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-grey.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-grey.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-grey, 54 | .iradio_square-grey { 55 | background-image: url(grey@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_square-pink, 4 | .iradio_square-pink { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(pink.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-pink { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-pink.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-pink.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-pink.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-pink.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-pink { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-pink.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-pink.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-pink.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-pink.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-pink, 54 | .iradio_square-pink { 55 | background-image: url(pink@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_minimal-aero, 4 | .iradio_minimal-aero { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(aero.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-aero { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-aero.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-aero.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-aero.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-aero.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-aero { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-aero.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-aero.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-aero.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-aero.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-aero, 54 | .iradio_minimal-aero { 55 | background-image: url(aero@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_minimal-blue, 4 | .iradio_minimal-blue { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(blue.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-blue { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-blue.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-blue.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-blue.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-blue.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-blue { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-blue.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-blue.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-blue.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-blue.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-blue, 54 | .iradio_minimal-blue { 55 | background-image: url(blue@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_minimal-grey, 4 | .iradio_minimal-grey { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(grey.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-grey { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-grey.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-grey.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-grey.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-grey.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-grey { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-grey.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-grey.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-grey.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-grey.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-grey, 54 | .iradio_minimal-grey { 55 | background-image: url(grey@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_minimal-pink, 4 | .iradio_minimal-pink { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(pink.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-pink { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-pink.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-pink.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-pink.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-pink.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-pink { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-pink.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-pink.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-pink.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-pink.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-pink, 54 | .iradio_minimal-pink { 55 | background-image: url(pink@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, green 2 | ----------------------------------- */ 3 | .icheckbox_square-green, 4 | .iradio_square-green { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(green.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-green { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-green.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-green.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-green.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-green.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-green { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-green.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-green.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-green.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-green.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-green, 54 | .iradio_square-green { 55 | background-image: url(green@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, green 2 | ----------------------------------- */ 3 | .icheckbox_minimal-green, 4 | .iradio_minimal-green { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(green.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-green { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-green.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-green.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-green.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-green.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-green { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-green.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-green.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-green.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-green.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-green, 54 | .iradio_minimal-green { 55 | background-image: url(green@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_square-orange, 4 | .iradio_square-orange { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(orange.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-orange { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-orange.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-orange.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-orange.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-orange.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-orange { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-orange.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-orange.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-orange.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-orange.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-orange, 54 | .iradio_square-orange { 55 | background-image: url(orange@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_square-purple, 4 | .iradio_square-purple { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(purple.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-purple { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-purple.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-purple.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-purple.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-purple.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-purple { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-purple.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-purple.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-purple.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-purple.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-purple, 54 | .iradio_square-purple { 55 | background-image: url(purple@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/square/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Square skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_square-yellow, 4 | .iradio_square-yellow { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 22px; 11 | height: 22px; 12 | background: url(yellow.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_square-yellow { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_square-yellow.hover { 21 | background-position: -24px 0; 22 | } 23 | .icheckbox_square-yellow.checked { 24 | background-position: -48px 0; 25 | } 26 | .icheckbox_square-yellow.disabled { 27 | background-position: -72px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_square-yellow.checked.disabled { 31 | background-position: -96px 0; 32 | } 33 | 34 | .iradio_square-yellow { 35 | background-position: -120px 0; 36 | } 37 | .iradio_square-yellow.hover { 38 | background-position: -144px 0; 39 | } 40 | .iradio_square-yellow.checked { 41 | background-position: -168px 0; 42 | } 43 | .iradio_square-yellow.disabled { 44 | background-position: -192px 0; 45 | cursor: default; 46 | } 47 | .iradio_square-yellow.checked.disabled { 48 | background-position: -216px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_square-yellow, 54 | .iradio_square-yellow { 55 | background-image: url(yellow@2x.png); 56 | -webkit-background-size: 240px 24px; 57 | background-size: 240px 24px; 58 | } 59 | } -------------------------------------------------------------------------------- /user/templates/registration/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Devops | {{ page_name }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 |
29 |
30 |

用户登录

31 |
32 | {% csrf_token %} 33 | {% block content %} 34 | {% endblock %} 35 |
36 | 37 |
38 |
39 |
40 |

devops

41 |

Copyright © 2015-{% now "Y" %}. power by abel.wang.

42 |
43 | 44 |
45 |
46 |
47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_minimal-orange, 4 | .iradio_minimal-orange { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(orange.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-orange { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-orange.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-orange.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-orange.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-orange.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-orange { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-orange.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-orange.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-orange.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-orange.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-orange, 54 | .iradio_minimal-orange { 55 | background-image: url(orange@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_minimal-purple, 4 | .iradio_minimal-purple { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(purple.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-purple { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-purple.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-purple.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-purple.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-purple.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-purple { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-purple.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-purple.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-purple.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-purple.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-purple, 54 | .iradio_minimal-purple { 55 | background-image: url(purple@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/minimal/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Minimal skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_minimal-yellow, 4 | .iradio_minimal-yellow { 5 | display: inline-block; 6 | *display: inline; 7 | vertical-align: middle; 8 | margin: 0; 9 | padding: 0; 10 | width: 18px; 11 | height: 18px; 12 | background: url(yellow.png) no-repeat; 13 | border: none; 14 | cursor: pointer; 15 | } 16 | 17 | .icheckbox_minimal-yellow { 18 | background-position: 0 0; 19 | } 20 | .icheckbox_minimal-yellow.hover { 21 | background-position: -20px 0; 22 | } 23 | .icheckbox_minimal-yellow.checked { 24 | background-position: -40px 0; 25 | } 26 | .icheckbox_minimal-yellow.disabled { 27 | background-position: -60px 0; 28 | cursor: default; 29 | } 30 | .icheckbox_minimal-yellow.checked.disabled { 31 | background-position: -80px 0; 32 | } 33 | 34 | .iradio_minimal-yellow { 35 | background-position: -100px 0; 36 | } 37 | .iradio_minimal-yellow.hover { 38 | background-position: -120px 0; 39 | } 40 | .iradio_minimal-yellow.checked { 41 | background-position: -140px 0; 42 | } 43 | .iradio_minimal-yellow.disabled { 44 | background-position: -160px 0; 45 | cursor: default; 46 | } 47 | .iradio_minimal-yellow.checked.disabled { 48 | background-position: -180px 0; 49 | } 50 | 51 | /* HiDPI support */ 52 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 53 | .icheckbox_minimal-yellow, 54 | .iradio_minimal-yellow { 55 | background-image: url(yellow@2x.png); 56 | -webkit-background-size: 200px 20px; 57 | background-size: 200px 20px; 58 | } 59 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/all.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin skins 2 | ----------------------------------- */ 3 | @import url("minimal/_all.css"); 4 | /* 5 | @import url("minimal/minimal.css"); 6 | @import url("minimal/red.css"); 7 | @import url("minimal/green.css"); 8 | @import url("minimal/blue.css"); 9 | @import url("minimal/aero.css"); 10 | @import url("minimal/grey.css"); 11 | @import url("minimal/orange.css"); 12 | @import url("minimal/yellow.css"); 13 | @import url("minimal/pink.css"); 14 | @import url("minimal/purple.css"); 15 | */ 16 | 17 | @import url("square/_all.css"); 18 | /* 19 | @import url("square/square.css"); 20 | @import url("square/red.css"); 21 | @import url("square/green.css"); 22 | @import url("square/blue.css"); 23 | @import url("square/aero.css"); 24 | @import url("square/grey.css"); 25 | @import url("square/orange.css"); 26 | @import url("square/yellow.css"); 27 | @import url("square/pink.css"); 28 | @import url("square/purple.css"); 29 | */ 30 | 31 | @import url("flat/_all.css"); 32 | /* 33 | @import url("flat/flat.css"); 34 | @import url("flat/red.css"); 35 | @import url("flat/green.css"); 36 | @import url("flat/blue.css"); 37 | @import url("flat/aero.css"); 38 | @import url("flat/grey.css"); 39 | @import url("flat/orange.css"); 40 | @import url("flat/yellow.css"); 41 | @import url("flat/pink.css"); 42 | @import url("flat/purple.css"); 43 | */ 44 | 45 | @import url("line/_all.css"); 46 | /* 47 | @import url("line/line.css"); 48 | @import url("line/red.css"); 49 | @import url("line/green.css"); 50 | @import url("line/blue.css"); 51 | @import url("line/aero.css"); 52 | @import url("line/grey.css"); 53 | @import url("line/orange.css"); 54 | @import url("line/yellow.css"); 55 | @import url("line/pink.css"); 56 | @import url("line/purple.css"); 57 | */ 58 | 59 | @import url("polaris/polaris.css"); 60 | 61 | @import url("futurico/futurico.css"); -------------------------------------------------------------------------------- /templates/tags/tag_permissions.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |

所有权限

4 | 9 |
10 | 11 |
12 | 13 | 14 | 15 | 16 |
17 | 18 |
19 |

已选权限

20 | 27 |
-------------------------------------------------------------------------------- /static/vendors/iCheck/icheck.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "icheck", 3 | "version": "1.0.2", 4 | "title": "iCheck", 5 | "author": { 6 | "name": "Damir Sultanov", 7 | "email": "info@fronteed.com", 8 | "homepage": "http://fronteed.com/" 9 | }, 10 | "licenses": [ 11 | { 12 | "type": "MIT", 13 | "url": "http://en.wikipedia.org/wiki/MIT_License" 14 | } 15 | ], 16 | "dependencies": { 17 | "jquery": ">=1.7" 18 | }, 19 | "description": "Highly customizable checkboxes and radio buttons (jQuery and Zepto). Features: identical inputs across different browsers and devices (both desktop and mobile), touch devices support (iOS, Android, BlackBerry, Windows Phone, Amazon Kindle), keyboard accessible inputs (Tab, Spacebar, Arrow up/down and other shortcuts), screenreader accessible inputs — (ARIA attributes for VoiceOver and others), customization freedom (use any HTML and CSS to style inputs or try 6 Retina-ready skins), lightweight size (1 kb gzipped). Provides 32 options to customize checkboxes and radio buttons, 11 callbacks to handle changes, 9 methods to make changes programmatically. Saves changes to original inputs, works carefully with any selectors.", 20 | "keywords": [ 21 | "checkbox", 22 | "radio", 23 | "input", 24 | "field", 25 | "form", 26 | "desktop", 27 | "mobile", 28 | "custom", 29 | "replacement", 30 | "accessibility", 31 | "skins", 32 | "ui", 33 | "checked", 34 | "disabled", 35 | "indeterminate", 36 | "css3", 37 | "html5", 38 | "tiny", 39 | "lightweight", 40 | "jquery", 41 | "zepto" 42 | ], 43 | "homepage": "http://fronteed.com/iCheck/", 44 | "docs": "https://github.com/fronteed/iCheck", 45 | "demo": "http://fronteed.com/iCheck/", 46 | "download": "http://fronteed.com/iCheck/", 47 | "bugs": "https://github.com/fronteed/iCheck/issues/" 48 | } 49 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | .fa-icon-rotate(@degrees, @rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; 16 | -webkit-transform: rotate(@degrees); 17 | -ms-transform: rotate(@degrees); 18 | transform: rotate(@degrees); 19 | } 20 | 21 | .fa-icon-flip(@horiz, @vert, @rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; 23 | -webkit-transform: scale(@horiz, @vert); 24 | -ms-transform: scale(@horiz, @vert); 25 | transform: scale(@horiz, @vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | .sr-only() { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | .sr-only-focusable() { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /static/vendors/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | 12 | } 13 | 14 | @mixin fa-icon-rotate($degrees, $rotation) { 15 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation})"; 16 | -webkit-transform: rotate($degrees); 17 | -ms-transform: rotate($degrees); 18 | transform: rotate($degrees); 19 | } 20 | 21 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 22 | -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}, mirror=1)"; 23 | -webkit-transform: scale($horiz, $vert); 24 | -ms-transform: scale($horiz, $vert); 25 | transform: scale($horiz, $vert); 26 | } 27 | 28 | 29 | // Only display content to screen readers. A la Bootstrap 4. 30 | // 31 | // See: http://a11yproject.com/posts/how-to-hide-content/ 32 | 33 | @mixin sr-only { 34 | position: absolute; 35 | width: 1px; 36 | height: 1px; 37 | padding: 0; 38 | margin: -1px; 39 | overflow: hidden; 40 | clip: rect(0,0,0,0); 41 | border: 0; 42 | } 43 | 44 | // Use in conjunction with .sr-only to only display content when it's focused. 45 | // 46 | // Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 47 | // 48 | // Credit: HTML5 Boilerplate 49 | 50 | @mixin sr-only-focusable { 51 | &:active, 52 | &:focus { 53 | position: static; 54 | width: auto; 55 | height: auto; 56 | margin: 0; 57 | overflow: visible; 58 | clip: auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /user/forms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf8 3 | # @Time : 17-8-11 上午11:16 4 | # @Author : Wang Chao 5 | 6 | from django import forms 7 | from user.models import * 8 | 9 | 10 | class LoginForm(forms.Form): 11 | username = forms.CharField(max_length=255, widget=forms.TextInput(attrs={'class': 'form-control', 12 | 'placeholder': '用户名', 13 | 'required': 'required'})) 14 | password = forms.CharField(widget=forms.PasswordInput(attrs={'class': 'form-control', 15 | 'placeholder': '密 码', 'required': 'required'})) 16 | error_messages = { 17 | 'invalid_login': ("Please enter a correct %(username)s and password. " 18 | "Note that both fields may be case-sensitive."), 19 | 'inactive': ("This account is inactive."), 20 | } 21 | 22 | 23 | class UserForm(forms.ModelForm): 24 | class Meta: 25 | model = Users 26 | email = forms.CharField(label='邮箱') 27 | fields = ('username', 'email', 'mobile', 'role', 'is_active') 28 | widgets = { 29 | 'username': forms.TextInput(attrs={'class': 'form-control', 'placeholder': '用户名', 'required': 'required', 30 | 'data-validate-length-range': '5,30'}), 31 | 'email': forms.EmailInput(attrs={'class': 'form-control', 'required': 'required'}), 32 | 'qq': forms.TextInput(attrs={'class': 'form-control', 'data-validate-length-range': '4,16'}), 33 | 'mobile': forms.TextInput(attrs={'class': 'form-control', 'data-validate-length': '11'}), 34 | 'role': forms.Select(attrs={'class': 'form-control', 'required': 'required'}), 35 | 'is_active': forms.CheckboxInput(attrs={'style': 'padding-top:5px;'}) 36 | } 37 | -------------------------------------------------------------------------------- /control.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | WORKSPACE=$(cd $(dirname $0)/; pwd) 4 | cd $WORKSPACE 5 | 6 | 7 | logdir="logs" 8 | mkdir -p $logdir 9 | 10 | app=devops 11 | pidfile=$logdir/$app.pid 12 | logfile=$logdir/$app.log 13 | if [ X$2==X ] 14 | then 15 | port=8000 16 | else 17 | port=$2 18 | fi 19 | 20 | function check_pid() { 21 | if [ -f $pidfile ];then 22 | pid=`cat $pidfile` 23 | if [ -n $pid ]; then 24 | running=`ps -p $pid|grep -v "PID TTY" |wc -l` 25 | return $running 26 | fi 27 | fi 28 | return 0 29 | } 30 | 31 | function start() { 32 | check_pid 33 | running=$? 34 | if [ $running -gt 0 ];then 35 | echo -n "$app now is running already, pid=" 36 | cat $pidfile 37 | return 1 38 | fi 39 | 40 | gunicorn -w 2 -b 127.0.0.1:$port $app.wsgi:application -D --pid $pidfile --capture-output --log-level debug --log-file=$logfile 2>&1 41 | sleep 1 42 | echo -n "$app started..., pid=" 43 | cat $pidfile 44 | } 45 | 46 | function stop() { 47 | pid=`cat $pidfile` 48 | kill $pid 49 | echo "$app quit..." 50 | } 51 | 52 | 53 | function restart() { 54 | stop 55 | sleep 2 56 | start 57 | } 58 | 59 | function status() { 60 | check_pid 61 | running=$? 62 | if [ $running -gt 0 ];then 63 | echo -n "$app now is running, pid=" 64 | cat $pidfile 65 | else 66 | echo "$app is stoped" 67 | fi 68 | } 69 | 70 | function reload_static() { 71 | python manage.py collectstatic --noinput 72 | } 73 | 74 | function help() { 75 | echo "$0 start|stop|restart|status" 76 | } 77 | 78 | if [ "$1" == "" ]; then 79 | help 80 | elif [ "$1" == "stop" ];then 81 | stop 82 | elif [ "$1" == "start" ];then 83 | start 84 | elif [ "$1" == "restart" ];then 85 | restart 86 | elif [ "$1" == "status" ];then 87 | status 88 | elif [ "$1" == "reload_static" ];then 89 | reload_static 90 | else 91 | help 92 | fi 93 | -------------------------------------------------------------------------------- /static/vendors/pnotify/pnotify.css: -------------------------------------------------------------------------------- 1 | .ui-pnotify{top:36px;right:36px;position:absolute;height:auto;z-index:2}body>.ui-pnotify{position:fixed;z-index:100040}.ui-pnotify-modal-overlay{background-color:rgba(0,0,0,.4);top:0;left:0;position:absolute;height:100%;width:100%;z-index:1}body>.ui-pnotify-modal-overlay{position:fixed;z-index:100039}.ui-pnotify.ui-pnotify-in{display:block!important}.ui-pnotify.ui-pnotify-move{transition:left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-slow{transition:opacity .6s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-slow.ui-pnotify.ui-pnotify-move{transition:opacity .6s linear,left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-normal{transition:opacity .4s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-normal.ui-pnotify.ui-pnotify-move{transition:opacity .4s linear,left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-fast{transition:opacity .2s linear;opacity:0}.ui-pnotify.ui-pnotify-fade-fast.ui-pnotify.ui-pnotify-move{transition:opacity .2s linear,left .5s ease,top .5s ease,right .5s ease,bottom .5s ease}.ui-pnotify.ui-pnotify-fade-in{opacity:1}.ui-pnotify .ui-pnotify-shadow{-webkit-box-shadow:0 6px 28px 0 rgba(0,0,0,.1);-moz-box-shadow:0 6px 28px 0 rgba(0,0,0,.1);box-shadow:0 6px 28px 0 rgba(0,0,0,.1)}.ui-pnotify-container{background-position:0 0;padding:.8em;height:100%;margin:0}.ui-pnotify-container:after{content:" ";visibility:hidden;display:block;height:0;clear:both}.ui-pnotify-container.ui-pnotify-sharp{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.ui-pnotify-title{display:block;margin-bottom:.4em;margin-top:0}.ui-pnotify-text{display:block}.ui-pnotify-icon,.ui-pnotify-icon span{display:block;float:left;margin-right:.2em}.ui-pnotify.stack-bottomleft,.ui-pnotify.stack-topleft{left:25px;right:auto}.ui-pnotify.stack-bottomleft,.ui-pnotify.stack-bottomright{bottom:25px;top:auto}.ui-pnotify.stack-modal{left:50%;right:auto;margin-left:-150px} -------------------------------------------------------------------------------- /static/vendors/datatables.net-bs/js/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-5'i><'col-sm-7'p>>",renderer:"bootstrap"});b.extend(f.ext.classes, 6 | {sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sProcessing:"dataTables_processing panel panel-default"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new f.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&&o.page()!=a.data.action&&o.page(a.data.action).draw("page")}; 7 | l=0;for(h=f.length;l",{"class":s.sPageButton+" "+g,id:0===r&&"string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#", 8 | "aria-controls":a.sTableId,"aria-label":t[c],"data-dt-idx":p,tabindex:a.iTabIndex}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('
    ').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};return f}); 9 | -------------------------------------------------------------------------------- /static/vendors/jquery-notifyjs/styles/metro/notify-metro.js: -------------------------------------------------------------------------------- 1 | $.notify.addStyle("metro", { 2 | html: 3 | "
    " + 4 | "
    " + 5 | "
    " + 6 | "
    " + 7 | "
    " + 8 | "
    " + 9 | "
    ", 10 | classes: { 11 | default: { 12 | "color": "#fafafa !important", 13 | "background-color": "#ABB7B7", 14 | "border": "1px solid #ABB7B7" 15 | }, 16 | error: { 17 | "color": "#fafafa !important", 18 | "background-color": "#E15554", 19 | "border": "1px solid #E15554" 20 | }, 21 | success: { 22 | "color": "#fafafa !important", 23 | "background-color": "#68C39F", 24 | "border": "1px solid #68C39F" 25 | }, 26 | info: { 27 | "color": "#fafafa !important", 28 | "background-color": "#65BBD6", 29 | "border": "1px solid #65BBD6" 30 | }, 31 | warning: { 32 | "color": "#fafafa !important", 33 | "background-color": "#FFC052", 34 | "border": "1px solid #FFC052" 35 | }, 36 | black: { 37 | "color": "#fafafa !important", 38 | "background-color": "#333", 39 | "border": "1px solid #000" 40 | }, 41 | cool: { 42 | "color": "#fafafa !important", 43 | "background-color": "#4A525F", 44 | "border": "1px solid #4A525F" 45 | }, 46 | nonspaced: { 47 | "color": "#fafafa !important", 48 | "background-color": "#4A525F", 49 | "min-width": "150px", 50 | "border": "1px solid #4A525F" 51 | }, 52 | white: { 53 | "background-color": "#f1f1f1", 54 | "border": "1px solid #ddd" 55 | } 56 | } 57 | }); -------------------------------------------------------------------------------- /utils/jenkins_job.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # @Time : 17-8-17 下午2:35 3 | # @Author : Wang Chao 4 | 5 | from jenkinsapi.jenkins import Jenkins 6 | from jenkinsapi.build import Build 7 | import traceback 8 | from datetime import datetime,timezone,timedelta 9 | 10 | 11 | class JenkinsJob(object): 12 | """"POST请求必须关闭Jenkins的CSRF,或者提供Jenkins-Crumb(http://192.168.37.100:8080/crumbIssuer/api/xml)""" 13 | def __init__(self, url, username, password): 14 | self.server = Jenkins(url, username=username, password=password) 15 | 16 | def job_build(self, job_name, params=None): 17 | if params is None: 18 | params = {} 19 | ret = self.server.build_job(job_name, params) 20 | return ret 21 | 22 | def job_query(self, job_name): 23 | try: 24 | job = self.server.get_job(job_name) 25 | last_build = job.get_last_stable_build() 26 | build_num = last_build.get_number() 27 | build_status = last_build.get_status() 28 | tzutc_8 = timezone(timedelta(hours=8)) 29 | build_time = last_build.get_timestamp() 30 | build_time = build_time.astimezone(tzutc_8).strftime('%Y-%m-%d %H:%M:%S') 31 | build_duration = last_build.get_duration().total_seconds() 32 | ret = { 33 | 'job_name': job_name, 34 | 'build_num': build_num, 35 | 'build_status': build_status, 36 | 'build_time': build_time, 37 | 'build_duration': build_duration 38 | } 39 | 40 | except Exception: 41 | traceback.print_exc() 42 | ret = {} 43 | return ret 44 | 45 | def job_console(self, job_name): 46 | job = self.server.get_job(job_name) 47 | last_build = job.get_last_stable_build() 48 | ret = last_build.get_console() 49 | return ret 50 | 51 | def job_list(self): 52 | ret = self.server.get_jobs_list() 53 | return ret 54 | 55 | 56 | if __name__ == '__main__': 57 | pass 58 | -------------------------------------------------------------------------------- /utils/config_parser.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # encoding: utf-8 3 | # description: a wrapper class for ConfigParser module 4 | # date: 2015-10-29 5 | 6 | from configparser import ConfigParser as CP 7 | 8 | 9 | class ConfParserClass(object): 10 | def __init__(self, conf_path): 11 | self.fpath = conf_path # 配置文件路径,要求是绝对路径 12 | self.cf = CP() # ConfigParser对象实例 13 | self.cf.read(self.fpath) # 一启动就读取配置文件 14 | 15 | # 添加指定的节 16 | def add_section(self, s): 17 | sections = self.cf.sections() 18 | if s in sections: 19 | return 20 | else: 21 | self.cf.add_section(s) 22 | 23 | # 移除指定的节 24 | def remove_section(self, s): 25 | return self.cf.remove_section(s) 26 | 27 | def get(self, s, o): 28 | return self.cf.get(s, o) 29 | 30 | def set(self, s, o, v): 31 | if self.cf.has_section(s): 32 | self.cf.set(s, o, v) 33 | 34 | # 移除指定节内的指定选项 35 | def remove_option(self, s, o): 36 | if self.cf.has_section(s): 37 | return self.cf.remove_option(s, o) 38 | return False 39 | 40 | # 返回节内的(key, val)列表or字典 41 | def items(self, s,dict_type=False): 42 | if dict_type: 43 | return dict(self.cf.items(s)) 44 | else: 45 | return self.cf.items(s) 46 | 47 | # 返回所有节的列表 48 | def sections(self): 49 | return self.cf.sections() 50 | 51 | # 返回节内的key列表 52 | def options(self, s): 53 | return self.cf.options(s) 54 | 55 | 56 | if __name__ == '__main__': 57 | config_file = 'devops/config_demo.conf' 58 | cp = ConfParserClass(config_file) 59 | print(cp.sections()) 60 | print(cp.items('CmdWindow')) 61 | print(cp.options('CmdWindow')) 62 | print(cp.get('main', 'optdata')) 63 | print(cp.get('LiveUpdate', 'Interval'), cp.set('LiveUpdate', 'Retry', '3')) 64 | print(cp.remove_option('LiveUpdate', 'Retry'), cp.set('LiveUpdate', 'Confirm', 'yes'), cp.add_section('Copyright')) 65 | print(cp.remove_section('Copyright'), cp.add_section('Copyright2')) 66 | -------------------------------------------------------------------------------- /asset/forms.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding: utf8 3 | # @Time : 17-8-11 上午11:16 4 | # @Author : Wang Chao 5 | 6 | from django import forms 7 | from asset.models import * 8 | 9 | 10 | VISIBLE_CHOICES = ( 11 | (0, u"私有"), 12 | (1, u"属组"), 13 | (2, u"公开"), 14 | ) 15 | 16 | 17 | class CloudsForm(forms.ModelForm): 18 | class Meta: 19 | model = Clouds 20 | fields = ('name', 'region_id', 'provider', 'description') 21 | widgets = { 22 | 'name': forms.TextInput(attrs={'class': 'form-control'}), 23 | 'region_id': forms.TextInput(attrs={'class': 'form-control'}), 24 | 'provider': forms.Select(attrs={'class': 'form-control'}), 25 | 'description': forms.TextInput(attrs={'class': 'form-control'}), 26 | } 27 | 28 | 29 | class OwnerForms(forms.ModelForm): 30 | class Meta: 31 | model = Owners 32 | fields = '__all__' 33 | 34 | def __init__(self, *args, **kwargs): 35 | super(OwnerForms, self).__init__(*args, **kwargs) 36 | for field in self: 37 | field.field.widget.attrs['class'] = 'form-control' 38 | 39 | 40 | class ServerAssetForm(forms.ModelForm): 41 | class Meta: 42 | model = ServerAsset 43 | fields = ['hostname','nodename', "public_ip", "size", "os", "status", "region","owner"] 44 | widgets = { 45 | 'hostname': forms.TextInput(attrs={'class': 'form-control'}), 46 | 'nodename': forms.TextInput(attrs={'class': 'form-control'}), 47 | 'private_ip': forms.TextInput(attrs={'class': 'form-control'}), 48 | 'public_ip': forms.TextInput(attrs={'class': 'form-control'}), 49 | 'size': forms.TextInput(attrs={'class': 'form-control'}), 50 | 'os': forms.TextInput(attrs={'class': 'form-control'}), 51 | 'status': forms.TextInput(attrs={'class': 'form-control'}), 52 | 'region': forms.Select(attrs={'class': 'form-control'}), 53 | 'product': forms.Select(attrs={'class': 'form-control'}), 54 | 'owner': forms.Select(attrs={'class': 'form-control'}), 55 | } 56 | -------------------------------------------------------------------------------- /devops/consumers.py: -------------------------------------------------------------------------------- 1 | from asgiref.sync import async_to_sync 2 | from channels.generic.websocket import WebsocketConsumer 3 | 4 | from channels.layers import get_channel_layer 5 | 6 | 7 | channel_layer = get_channel_layer() 8 | 9 | 10 | class EchoConsumer(WebsocketConsumer): 11 | def connect(self): 12 | # 创建channels group, 命名为:用户名,并使用channel_layer写入到redis 13 | async_to_sync(self.channel_layer.group_add)(self.scope['user'].username, self.channel_name) 14 | 15 | # 返回给receive方法处理 16 | self.accept() 17 | 18 | def receive(self, text_data): 19 | async_to_sync(self.channel_layer.group_send)( 20 | self.scope['user'].username, 21 | { 22 | "type": "user.message", 23 | "text": text_data, 24 | }, 25 | ) 26 | 27 | def user_message(self, event): 28 | # 消费 29 | self.send(text_data=event["text"]) 30 | 31 | def disconnect(self, close_code): 32 | async_to_sync(self.channel_layer.group_discard)(self.scope['user'].username, self.channel_name) 33 | 34 | 35 | # class StatsConsumer(WebsocketConsumer): 36 | # 37 | # def connect(self): 38 | # async_to_sync(self.channel_layer.group_add)(self.scope['user'].username, self.channel_name) 39 | # 40 | # self.accept() 41 | # 42 | # def receive(self, text_data): 43 | # key = '-'.join(('django-mstats-processlist', str(self.scope['user'].uid))) 44 | # cache.set(key, 'start', timeout=None) 45 | # show_processlist.delay(host=text_data, user=self.scope['user'].username, key=key) 46 | # 47 | # async_to_sync(self.channel_layer.group_send)( 48 | # self.scope['user'].username, 49 | # { 50 | # "type": "user.message", 51 | # "text": text_data, 52 | # }, 53 | # ) 54 | # 55 | # def user_message(self, event): 56 | # self.send(text_data=event["text"]) 57 | # 58 | # def disconnect(self, close_code): 59 | # key = '-'.join(('django-mstats-processlist', str(self.scope['user'].uid))) 60 | # cache.set(key, 'end', timeout=None) 61 | # async_to_sync(self.channel_layer.group_discard)(self.scope['user'].username, self.channel_name) -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/line.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, black 2 | ----------------------------------- */ 3 | .icheckbox_line, 4 | .iradio_line { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #000; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line .icheck_line-icon, 20 | .iradio_line .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line.hover, 33 | .icheckbox_line.checked.hover, 34 | .iradio_line.hover { 35 | background: #444; 36 | } 37 | .icheckbox_line.checked, 38 | .iradio_line.checked { 39 | background: #000; 40 | } 41 | .icheckbox_line.checked .icheck_line-icon, 42 | .iradio_line.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line.disabled, 46 | .iradio_line.disabled { 47 | background: #ccc; 48 | cursor: default; 49 | } 50 | .icheckbox_line.disabled .icheck_line-icon, 51 | .iradio_line.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line.checked.disabled, 55 | .iradio_line.checked.disabled { 56 | background: #ccc; 57 | } 58 | .icheckbox_line.checked.disabled .icheck_line-icon, 59 | .iradio_line.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line .icheck_line-icon, 66 | .iradio_line .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js: -------------------------------------------------------------------------------- 1 | /*! bootstrap-progressbar v0.9.0 | Copyright (c) 2012-2015 Stephan Groß | MIT license | http://www.minddust.com */ 2 | !function(t){"use strict";var e=function(n,s){this.$element=t(n),this.options=t.extend({},e.defaults,s)};e.defaults={transition_delay:300,refresh_speed:50,display_text:"none",use_percentage:!0,percent_format:function(t){return t+"%"},amount_format:function(t,e){return t+" / "+e},update:t.noop,done:t.noop,fail:t.noop},e.prototype.transition=function(){var n=this.$element,s=n.parent(),a=this.$back_text,r=this.$front_text,i=this.options,o=parseInt(n.attr("data-transitiongoal")),h=parseInt(n.attr("aria-valuemin"))||0,d=parseInt(n.attr("aria-valuemax"))||100,f=s.hasClass("vertical"),p=i.update&&"function"==typeof i.update?i.update:e.defaults.update,u=i.done&&"function"==typeof i.done?i.done:e.defaults.done,c=i.fail&&"function"==typeof i.fail?i.fail:e.defaults.fail;if(isNaN(o))return void c("data-transitiongoal not set");var l=Math.round(100*(o-h)/(d-h));if("center"===i.display_text&&!a&&!r){this.$back_text=a=t("").addClass("progressbar-back-text").prependTo(s),this.$front_text=r=t("").addClass("progressbar-front-text").prependTo(n);var g;f?(g=s.css("height"),a.css({height:g,"line-height":g}),r.css({height:g,"line-height":g}),t(window).resize(function(){g=s.css("height"),a.css({height:g,"line-height":g}),r.css({height:g,"line-height":g})})):(g=s.css("width"),r.css({width:g}),t(window).resize(function(){g=s.css("width"),r.css({width:g})}))}setTimeout(function(){var t,e,c,g,_;f?n.css("height",l+"%"):n.css("width",l+"%");var x=setInterval(function(){f?(c=n.height(),g=s.height()):(c=n.width(),g=s.width()),t=Math.round(100*c/g),e=Math.round(h+c/g*(d-h)),t>=l&&(t=l,e=o,u(n),clearInterval(x)),"none"!==i.display_text&&(_=i.use_percentage?i.percent_format(t):i.amount_format(e,d,h),"fill"===i.display_text?n.text(_):"center"===i.display_text&&(a.text(_),r.text(_))),n.attr("aria-valuenow",e),p(t,n)},i.refresh_speed)},i.transition_delay)};var n=t.fn.progressbar;t.fn.progressbar=function(n){return this.each(function(){var s=t(this),a=s.data("bs.progressbar"),r="object"==typeof n&&n;a&&r&&t.extend(a.options,r),a||s.data("bs.progressbar",a=new e(this,r)),a.transition()})},t.fn.progressbar.Constructor=e,t.fn.progressbar.noConflict=function(){return t.fn.progressbar=n,this}}(window.jQuery); -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/red.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, red 2 | ----------------------------------- */ 3 | .icheckbox_line-red, 4 | .iradio_line-red { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #e56c69; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-red .icheck_line-icon, 20 | .iradio_line-red .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-red.hover, 33 | .icheckbox_line-red.checked.hover, 34 | .iradio_line-red.hover { 35 | background: #E98582; 36 | } 37 | .icheckbox_line-red.checked, 38 | .iradio_line-red.checked { 39 | background: #e56c69; 40 | } 41 | .icheckbox_line-red.checked .icheck_line-icon, 42 | .iradio_line-red.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-red.disabled, 46 | .iradio_line-red.disabled { 47 | background: #F7D3D2; 48 | cursor: default; 49 | } 50 | .icheckbox_line-red.disabled .icheck_line-icon, 51 | .iradio_line-red.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-red.checked.disabled, 55 | .iradio_line-red.checked.disabled { 56 | background: #F7D3D2; 57 | } 58 | .icheckbox_line-red.checked.disabled .icheck_line-icon, 59 | .iradio_line-red.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-red .icheck_line-icon, 66 | .iradio_line-red .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/aero.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, aero 2 | ----------------------------------- */ 3 | .icheckbox_line-aero, 4 | .iradio_line-aero { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #9cc2cb; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-aero .icheck_line-icon, 20 | .iradio_line-aero .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-aero.hover, 33 | .icheckbox_line-aero.checked.hover, 34 | .iradio_line-aero.hover { 35 | background: #B5D1D8; 36 | } 37 | .icheckbox_line-aero.checked, 38 | .iradio_line-aero.checked { 39 | background: #9cc2cb; 40 | } 41 | .icheckbox_line-aero.checked .icheck_line-icon, 42 | .iradio_line-aero.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-aero.disabled, 46 | .iradio_line-aero.disabled { 47 | background: #D2E4E8; 48 | cursor: default; 49 | } 50 | .icheckbox_line-aero.disabled .icheck_line-icon, 51 | .iradio_line-aero.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-aero.checked.disabled, 55 | .iradio_line-aero.checked.disabled { 56 | background: #D2E4E8; 57 | } 58 | .icheckbox_line-aero.checked.disabled .icheck_line-icon, 59 | .iradio_line-aero.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-aero .icheck_line-icon, 66 | .iradio_line-aero .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/blue.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, blue 2 | ----------------------------------- */ 3 | .icheckbox_line-blue, 4 | .iradio_line-blue { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #2489c5; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-blue .icheck_line-icon, 20 | .iradio_line-blue .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-blue.hover, 33 | .icheckbox_line-blue.checked.hover, 34 | .iradio_line-blue.hover { 35 | background: #3DA0DB; 36 | } 37 | .icheckbox_line-blue.checked, 38 | .iradio_line-blue.checked { 39 | background: #2489c5; 40 | } 41 | .icheckbox_line-blue.checked .icheck_line-icon, 42 | .iradio_line-blue.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-blue.disabled, 46 | .iradio_line-blue.disabled { 47 | background: #ADD7F0; 48 | cursor: default; 49 | } 50 | .icheckbox_line-blue.disabled .icheck_line-icon, 51 | .iradio_line-blue.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-blue.checked.disabled, 55 | .iradio_line-blue.checked.disabled { 56 | background: #ADD7F0; 57 | } 58 | .icheckbox_line-blue.checked.disabled .icheck_line-icon, 59 | .iradio_line-blue.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-blue .icheck_line-icon, 66 | .iradio_line-blue .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/grey.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, grey 2 | ----------------------------------- */ 3 | .icheckbox_line-grey, 4 | .iradio_line-grey { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #73716e; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-grey .icheck_line-icon, 20 | .iradio_line-grey .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-grey.hover, 33 | .icheckbox_line-grey.checked.hover, 34 | .iradio_line-grey.hover { 35 | background: #8B8986; 36 | } 37 | .icheckbox_line-grey.checked, 38 | .iradio_line-grey.checked { 39 | background: #73716e; 40 | } 41 | .icheckbox_line-grey.checked .icheck_line-icon, 42 | .iradio_line-grey.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-grey.disabled, 46 | .iradio_line-grey.disabled { 47 | background: #D5D4D3; 48 | cursor: default; 49 | } 50 | .icheckbox_line-grey.disabled .icheck_line-icon, 51 | .iradio_line-grey.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-grey.checked.disabled, 55 | .iradio_line-grey.checked.disabled { 56 | background: #D5D4D3; 57 | } 58 | .icheckbox_line-grey.checked.disabled .icheck_line-icon, 59 | .iradio_line-grey.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-grey .icheck_line-icon, 66 | .iradio_line-grey .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/pink.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, pink 2 | ----------------------------------- */ 3 | .icheckbox_line-pink, 4 | .iradio_line-pink { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #a77a94; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-pink .icheck_line-icon, 20 | .iradio_line-pink .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-pink.hover, 33 | .icheckbox_line-pink.checked.hover, 34 | .iradio_line-pink.hover { 35 | background: #B995A9; 36 | } 37 | .icheckbox_line-pink.checked, 38 | .iradio_line-pink.checked { 39 | background: #a77a94; 40 | } 41 | .icheckbox_line-pink.checked .icheck_line-icon, 42 | .iradio_line-pink.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-pink.disabled, 46 | .iradio_line-pink.disabled { 47 | background: #E0D0DA; 48 | cursor: default; 49 | } 50 | .icheckbox_line-pink.disabled .icheck_line-icon, 51 | .iradio_line-pink.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-pink.checked.disabled, 55 | .iradio_line-pink.checked.disabled { 56 | background: #E0D0DA; 57 | } 58 | .icheckbox_line-pink.checked.disabled .icheck_line-icon, 59 | .iradio_line-pink.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-pink .icheck_line-icon, 66 | .iradio_line-pink .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /templates/user/user_profile.html: -------------------------------------------------------------------------------- 1 | {% extends 'base/base.html' %} 2 | {% block title %}用户详情{% endblock %} 3 | {% block css %} 4 | 5 | {% endblock %} 6 | {% block content %} 7 |
    8 |
    9 |
    10 | 11 |
    12 |
    13 |
    14 |
    15 |

    用户详情 | 返回

    16 |
    17 |
    18 |
    19 | 20 | 21 | 22 | {% for i in user_detail %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | {% endfor %} 44 | 45 |
    用户名称{{ i.username }}
    邮件{{ i.email }}
    角色{{ i.identity }}
    手机号码{{ i.mobile_phone }}
    创建日期{{ i.date_joined|date:'Y-m-d h:m:s' }}
    46 |
    47 |
    48 |
    49 |
    50 |
    51 |
    52 | {% endblock %} 53 | {% block js %} 54 | 55 | {% endblock %} 56 | -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/green.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, green 2 | ----------------------------------- */ 3 | .icheckbox_line-green, 4 | .iradio_line-green { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #1b7e5a; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-green .icheck_line-icon, 20 | .iradio_line-green .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-green.hover, 33 | .icheckbox_line-green.checked.hover, 34 | .iradio_line-green.hover { 35 | background: #24AA7A; 36 | } 37 | .icheckbox_line-green.checked, 38 | .iradio_line-green.checked { 39 | background: #1b7e5a; 40 | } 41 | .icheckbox_line-green.checked .icheck_line-icon, 42 | .iradio_line-green.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-green.disabled, 46 | .iradio_line-green.disabled { 47 | background: #89E6C4; 48 | cursor: default; 49 | } 50 | .icheckbox_line-green.disabled .icheck_line-icon, 51 | .iradio_line-green.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-green.checked.disabled, 55 | .iradio_line-green.checked.disabled { 56 | background: #89E6C4; 57 | } 58 | .icheckbox_line-green.checked.disabled .icheck_line-icon, 59 | .iradio_line-green.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-green .icheck_line-icon, 66 | .iradio_line-green .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/webssh/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | jQuery(function($){ 3 | 4 | var status = $('#status'); 5 | // btn = $('.btn-primary'); 6 | 7 | $('form#connect').submit(function(event) { 8 | event.preventDefault(); 9 | 10 | var form = $(this), 11 | url = form.attr('action'), 12 | type = form.attr('type'); 13 | // data = new FormData(this); 14 | 15 | // var pk = data.get('privatekey'); 16 | // if (pk && pk.size > 16384) { 17 | // status.text('Key size exceeds maximum value.'); 18 | // return; 19 | // } 20 | 21 | // status.text(''); 22 | // btn.prop('disabled', true); 23 | 24 | $.ajax({ 25 | url: url, 26 | type: type, 27 | data: {hostname:'42.62.55.58',port:22,username:'root',password:'123456'}, 28 | success: callback 29 | // cache: false, 30 | // contentType: false, 31 | // processData: false 32 | }); 33 | 34 | }); 35 | 36 | 37 | 38 | function callback(msg) { 39 | console.log(msg); 40 | if (msg.status) { 41 | status.text(msg.status); 42 | // setTimeout(function(){ 43 | // btn.prop('disabled', false); 44 | // }, 3000); 45 | // return; 46 | } 47 | 48 | var ws_url = window.location.href.replace('http', 'ws'), 49 | // join = (ws_url[ws_url.length-1] == '/' ? '' : '/'), 50 | 51 | url = "ws://127.0.0.1:8005/" + 'ws?id=' + msg.id, 52 | // url = ws_url + join + 'ws?id=' + msg.id, 53 | 54 | socket = new WebSocket(url), 55 | terminal = document.getElementById('#terminal'), 56 | term = new Terminal({cursorBlink: true}); 57 | // alert(ws_url) 58 | console.log(url); 59 | term.on('data', function(data) { 60 | // console.log(data); 61 | socket.send(data); 62 | }); 63 | 64 | socket.onopen = function(e) { 65 | $('.container').hide(); 66 | term.open(terminal, true); 67 | term.toggleFullscreen(true); 68 | }; 69 | 70 | socket.onmessage = function(msg) { 71 | // console.log(msg); 72 | term.write(msg.data); 73 | }; 74 | 75 | socket.onerror = function(e) { 76 | console.log(e); 77 | }; 78 | 79 | socket.onclose = function(e) { 80 | console.log(e); 81 | term.destroy(); 82 | $('.container').show(); 83 | // status.text(e.reason); 84 | // btn.prop('disabled', false); 85 | }; 86 | } 87 | }); 88 | -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/orange.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, orange 2 | ----------------------------------- */ 3 | .icheckbox_line-orange, 4 | .iradio_line-orange { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #f70; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-orange .icheck_line-icon, 20 | .iradio_line-orange .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-orange.hover, 33 | .icheckbox_line-orange.checked.hover, 34 | .iradio_line-orange.hover { 35 | background: #FF9233; 36 | } 37 | .icheckbox_line-orange.checked, 38 | .iradio_line-orange.checked { 39 | background: #f70; 40 | } 41 | .icheckbox_line-orange.checked .icheck_line-icon, 42 | .iradio_line-orange.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-orange.disabled, 46 | .iradio_line-orange.disabled { 47 | background: #FFD6B3; 48 | cursor: default; 49 | } 50 | .icheckbox_line-orange.disabled .icheck_line-icon, 51 | .iradio_line-orange.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-orange.checked.disabled, 55 | .iradio_line-orange.checked.disabled { 56 | background: #FFD6B3; 57 | } 58 | .icheckbox_line-orange.checked.disabled .icheck_line-icon, 59 | .iradio_line-orange.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-orange .icheck_line-icon, 66 | .iradio_line-orange .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/purple.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, purple 2 | ----------------------------------- */ 3 | .icheckbox_line-purple, 4 | .iradio_line-purple { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #6a5a8c; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-purple .icheck_line-icon, 20 | .iradio_line-purple .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-purple.hover, 33 | .icheckbox_line-purple.checked.hover, 34 | .iradio_line-purple.hover { 35 | background: #8677A7; 36 | } 37 | .icheckbox_line-purple.checked, 38 | .iradio_line-purple.checked { 39 | background: #6a5a8c; 40 | } 41 | .icheckbox_line-purple.checked .icheck_line-icon, 42 | .iradio_line-purple.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-purple.disabled, 46 | .iradio_line-purple.disabled { 47 | background: #D2CCDE; 48 | cursor: default; 49 | } 50 | .icheckbox_line-purple.disabled .icheck_line-icon, 51 | .iradio_line-purple.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-purple.checked.disabled, 55 | .iradio_line-purple.checked.disabled { 56 | background: #D2CCDE; 57 | } 58 | .icheckbox_line-purple.checked.disabled .icheck_line-icon, 59 | .iradio_line-purple.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-purple .icheck_line-icon, 66 | .iradio_line-purple .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /static/vendors/iCheck/skins/line/yellow.css: -------------------------------------------------------------------------------- 1 | /* iCheck plugin Line skin, yellow 2 | ----------------------------------- */ 3 | .icheckbox_line-yellow, 4 | .iradio_line-yellow { 5 | position: relative; 6 | display: block; 7 | margin: 0; 8 | padding: 5px 15px 5px 38px; 9 | font-size: 13px; 10 | line-height: 17px; 11 | color: #fff; 12 | background: #FFC414; 13 | border: none; 14 | -webkit-border-radius: 3px; 15 | -moz-border-radius: 3px; 16 | border-radius: 3px; 17 | cursor: pointer; 18 | } 19 | .icheckbox_line-yellow .icheck_line-icon, 20 | .iradio_line-yellow .icheck_line-icon { 21 | position: absolute; 22 | top: 50%; 23 | left: 13px; 24 | width: 13px; 25 | height: 11px; 26 | margin: -5px 0 0 0; 27 | padding: 0; 28 | overflow: hidden; 29 | background: url(line.png) no-repeat; 30 | border: none; 31 | } 32 | .icheckbox_line-yellow.hover, 33 | .icheckbox_line-yellow.checked.hover, 34 | .iradio_line-yellow.hover { 35 | background: #FFD34F; 36 | } 37 | .icheckbox_line-yellow.checked, 38 | .iradio_line-yellow.checked { 39 | background: #FFC414; 40 | } 41 | .icheckbox_line-yellow.checked .icheck_line-icon, 42 | .iradio_line-yellow.checked .icheck_line-icon { 43 | background-position: -15px 0; 44 | } 45 | .icheckbox_line-yellow.disabled, 46 | .iradio_line-yellow.disabled { 47 | background: #FFE495; 48 | cursor: default; 49 | } 50 | .icheckbox_line-yellow.disabled .icheck_line-icon, 51 | .iradio_line-yellow.disabled .icheck_line-icon { 52 | background-position: -30px 0; 53 | } 54 | .icheckbox_line-yellow.checked.disabled, 55 | .iradio_line-yellow.checked.disabled { 56 | background: #FFE495; 57 | } 58 | .icheckbox_line-yellow.checked.disabled .icheck_line-icon, 59 | .iradio_line-yellow.checked.disabled .icheck_line-icon { 60 | background-position: -45px 0; 61 | } 62 | 63 | /* HiDPI support */ 64 | @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { 65 | .icheckbox_line-yellow .icheck_line-icon, 66 | .iradio_line-yellow .icheck_line-icon { 67 | background-image: url(line@2x.png); 68 | -webkit-background-size: 60px 13px; 69 | background-size: 60px 13px; 70 | } 71 | } -------------------------------------------------------------------------------- /sysadmin/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from user.models import Users 3 | from asset.models import ServerAsset 4 | 5 | 6 | class DnsRecords(models.Model): 7 | rr = models.CharField(max_length=255, blank=True, null=True) 8 | status = models.CharField(max_length=255, blank=True, null=True) 9 | value = models.CharField(max_length=5, blank=True, null=True) 10 | type = models.CharField(max_length=255, blank=True, null=True) 11 | ttl = models.IntegerField(blank=True, null=True) 12 | domainname = models.CharField(max_length=64, blank=True, null=True) 13 | 14 | def __str__(self): 15 | return self.rr 16 | 17 | class Meta: 18 | default_permissions = () 19 | permissions = ( 20 | ('view_dns', u'查看DNS'), 21 | ('manage_dns', u'管理DNS') 22 | ) 23 | ordering = ['-id'] 24 | verbose_name = u'域名解析' 25 | 26 | 27 | class SaltHost(models.Model): 28 | nodename = models.CharField( 29 | max_length=80, 30 | unique=True, 31 | verbose_name=u'主机名称') 32 | # salt主机存活状态 33 | alive = models.BooleanField(default=False, verbose_name=u'连通状态') 34 | # 上次检测时间 35 | alive_time_last = models.DateTimeField(auto_now=True) 36 | # 当前检测时间 37 | alive_time_now = models.DateTimeField(auto_now=True) 38 | status = models.BooleanField(default=False, verbose_name=u'是否加入salt管理') 39 | 40 | def __str__(self): 41 | return self.nodename 42 | 43 | class Meta: 44 | default_permissions = () 45 | permissions = ( 46 | ("view_deploy", u"查看主机部署"), 47 | ("edit_deploy", u"管理主机部署"), 48 | ("edit_salthost", u"管理Salt主机"), 49 | ) 50 | verbose_name = u'Salt主机授权' 51 | verbose_name_plural = u'Salt主机授权管理' 52 | 53 | 54 | class SaltGroup(models.Model): 55 | # 定义分组别名 56 | nickname = models.CharField( 57 | max_length=80, 58 | unique=True, 59 | verbose_name=u'Salt分组') 60 | # 分组后groupname不可变 61 | groupname = models.CharField( 62 | max_length=80, 63 | unique=True) 64 | minions = models.ManyToManyField( 65 | SaltHost, 66 | related_name='salt_host_set', 67 | verbose_name=u'Salt主机') 68 | 69 | def __str__(self): 70 | return self.nickname 71 | 72 | class Meta: 73 | default_permissions = () 74 | permissions = ( 75 | ("edit_saltgroup", u"管理Salt主机分组"), 76 | ) 77 | verbose_name = u'Salt分组' 78 | verbose_name_plural = u'Salt分组管理' 79 | -------------------------------------------------------------------------------- /static/vendors/pnotify/pnotify.nonblock.js: -------------------------------------------------------------------------------- 1 | (function(h,f){"function"===typeof define&&define.amd?define("pnotify.nonblock",["jquery","pnotify"],f):"object"===typeof exports&&"undefined"!==typeof module?module.exports=f(require("jquery"),require("./pnotify")):f(h.jQuery,h.PNotify)})(this,function(h,f){var l=/^on/,m=/^(dbl)?click$|^mouse(move|down|up|over|out|enter|leave)$|^contextmenu$/,n=/^(focus|blur|select|change|reset)$|^key(press|down|up)$/,p=/^(scroll|resize|(un)?load|abort|error)$/,k=function(c,b){var d;c=c.toLowerCase();document.createEvent&& 2 | this.dispatchEvent?(c=c.replace(l,""),c.match(m)?(h(this).offset(),d=document.createEvent("MouseEvents"),d.initMouseEvent(c,b.bubbles,b.cancelable,b.view,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget)):c.match(n)?(d=document.createEvent("UIEvents"),d.initUIEvent(c,b.bubbles,b.cancelable,b.view,b.detail)):c.match(p)&&(d=document.createEvent("HTMLEvents"),d.initEvent(c,b.bubbles,b.cancelable)),d&&this.dispatchEvent(d)):(c.match(l)|| 3 | (c="on"+c),d=document.createEventObject(b),this.fireEvent(c,d))},g,e=function(c,b,d){c.elem.addClass("ui-pnotify-nonblock-hide");var a=document.elementFromPoint(b.clientX,b.clientY);c.elem.removeClass("ui-pnotify-nonblock-hide");var f=h(a),e=f.css("cursor");"auto"===e&&"A"===a.tagName&&(e="pointer");c.elem.css("cursor","auto"!==e?e:"default");g&&g.get(0)==a||(g&&(k.call(g.get(0),"mouseleave",b.originalEvent),k.call(g.get(0),"mouseout",b.originalEvent)),k.call(a,"mouseenter",b.originalEvent),k.call(a, 4 | "mouseover",b.originalEvent));k.call(a,d,b.originalEvent);g=f};f.prototype.options.nonblock={nonblock:!1};f.prototype.modules.nonblock={init:function(c,b){var d=this;c.elem.on({mouseenter:function(a){d.options.nonblock&&a.stopPropagation();d.options.nonblock&&c.elem.addClass("ui-pnotify-nonblock-fade")},mouseleave:function(a){d.options.nonblock&&a.stopPropagation();g=null;c.elem.css("cursor","auto");d.options.nonblock&&"out"!==c.animating&&c.elem.removeClass("ui-pnotify-nonblock-fade")},mouseover:function(a){d.options.nonblock&& 5 | a.stopPropagation()},mouseout:function(a){d.options.nonblock&&a.stopPropagation()},mousemove:function(a){d.options.nonblock&&(a.stopPropagation(),e(c,a,"onmousemove"))},mousedown:function(a){d.options.nonblock&&(a.stopPropagation(),a.preventDefault(),e(c,a,"onmousedown"))},mouseup:function(a){d.options.nonblock&&(a.stopPropagation(),a.preventDefault(),e(c,a,"onmouseup"))},click:function(a){d.options.nonblock&&(a.stopPropagation(),e(c,a,"onclick"))},dblclick:function(a){d.options.nonblock&&(a.stopPropagation(), 6 | e(c,a,"ondblclick"))}})}}}); 7 | -------------------------------------------------------------------------------- /static/vendors/ion.rangeSlider/css/ion.rangeSlider.skinFlat.css: -------------------------------------------------------------------------------- 1 | /* Ion.RangeSlider, Flat UI Skin 2 | // css version 2.0.3 3 | // © Denis Ineshin, 2014 https://github.com/IonDen 4 | // ===================================================================================================================*/ 5 | 6 | /* ===================================================================================================================== 7 | // Skin details */ 8 | 9 | .irs-line-mid, 10 | .irs-line-left, 11 | .irs-line-right, 12 | .irs-bar, 13 | .irs-bar-edge, 14 | .irs-slider { 15 | background: url(../img/sprite-skin-flat.png) repeat-x; 16 | } 17 | 18 | .irs { 19 | height: 40px; 20 | } 21 | .irs-with-grid { 22 | height: 60px; 23 | } 24 | .irs-line { 25 | height: 12px; top: 25px; 26 | } 27 | .irs-line-left { 28 | height: 12px; 29 | background-position: 0 -30px; 30 | } 31 | .irs-line-mid { 32 | height: 12px; 33 | background-position: 0 0; 34 | } 35 | .irs-line-right { 36 | height: 12px; 37 | background-position: 100% -30px; 38 | } 39 | 40 | .irs-bar { 41 | height: 12px; top: 25px; 42 | background-position: 0 -60px; 43 | } 44 | .irs-bar-edge { 45 | top: 25px; 46 | height: 12px; width: 9px; 47 | background-position: 0 -90px; 48 | } 49 | 50 | .irs-shadow { 51 | height: 3px; top: 34px; 52 | background: #000; 53 | opacity: 0.25; 54 | } 55 | .lt-ie9 .irs-shadow { 56 | filter: alpha(opacity=25); 57 | } 58 | 59 | .irs-slider { 60 | width: 16px; height: 18px; 61 | top: 22px; 62 | background-position: 0 -120px; 63 | } 64 | .irs-slider.state_hover, .irs-slider:hover { 65 | background-position: 0 -150px; 66 | } 67 | 68 | .irs-min, .irs-max { 69 | color: #999; 70 | font-size: 10px; line-height: 1.333; 71 | text-shadow: none; 72 | top: 0; padding: 1px 3px; 73 | background: #e1e4e9; 74 | -moz-border-radius: 4px; 75 | border-radius: 4px; 76 | } 77 | 78 | .irs-from, .irs-to, .irs-single { 79 | color: #fff; 80 | font-size: 10px; line-height: 1.333; 81 | text-shadow: none; 82 | padding: 1px 5px; 83 | background: #ed5565; 84 | -moz-border-radius: 4px; 85 | border-radius: 4px; 86 | } 87 | .irs-from:after, .irs-to:after, .irs-single:after { 88 | position: absolute; display: block; content: ""; 89 | bottom: -6px; left: 50%; 90 | width: 0; height: 0; 91 | margin-left: -3px; 92 | overflow: hidden; 93 | border: 3px solid transparent; 94 | border-top-color: #ed5565; 95 | } 96 | 97 | 98 | .irs-grid-pol { 99 | background: #e1e4e9; 100 | } 101 | .irs-grid-text { 102 | color: #999; 103 | } 104 | 105 | .irs-disabled { 106 | } 107 | --------------------------------------------------------------------------------