├── README.md
├── client
├── __init__.py
├── __pycache__
│ └── settings.cpython-36.pyc
├── data
│ ├── ip.conf
│ └── profile
├── fab_run.py
├── logs
│ └── monitor.log
├── running.py
├── service.py
├── settings.py
├── src
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-36.pyc
│ │ ├── data_init.cpython-36.pyc
│ │ ├── post_get_method.cpython-36.pyc
│ │ ├── run_fabric.cpython-36.pyc
│ │ ├── run_get_url.cpython-36.pyc
│ │ └── ss.cpython-36.pyc
│ ├── data_init.py
│ ├── main.py
│ ├── post_get_method.py
│ ├── print_log.py
│ ├── run_fabric.py
│ ├── run_get_url.py
│ └── ss.py
└── start.sh
└── execute_task
├── execute_task
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── print_log.cpython-36.pyc
│ ├── settings.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── wsgi.cpython-36.pyc
├── print_log.py
├── settings.py
├── urls.py
└── wsgi.py
├── logs
├── service.log
└── sy_monitor.log
├── manage.py
├── static
├── assets
│ ├── css
│ │ ├── reset.css
│ │ ├── style.css
│ │ └── supersized.css
│ ├── img
│ │ ├── backgrounds
│ │ │ ├── 1.jpg
│ │ │ ├── 2.jpg
│ │ │ └── 3.jpg
│ │ ├── facebook.png
│ │ ├── progress.gif
│ │ └── twitter.png
│ └── js
│ │ ├── jquery-1.8.2.min.js
│ │ ├── scripts.js
│ │ ├── supersized-init.js
│ │ └── supersized.3.2.7.min.js
├── css
│ ├── animate.min.css
│ ├── bootstrap-switch.min.css
│ ├── bootstrap.min.css
│ ├── checkbox3.min.css
│ ├── dataTables.bootstrap.css
│ ├── flat-blue.css
│ ├── font-awesome.min.css
│ ├── jquery.dataTables.min.css
│ ├── select2.min.css
│ └── style.css
├── fonts
│ ├── FontAwesome.otf
│ ├── fontawesome-webfont.eot
│ ├── fontawesome-webfont.svg
│ ├── fontawesome-webfont.ttf
│ ├── fontawesome-webfont.woff
│ ├── fontawesome-webfont.woff2
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.svg
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── img
│ ├── app-header-bg.jpg
│ ├── backdrop
│ │ ├── micro_carbon.png
│ │ └── tactile_noise.png
│ ├── bg.jpg
│ ├── bg
│ │ └── picjumbo.com_HNCK3558.jpg
│ ├── contact-us-bg.jpg
│ ├── profile
│ │ ├── picjumbo.com_HNCK4153_resize.jpg
│ │ └── profile-1.jpg
│ ├── screenshots
│ │ ├── dashboard.png
│ │ ├── landing.png
│ │ ├── login.png
│ │ └── theming.png
│ └── thumbnails
│ │ ├── picjumbo.com_HNCK4737.jpg
│ │ ├── picjumbo.com_IMG_3241.jpg
│ │ └── picjumbo.com_IMG_4566.jpg
├── js
│ ├── Chart.min.js
│ ├── ace
│ │ ├── ace.js
│ │ ├── mode-html.js
│ │ └── theme-github.js
│ ├── app.js
│ ├── bootstrap-switch.min.js
│ ├── bootstrap.min.js
│ ├── dataTables.bootstrap.min.js
│ ├── index.js
│ ├── jquery.dataTables.min.js
│ ├── jquery.matchHeight-min.js
│ ├── jquery.min.js
│ └── select2.full.min.js
└── vue
│ ├── animate.css
│ ├── axios.min.js
│ ├── fonts
│ ├── element-icons.ttf
│ └── element-icons.woff
│ ├── index.css
│ ├── index.js
│ └── vue.js
├── task
├── __init__.py
├── __pycache__
│ ├── __init__.cpython-36.pyc
│ ├── admin.cpython-36.pyc
│ ├── auth.cpython-36.pyc
│ ├── check_data.cpython-36.pyc
│ ├── forms.cpython-36.pyc
│ ├── models.cpython-36.pyc
│ ├── my_form.cpython-36.pyc
│ ├── permission.cpython-36.pyc
│ ├── permission_list.cpython-36.pyc
│ ├── urls.cpython-36.pyc
│ └── views.cpython-36.pyc
├── admin.py
├── apps.py
├── auth.py
├── check_data.py
├── forms.py
├── migrations
│ ├── 0001_initial.py
│ ├── 0002_auto_20180424_0949.py
│ ├── 0003_auto_20180424_1034.py
│ ├── 0004_task_hosts.py
│ ├── 0005_hosts.py
│ ├── 0006_auto_20180424_1508.py
│ ├── 0007_user.py
│ ├── 0008_auto_20180425_1417.py
│ ├── 0009_auto_20180426_1054.py
│ ├── 0010_groups_time.py
│ ├── 0011_hosts_v_or_s.py
│ ├── 0012_auto_20180428_1322.py
│ ├── 0013_task_result_ip.py
│ ├── 0014_auto_20180428_1354.py
│ ├── 0015_auto_20180428_1356.py
│ ├── 0016_auto_20180502_0919.py
│ ├── 0017_task_login.py
│ ├── 0018_control_group_userinfo.py
│ ├── 0019_hosts_proxy_or_client.py
│ ├── __init__.py
│ └── __pycache__
│ │ ├── 0001_initial.cpython-36.pyc
│ │ ├── 0002_auto_20180424_0949.cpython-36.pyc
│ │ ├── 0003_auto_20180424_1034.cpython-36.pyc
│ │ ├── 0004_task_hosts.cpython-36.pyc
│ │ ├── 0005_hosts.cpython-36.pyc
│ │ ├── 0006_auto_20180424_1508.cpython-36.pyc
│ │ ├── 0007_user.cpython-36.pyc
│ │ ├── 0008_auto_20180425_1417.cpython-36.pyc
│ │ ├── 0009_auto_20180426_1054.cpython-36.pyc
│ │ ├── 0010_groups_time.cpython-36.pyc
│ │ ├── 0011_hosts_v_or_s.cpython-36.pyc
│ │ ├── 0012_auto_20180428_1322.cpython-36.pyc
│ │ ├── 0013_task_result_ip.cpython-36.pyc
│ │ ├── 0014_auto_20180428_1354.cpython-36.pyc
│ │ ├── 0015_auto_20180428_1356.cpython-36.pyc
│ │ ├── 0016_auto_20180502_0919.cpython-36.pyc
│ │ ├── 0017_task_login.cpython-36.pyc
│ │ ├── 0018_control_group_userinfo.cpython-36.pyc
│ │ ├── 0019_hosts_proxy_or_client.cpython-36.pyc
│ │ └── __init__.cpython-36.pyc
├── models.py
├── my_form.py
├── permission.py
├── permission_list.py
├── tests.py
├── urls.py
└── views.py
└── templates
├── 403.html
├── command.html
├── host.html
├── index.html
├── login.html
├── task.html
├── template_html
└── index_base.html
├── user.html
└── user_list.html
/README.md:
--------------------------------------------------------------------------------
1 | # 更新说明
2 |
3 | 此项目会根据使用情况,不定期更新,如有需要沟通可联系QQ:247435333
4 |
5 |
6 | # 简介
7 |
8 | 此平台是 跨平台的账号管理,命令下发,使用。
9 | 使用场景,多平台都是通过vpn来登陆服务器操作的,此时不方便统一管理各平台,
10 | 这时是最适合使用此平台
11 |
12 | 功能:
13 | 账号功能:增加,sudo,删除,密码修改,禁用。
14 | 命令执行。
15 | 服务器基础信息搜集
16 |
17 |
18 |
19 | 架构说明:
20 |
21 | 前端使用:Vue, element-ui, axios
22 | 服务端:django
23 | 客户端:requests,fabric
24 |
25 |
26 | client ---> server
27 | 客户端主动向server端请求api,来获取任务,推送数据,为了保证数据安全 之间使用了api认证。
28 |
29 | 服务端下发任务,客户端主动获取。
30 |
31 |
32 | ---
33 |
34 | # 平台使用说明
35 |
36 | ## 1、api认证设置 与平台认证
37 |
38 | api认证:
39 |
40 | 服务端 execute_task/execute_task/settings.py 内的 APPID 参数是自定义api认证鉴权码
41 | 客户端 client/settings.py 也有一个 APPID 需要和服务端的配置成一样的鉴权码,否则会认证失败。
42 |
43 |
44 | 平台认证:
45 |
46 | 服务端:http://192.168.6.125:8008/admin/ 内部有一个Groups表,在里面添加平台名称。
47 | 只有添加了平台名称客户端才能正常上报。
48 | 客户端:client/settings.py 参数 QY_NAME 是以什么平台名称来上报数据。
49 |
50 | ## 2、平台权限管理。
51 |
52 | 平台管理的粒度很细,可以针对 各种请求,携带的各种参数,来做认证,也可以针对业务来做认证。
53 |
54 | execute_task/task/permission_list.py 是权限管理的条目, 它是一个字典。
55 |
56 | 字典解析:
57 |
58 | command_post_cmd 权限对应的自定义代码,在admin内设置权限时使用
59 | command 是url.py内对应的url name
60 | POST 指定是什么请求
61 | [] 需要携带什么参数
62 | {"status":"cmd"} 明确指定携带参数的value是什么
63 | custom_perm_logic.only_view_own_customers 是权限自定义钩子,可以针对自己的业务来自定义权限,返回True/False
64 |
65 | 'command_post_cmd': ['command', 'POST', [], {"status":"cmd"}, custom_perm_logic.only_view_own_customers]
66 |
67 | 使用方法:
68 | 在admin内打开,设置权限条目,设置用户组,和用户,来对其进行权限控制。
69 |
70 |
71 | ## 3、平台部署
72 |
73 | 服务端安装:
74 | 默认使用的数据库是 sqlit3,如需更换请自行修改配置,python需要使用 3
75 |
76 | 客户端安装:
77 | 安装fabric模块和 requsts模块即可。
78 | 启动: bash start.sh start
79 |
80 |
81 | ## 4、客户端管理其它服务器的方法
82 |
83 | 使用的fabric来管理此平台下的其它服务器。
84 | 1、可以使用文件类型的方式记录主机ip和密码
85 | data/ip.conf 第一列是ip 空行后 第二列是密码
86 |
87 | 2、使用ssh认证免密码登陆,但是也需要在 data/ip.conf内写入ip地址,密码列可以随便填写。
88 |
89 |
90 |
91 | ## 平台展示
92 |
93 | #### 登陆页面
94 |
95 | 
96 |
97 |
98 | #### 主页面
99 |
100 | 
101 |
102 |
103 | #### 用户页面
104 |
105 | 
106 |
107 |
108 | #### 命令执行
109 |
110 | 
111 |
112 | 
113 |
114 |
115 | #### 主机信息
116 |
117 | 
118 |
119 | #### admin后台groups管理与权限控制
120 |
121 | 
122 |
123 | 
124 |
--------------------------------------------------------------------------------
/client/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/__init__.py
--------------------------------------------------------------------------------
/client/__pycache__/settings.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/__pycache__/settings.cpython-36.pyc
--------------------------------------------------------------------------------
/client/data/ip.conf:
--------------------------------------------------------------------------------
1 | 192.168.6.125 123456
2 | 192.168.6.126 123456
3 | 192.168.6.138 123456
4 |
--------------------------------------------------------------------------------
/client/data/profile:
--------------------------------------------------------------------------------
1 | export CMDLOG_FILE="/var/log/command.log"
2 | readonly PROMPT_COMMAND='{ date "+%y-%m-%d %T ##### $(who am i |awk "{print \$1\" \"\$2\" \"\$5}") #### $(pwd) #### $(history 1 | { read x cmd; echo "$cmd"; })"; } >> $CMDLOG_FILE'
--------------------------------------------------------------------------------
/client/fab_run.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 |
5 | from fabric.api import *
6 | import os
7 | import sys
8 | import time
9 | import logging
10 | import socket
11 | import re
12 |
13 | list_user_ip = []
14 | ip_dict = {}
15 | host_dict = {}
16 | web_list = []
17 | check_dict = {}
18 | web_ip = []
19 | es_ip = []
20 | es_id = 1
21 | lvs_dic = {}
22 | LVS_RS_IP = []
23 | keep_ip = []
24 | env.warn_only = True
25 |
26 | # 读取ip.conf 文件 来设置env.hosts 和env.passwords
27 | with open('data/ip.conf') as f:
28 | for line in f.readlines():
29 | if line.rstrip() == '':
30 | continue
31 | list_line = line.rstrip().split()
32 | ip = list_line[0]
33 | if len(list_line) == 3:
34 | host = list_line[2]
35 | host_dict[ip] = host
36 | passwd = list_line[1]
37 | check_dict[ip] = 0
38 | ip_dict['root@' + ip + ':22'] = passwd
39 | ssh_ip = 'root@' + ip
40 | list_user_ip.append(ssh_ip)
41 |
42 | env.hosts = list_user_ip
43 |
44 | env.user = 'root'
45 | env.passwords = ip_dict
46 |
47 |
48 | @task
49 | def go():
50 | run("touch /var/log/command.log")
51 | run("chmod 777 /var/log/command.log")
52 | put("data/profile","/tmp/profile")
53 | run("cat /tmp/profile >>/etc/profile")
54 | run("yum install pciutils* -y")
55 |
--------------------------------------------------------------------------------
/client/logs/monitor.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/logs/monitor.log
--------------------------------------------------------------------------------
/client/running.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | import os
4 |
5 | # 获取上一层模块路径并且添加到python环境变量中
6 | BASE = os.path.dirname(os.path.abspath(__file__)) + "/src"
7 | print(BASE)
8 | import sys
9 |
10 | sys.path.append(BASE)
11 | import settings
12 | from src import post_get_method
13 | from src import run_fabric
14 | from src import main
15 | from src.print_log import print_logs
16 |
17 |
18 | def go():
19 | print_logs.info("-----------------------------------------------")
20 | print_logs.info("服务已开始启动")
21 | # 刚启动时获取所有任务id
22 | id_list = post_get_method.first_running()
23 | print_logs.info("已获取所有任务id")
24 | # 启动时检查管理主机的状态
25 | obj = run_fabric.Fabric_run()
26 | result = obj.running(obj.check_host)
27 | print_logs.info("所有主机状态已检查完毕,: %s" % result)
28 | for ip, data in result.items():
29 | if data == "":
30 | print_logs.error("主机检查失败: {ip}".format(ip=ip))
31 | # 把检查的状态发送给服务器
32 | result["name"] = settings.QY_NAME
33 | proxy_ip = os.popen("""ip a|grep -Po '(?<=inet )[\d.]+'|grep -v 127.0.0.1|sed ':a;N;s/\\n/,/;ba'""").read().rstrip(
34 | "\n")
35 | result["proxy_ip"] = proxy_ip
36 | post = post_get_method.Send_Data()
37 | post_result = post.post_data(result, "/monitor/Get_taskid_all/")
38 | print_logs.info("主机状态已发送到服务端,: %s" % post_result)
39 | print(post_result)
40 | main_obj = main.Monitor(id_list)
41 | print_logs.info("服务已初始化!")
42 | main_obj.running()
43 |
--------------------------------------------------------------------------------
/client/service.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 |
5 | import running
6 |
7 |
8 | if __name__ == '__main__':
9 | running.go()
--------------------------------------------------------------------------------
/client/settings.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 |
5 | # 企业名称
6 | QY_NAME = u"北京北汽"
7 |
8 | URL = "http://192.168.6.125:8008"
9 |
10 | APPID = "..."
11 |
12 | # 循环间隔
13 | INTERVAL = 10
14 |
15 | # POST 重试次数
16 | POST_RETRY = 8
17 |
18 | # POST 重试间隔
19 | POST_RETRY_TIME = 5
20 |
21 | # GET 重试次数
22 | GET_RETRY = 8
23 |
24 | # GET 重试间隔
25 | GET_RETRY_TIME = 5
26 |
27 |
28 | # 客户端上报间隔(秒)
29 | REPORT_TIME = 30
30 |
--------------------------------------------------------------------------------
/client/src/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__init__.py
--------------------------------------------------------------------------------
/client/src/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/client/src/__pycache__/data_init.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__pycache__/data_init.cpython-36.pyc
--------------------------------------------------------------------------------
/client/src/__pycache__/post_get_method.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__pycache__/post_get_method.cpython-36.pyc
--------------------------------------------------------------------------------
/client/src/__pycache__/run_fabric.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__pycache__/run_fabric.cpython-36.pyc
--------------------------------------------------------------------------------
/client/src/__pycache__/run_get_url.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__pycache__/run_get_url.cpython-36.pyc
--------------------------------------------------------------------------------
/client/src/__pycache__/ss.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/client/src/__pycache__/ss.cpython-36.pyc
--------------------------------------------------------------------------------
/client/src/data_init.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 |
4 |
5 |
6 | def run():
7 | list_user_ip = []
8 | ip_dict = {}
9 | with open('data/ip.conf') as f:
10 | for line in f.readlines():
11 | if line.rstrip() == '':
12 | continue
13 | list_line = line.rstrip().split()
14 | ip = list_line[0]
15 | passwd = list_line[1]
16 | ip_dict['root@' + ip + ':22'] = passwd
17 | ssh_ip = ip
18 | list_user_ip.append(ssh_ip)
19 | return (list_user_ip,ip_dict)
20 |
21 |
22 | if __name__ == '__main__':
23 | run()
--------------------------------------------------------------------------------
/client/src/main.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 | import sys, time
5 | import post_get_method
6 | import run_fabric
7 | sys.path.append("../")
8 | import settings
9 | import print_log
10 |
11 | class Monitor(object):
12 | def __init__(self,id_list):
13 | self.id_list = id_list
14 | self.interval = settings.INTERVAL
15 | self.qy_name = settings.QY_NAME
16 | self.api_obj = post_get_method.Send_Data()
17 | self.last_time = time.time()
18 |
19 | def task_handle(self, task_dic):
20 | hosts = task_dic.get("hosts")
21 | cmd = task_dic.get("cmd")
22 | # 如果是True 那么就是和账号相关的操作
23 | if task_dic.get("status_user"):
24 | user = task_dic.get("user")
25 | passwd = task_dic.get("passwd")
26 | login = task_dic.get("login")
27 | sudo = task_dic.get("sudo")
28 | fabric_obj = run_fabric.Fabric_run(user_passwd=[user, passwd, login,sudo])
29 | # 判断是否有此方法,如果没有则是非法指令
30 | if hasattr(fabric_obj,cmd):
31 | return fabric_obj.running(getattr(fabric_obj,cmd),hosts)
32 | print_log.print_logs.error("没找到此方法为非法指令: {cmd}".format(cmd=cmd))
33 | print(u"没找到此方法为非法指令")
34 | return False
35 | else:
36 | fabric_obj = run_fabric.Fabric_run(cmd)
37 | if not hosts:
38 | hosts = False
39 | print(hosts)
40 | return fabric_obj.running(fabric_obj.run_command,hosts)
41 |
42 | def change_file(self,user_passwd,post_json):
43 | if user_passwd[0].strip() == "root":
44 | with open('data/ip.conf',"r") as f:
45 | lines = f.readlines()
46 | with open('data/ip.conf', "w") as f_w:
47 | for line in lines:
48 | if len(line.split()) != 0:
49 | ip = line.split()[0]
50 | if ip in post_json:
51 | print(ip)
52 | print(post_json)
53 | if post_json[ip] == "ok":
54 | f_w.write("%s %s\n"%(ip,user_passwd[1]))
55 | else:
56 | f_w.write(line)
57 | else:
58 | f_w.write(line)
59 | def report_time(self,now_time):
60 | if now_time - self.last_time >= settings.REPORT_TIME:
61 | self.last_time = now_time
62 | print_log.print_logs.info("客户端状态时间上报")
63 | print("client status report")
64 | post_result = self.api_obj.post_data({"name":self.qy_name,"time":now_time}, "/monitor/Monitor_status/")
65 |
66 | def running(self):
67 | while True:
68 | print_log.print_logs.info("已经开始任务获取,心跳间隔为 %s."% self.interval)
69 | print(self.interval)
70 | # 客户端上报时间
71 | self.report_time(time.time())
72 | # 返回的是 [{...},{...}] 最近发出的任务队列
73 | result = self.api_obj.get_data({},"/monitor/Get_put_task/")
74 | if result:
75 | # 循环任务队列
76 | for i in result:
77 | # 如果任务id不在自己的 id_list队列内则 开始执行下面任务
78 | if i["id"] not in self.id_list:
79 | if self.qy_name in i["groups"] or "ALL" in i["groups"]:
80 | # 开始执行任务
81 | print_log.print_logs.info("开始执行任务 : {cmd}".format(cmd=i["cmd"]))
82 | post_json = self.task_handle(i)
83 | print(post_json)
84 | if post_json:
85 | if i.get("status_user"):
86 | # 判断是否是root 如果是 则修改配置文件
87 | self.change_file([i["user"],i["passwd"]],post_json)
88 | post_json["name"] = self.qy_name
89 | post_json["id"] = i["id"]
90 | post_result = self.api_obj.post_data(post_json,"/monitor/Get_put_task/")
91 | print_log.print_logs.info("任务执行完毕 : {cmd}".format(cmd=i["cmd"]))
92 | else:
93 | print_log.print_logs.error("任务执行失败 : {cmd}".format(cmd=i["cmd"]))
94 | # 把任务id加入 任务队列
95 | self.id_list.append(i["id"])
96 | else:
97 | print_log.print_logs.info("暂时无任务,或者get失败")
98 | time.sleep(self.interval)
--------------------------------------------------------------------------------
/client/src/post_get_method.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 | import requests
5 | import sys
6 | import time, hashlib
7 | sys.path.append("../")
8 | import settings
9 | import print_log
10 |
11 |
12 | class Send_Data(object):
13 | def __init__(self):
14 | self.number = 1
15 | # data, client_time = self.md5(settings.APPID)
16 | # new_appid = 'a94ff928a82749d017a873902922e650|1501150616.916467'
17 | # self.new_appid = "%s|%s" % (data, client_time)
18 |
19 | def init_api(self):
20 | data, client_time = self.md5(settings.APPID)
21 | self.new_appid = "%s|%s" % (data, client_time)
22 |
23 | def md5(self,appid):
24 | new_time = str(time.time())
25 | m = hashlib.md5()
26 | m.update(bytes(appid + new_time))
27 | return m.hexdigest(),new_time
28 |
29 | def post_data(self,data_dict,uri):
30 | self.init_api()
31 | """失败时会重试N次"""
32 | result_json = False
33 | if self.number <= settings.POST_RETRY:
34 | try:
35 | result = requests.post(url='%s%s' % (settings.URL,uri),
36 | data=data_dict, headers={'appid': self.new_appid},timeout=10)
37 |
38 | result_json = result.json()
39 | if result_json.get('code') == '1001':
40 | self.number += 1
41 | print_log.print_logs.error("与服务器端的鉴权失败.")
42 | time.sleep(settings.POST_RETRY_TIME)
43 | self.post_data(data_dict,uri)
44 | except Exception as a:
45 | print("fail %s" % self.number)
46 | print_log.print_logs.error("POST 请求失败 %s" % a)
47 | self.number += 1
48 | time.sleep(settings.POST_RETRY_TIME)
49 | self.post_data(data_dict,uri)
50 | self.number = 0
51 | return result_json
52 |
53 | def get_data(self,data_dict,uri):
54 | self.init_api()
55 | """失败时会重试N次"""
56 | result_json = False
57 | if self.number <= settings.GET_RETRY:
58 | try:
59 | result = requests.get(url='%s%s' % (settings.URL,uri),
60 | params=data_dict ,timeout=10)
61 | result_json = result.json()
62 | except Exception as a:
63 | print("fail %s" % self.number)
64 | print_log.print_logs.error("GET 请求失败 %s" % a)
65 | self.number += 1
66 | time.sleep(settings.GET_RETRY_TIME)
67 | self.get_data(data_dict,uri)
68 | self.number = 0
69 | return result_json
70 |
71 |
72 | def first_running():
73 | obj = Send_Data()
74 | return obj.get_data({},"/monitor/Get_taskid_all/")
75 |
--------------------------------------------------------------------------------
/client/src/print_log.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 |
5 | import logging
6 | import os
7 |
8 | BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
9 |
10 |
11 | class Log():
12 | def __init__(self, logname, logger, level):
13 | self.logger = logging.getLogger(logger)
14 | self.logger.setLevel(level)
15 | fh = logging.FileHandler(logname)
16 | fh.setLevel(logging.DEBUG)
17 | formatter = logging.Formatter(
18 | '%(asctime)s - %(name)s - %(levelname)s - %(filename)s - %(funcName)s - %(lineno)s -%(message)s')
19 | fh.setFormatter(formatter)
20 | self.logger.addHandler(fh)
21 |
22 | def getlog(self):
23 | return self.logger
24 |
25 |
26 | print_logs = Log(logname="%s/logs/monitor.log" % BASE, logger="message", level=logging.DEBUG).getlog()
27 |
--------------------------------------------------------------------------------
/client/src/run_fabric.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 | from fabric.api import *
5 | import data_init
6 |
7 |
8 | class Fabric_run(object):
9 | def __init__(self, command=False, user_passwd=False):
10 | self.command = command
11 | # 数据类型 [ user, passwd ]
12 | self.user_passwd = user_passwd
13 | ip_list, ip_dic = data_init.run()
14 | env.warn_only = True
15 | env.hosts = ip_list
16 | env.user = 'root'
17 | env.passwords = ip_dic
18 |
19 | @parallel(pool_size=20)
20 | def run_command(self):
21 | with settings(abort_on_prompts=True):
22 | try:
23 | with hide('running', 'stdout', 'stderr'):
24 | return run(self.command)
25 | except:
26 | return "Failure to execute"
27 |
28 | # 第一次上报数据
29 | def check_host(self):
30 | with settings(abort_on_prompts=True):
31 | try:
32 | with hide('running', 'stdout', 'stderr'):
33 | disk_k = run("fdisk -l 2>/dev/null|egrep 'Disk /dev/[svx]' 2>/dev/null|awk '{a+=$3}END{print a}'")
34 | disk_num = run("fdisk -l 2>/dev/null|egrep 'Disk /dev/[svx]' 2>/dev/null|wc -l")
35 | mem = run("free -g|awk 'NR==2{print $2}'")
36 | cpu_num = run('cat /proc/cpuinfo |grep "processor"|wc -l')
37 | cpu_model = run("cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c|grep -Po '(?<=[0-9]).*' ")
38 | v_s = run("lspci | grep -i vga|grep VMware >/dev/null&&echo '虚拟机'||echo '物理机'")
39 | return "{disk_k}||{disk_num}||{mem}||{cpu_num}||{cpu_model}||{v_s}".format(disk_k=disk_k,
40 | disk_num=disk_num,
41 | mem=mem, cpu_num=cpu_num,
42 | cpu_model=cpu_model,
43 | v_s=v_s)
44 | except:
45 | return ""
46 |
47 | # 密码修改
48 | @parallel(pool_size=20)
49 | def mychange(self):
50 | result = run('echo "{passwd}" | sudo passwd {username} --stdin >/dev/null&&echo "ok"||echo "error"'.format(
51 | username=self.user_passwd[0], passwd=self.user_passwd[1]))
52 | return result
53 |
54 | # 删除账号
55 | @parallel(pool_size=20)
56 | def mydel(self):
57 | if self.user_passwd[0].strip() == "root":
58 | return "error root not del"
59 | with settings(abort_on_prompts=True):
60 | try:
61 | with hide('running', 'stdout', 'stderr'):
62 | result = run(
63 | 'userdel -r {username} 2>/dev/null&&echo "ok"||echo "error {username} no exist"'.format(
64 | username=self.user_passwd[0]))
65 | run("sed -i 's/^{username} .*//g' /etc/sudoers".format(username=self.user_passwd[0]))
66 | return result
67 | except:
68 | return "Failure to execute"
69 |
70 | # 账号添加与禁用
71 | @parallel(pool_size=20)
72 | def myadd(self):
73 | if self.user_passwd[0].strip() == "root":
74 | return "error root not add or nologin"
75 | with settings(abort_on_prompts=True):
76 | try:
77 | with hide('running', 'stdout', 'stderr'):
78 | result = run('useradd {username} 2>/dev/null||echo "error"'.format(username=self.user_passwd[0]))
79 | if result == "error":
80 | if self.user_passwd[2] == False:
81 | run("usermod -L {username}".format(username=self.user_passwd[0]))
82 | return "ok disable"
83 | elif self.user_passwd[2] == True:
84 | run("usermod -U {username}".format(username=self.user_passwd[0]))
85 |
86 | if self.user_passwd[3] == True:
87 | sudo = run('cat /etc/sudoers|grep "{username} " >/dev/null &&echo "ok"||echo "{username} ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers'.format(
88 | username=self.user_passwd[0]))
89 | if sudo == "ok":
90 | return "error %s user exist" % self.user_passwd[0]
91 | return "ok enable sudo"
92 | elif self.user_passwd[3] == False:
93 | run("sed -i 's/^{username} .*//g' /etc/sudoers".format(username=self.user_passwd[0]))
94 | return "ok disable sudo"
95 | return "error %s user exist" % self.user_passwd[0]
96 |
97 | run('echo "{passwd}" | sudo passwd {username} --stdin >/dev/null'.format(
98 | username=self.user_passwd[0], passwd=self.user_passwd[1]))
99 | if self.user_passwd[3] == True:
100 | run('echo "{username} ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers'.format(
101 | username=self.user_passwd[0]))
102 | return "ok"
103 | except:
104 | return "Failure to execute"
105 |
106 | def running(self, obj, hosts=False):
107 | if hosts:
108 | return execute(obj, hosts=hosts)
109 | else:
110 | return execute(obj)
111 |
--------------------------------------------------------------------------------
/client/src/run_get_url.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 |
5 | import post_get_method
6 |
7 | def first_running():
8 | obj = post_get_method.Send_Data()
9 | obj.get_data({},"/monitor/Get_taskid_all/")
10 |
11 |
12 |
--------------------------------------------------------------------------------
/client/src/ss.py:
--------------------------------------------------------------------------------
1 | #!./usr/bin/python
2 |
3 | A = "cccc"
--------------------------------------------------------------------------------
/client/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source /etc/profile
3 |
4 |
5 | start() {
6 | nohup python service.py >/dev/null 2>&1 &
7 | echo "start ok ..."
8 | }
9 |
10 | stop() {
11 | ps -ef|grep "python service.py"|grep -v grep|awk '{print $2}'|xargs kill -9 2>/dev/null
12 | echo "stop ok ..."
13 | }
14 |
15 | case "$1" in
16 | start)
17 | start
18 | ;;
19 | stop)
20 | stop
21 | ;;
22 | restart)
23 | stop
24 | start
25 | ;;
26 | *)
27 | echo $"Usage: $prog {start|stop|restart}"
28 | esac
29 |
--------------------------------------------------------------------------------
/execute_task/execute_task/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/execute_task/__init__.py
--------------------------------------------------------------------------------
/execute_task/execute_task/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/execute_task/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/execute_task/__pycache__/print_log.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/execute_task/__pycache__/print_log.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/execute_task/__pycache__/settings.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/execute_task/__pycache__/settings.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/execute_task/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/execute_task/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/execute_task/__pycache__/wsgi.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/execute_task/__pycache__/wsgi.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/execute_task/print_log.py:
--------------------------------------------------------------------------------
1 | #!/usr.bin/python
2 |
3 | import logging
4 | import os
5 |
6 | BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
7 | class Log():
8 | def __init__(self,logname,logger,level):
9 | self.logger = logging.getLogger(logger)
10 | self.logger.setLevel(level)
11 | fh = logging.FileHandler(logname)
12 | fh.setLevel(logging.DEBUG)
13 | formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(filename)s - %(funcName)s - %(lineno)s -%(message)s')
14 | fh.setFormatter(formatter)
15 | self.logger.addHandler(fh)
16 |
17 | def getlog(self):
18 | return self.logger
19 |
20 | print_logs = Log(logname="%s/logs/service.log"%BASE,logger="message",level=logging.DEBUG).getlog()
--------------------------------------------------------------------------------
/execute_task/execute_task/settings.py:
--------------------------------------------------------------------------------
1 | """
2 | Django settings for execute_task project.
3 |
4 | Generated by 'django-admin startproject' using Django 1.11.
5 |
6 | For more information on this file, see
7 | https://docs.djangoproject.com/en/1.11/topics/settings/
8 |
9 | For the full list of settings and their values, see
10 | https://docs.djangoproject.com/en/1.11/ref/settings/
11 | """
12 |
13 | import os
14 |
15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17 |
18 |
19 | # Quick-start development settings - unsuitable for production
20 | # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
21 |
22 | # SECURITY WARNING: keep the secret key used in production secret!
23 | SECRET_KEY = 'xlm64qn6zn=$x-r9@&mq3o3c_89*82$&@7d4hj!%^yl3jglco('
24 |
25 | # SECURITY WARNING: don't run with debug turned on in production!
26 | DEBUG = True
27 |
28 | ALLOWED_HOSTS = ['*']
29 |
30 |
31 | # Application definition
32 |
33 | INSTALLED_APPS = [
34 | 'django.contrib.admin',
35 | 'django.contrib.auth',
36 | 'django.contrib.contenttypes',
37 | 'django.contrib.sessions',
38 | 'django.contrib.messages',
39 | 'django.contrib.staticfiles',
40 | 'task'
41 | ]
42 |
43 | MIDDLEWARE = [
44 | 'django.middleware.security.SecurityMiddleware',
45 | 'django.contrib.sessions.middleware.SessionMiddleware',
46 | 'django.middleware.common.CommonMiddleware',
47 | 'django.middleware.csrf.CsrfViewMiddleware',
48 | 'django.contrib.auth.middleware.AuthenticationMiddleware',
49 | 'django.contrib.messages.middleware.MessageMiddleware',
50 | 'django.middleware.clickjacking.XFrameOptionsMiddleware',
51 | ]
52 |
53 | ROOT_URLCONF = 'execute_task.urls'
54 |
55 | TEMPLATES = [
56 | {
57 | 'BACKEND': 'django.template.backends.django.DjangoTemplates',
58 | 'DIRS': [os.path.join(BASE_DIR, 'templates')]
59 | ,
60 | 'APP_DIRS': True,
61 | 'OPTIONS': {
62 | 'context_processors': [
63 | 'django.template.context_processors.debug',
64 | 'django.template.context_processors.request',
65 | 'django.contrib.auth.context_processors.auth',
66 | 'django.contrib.messages.context_processors.messages',
67 | ],
68 | },
69 | },
70 | ]
71 |
72 | WSGI_APPLICATION = 'execute_task.wsgi.application'
73 |
74 |
75 | # Database
76 | # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
77 |
78 | DATABASES = {
79 | 'default': {
80 | 'ENGINE': 'django.db.backends.sqlite3',
81 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
82 | }
83 | }
84 |
85 |
86 | # Password validation
87 | # https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators
88 |
89 | AUTH_PASSWORD_VALIDATORS = [
90 | {
91 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
92 | },
93 | {
94 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
95 | },
96 | {
97 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
98 | },
99 | {
100 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
101 | },
102 | ]
103 |
104 |
105 | # Internationalization
106 | # https://docs.djangoproject.com/en/1.11/topics/i18n/
107 |
108 | LANGUAGE_CODE = 'en-us'
109 |
110 |
111 | USE_I18N = True
112 |
113 | USE_L10N = True
114 |
115 | TIME_ZONE = 'Asia/Shanghai'
116 | USE_TZ = False
117 |
118 |
119 | # Static files (CSS, JavaScript, Images)
120 | # https://docs.djangoproject.com/en/1.11/howto/static-files/
121 |
122 | STATIC_URL = '/static/'
123 | STATICFILES_DIRS = (
124 | os.path.join(BASE_DIR, 'static'),
125 | )
126 |
127 | APPID = '...'
128 |
129 |
130 | # 客户端超时时间(秒)
131 |
132 | M_TIMEOUT = 300
133 |
--------------------------------------------------------------------------------
/execute_task/execute_task/urls.py:
--------------------------------------------------------------------------------
1 | """execute_task URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/1.11/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: url(r'^$', 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: url(r'^$', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.conf.urls import url, include
14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
15 | """
16 | from django.conf.urls import url, include
17 | from django.contrib import admin
18 | from task import urls
19 |
20 | urlpatterns = [
21 | url(r'^admin/', admin.site.urls),
22 | url(r'^monitor/', include('task.urls')),
23 | ]
24 |
--------------------------------------------------------------------------------
/execute_task/execute_task/wsgi.py:
--------------------------------------------------------------------------------
1 | """
2 | WSGI config for execute_task 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/1.11/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", "execute_task.settings")
15 |
16 | application = get_wsgi_application()
17 |
--------------------------------------------------------------------------------
/execute_task/logs/sy_monitor.log:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/logs/sy_monitor.log
--------------------------------------------------------------------------------
/execute_task/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", "execute_task.settings")
7 | try:
8 | from django.core.management import execute_from_command_line
9 | except ImportError:
10 | # The above import may fail for some other reason. Ensure that the
11 | # issue is really that Django is missing to avoid masking other
12 | # exceptions on Python 2.
13 | try:
14 | import django
15 | except ImportError:
16 | raise ImportError(
17 | "Couldn't import Django. Are you sure it's installed and "
18 | "available on your PYTHONPATH environment variable? Did you "
19 | "forget to activate a virtual environment?"
20 | )
21 | raise
22 | execute_from_command_line(sys.argv)
23 |
--------------------------------------------------------------------------------
/execute_task/static/assets/css/reset.css:
--------------------------------------------------------------------------------
1 |
2 | /* ------- This is the CSS Reset ------- */
3 |
4 | html, body, div, span, applet, object, iframe,
5 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, a,
6 | abbr, acronym, address, big, cite, code, del,
7 | dfn, em, img, ins, kbd, q, s, samp, small,
8 | strike, strong, sub, sup, tt, var, u, i, center,
9 | dl, dt, dd, ol, ul, li, fieldset, form, label,
10 | legend, table, caption, tbody, tfoot, thead, tr,
11 | th, td, article, aside, canvas, details, embed,
12 | figure, figcaption, footer, header, hgroup, menu,
13 | nav, output, ruby, section, summary, time, mark, audio, video {
14 | margin: 0;
15 | padding: 0;
16 | border: 0;
17 | font-size: 100%;
18 | font: inherit;
19 | vertical-align: baseline;
20 | }
21 |
22 | /* ------- HTML5 display-role reset for older browsers ------- */
23 |
24 | article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
25 | display: block;
26 | }
27 | body {
28 | line-height: 1;
29 | }
30 | ol, ul {
31 | list-style: none;
32 | }
33 | blockquote, q {
34 | quotes: none;
35 | }
36 | blockquote:before, blockquote:after, q:before, q:after {
37 | content: '';
38 | content: none;
39 | }
40 | table {
41 | border-collapse: collapse;
42 | border-spacing: 0;
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/execute_task/static/assets/css/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Template Name: Fullscreen Login
4 | * Description: Login Template with Fullscreen Background Slideshow
5 | * Author: Anli Zaimi
6 | * Author URI: http://azmind.com
7 | *
8 | */
9 |
10 |
11 | body {
12 | background: #f8f8f8;
13 | font-family: 'PT Sans', Helvetica, Arial, sans-serif;
14 | text-align: center;
15 | color: #fff;
16 | }
17 |
18 | .page-container {
19 | margin: 120px auto 0 auto;
20 | }
21 |
22 | h1 {
23 | font-size: 30px;
24 | font-weight: 700;
25 | text-shadow: 0 1px 4px rgba(0,0,0,.2);
26 | }
27 |
28 | form {
29 | position: relative;
30 | width: 305px;
31 | margin: 15px auto 0 auto;
32 | text-align: center;
33 | }
34 |
35 | input {
36 | width: 270px;
37 | height: 42px;
38 | margin-top: 25px;
39 | padding: 0 15px;
40 | background: #2d2d2d; /* browsers that don't support rgba */
41 | background: rgba(45,45,45,.15);
42 | -moz-border-radius: 6px;
43 | -webkit-border-radius: 6px;
44 | border-radius: 6px;
45 | border: 1px solid #3d3d3d; /* browsers that don't support rgba */
46 | border: 1px solid rgba(255,255,255,.15);
47 | -moz-box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
48 | -webkit-box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
49 | box-shadow: 0 2px 3px 0 rgba(0,0,0,.1) inset;
50 | font-family: 'PT Sans', Helvetica, Arial, sans-serif;
51 | font-size: 14px;
52 | color: #fff;
53 | text-shadow: 0 1px 2px rgba(0,0,0,.1);
54 | -o-transition: all .2s;
55 | -moz-transition: all .2s;
56 | -webkit-transition: all .2s;
57 | -ms-transition: all .2s;
58 | }
59 |
60 | input:-moz-placeholder { color: #fff; }
61 | input:-ms-input-placeholder { color: #fff; }
62 | input::-webkit-input-placeholder { color: #fff; }
63 |
64 | input:focus {
65 | outline: none;
66 | -moz-box-shadow:
67 | 0 2px 3px 0 rgba(0,0,0,.1) inset,
68 | 0 2px 7px 0 rgba(0,0,0,.2);
69 | -webkit-box-shadow:
70 | 0 2px 3px 0 rgba(0,0,0,.1) inset,
71 | 0 2px 7px 0 rgba(0,0,0,.2);
72 | box-shadow:
73 | 0 2px 3px 0 rgba(0,0,0,.1) inset,
74 | 0 2px 7px 0 rgba(0,0,0,.2);
75 | }
76 |
77 | button {
78 | cursor: pointer;
79 | width: 300px;
80 | height: 44px;
81 | margin-top: 25px;
82 | padding: 0;
83 | background: #ef4300;
84 | -moz-border-radius: 6px;
85 | -webkit-border-radius: 6px;
86 | border-radius: 6px;
87 | border: 1px solid #ff730e;
88 | -moz-box-shadow:
89 | 0 15px 30px 0 rgba(255,255,255,.25) inset,
90 | 0 2px 7px 0 rgba(0,0,0,.2);
91 | -webkit-box-shadow:
92 | 0 15px 30px 0 rgba(255,255,255,.25) inset,
93 | 0 2px 7px 0 rgba(0,0,0,.2);
94 | box-shadow:
95 | 0 15px 30px 0 rgba(255,255,255,.25) inset,
96 | 0 2px 7px 0 rgba(0,0,0,.2);
97 | font-family: 'PT Sans', Helvetica, Arial, sans-serif;
98 | font-size: 14px;
99 | font-weight: 700;
100 | color: #fff;
101 | text-shadow: 0 1px 2px rgba(0,0,0,.1);
102 | -o-transition: all .2s;
103 | -moz-transition: all .2s;
104 | -webkit-transition: all .2s;
105 | -ms-transition: all .2s;
106 | }
107 |
108 | button:hover {
109 | -moz-box-shadow:
110 | 0 15px 30px 0 rgba(255,255,255,.15) inset,
111 | 0 2px 7px 0 rgba(0,0,0,.2);
112 | -webkit-box-shadow:
113 | 0 15px 30px 0 rgba(255,255,255,.15) inset,
114 | 0 2px 7px 0 rgba(0,0,0,.2);
115 | box-shadow:
116 | 0 15px 30px 0 rgba(255,255,255,.15) inset,
117 | 0 2px 7px 0 rgba(0,0,0,.2);
118 | }
119 |
120 | button:active {
121 | -moz-box-shadow:
122 | 0 15px 30px 0 rgba(255,255,255,.15) inset,
123 | 0 2px 7px 0 rgba(0,0,0,.2);
124 | -webkit-box-shadow:
125 | 0 15px 30px 0 rgba(255,255,255,.15) inset,
126 | 0 2px 7px 0 rgba(0,0,0,.2);
127 | box-shadow:
128 | 0 5px 8px 0 rgba(0,0,0,.1) inset,
129 | 0 1px 4px 0 rgba(0,0,0,.1);
130 |
131 | border: 0px solid #ef4300;
132 | }
133 |
134 | .error {
135 | display: none;
136 | position: absolute;
137 | top: 27px;
138 | right: -55px;
139 | width: 40px;
140 | height: 40px;
141 | background: #2d2d2d; /* browsers that don't support rgba */
142 | background: rgba(45,45,45,.25);
143 | -moz-border-radius: 8px;
144 | -webkit-border-radius: 8px;
145 | border-radius: 8px;
146 | }
147 |
148 | .error span {
149 | display: inline-block;
150 | margin-left: 2px;
151 | font-size: 40px;
152 | font-weight: 700;
153 | line-height: 40px;
154 | text-shadow: 0 1px 2px rgba(0,0,0,.1);
155 | -o-transform: rotate(45deg);
156 | -moz-transform: rotate(45deg);
157 | -webkit-transform: rotate(45deg);
158 | -ms-transform: rotate(45deg);
159 |
160 | }
161 |
162 | .connect {
163 | width: 305px;
164 | margin: 35px auto 0 auto;
165 | font-size: 18px;
166 | font-weight: 700;
167 | text-shadow: 0 1px 3px rgba(0,0,0,.2);
168 | }
169 |
170 | .connect a {
171 | display: inline-block;
172 | width: 32px;
173 | height: 35px;
174 | margin-top: 15px;
175 | -o-transition: all .2s;
176 | -moz-transition: all .2s;
177 | -webkit-transition: all .2s;
178 | -ms-transition: all .2s;
179 | }
180 |
181 | .connect a.facebook { background: url(../img/facebook.png) center center no-repeat; }
182 | .connect a.twitter { background: url(../img/twitter.png) center center no-repeat; }
183 |
184 | .connect a:hover { background-position: center bottom; }
185 |
186 |
187 |
188 |
--------------------------------------------------------------------------------
/execute_task/static/assets/css/supersized.css:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Supersized - Fullscreen Slideshow jQuery Plugin
4 | Version : 3.2.7
5 | Site : www.buildinternet.com/project/supersized
6 |
7 | Author : Sam Dunn
8 | Company : One Mighty Roar (www.onemightyroar.com)
9 | License : MIT License / GPL License
10 |
11 | */
12 |
13 | * { margin:0; padding:0; }
14 | body { background:#111; height:100%; }
15 | img { border:none; }
16 |
17 | #supersized-loader { position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url(../img/progress.gif) no-repeat center center;}
18 |
19 | #supersized { display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:-999; height:100%; width:100%; }
20 | #supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; }
21 | #supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/
22 | #supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; } /*Quality*/
23 |
24 | #supersized li { display:block; list-style:none; z-index:-30; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; }
25 | #supersized a { width:100%; height:100%; display:block; }
26 | #supersized li.prevslide { z-index:-20; }
27 | #supersized li.activeslide { z-index:-10; }
28 | #supersized li.image-loading { background:#111 url(../img/progress.gif) no-repeat center center; width:100%; height:100%; }
29 | #supersized li.image-loading img{ visibility:hidden; }
30 | #supersized li.prevslide img, #supersized li.activeslide img{ display:inline; }
31 |
32 |
33 | #supersized img { max-width: none !important }
34 |
35 |
--------------------------------------------------------------------------------
/execute_task/static/assets/img/backgrounds/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/assets/img/backgrounds/1.jpg
--------------------------------------------------------------------------------
/execute_task/static/assets/img/backgrounds/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/assets/img/backgrounds/2.jpg
--------------------------------------------------------------------------------
/execute_task/static/assets/img/backgrounds/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/assets/img/backgrounds/3.jpg
--------------------------------------------------------------------------------
/execute_task/static/assets/img/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/assets/img/facebook.png
--------------------------------------------------------------------------------
/execute_task/static/assets/img/progress.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/assets/img/progress.gif
--------------------------------------------------------------------------------
/execute_task/static/assets/img/twitter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/assets/img/twitter.png
--------------------------------------------------------------------------------
/execute_task/static/assets/js/scripts.js:
--------------------------------------------------------------------------------
1 |
2 | jQuery(document).ready(function() {
3 |
4 | $('.page-container form').submit(function(){
5 | var username = $(this).find('.username').val();
6 | var password = $(this).find('.password').val();
7 | if(username == '') {
8 | $(this).find('.error').fadeOut('fast', function(){
9 | $(this).css('top', '27px');
10 | });
11 | $(this).find('.error').fadeIn('fast', function(){
12 | $(this).parent().find('.username').focus();
13 | });
14 | return false;
15 | }
16 | if(password == '') {
17 | $(this).find('.error').fadeOut('fast', function(){
18 | $(this).css('top', '96px');
19 | });
20 | $(this).find('.error').fadeIn('fast', function(){
21 | $(this).parent().find('.password').focus();
22 | });
23 | return false;
24 | }
25 | });
26 |
27 | $('.page-container form .username, .page-container form .password').keyup(function(){
28 | $(this).parent().find('.error').fadeOut('fast');
29 | });
30 |
31 | });
32 |
--------------------------------------------------------------------------------
/execute_task/static/assets/js/supersized-init.js:
--------------------------------------------------------------------------------
1 | jQuery(function($){
2 |
3 | $.supersized({
4 |
5 | // Functionality
6 | slide_interval : 4000, // Length between transitions
7 | transition : 1, // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left
8 | transition_speed : 1000, // Speed of transition
9 | performance : 1, // 0-Normal, 1-Hybrid speed/quality, 2-Optimizes image quality, 3-Optimizes transition speed // (Only works for Firefox/IE, not Webkit)
10 |
11 | // Size & Position
12 | min_width : 0, // Min width allowed (in pixels)
13 | min_height : 0, // Min height allowed (in pixels)
14 | vertical_center : 1, // Vertically center background
15 | horizontal_center : 1, // Horizontally center background
16 | fit_always : 0, // Image will never exceed browser width or height (Ignores min. dimensions)
17 | fit_portrait : 1, // Portrait images will not exceed browser height
18 | fit_landscape : 0, // Landscape images will not exceed browser width
19 |
20 | // Components
21 | slide_links : 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank')
22 | slides : [ // Slideshow Images
23 | {image : '/static/assets/img/backgrounds/1.jpg'},
24 | {image : '/static/assets/img/backgrounds/2.jpg'},
25 | {image : '/static/assets/img/backgrounds/3.jpg'}
26 | ]
27 |
28 | });
29 |
30 | });
31 |
--------------------------------------------------------------------------------
/execute_task/static/css/bootstrap-switch.min.css:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * bootstrap-switch - v3.3.2
3 | * http://www.bootstrap-switch.org
4 | * ========================================================================
5 | * Copyright 2012-2013 Mattia Larentis
6 | *
7 | * ========================================================================
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================================
20 | */
21 |
22 | .bootstrap-switch{display:inline-block;direction:ltr;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;z-index:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bootstrap-switch .bootstrap-switch-container{display:inline-block;top:0;border-radius:4px;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:inline-block !important;height:100%;padding:6px 12px;font-size:14px;line-height:20px}.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-handle-off{text-align:center;z-index:1}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-primary,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-primary{color:#fff;background:#428bca}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-info,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-info{color:#fff;background:#5bc0de}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-success{color:#fff;background:#5cb85c}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-warning,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-warning{background:#f0ad4e;color:#fff}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-danger,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-danger{color:#fff;background:#d9534f}.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-default,.bootstrap-switch .bootstrap-switch-handle-off.bootstrap-switch-default{color:#000;background:#eee}.bootstrap-switch .bootstrap-switch-label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;color:#333;background:#fff}.bootstrap-switch .bootstrap-switch-handle-on{border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch .bootstrap-switch-handle-off{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch input[type='radio'],.bootstrap-switch input[type='checkbox']{position:absolute !important;top:0;left:0;opacity:0;filter:alpha(opacity=0);z-index:-1}.bootstrap-switch input[type='radio'].form-control,.bootstrap-switch input[type='checkbox'].form-control{height:auto}.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-mini .bootstrap-switch-label{padding:1px 5px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-small .bootstrap-switch-label{padding:5px 10px;font-size:12px;line-height:1.5}.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-large .bootstrap-switch-label{padding:6px 16px;font-size:18px;line-height:1.33}.bootstrap-switch.bootstrap-switch-disabled,.bootstrap-switch.bootstrap-switch-readonly,.bootstrap-switch.bootstrap-switch-indeterminate{cursor:default !important}.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-on,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-handle-off,.bootstrap-switch.bootstrap-switch-disabled .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-readonly .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-indeterminate .bootstrap-switch-label{opacity:.5;filter:alpha(opacity=50);cursor:default !important}.bootstrap-switch.bootstrap-switch-animate .bootstrap-switch-container{-webkit-transition:margin-left .5s;transition:margin-left .5s}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-on{border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-inverse .bootstrap-switch-handle-off{border-bottom-right-radius:0;border-top-right-radius:0;border-bottom-left-radius:3px;border-top-left-radius:3px}.bootstrap-switch.bootstrap-switch-focused{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.bootstrap-switch.bootstrap-switch-on .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label{border-bottom-right-radius:3px;border-top-right-radius:3px}.bootstrap-switch.bootstrap-switch-off .bootstrap-switch-label,.bootstrap-switch.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label{border-bottom-left-radius:3px;border-top-left-radius:3px}
--------------------------------------------------------------------------------
/execute_task/static/css/checkbox3.min.css:
--------------------------------------------------------------------------------
1 | .checkbox3 label::before,.radio3 label::before{overflow:hidden;vertical-align:middle;text-align:center}.checkbox3 label,.radio3 label{white-space:nowrap;cursor:pointer}.checkbox3{position:relative}.checkbox3 input{position:absolute;left:-9999px}.checkbox3 label::after,.checkbox3 label::before{content:'';top:10px;bottom:10px;left:0;display:block}.checkbox3 label{display:block;position:relative;padding:11px 0 11px 30px;font-size:12px;margin-bottom:0;margin-top:-4px}.checkbox3 label::before{position:absolute;width:21px;height:21px;border:1px solid #CCC;-moz-border-radius:1px;border-radius:1px;-webkit-transition:background-color .2s;-moz-transition:background-color .2s;transition:background-color .2s}.checkbox3 label::after{position:absolute;width:19px;height:19px;border:12px solid #FFF;margin:1px;-webkit-transition:all 50ms;-moz-transition:all 50ms;transition:all 50ms;opacity:0}.checkbox3 input:checked+label::before{border-width:1px;border-style:solid;background-color:#444;border-color:#444;color:#fff}.checkbox3 input:checked+label::after{border:3px solid #FFF;opacity:1}.checkbox3.checkbox-sm label{padding:8px 0 8px 22px}.checkbox3.checkbox-sm label::before{width:14px;height:14px;line-height:14px}.checkbox3.checkbox-sm label::after{width:12px;height:12px}.checkbox3.checkbox-lg label{padding:15px 0 15px 40px}.checkbox3.checkbox-lg label::before{width:28px;height:27px;line-height:24px}.checkbox3.checkbox-lg label::after{width:26px;height:25px}.checkbox3.checkbox-inline,.radio3.radio-inline{padding-top:0;padding-left:0;padding-right:0;margin-left:0;margin-right:20px}.checkbox3.checkbox-inline input[type=checkbox],.checkbox3.checkbox-inline input[type=radio],.radio3.radio-inline input[type=checkbox],.radio3.radio-inline input[type=radio]{position:absolute}.checkbox3.checkbox-check input:checked+label::after,.checkbox3.checkbox-check label::after{border:0}.checkbox3.checkbox-check label::after{content:"\f00c";font-family:FontAwesome;font-size:12px;color:#FFF;width:19px;height:20px;line-height:20px;vertical-align:middle;text-align:center;border-width:0}.checkbox3.checkbox-check.checkbox-sm label::after{font-size:9px;line-height:12px;width:12px}.checkbox3.checkbox-check.checkbox-lg label::after{font-size:16px;line-height:26px;width:26px}.checkbox3.checkbox-check.checkbox-light label::after{color:#444}.checkbox3.checkbox-circle label::after,.checkbox3.checkbox-circle label::before{-moz-border-radius:20px;border-radius:20px}.checkbox3.checkbox-round label::after,.checkbox3.checkbox-round label::before,.checkbox3.checkbox-s1 label::after,.checkbox3.checkbox-s1 label::before{-moz-border-radius:4px;border-radius:4px}.checkbox3.checkbox-light label::before{background-color:transparent}.checkbox3.checkbox-light input:checked+label::before{background-color:transparent;border-color:#444}.checkbox3.checkbox-info input:checked+label::before{background-color:#2caef5;border-color:#2caef5}.checkbox3.checkbox-primary input:checked+label::before{background-color:#4183d7;border-color:#4183d7}.checkbox3.checkbox-success input:checked+label::before{background-color:#36b846;border-color:#36b846}.checkbox3.checkbox-warning input:checked+label::before{background-color:#ff9c00;border-color:#ff9c00}.checkbox3.checkbox-danger input:checked+label::before{background-color:#e50011;border-color:#e50011}.checkbox3.checkbox-primary.checkbox-light input:checked+label::before{background-color:transparent;border-color:#4183d7}.checkbox3.checkbox-primary.checkbox-light input:checked+label::after{color:#4183d7}.checkbox3.checkbox-info.checkbox-light input:checked+label::before{background-color:transparent;border-color:#2caef5}.checkbox3.checkbox-info.checkbox-light input:checked+label::after{color:#2caef5}.checkbox3.checkbox-success.checkbox-light input:checked+label::before{background-color:transparent;border-color:#36b846}.checkbox3.checkbox-success.checkbox-light input:checked+label::after{color:#36b846}.checkbox3.checkbox-warning.checkbox-light input:checked+label::before{background-color:transparent;border-color:#ff9c00}.checkbox3.checkbox-warning.checkbox-light input:checked+label::after{color:#ff9c00}.checkbox3.checkbox-danger.checkbox-light input:checked+label::before{background-color:transparent;border-color:#e50011}.checkbox3.checkbox-danger.checkbox-light input:checked+label::after{color:#e50011}.radio3{position:relative}.radio3 input{position:absolute;left:-9999px}.radio3 label{display:block;position:relative;padding:11px 0 11px 30px;font-size:12px;margin-bottom:0;margin-top:-4px}.radio3 label::after,.radio3 label::before{content:'';display:block;position:absolute;top:10px;bottom:10px;left:0}.radio3 label::before{width:21px;height:21px;border:1px solid #CCC;-webkit-transition:background-color .2s;-moz-transition:background-color .2s;transition:background-color .2s}.radio3 label::after{width:19px;height:19px;border:12px solid #FFF;margin:1px;-webkit-transition:all 50ms;-moz-transition:all 50ms;transition:all 50ms;opacity:0}.radio3 input:checked+label::before{font-family:FontAwesome;border-width:1px;border-style:solid;background-color:#444;border-color:#444;color:#fff}.radio3 input:checked+label::after{border:3px solid #FFF;opacity:1}.radio3.radio-check label::after,.radio3.radio-check.radio-light label::after{content:"\f00c";font-family:FontAwesome;color:#FFF;width:19px;height:20px;line-height:20px;vertical-align:middle;text-align:center;border-width:0}.radio3 label::after,.radio3 label::before{-moz-border-radius:20px;border-radius:20px}.radio3.radio-check input:checked+label::after{border-width:0}.radio3.radio-check.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-check.radio-light input:checked+label::after{border-width:0;color:#444}.radio3.radio-sm label{padding:8px 0 8px 22px}.radio3.radio-sm label::before{width:14px;height:14px;line-height:14px}.radio3.radio-sm label::after{width:12px;height:12px}.radio3.radio-lg label{padding:15px 0 15px 40px}.radio3.radio-lg label::before{width:28px;height:27px;line-height:24px}.radio3.radio-lg label::after{width:26px;height:25px}.radio3.radio-check.radio-sm label::after{font-size:9px;line-height:12px;width:12px}.radio3.radio-check.radio-lg label::after{font-size:16px;line-height:26px;width:26px}.radio3.radio-primary input:checked+label::before{background-color:#4183d7;border-color:#4183d7}.radio3.radio-info input:checked+label::before{background-color:#2caef5;border-color:#2caef5}.radio3.radio-success input:checked+label::before{background-color:#36b846;border-color:#36b846}.radio3.radio-warning input:checked+label::before{background-color:#ff9c00;border-color:#ff9c00}.radio3.radio-danger input:checked+label::before{background-color:#e50011;border-color:#e50011}.radio3.radio-primary.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-primary.radio-light input:checked+label::after{color:#4183d7}.radio3.radio-info.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-info.radio-light input:checked+label::after{color:#2caef5}.radio3.radio-success.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-success.radio-light input:checked+label::after{color:#36b846}.radio3.radio-warning.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-warning.radio-light input:checked+label::after{color:#ff9c00}.radio3.radio-danger.radio-light input:checked+label::before{background-color:transparent}.radio3.radio-danger.radio-light input:checked+label::after{color:#e50011}
--------------------------------------------------------------------------------
/execute_task/static/css/dataTables.bootstrap.css:
--------------------------------------------------------------------------------
1 | table.dataTable {
2 | clear: both;
3 | margin-top: 6px !important;
4 | margin-bottom: 6px !important;
5 | max-width: none !important;
6 | }
7 | table.dataTable td,
8 | table.dataTable th {
9 | -webkit-box-sizing: content-box;
10 | -moz-box-sizing: content-box;
11 | box-sizing: content-box;
12 | }
13 | table.dataTable td.dataTables_empty,
14 | table.dataTable th.dataTables_empty {
15 | text-align: center;
16 | }
17 | table.dataTable.nowrap th,
18 | table.dataTable.nowrap td {
19 | white-space: nowrap;
20 | }
21 |
22 | div.dataTables_wrapper div.dataTables_length label {
23 | font-weight: normal;
24 | text-align: left;
25 | white-space: nowrap;
26 | }
27 | div.dataTables_wrapper div.dataTables_length select {
28 | width: 75px;
29 | display: inline-block;
30 | }
31 | div.dataTables_wrapper div.dataTables_filter {
32 | text-align: right;
33 | }
34 | div.dataTables_wrapper div.dataTables_filter label {
35 | font-weight: normal;
36 | white-space: nowrap;
37 | text-align: left;
38 | }
39 | div.dataTables_wrapper div.dataTables_filter input {
40 | margin-left: 0.5em;
41 | display: inline-block;
42 | width: auto;
43 | }
44 | div.dataTables_wrapper div.dataTables_info {
45 | padding-top: 8px;
46 | white-space: nowrap;
47 | }
48 | div.dataTables_wrapper div.dataTables_paginate {
49 | margin: 0;
50 | white-space: nowrap;
51 | text-align: right;
52 | }
53 | div.dataTables_wrapper div.dataTables_paginate ul.pagination {
54 | margin: 2px 0;
55 | white-space: nowrap;
56 | }
57 | div.dataTables_wrapper div.dataTables_processing {
58 | position: absolute;
59 | top: 50%;
60 | left: 50%;
61 | width: 200px;
62 | margin-left: -100px;
63 | margin-top: -26px;
64 | text-align: center;
65 | padding: 1em 0;
66 | }
67 |
68 | table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
69 | table.dataTable thead > tr > td.sorting_asc,
70 | table.dataTable thead > tr > td.sorting_desc,
71 | table.dataTable thead > tr > td.sorting {
72 | padding-right: 30px;
73 | }
74 | table.dataTable thead > tr > th:active,
75 | table.dataTable thead > tr > td:active {
76 | outline: none;
77 | }
78 | table.dataTable thead .sorting,
79 | table.dataTable thead .sorting_asc,
80 | table.dataTable thead .sorting_desc,
81 | table.dataTable thead .sorting_asc_disabled,
82 | table.dataTable thead .sorting_desc_disabled {
83 | cursor: pointer;
84 | position: relative;
85 | }
86 | table.dataTable thead .sorting:after,
87 | table.dataTable thead .sorting_asc:after,
88 | table.dataTable thead .sorting_desc:after,
89 | table.dataTable thead .sorting_asc_disabled:after,
90 | table.dataTable thead .sorting_desc_disabled:after {
91 | position: absolute;
92 | bottom: 8px;
93 | right: 8px;
94 | display: block;
95 | font-family: 'Glyphicons Halflings';
96 | opacity: 0.5;
97 | }
98 | table.dataTable thead .sorting:after {
99 | opacity: 0.2;
100 | content: "\e150";
101 | /* sort */
102 | }
103 | table.dataTable thead .sorting_asc:after {
104 | content: "\e155";
105 | /* sort-by-attributes */
106 | }
107 | table.dataTable thead .sorting_desc:after {
108 | content: "\e156";
109 | /* sort-by-attributes-alt */
110 | }
111 | table.dataTable thead .sorting_asc_disabled:after,
112 | table.dataTable thead .sorting_desc_disabled:after {
113 | color: #eee;
114 | }
115 |
116 | div.dataTables_scrollHead table.dataTable {
117 | margin-bottom: 0 !important;
118 | }
119 |
120 | div.dataTables_scrollBody table {
121 | border-top: none;
122 | margin-top: 0 !important;
123 | margin-bottom: 0 !important;
124 | }
125 | div.dataTables_scrollBody table thead .sorting:after,
126 | div.dataTables_scrollBody table thead .sorting_asc:after,
127 | div.dataTables_scrollBody table thead .sorting_desc:after {
128 | display: none;
129 | }
130 | div.dataTables_scrollBody table tbody tr:first-child th,
131 | div.dataTables_scrollBody table tbody tr:first-child td {
132 | border-top: none;
133 | }
134 |
135 | div.dataTables_scrollFoot table {
136 | margin-top: 0 !important;
137 | border-top: none;
138 | }
139 |
140 | @media screen and (max-width: 767px) {
141 | div.dataTables_wrapper div.dataTables_length,
142 | div.dataTables_wrapper div.dataTables_filter,
143 | div.dataTables_wrapper div.dataTables_info,
144 | div.dataTables_wrapper div.dataTables_paginate {
145 | text-align: center;
146 | }
147 | }
148 | table.dataTable.table-condensed > thead > tr > th {
149 | padding-right: 20px;
150 | }
151 | table.dataTable.table-condensed .sorting:after,
152 | table.dataTable.table-condensed .sorting_asc:after,
153 | table.dataTable.table-condensed .sorting_desc:after {
154 | top: 6px;
155 | right: 6px;
156 | }
157 |
158 | table.table-bordered.dataTable {
159 | border-collapse: separate !important;
160 | }
161 | table.table-bordered.dataTable th,
162 | table.table-bordered.dataTable td {
163 | border-left-width: 0;
164 | }
165 | table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
166 | table.table-bordered.dataTable td:last-child,
167 | table.table-bordered.dataTable td:last-child {
168 | border-right-width: 0;
169 | }
170 | table.table-bordered.dataTable tbody th,
171 | table.table-bordered.dataTable tbody td {
172 | border-bottom-width: 0;
173 | }
174 |
175 | div.dataTables_scrollHead table.table-bordered {
176 | border-bottom-width: 0;
177 | }
178 |
179 | div.table-responsive > div.dataTables_wrapper > div.row {
180 | margin: 0;
181 | }
182 | div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
183 | padding-left: 0;
184 | }
185 | div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
186 | padding-right: 0;
187 | }
188 |
--------------------------------------------------------------------------------
/execute_task/static/css/jquery.dataTables.min.css:
--------------------------------------------------------------------------------
1 | table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;border-spacing:0}table.dataTable thead th,table.dataTable tfoot th{font-weight:bold}table.dataTable thead th,table.dataTable thead td{padding:10px 18px;border-bottom:1px solid #111}table.dataTable thead th:active,table.dataTable thead td:active{outline:none}table.dataTable tfoot th,table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{cursor:pointer;*cursor:hand}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}table.dataTable tbody tr{background-color:#ffffff}table.dataTable tbody tr.selected{background-color:#B0BED9}table.dataTable tbody th,table.dataTable tbody td{padding:8px 10px}table.dataTable.row-border tbody th,table.dataTable.row-border tbody td,table.dataTable.display tbody th,table.dataTable.display tbody td{border-top:1px solid #ddd}table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td,table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th,table.dataTable.cell-border tbody td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child{border-left:1px solid #ddd}table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.stripe tbody tr.odd,table.dataTable.display tbody tr.odd{background-color:#f9f9f9}table.dataTable.stripe tbody tr.odd.selected,table.dataTable.display tbody tr.odd.selected{background-color:#acbad4}table.dataTable.hover tbody tr:hover,table.dataTable.display tbody tr:hover{background-color:#f6f6f6}table.dataTable.hover tbody tr:hover.selected,table.dataTable.display tbody tr:hover.selected{background-color:#aab7d1}table.dataTable.order-column tbody tr>.sorting_1,table.dataTable.order-column tbody tr>.sorting_2,table.dataTable.order-column tbody tr>.sorting_3,table.dataTable.display tbody tr>.sorting_1,table.dataTable.display tbody tr>.sorting_2,table.dataTable.display tbody tr>.sorting_3{background-color:#fafafa}table.dataTable.order-column tbody tr.selected>.sorting_1,table.dataTable.order-column tbody tr.selected>.sorting_2,table.dataTable.order-column tbody tr.selected>.sorting_3,table.dataTable.display tbody tr.selected>.sorting_1,table.dataTable.display tbody tr.selected>.sorting_2,table.dataTable.display tbody tr.selected>.sorting_3{background-color:#acbad5}table.dataTable.display tbody tr.odd>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.display tbody tr.odd>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.display tbody tr.odd>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:whitesmoke}table.dataTable.display tbody tr.odd.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.dataTable.display tbody tr.odd.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.dataTable.display tbody tr.odd.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.dataTable.display tbody tr.even>.sorting_1,table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#fafafa}table.dataTable.display tbody tr.even>.sorting_2,table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fcfcfc}table.dataTable.display tbody tr.even>.sorting_3,table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fefefe}table.dataTable.display tbody tr.even.selected>.sorting_1,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad5}table.dataTable.display tbody tr.even.selected>.sorting_2,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#aebcd6}table.dataTable.display tbody tr.even.selected>.sorting_3,table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.display tbody tr:hover>.sorting_1,table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.display tbody tr:hover>.sorting_2,table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ececec}table.dataTable.display tbody tr:hover>.sorting_3,table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#efefef}table.dataTable.display tbody tr:hover.selected>.sorting_1,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a2aec7}table.dataTable.display tbody tr:hover.selected>.sorting_2,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.dataTable.display tbody tr:hover.selected>.sorting_3,table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.dataTable.no-footer{border-bottom:1px solid #111}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th,table.dataTable.compact thead td{padding:4px 17px 4px 4px}table.dataTable.compact tfoot th,table.dataTable.compact tfoot td{padding:4px}table.dataTable.compact tbody th,table.dataTable.compact tbody td{padding:4px}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable,table.dataTable th,table.dataTable td{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.dataTables_wrapper .dataTables_length{float:left}.dataTables_wrapper .dataTables_filter{float:right;text-align:right}.dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%, #111 100%)}.dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);box-shadow:inset 0 0 3px #111}.dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate{color:#333}.dataTables_wrapper .dataTables_scroll{clear:both}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{vertical-align:middle}.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.dataTables_wrapper.no-footer div.dataTables_scrollHead table,.dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter{float:none;text-align:center}.dataTables_wrapper .dataTables_filter{margin-top:0.5em}}
2 |
--------------------------------------------------------------------------------
/execute_task/static/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/execute_task/static/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/execute_task/static/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/execute_task/static/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/execute_task/static/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/execute_task/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/execute_task/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/execute_task/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/execute_task/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/execute_task/static/img/app-header-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/app-header-bg.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/backdrop/micro_carbon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/backdrop/micro_carbon.png
--------------------------------------------------------------------------------
/execute_task/static/img/backdrop/tactile_noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/backdrop/tactile_noise.png
--------------------------------------------------------------------------------
/execute_task/static/img/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/bg.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/bg/picjumbo.com_HNCK3558.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/bg/picjumbo.com_HNCK3558.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/contact-us-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/contact-us-bg.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/profile/picjumbo.com_HNCK4153_resize.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/profile/picjumbo.com_HNCK4153_resize.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/profile/profile-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/profile/profile-1.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/screenshots/dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/screenshots/dashboard.png
--------------------------------------------------------------------------------
/execute_task/static/img/screenshots/landing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/screenshots/landing.png
--------------------------------------------------------------------------------
/execute_task/static/img/screenshots/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/screenshots/login.png
--------------------------------------------------------------------------------
/execute_task/static/img/screenshots/theming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/screenshots/theming.png
--------------------------------------------------------------------------------
/execute_task/static/img/thumbnails/picjumbo.com_HNCK4737.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/thumbnails/picjumbo.com_HNCK4737.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/thumbnails/picjumbo.com_IMG_3241.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/thumbnails/picjumbo.com_IMG_3241.jpg
--------------------------------------------------------------------------------
/execute_task/static/img/thumbnails/picjumbo.com_IMG_4566.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/img/thumbnails/picjumbo.com_IMG_4566.jpg
--------------------------------------------------------------------------------
/execute_task/static/js/ace/theme-github.js:
--------------------------------------------------------------------------------
1 | define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
2 |
3 | exports.isDark = false;
4 | exports.cssClass = "ace-github";
5 | exports.cssText = "\
6 | .ace-github .ace_gutter {\
7 | background: #e8e8e8;\
8 | color: #AAA;\
9 | }\
10 | .ace-github {\
11 | background: #fff;\
12 | color: #000;\
13 | }\
14 | .ace-github .ace_keyword {\
15 | font-weight: bold;\
16 | }\
17 | .ace-github .ace_string {\
18 | color: #D14;\
19 | }\
20 | .ace-github .ace_variable.ace_class {\
21 | color: teal;\
22 | }\
23 | .ace-github .ace_constant.ace_numeric {\
24 | color: #099;\
25 | }\
26 | .ace-github .ace_constant.ace_buildin {\
27 | color: #0086B3;\
28 | }\
29 | .ace-github .ace_support.ace_function {\
30 | color: #0086B3;\
31 | }\
32 | .ace-github .ace_comment {\
33 | color: #998;\
34 | font-style: italic;\
35 | }\
36 | .ace-github .ace_variable.ace_language {\
37 | color: #0086B3;\
38 | }\
39 | .ace-github .ace_paren {\
40 | font-weight: bold;\
41 | }\
42 | .ace-github .ace_boolean {\
43 | font-weight: bold;\
44 | }\
45 | .ace-github .ace_string.ace_regexp {\
46 | color: #009926;\
47 | font-weight: normal;\
48 | }\
49 | .ace-github .ace_variable.ace_instance {\
50 | color: teal;\
51 | }\
52 | .ace-github .ace_constant.ace_language {\
53 | font-weight: bold;\
54 | }\
55 | .ace-github .ace_cursor {\
56 | color: black;\
57 | }\
58 | .ace-github.ace_focus .ace_marker-layer .ace_active-line {\
59 | background: rgb(255, 255, 204);\
60 | }\
61 | .ace-github .ace_marker-layer .ace_active-line {\
62 | background: rgb(245, 245, 245);\
63 | }\
64 | .ace-github .ace_marker-layer .ace_selection {\
65 | background: rgb(181, 213, 255);\
66 | }\
67 | .ace-github.ace_multiselect .ace_selection.ace_start {\
68 | box-shadow: 0 0 3px 0px white;\
69 | }\
70 | .ace-github.ace_nobold .ace_line > span {\
71 | font-weight: normal !important;\
72 | }\
73 | .ace-github .ace_marker-layer .ace_step {\
74 | background: rgb(252, 255, 0);\
75 | }\
76 | .ace-github .ace_marker-layer .ace_stack {\
77 | background: rgb(164, 229, 101);\
78 | }\
79 | .ace-github .ace_marker-layer .ace_bracket {\
80 | margin: -1px 0 0 -1px;\
81 | border: 1px solid rgb(192, 192, 192);\
82 | }\
83 | .ace-github .ace_gutter-active-line {\
84 | background-color : rgba(0, 0, 0, 0.07);\
85 | }\
86 | .ace-github .ace_marker-layer .ace_selected-word {\
87 | background: rgb(250, 250, 255);\
88 | border: 1px solid rgb(200, 200, 250);\
89 | }\
90 | .ace-github .ace_invisible {\
91 | color: #BFBFBF\
92 | }\
93 | .ace-github .ace_print-margin {\
94 | width: 1px;\
95 | background: #e8e8e8;\
96 | }\
97 | .ace-github .ace_indent-guide {\
98 | background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
99 | }";
100 |
101 | var dom = require("../lib/dom");
102 | dom.importCssString(exports.cssText, exports.cssClass);
103 | });
104 |
--------------------------------------------------------------------------------
/execute_task/static/js/app.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | $(".navbar-expand-toggle").click(function() {
3 | $(".app-container").toggleClass("expanded");
4 | return $(".navbar-expand-toggle").toggleClass("fa-rotate-90");
5 | });
6 | return $(".navbar-right-expand-toggle").click(function() {
7 | $(".navbar-right").toggleClass("expanded");
8 | return $(".navbar-right-expand-toggle").toggleClass("fa-rotate-90");
9 | });
10 | });
11 |
12 | $(function() {
13 | return $('select').select2();
14 | });
15 |
16 | $(function() {
17 | return $('.toggle-checkbox').bootstrapSwitch({
18 | size: "small"
19 | });
20 | });
21 |
22 | $(function() {
23 | return $('.match-height').matchHeight();
24 | });
25 |
26 | $(function() {
27 | return $('.datatable').DataTable({
28 | "dom": '<"top"fl<"clear">>rt<"bottom"ip<"clear">>'
29 | });
30 | });
31 |
32 | $(function() {
33 | return $(".side-menu .nav .dropdown").on('show.bs.collapse', function() {
34 | return $(".side-menu .nav .dropdown .collapse").collapse('hide');
35 | });
36 | });
37 |
--------------------------------------------------------------------------------
/execute_task/static/js/bootstrap-switch.min.js:
--------------------------------------------------------------------------------
1 | /* ========================================================================
2 | * bootstrap-switch - v3.3.2
3 | * http://www.bootstrap-switch.org
4 | * ========================================================================
5 | * Copyright 2012-2013 Mattia Larentis
6 | *
7 | * ========================================================================
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | * ========================================================================
20 | */
21 |
22 | (function(){var t=[].slice;!function(e,i){"use strict";var n;return n=function(){function t(t,i){null==i&&(i={}),this.$element=e(t),this.options=e.extend({},e.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")},i),this.$wrapper=e("
",{"class":function(t){return function(){var e;return e=[""+t.options.baseClass].concat(t._getClasses(t.options.wrapperClass)),e.push(t.options.state?""+t.options.baseClass+"-on":""+t.options.baseClass+"-off"),null!=t.options.size&&e.push(""+t.options.baseClass+"-"+t.options.size),t.options.disabled&&e.push(""+t.options.baseClass+"-disabled"),t.options.readonly&&e.push(""+t.options.baseClass+"-readonly"),t.options.indeterminate&&e.push(""+t.options.baseClass+"-indeterminate"),t.options.inverse&&e.push(""+t.options.baseClass+"-inverse"),t.$element.attr("id")&&e.push(""+t.options.baseClass+"-id-"+t.$element.attr("id")),e.join(" ")}}(this)()}),this.$container=e("
",{"class":""+this.options.baseClass+"-container"}),this.$on=e("
",{html:this.options.onText,"class":""+this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=e("",{html:this.options.offText,"class":""+this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=e("",{html:this.options.labelText,"class":""+this.options.baseClass+"-label"}),this.$element.on("init.bootstrapSwitch",function(e){return function(){return e.options.onInit.apply(t,arguments)}}(this)),this.$element.on("switchChange.bootstrapSwitch",function(e){return function(){return e.options.onSwitchChange.apply(t,arguments)}}(this)),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch")}return t.prototype._constructor=t,t.prototype.state=function(t,e){return"undefined"==typeof t?this.options.state:this.options.disabled||this.options.readonly?this.$element:this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.options.indeterminate&&this.indeterminate(!1),t=!!t,this.$element.prop("checked",t).trigger("change.bootstrapSwitch",e),this.$element)},t.prototype.toggleState=function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)},t.prototype.size=function(t){return"undefined"==typeof t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(""+this.options.baseClass+"-"+this.options.size),t&&this.$wrapper.addClass(""+this.options.baseClass+"-"+t),this._width(),this._containerPosition(),this.options.size=t,this.$element)},t.prototype.animate=function(t){return"undefined"==typeof t?this.options.animate:(t=!!t,t===this.options.animate?this.$element:this.toggleAnimate())},t.prototype.toggleAnimate=function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(""+this.options.baseClass+"-animate"),this.$element},t.prototype.disabled=function(t){return"undefined"==typeof t?this.options.disabled:(t=!!t,t===this.options.disabled?this.$element:this.toggleDisabled())},t.prototype.toggleDisabled=function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(""+this.options.baseClass+"-disabled"),this.$element},t.prototype.readonly=function(t){return"undefined"==typeof t?this.options.readonly:(t=!!t,t===this.options.readonly?this.$element:this.toggleReadonly())},t.prototype.toggleReadonly=function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(""+this.options.baseClass+"-readonly"),this.$element},t.prototype.indeterminate=function(t){return"undefined"==typeof t?this.options.indeterminate:(t=!!t,t===this.options.indeterminate?this.$element:this.toggleIndeterminate())},t.prototype.toggleIndeterminate=function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(""+this.options.baseClass+"-indeterminate"),this._containerPosition(),this.$element},t.prototype.inverse=function(t){return"undefined"==typeof t?this.options.inverse:(t=!!t,t===this.options.inverse?this.$element:this.toggleInverse())},t.prototype.toggleInverse=function(){var t,e;return this.$wrapper.toggleClass(""+this.options.baseClass+"-inverse"),e=this.$on.clone(!0),t=this.$off.clone(!0),this.$on.replaceWith(t),this.$off.replaceWith(e),this.$on=t,this.$off=e,this.options.inverse=!this.options.inverse,this.$element},t.prototype.onColor=function(t){var e;return e=this.options.onColor,"undefined"==typeof t?e:(null!=e&&this.$on.removeClass(""+this.options.baseClass+"-"+e),this.$on.addClass(""+this.options.baseClass+"-"+t),this.options.onColor=t,this.$element)},t.prototype.offColor=function(t){var e;return e=this.options.offColor,"undefined"==typeof t?e:(null!=e&&this.$off.removeClass(""+this.options.baseClass+"-"+e),this.$off.addClass(""+this.options.baseClass+"-"+t),this.options.offColor=t,this.$element)},t.prototype.onText=function(t){return"undefined"==typeof t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)},t.prototype.offText=function(t){return"undefined"==typeof t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)},t.prototype.labelText=function(t){return"undefined"==typeof t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)},t.prototype.handleWidth=function(t){return"undefined"==typeof t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.labelWidth=function(t){return"undefined"==typeof t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.baseClass=function(){return this.options.baseClass},t.prototype.wrapperClass=function(t){return"undefined"==typeof t?this.options.wrapperClass:(t||(t=e.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)},t.prototype.radioAllOff=function(t){return"undefined"==typeof t?this.options.radioAllOff:(t=!!t,t===this.options.radioAllOff?this.$element:(this.options.radioAllOff=t,this.$element))},t.prototype.onInit=function(t){return"undefined"==typeof t?this.options.onInit:(t||(t=e.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)},t.prototype.onSwitchChange=function(t){return"undefined"==typeof t?this.options.onSwitchChange:(t||(t=e.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)},t.prototype.destroy=function(){var t;return t=this.$element.closest("form"),t.length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},t.prototype._width=function(){var t,e;return t=this.$on.add(this.$off),t.add(this.$label).css("width",""),e="auto"===this.options.handleWidth?Math.max(this.$on.width(),this.$off.width()):this.options.handleWidth,t.width(e),this.$label.width(function(t){return function(i,n){return"auto"!==t.options.labelWidth?t.options.labelWidth:e>n?e:n}}(this)),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)},t.prototype._containerPosition=function(t,e){return null==t&&(t=this.options.state),this.$container.css("margin-left",function(e){return function(){var i;return i=[0,"-"+e._handleWidth+"px"],e.options.indeterminate?"-"+e._handleWidth/2+"px":t?e.options.inverse?i[1]:i[0]:e.options.inverse?i[0]:i[1]}}(this)),e?setTimeout(function(){return e()},50):void 0},t.prototype._init=function(){var t,e;return t=function(t){return function(){return t._width(),t._containerPosition(null,function(){return t.options.animate?t.$wrapper.addClass(""+t.options.baseClass+"-animate"):void 0})}}(this),this.$wrapper.is(":visible")?t():e=i.setInterval(function(n){return function(){return n.$wrapper.is(":visible")?(t(),i.clearInterval(e)):void 0}}(this),50)},t.prototype._elementHandlers=function(){return this.$element.on({"change.bootstrapSwitch":function(t){return function(i,n){var o;return i.preventDefault(),i.stopImmediatePropagation(),o=t.$element.is(":checked"),t._containerPosition(o),o!==t.options.state?(t.options.state=o,t.$wrapper.toggleClass(""+t.options.baseClass+"-off").toggleClass(""+t.options.baseClass+"-on"),n?void 0:(t.$element.is(":radio")&&e("[name='"+t.$element.attr("name")+"']").not(t.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),t.$element.trigger("switchChange.bootstrapSwitch",[o]))):void 0}}(this),"focus.bootstrapSwitch":function(t){return function(e){return e.preventDefault(),t.$wrapper.addClass(""+t.options.baseClass+"-focused")}}(this),"blur.bootstrapSwitch":function(t){return function(e){return e.preventDefault(),t.$wrapper.removeClass(""+t.options.baseClass+"-focused")}}(this),"keydown.bootstrapSwitch":function(t){return function(e){if(e.which&&!t.options.disabled&&!t.options.readonly)switch(e.which){case 37:return e.preventDefault(),e.stopImmediatePropagation(),t.state(!1);case 39:return e.preventDefault(),e.stopImmediatePropagation(),t.state(!0)}}}(this)})},t.prototype._handleHandlers=function(){return this.$on.on("click.bootstrapSwitch",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.state(!1),t.$element.trigger("focus.bootstrapSwitch")}}(this)),this.$off.on("click.bootstrapSwitch",function(t){return function(e){return e.preventDefault(),e.stopPropagation(),t.state(!0),t.$element.trigger("focus.bootstrapSwitch")}}(this))},t.prototype._labelHandlers=function(){return this.$label.on({"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(t){return function(e){return t._dragStart||t.options.disabled||t.options.readonly?void 0:(e.preventDefault(),e.stopPropagation(),t._dragStart=(e.pageX||e.originalEvent.touches[0].pageX)-parseInt(t.$container.css("margin-left"),10),t.options.animate&&t.$wrapper.removeClass(""+t.options.baseClass+"-animate"),t.$element.trigger("focus.bootstrapSwitch"))}}(this),"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(t){return function(e){var i;if(null!=t._dragStart&&(e.preventDefault(),i=(e.pageX||e.originalEvent.touches[0].pageX)-t._dragStart,!(i<-t._handleWidth||i>0)))return t._dragEnd=i,t.$container.css("margin-left",""+t._dragEnd+"px")}}(this),"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(t){return function(e){var i;if(t._dragStart)return e.preventDefault(),t.options.animate&&t.$wrapper.addClass(""+t.options.baseClass+"-animate"),t._dragEnd?(i=t._dragEnd>-(t._handleWidth/2),t._dragEnd=!1,t.state(t.options.inverse?!i:i)):t.state(!t.options.state),t._dragStart=!1}}(this),"mouseleave.bootstrapSwitch":function(t){return function(){return t.$label.trigger("mouseup.bootstrapSwitch")}}(this)})},t.prototype._externalLabelHandler=function(){var t;return t=this.$element.closest("label"),t.on("click",function(e){return function(i){return i.preventDefault(),i.stopImmediatePropagation(),i.target===t[0]?e.toggleState():void 0}}(this))},t.prototype._formHandler=function(){var t;return t=this.$element.closest("form"),t.data("bootstrap-switch")?void 0:t.on("reset.bootstrapSwitch",function(){return i.setTimeout(function(){return t.find("input").filter(function(){return e(this).data("bootstrap-switch")}).each(function(){return e(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},t.prototype._getClasses=function(t){var i,n,o,s;if(!e.isArray(t))return[""+this.options.baseClass+"-"+t];for(n=[],o=0,s=t.length;s>o;o++)i=t[o],n.push(""+this.options.baseClass+"-"+i);return n},t}(),e.fn.bootstrapSwitch=function(){var i,o,s;return o=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],s=this,this.each(function(){var t,a;return t=e(this),a=t.data("bootstrap-switch"),a||t.data("bootstrap-switch",a=new n(this,o)),"string"==typeof o?s=a[o].apply(a,i):void 0}),s},e.fn.bootstrapSwitch.Constructor=n,e.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:" ",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}(window.jQuery,window)}).call(this);
--------------------------------------------------------------------------------
/execute_task/static/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,e){a||(a=window);if(!e||!e.fn.dataTable)e=require("datatables.net")(a,e).$;return b(e,a,a.document)}:b(jQuery,window,document)})(function(b,a,e){var d=b.fn.dataTable;b.extend(!0,d.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(d.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"});d.ext.renderer.pageButton.bootstrap=function(a,h,r,m,j,n){var o=new d.Api(a),s=a.oClasses,k=a.oLanguage.oPaginate,t=a.oLanguage.oAria.paginate||{},f,g,p=0,q=function(d,e){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=e.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(f)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(e.activeElement).data("dt-idx")}catch(u){}q(b(h).empty().html('').children("ul"),m);i&&b(h).find("[data-dt-idx="+i+"]").focus()};d.TableTools&&(b.extend(!0,d.TableTools.classes,{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",
9 | buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info"},select:{row:"active"}}),b.extend(!0,d.TableTools.DEFAULTS.oTags,{collection:{container:"ul",button:"li",liner:"a"}}));return d});
10 |
--------------------------------------------------------------------------------
/execute_task/static/js/index.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | var ctx, data, myLineChart, options;
3 | Chart.defaults.global.responsive = true;
4 | ctx = $('#jumbotron-line-chart').get(0).getContext('2d');
5 | options = {
6 | showScale: false,
7 | scaleShowGridLines: false,
8 | scaleGridLineColor: "rgba(0,0,0,.05)",
9 | scaleGridLineWidth: 0,
10 | scaleShowHorizontalLines: false,
11 | scaleShowVerticalLines: false,
12 | bezierCurve: false,
13 | bezierCurveTension: 0.4,
14 | pointDot: false,
15 | pointDotRadius: 0,
16 | pointDotStrokeWidth: 2,
17 | pointHitDetectionRadius: 20,
18 | datasetStroke: true,
19 | datasetStrokeWidth: 4,
20 | datasetFill: true,
21 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
22 | };
23 | data = {
24 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
25 | datasets: [
26 | {
27 | label: "My Second dataset",
28 | fillColor: "rgba(34, 167, 240,0.2)",
29 | strokeColor: "#22A7F0",
30 | pointColor: "#22A7F0",
31 | pointStrokeColor: "#fff",
32 | pointHighlightFill: "#fff",
33 | pointHighlightStroke: "#22A7F0",
34 | data: [28, 48, 40, 45, 76, 65, 90]
35 | }
36 | ]
37 | };
38 | myLineChart = new Chart(ctx).Line(data, options);
39 | });
40 |
41 | $(function() {
42 | var ctx, data, myBarChart, option_bars;
43 | Chart.defaults.global.responsive = true;
44 | ctx = $('#jumbotron-bar-chart').get(0).getContext('2d');
45 | option_bars = {
46 | showScale: false,
47 | scaleShowGridLines: false,
48 | scaleBeginAtZero: true,
49 | scaleShowGridLines: true,
50 | scaleGridLineColor: "rgba(0,0,0,.05)",
51 | scaleGridLineWidth: 1,
52 | scaleShowHorizontalLines: false,
53 | scaleShowVerticalLines: false,
54 | barShowStroke: true,
55 | barStrokeWidth: 1,
56 | barValueSpacing: 7,
57 | barDatasetSpacing: 3,
58 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
59 | };
60 | data = {
61 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
62 | datasets: [
63 | {
64 | label: "My First dataset",
65 | fillColor: "rgba(26, 188, 156,0.6)",
66 | strokeColor: "#1ABC9C",
67 | pointColor: "#1ABC9C",
68 | pointStrokeColor: "#fff",
69 | pointHighlightFill: "#fff",
70 | pointHighlightStroke: "#1ABC9C",
71 | data: [65, 59, 80, 81, 56, 55, 40]
72 | }, {
73 | label: "My Second dataset",
74 | fillColor: "rgba(34, 167, 240,0.6)",
75 | strokeColor: "#22A7F0",
76 | pointColor: "#22A7F0",
77 | pointStrokeColor: "#fff",
78 | pointHighlightFill: "#fff",
79 | pointHighlightStroke: "#22A7F0",
80 | data: [28, 48, 40, 19, 86, 27, 90]
81 | }
82 | ]
83 | };
84 | myBarChart = new Chart(ctx).Bar(data, option_bars);
85 | });
86 |
87 | $(function() {
88 | var ctx, data, myLineChart, options;
89 | Chart.defaults.global.responsive = true;
90 | ctx = $('#jumbotron-line-2-chart').get(0).getContext('2d');
91 | options = {
92 | showScale: false,
93 | scaleShowGridLines: false,
94 | scaleGridLineColor: "rgba(0,0,0,.05)",
95 | scaleGridLineWidth: 0,
96 | scaleShowHorizontalLines: false,
97 | scaleShowVerticalLines: false,
98 | bezierCurve: false,
99 | bezierCurveTension: 0.4,
100 | pointDot: false,
101 | pointDotRadius: 0,
102 | pointDotStrokeWidth: 2,
103 | pointHitDetectionRadius: 20,
104 | datasetStroke: true,
105 | datasetStrokeWidth: 3,
106 | datasetFill: true,
107 | legendTemplate: "-legend\"><% for (var i=0; i- \"><%if(datasets[i].label){%><%=datasets[i].label%><%}%>
<%}%>
"
108 | };
109 | data = {
110 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
111 | datasets: [
112 | {
113 | label: "My First dataset",
114 | fillColor: "rgba(26, 188, 156,0.2)",
115 | strokeColor: "#1ABC9C",
116 | pointColor: "#1ABC9C",
117 | pointStrokeColor: "#fff",
118 | pointHighlightFill: "#fff",
119 | pointHighlightStroke: "#1ABC9C",
120 | data: [65, 59, 80, 81, 56, 55, 40]
121 | }, {
122 | label: "My Second dataset",
123 | fillColor: "rgba(34, 167, 240,0.2)",
124 | strokeColor: "#22A7F0",
125 | pointColor: "#22A7F0",
126 | pointStrokeColor: "#fff",
127 | pointHighlightFill: "#fff",
128 | pointHighlightStroke: "#22A7F0",
129 | data: [28, 48, 40, 19, 86, 27, 90]
130 | }
131 | ]
132 | };
133 | myLineChart = new Chart(ctx).Line(data, options);
134 | });
135 |
--------------------------------------------------------------------------------
/execute_task/static/js/jquery.matchHeight-min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * jquery.matchHeight-min.js master
3 | * http://brm.io/jquery-match-height/
4 | * License: MIT
5 | */
6 | (function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight=
7 | function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this);
8 | a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b="inline-block"===a.css("display")?"inline-block":"block";a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),f=0;if(d.target)f=
9 | d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b={display:"inline-block"===a.css("display")?"inline-block":"block"};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),a.css(d.property,
10 | f-b))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements,
11 | this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1},b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery);
--------------------------------------------------------------------------------
/execute_task/static/vue/axios.min.js:
--------------------------------------------------------------------------------
1 | /* axios v0.18.0 | (c) 2018 by Matt Zabriskie */
2 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new s(e),n=i(s.prototype.request,t);return o.extend(n,s.prototype,t),o.extend(n,t),n}var o=n(2),i=n(3),s=n(5),u=n(6),a=r(u);a.Axios=s,a.create=function(e){return r(o.merge(u,e))},a.Cancel=n(23),a.CancelToken=n(24),a.isCancel=n(20),a.all=function(e){return Promise.all(e)},a.spread=n(25),e.exports=a,e.exports.default=a},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"[object ArrayBuffer]"===R.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function s(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function u(e){return"string"==typeof e}function a(e){return"number"==typeof e}function c(e){return"undefined"==typeof e}function f(e){return null!==e&&"object"==typeof e}function p(e){return"[object Date]"===R.call(e)}function d(e){return"[object File]"===R.call(e)}function l(e){return"[object Blob]"===R.call(e)}function h(e){return"[object Function]"===R.call(e)}function m(e){return f(e)&&h(e.pipe)}function y(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function w(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function v(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n
6 | * @license MIT
7 | */
8 | e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new s,response:new s}}var o=n(6),i=n(2),s=n(17),u=n(18);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[u,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";function r(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function o(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(8):"undefined"!=typeof process&&(e=n(8)),e}var i=n(2),s=n(7),u={"Content-Type":"application/x-www-form-urlencoded"},a={adapter:o(),transformRequest:[function(e,t){return s(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(e){a.headers[e]={}}),i.forEach(["post","put","patch"],function(e){a.headers[e]=i.merge(u)}),e.exports=a},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(9),i=n(12),s=n(13),u=n(14),a=n(10),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(15);e.exports=function(e){return new Promise(function(t,f){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||u(e.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),e.auth){var y=e.auth.username||"",w=e.auth.password||"";d.Authorization="Basic "+c(y+":"+w)}if(l.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?s(l.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:r,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:e,request:l};o(t,f,i),l=null}},l.onerror=function(){f(a("Network Error",e,null,l)),l=null},l.ontimeout=function(){f(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=n(16),v=(e.withCredentials||u(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;v&&(d[e.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),e.withCredentials&&(l.withCredentials=!0),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),f(e),l=null)}),void 0===p&&(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(2);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var s=[];o.forEach(t,function(e,t){null!==e&&"undefined"!=typeof e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),s.push(r(t)+"="+r(e))}))}),i=s.join("&")}return i&&(e+=(e.indexOf("?")===-1?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?s[t]=(s[t]?s[t]:[]).concat([n]):s[t]=s[t]?s[t]+", "+n:n}}),s):s}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t){"use strict";function n(){this.message="String contains an invalid character"}function r(e){for(var t,r,i=String(e),s="",u=0,a=o;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if(r=i.charCodeAt(u+=.75),r>255)throw new n;t=t<<8|r}return s}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.prototype=new Error,n.prototype.code=5,n.prototype.name="InvalidCharacterError",e.exports=r},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),s===!0&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(2);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(2),i=n(19),s=n(20),u=n(6),a=n(21),c=n(22);e.exports=function(e){r(e),e.baseURL&&!a(e.url)&&(e.url=c(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]});var t=e.adapter||u.adapter;return t(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return s(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])});
9 | //# sourceMappingURL=axios.min.map
--------------------------------------------------------------------------------
/execute_task/static/vue/fonts/element-icons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/vue/fonts/element-icons.ttf
--------------------------------------------------------------------------------
/execute_task/static/vue/fonts/element-icons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/static/vue/fonts/element-icons.woff
--------------------------------------------------------------------------------
/execute_task/task/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__init__.py
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/admin.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/admin.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/auth.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/auth.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/check_data.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/check_data.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/forms.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/forms.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/models.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/models.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/my_form.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/my_form.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/permission.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/permission.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/permission_list.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/permission_list.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/urls.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/urls.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/__pycache__/views.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/__pycache__/views.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/admin.py:
--------------------------------------------------------------------------------
1 | from django.contrib import admin
2 |
3 | # Register your models here.
4 |
5 | from task import models
6 |
7 | class ArticleAdmin(admin.ModelAdmin):
8 | list_display = ('id', 'name',) # 设置多字段显示
9 | list_filter = ('name',) # 显示过滤字段
10 | search_fields = ('name',) # 设置搜索页面里可以搜索的字段
11 |
12 |
13 | class TaskAdmin(admin.ModelAdmin):
14 | list_display = ('id', 'task_group','cmd','user',) # 设置多字段显示
15 | list_filter = ('task_group','cmd',) # 显示过滤字段
16 | search_fields = ('user',) # 设置搜索页面里可以搜索的字段
17 |
18 |
19 | class Task_resultAdmin(admin.ModelAdmin):
20 | list_display = ('id', 'group_name','task_id','task_status',) # 设置多字段显示
21 | list_filter = ('group_name','task_id',) # 显示过滤字段
22 | search_fields = ('group_name',) # 设置搜索页面里可以搜索的字段
23 |
24 |
25 |
26 | class UserInfoAdmin(admin.ModelAdmin):
27 | filter_horizontal = ('to_group', 'to_control')
28 |
29 |
30 | admin.site.register(models.UserInfo,UserInfoAdmin)
31 | admin.site.register(models.Control)
32 | admin.site.register(models.Group)
33 | admin.site.register(models.Groups,ArticleAdmin)
34 | admin.site.register(models.Task,TaskAdmin)
35 | admin.site.register(models.Task_result,Task_resultAdmin)
--------------------------------------------------------------------------------
/execute_task/task/apps.py:
--------------------------------------------------------------------------------
1 | from django.apps import AppConfig
2 |
3 |
4 | class TaskConfig(AppConfig):
5 | name = 'task'
6 |
--------------------------------------------------------------------------------
/execute_task/task/auth.py:
--------------------------------------------------------------------------------
1 | #! /usr/bin/python
2 | # coding:utf-8
3 | # author: sunyang
4 | # api validate
5 | from django.shortcuts import HttpResponse
6 | from execute_task.print_log import print_logs
7 | import json
8 | import time
9 | import hashlib
10 | from django.conf import settings
11 | APPID_LIST = {}
12 |
13 | APPID = settings.APPID
14 | DEL_ID = []
15 |
16 | # 生成md5 现在时间 + appid客户端传递过来的
17 | def md5(appid,new_time):
18 | m = hashlib.md5()
19 | m.update(bytes(appid + new_time,encoding='utf-8'))
20 | return m.hexdigest()
21 |
22 |
23 | #验证主体函数
24 | def auth_status(request):
25 | DEL_ID = []
26 | api_id = request.META.get('HTTP_APPID')
27 | group_name = request.GET.get("group_name")
28 | # 如果客户端传递过来的appid不是用|分开的就报错
29 | try:
30 | appid_md5, client_time = api_id.split('|')
31 | except:
32 | print_logs.error("%s 非法用户连接" % group_name)
33 | return False
34 | local_time = time.time()
35 | float_client_time = float(client_time)
36 | # 大于10秒的请求丢弃
37 | if local_time - 10 > float_client_time:
38 | print_logs.info("%s api 请求大于10秒 请求丢弃"%group_name)
39 | return False
40 | # 循环已有的列表,超过20秒的放到丢弃列表内
41 | for id in APPID_LIST.keys():
42 | if local_time - 20 > APPID_LIST[id]:
43 | DEL_ID.append(id)
44 | # 循环丢弃列表 并且删除这个值
45 | for id in DEL_ID:
46 | print_logs.info("%s api 请求超过20秒 删除"%group_name)
47 | del APPID_LIST[id]
48 | print('del---------------')
49 | # 如果这次访问的api_id在已访问的列表内,证明此id被截获
50 | if api_id in APPID_LIST:
51 | print_logs.error("%s api 请求已经存在列表内,请求拒绝!"%group_name)
52 | return False
53 |
54 | # 如果匹配成功则把api_id当键 时间当value存入
55 | local_md5 = md5(APPID, client_time)
56 | if appid_md5 == local_md5:
57 | APPID_LIST[api_id] = float_client_time
58 | print_logs.info("%s api 请求成功,可以建立连接"% group_name)
59 | return True
60 | else:
61 | print_logs.error("%s api 请求失败,无法建立连接" % group_name)
62 | return False
63 |
64 | # 装饰器
65 | def apiauth(func):
66 | def para(*args, **kwargs):
67 | # 获取验证函数的request
68 | request = args[1]
69 | result = auth_status(request)
70 | print('11111111111',APPID_LIST)
71 | print(result)
72 | if not result:
73 | return HttpResponse(json.dumps({'code':'1001','message':'auth fail'}))
74 | return func(*args, **kwargs)
75 | return para
--------------------------------------------------------------------------------
/execute_task/task/check_data.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | from django.shortcuts import render,HttpResponse
3 | import json
4 |
5 | def check(objects,dic):
6 | objs = objects.filter(dic)
7 | if objs:
8 | return False
9 | return True
10 |
11 |
12 | def check_form(method, model, check_dic,not_edit_field=False):
13 | message = ""
14 | for dic in check_dic:
15 | if not_edit_field:
16 | if dic["field"] in not_edit_field :
17 | continue
18 | method_field = method.get(dic["field"],"")
19 | data_dic = {dic["field"]:method_field}
20 | print(data_dic)
21 | print(len(''.join(list(data_dic.values())[0])))
22 | if not dic["null"]:
23 | print(None in data_dic.values())
24 | if "" in data_dic.values():
25 | print("走了")
26 | message = "%s 项目不能为空!" % dic["name"]
27 | return message
28 |
29 | if len(''.join(list(data_dic.values())[0])) < dic["min_len"]:
30 | print(len(''.join(list(data_dic.values())[0])),"aaa")
31 | message = "%s 长度不能小于%s!" % (dic["name"],dic["min_len"])
32 | return message
33 |
34 | if dic["unique"]:
35 | objs = model.objects.filter(**data_dic)
36 | if objs:
37 | message = "%s 已存在!" % dic["name"]
38 | return message
39 | return message
40 |
--------------------------------------------------------------------------------
/execute_task/task/forms.py:
--------------------------------------------------------------------------------
1 | from django import forms
2 | from django.core.exceptions import ValidationError
3 |
4 | class UserForm(forms.Form):
5 | user = forms.CharField(required=True,min_length=3,error_messages={'required':'用户名不能为空',"min_lenth":"用户名长度不能小于3"})
6 | passwd = forms.CharField(required=True, min_length=8,error_messages={
7 | 'min_length':'密码长度不能小于8','required':'密码不能为空'})
--------------------------------------------------------------------------------
/execute_task/task/migrations/0001_initial.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 09:32
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 | import django.db.models.deletion
7 |
8 |
9 | class Migration(migrations.Migration):
10 |
11 | initial = True
12 |
13 | dependencies = [
14 | ]
15 |
16 | operations = [
17 | migrations.CreateModel(
18 | name='Groups',
19 | fields=[
20 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
21 | ('name', models.CharField(max_length=64, unique=True)),
22 | ],
23 | ),
24 | migrations.CreateModel(
25 | name='Task',
26 | fields=[
27 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
28 | ('task_group', models.CharField(max_length=256)),
29 | ('cmd', models.TextField()),
30 | ('time', models.DateTimeField(default=1524533560.7203975, verbose_name='时间')),
31 | ],
32 | ),
33 | migrations.CreateModel(
34 | name='Task_result',
35 | fields=[
36 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
37 | ('group_name', models.CharField(max_length=64)),
38 | ('task_status', models.BooleanField()),
39 | ('message', models.TextField()),
40 | ('host_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='task.Task')),
41 | ],
42 | ),
43 | ]
44 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0002_auto_20180424_0949.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 09:49
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 | import django.utils.timezone
7 |
8 |
9 | class Migration(migrations.Migration):
10 |
11 | dependencies = [
12 | ('task', '0001_initial'),
13 | ]
14 |
15 | operations = [
16 | migrations.AlterField(
17 | model_name='task',
18 | name='time',
19 | field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='时间'),
20 | ),
21 | ]
22 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0003_auto_20180424_1034.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 10:34
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0002_auto_20180424_0949'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='task',
17 | name='passwd',
18 | field=models.CharField(max_length=64, null=True),
19 | ),
20 | migrations.AddField(
21 | model_name='task',
22 | name='status_user',
23 | field=models.BooleanField(default=False),
24 | ),
25 | migrations.AddField(
26 | model_name='task',
27 | name='user',
28 | field=models.CharField(max_length=32, null=True),
29 | ),
30 | ]
31 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0004_task_hosts.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 10:41
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0003_auto_20180424_1034'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='task',
17 | name='hosts',
18 | field=models.CharField(max_length=256, null=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0005_hosts.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 10:53
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 | import django.db.models.deletion
7 |
8 |
9 | class Migration(migrations.Migration):
10 |
11 | dependencies = [
12 | ('task', '0004_task_hosts'),
13 | ]
14 |
15 | operations = [
16 | migrations.CreateModel(
17 | name='Hosts',
18 | fields=[
19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20 | ('ip', models.CharField(max_length=32)),
21 | ('disk_num', models.CharField(max_length=32)),
22 | ('memory', models.CharField(max_length=32)),
23 | ('cpu', models.CharField(max_length=32)),
24 | ('group_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='task.Groups')),
25 | ],
26 | ),
27 | ]
28 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0006_auto_20180424_1508.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 15:08
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0005_hosts'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='hosts',
17 | name='cpu_model',
18 | field=models.CharField(max_length=32, null=True),
19 | ),
20 | migrations.AddField(
21 | model_name='hosts',
22 | name='disk_capacity',
23 | field=models.CharField(max_length=32, null=True),
24 | ),
25 | ]
26 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0007_user.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-24 15:26
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0006_auto_20180424_1508'),
12 | ]
13 |
14 | operations = [
15 | migrations.CreateModel(
16 | name='User',
17 | fields=[
18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19 | ('username', models.CharField(max_length=32)),
20 | ('passwd', models.CharField(max_length=32)),
21 | ('status', models.BooleanField()),
22 | ],
23 | ),
24 | ]
25 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0008_auto_20180425_1417.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-25 14:17
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0007_user'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='user',
17 | name='status',
18 | field=models.CharField(max_length=32),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0009_auto_20180426_1054.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-26 10:54
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0008_auto_20180425_1417'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='task',
17 | name='cmd',
18 | field=models.TextField(blank=True),
19 | ),
20 | migrations.AlterField(
21 | model_name='task',
22 | name='hosts',
23 | field=models.CharField(blank=True, max_length=256, null=True),
24 | ),
25 | migrations.AlterField(
26 | model_name='task',
27 | name='passwd',
28 | field=models.CharField(blank=True, max_length=64, null=True),
29 | ),
30 | migrations.AlterField(
31 | model_name='task',
32 | name='task_group',
33 | field=models.CharField(blank=True, max_length=256),
34 | ),
35 | migrations.AlterField(
36 | model_name='task',
37 | name='user',
38 | field=models.CharField(blank=True, max_length=32, null=True),
39 | ),
40 | ]
41 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0010_groups_time.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-27 16:57
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0009_auto_20180426_1054'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='groups',
17 | name='time',
18 | field=models.CharField(max_length=64, null=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0011_hosts_v_or_s.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-28 10:34
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0010_groups_time'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='hosts',
17 | name='v_or_s',
18 | field=models.CharField(max_length=32, null=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0012_auto_20180428_1322.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-28 13:22
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0011_hosts_v_or_s'),
12 | ]
13 |
14 | operations = [
15 | migrations.RenameField(
16 | model_name='task_result',
17 | old_name='host_id',
18 | new_name='task_id',
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0013_task_result_ip.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-28 13:42
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0012_auto_20180428_1322'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='task_result',
17 | name='ip',
18 | field=models.CharField(max_length=64, null=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0014_auto_20180428_1354.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-28 13:54
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 | import django.db.models.deletion
7 |
8 |
9 | class Migration(migrations.Migration):
10 |
11 | dependencies = [
12 | ('task', '0013_task_result_ip'),
13 | ]
14 |
15 | operations = [
16 | migrations.AlterField(
17 | model_name='groups',
18 | name='name',
19 | field=models.CharField(max_length=64, unique=True, verbose_name='企业名称'),
20 | ),
21 | migrations.AlterField(
22 | model_name='hosts',
23 | name='cpu',
24 | field=models.CharField(max_length=32, verbose_name='cpu盒数'),
25 | ),
26 | migrations.AlterField(
27 | model_name='hosts',
28 | name='cpu_model',
29 | field=models.CharField(max_length=32, null=True, validators=['c', 'p', 'u', '型', '号']),
30 | ),
31 | migrations.AlterField(
32 | model_name='hosts',
33 | name='disk_capacity',
34 | field=models.CharField(max_length=32, null=True, verbose_name='磁盘总大小'),
35 | ),
36 | migrations.AlterField(
37 | model_name='hosts',
38 | name='disk_num',
39 | field=models.CharField(max_length=32, verbose_name='磁盘数量'),
40 | ),
41 | migrations.AlterField(
42 | model_name='hosts',
43 | name='group_id',
44 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='task.Groups', verbose_name='主机id'),
45 | ),
46 | migrations.AlterField(
47 | model_name='hosts',
48 | name='ip',
49 | field=models.CharField(max_length=32, verbose_name='主机ip'),
50 | ),
51 | migrations.AlterField(
52 | model_name='hosts',
53 | name='memory',
54 | field=models.CharField(max_length=32, verbose_name='内存大小'),
55 | ),
56 | migrations.AlterField(
57 | model_name='hosts',
58 | name='v_or_s',
59 | field=models.CharField(max_length=32, null=True, verbose_name='主机类型'),
60 | ),
61 | ]
62 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0015_auto_20180428_1356.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-04-28 13:56
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0014_auto_20180428_1354'),
12 | ]
13 |
14 | operations = [
15 | migrations.AlterField(
16 | model_name='hosts',
17 | name='cpu_model',
18 | field=models.CharField(max_length=32, null=True, verbose_name='cpu型号'),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0016_auto_20180502_0919.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-05-02 09:19
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0015_auto_20180428_1356'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='user',
17 | name='name',
18 | field=models.CharField(max_length=32, null=True, verbose_name='姓名'),
19 | ),
20 | migrations.AddField(
21 | model_name='user',
22 | name='push_status',
23 | field=models.CharField(max_length=32, null=True),
24 | ),
25 | migrations.AlterField(
26 | model_name='user',
27 | name='username',
28 | field=models.CharField(max_length=32, verbose_name='系统账号名'),
29 | ),
30 | ]
31 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0017_task_login.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-05-02 15:00
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0016_auto_20180502_0919'),
12 | ]
13 |
14 | operations = [
15 | migrations.AddField(
16 | model_name='task',
17 | name='login',
18 | field=models.BooleanField(default=True),
19 | ),
20 | ]
21 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0018_control_group_userinfo.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # Generated by Django 1.11 on 2018-05-04 09:17
3 | from __future__ import unicode_literals
4 |
5 | from django.db import migrations, models
6 |
7 |
8 | class Migration(migrations.Migration):
9 |
10 | dependencies = [
11 | ('task', '0017_task_login'),
12 | ]
13 |
14 | operations = [
15 | migrations.CreateModel(
16 | name='Control',
17 | fields=[
18 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
19 | ('code', models.CharField(max_length=32, verbose_name='权限对应代码')),
20 | ('name', models.CharField(max_length=32, verbose_name='权限名称')),
21 | ],
22 | options={
23 | 'verbose_name_plural': '权限表',
24 | },
25 | ),
26 | migrations.CreateModel(
27 | name='Group',
28 | fields=[
29 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
30 | ('name', models.CharField(max_length=32, verbose_name='组名')),
31 | ('to_control', models.ManyToManyField(blank=True, to='task.Control', verbose_name='权限选择')),
32 | ],
33 | options={
34 | 'verbose_name_plural': '权限组表',
35 | },
36 | ),
37 | migrations.CreateModel(
38 | name='UserInfo',
39 | fields=[
40 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
41 | ('user', models.CharField(max_length=32)),
42 | ('passwd', models.CharField(max_length=32)),
43 | ('name', models.CharField(max_length=32, verbose_name='用户姓名')),
44 | ('to_control', models.ManyToManyField(blank=True, to='task.Control', verbose_name='权限的选择')),
45 | ('to_group', models.ManyToManyField(blank=True, to='task.Group', verbose_name='组的选择')),
46 | ],
47 | options={
48 | 'verbose_name_plural': '用户权限',
49 | },
50 | ),
51 | ]
52 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/0019_hosts_proxy_or_client.py:
--------------------------------------------------------------------------------
1 | # Generated by Django 2.0.3 on 2018-05-09 10:26
2 |
3 | from django.db import migrations, models
4 |
5 |
6 | class Migration(migrations.Migration):
7 |
8 | dependencies = [
9 | ('task', '0018_control_group_userinfo'),
10 | ]
11 |
12 | operations = [
13 | migrations.AddField(
14 | model_name='hosts',
15 | name='proxy_or_client',
16 | field=models.CharField(max_length=32, null=True, verbose_name='服务器类型'),
17 | ),
18 | ]
19 |
--------------------------------------------------------------------------------
/execute_task/task/migrations/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__init__.py
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0001_initial.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0001_initial.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0002_auto_20180424_0949.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0002_auto_20180424_0949.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0003_auto_20180424_1034.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0003_auto_20180424_1034.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0004_task_hosts.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0004_task_hosts.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0005_hosts.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0005_hosts.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0006_auto_20180424_1508.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0006_auto_20180424_1508.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0007_user.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0007_user.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0008_auto_20180425_1417.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0008_auto_20180425_1417.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0009_auto_20180426_1054.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0009_auto_20180426_1054.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0010_groups_time.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0010_groups_time.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0011_hosts_v_or_s.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0011_hosts_v_or_s.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0012_auto_20180428_1322.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0012_auto_20180428_1322.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0013_task_result_ip.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0013_task_result_ip.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0014_auto_20180428_1354.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0014_auto_20180428_1354.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0015_auto_20180428_1356.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0015_auto_20180428_1356.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0016_auto_20180502_0919.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0016_auto_20180502_0919.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0017_task_login.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0017_task_login.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0018_control_group_userinfo.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0018_control_group_userinfo.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/0019_hosts_proxy_or_client.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/0019_hosts_proxy_or_client.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/migrations/__pycache__/__init__.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/s57445560/user_command_web/d0a1a51aaae22c66b9d326bb2ce08c4932fce1a5/execute_task/task/migrations/__pycache__/__init__.cpython-36.pyc
--------------------------------------------------------------------------------
/execute_task/task/models.py:
--------------------------------------------------------------------------------
1 | from django.db import models
2 | from django.utils import timezone
3 | import time
4 | # Create your models here.
5 |
6 | class Groups(models.Model):
7 | name = models.CharField(max_length=64, unique=True,verbose_name="企业名称")
8 | time = models.CharField(max_length=64,null=True)
9 |
10 | def __str__(self):
11 | return self.name
12 |
13 |
14 | class Hosts(models.Model):
15 | group_id = models.ForeignKey(to="Groups",on_delete=models.CASCADE,verbose_name="主机id")
16 | ip = models.CharField(max_length=32,verbose_name="主机ip")
17 | disk_num = models.CharField(max_length=32,verbose_name="磁盘数量")
18 | disk_capacity = models.CharField(max_length=32,null=True,verbose_name="磁盘总大小")
19 | memory = models.CharField(max_length=32,verbose_name="内存大小")
20 | cpu_model = models.CharField(max_length=32,null=True,verbose_name="cpu型号")
21 | cpu = models.CharField(max_length=32,verbose_name="cpu盒数")
22 | v_or_s = models.CharField(max_length=32,null=True,verbose_name="主机类型")
23 | proxy_or_client = models.CharField(max_length=32,null=True,verbose_name="服务器类型")
24 |
25 |
26 | class Task(models.Model):
27 | task_group = models.CharField(max_length=256,blank=True)
28 | hosts = models.CharField(max_length=256,null=True,blank=True)
29 | cmd = models.TextField(blank=True)
30 | passwd = models.CharField(max_length=64,null=True,blank=True)
31 | user = models.CharField(max_length=32,null=True,blank=True)
32 | status_user = models.BooleanField(default=False,blank=True)
33 | login = models.BooleanField(default=True,blank=True)
34 | sudo = models.BooleanField(default=True,blank=True)
35 | time = models.DateTimeField(verbose_name="时间", default=timezone.now)
36 |
37 | def __str__(self):
38 | return self.cmd
39 |
40 |
41 | class Task_result(models.Model):
42 | task_id = models.ForeignKey(to="Task",on_delete=models.CASCADE)
43 | ip = models.CharField(max_length=64,null=True)
44 | group_name = models.CharField(max_length=64)
45 | task_status = models.BooleanField()
46 | message = models.TextField()
47 |
48 |
49 | class User(models.Model):
50 | name = models.CharField(max_length=32,null=True,verbose_name="姓名")
51 | username = models.CharField(max_length=32,verbose_name="系统账号名")
52 | passwd = models.CharField(max_length=32)
53 | status = models.CharField(max_length=32)
54 | push_status = models.CharField(max_length=32,null=True)
55 | sudo_status = models.CharField(max_length=32, null=True)
56 |
57 |
58 | ############### 权限表
59 |
60 | class Group(models.Model):
61 | name = models.CharField(max_length=32,verbose_name="组名")
62 | to_control = models.ManyToManyField('Control',verbose_name="权限选择",blank=True)
63 |
64 | def __str__(self):
65 | return self.name
66 |
67 | class Meta:
68 | verbose_name_plural = u'权限组表'
69 |
70 |
71 | class Control(models.Model):
72 | code = models.CharField(max_length=32,verbose_name="权限对应代码")
73 | name = models.CharField(max_length=32,verbose_name="权限名称")
74 |
75 | def __str__(self):
76 | return self.name
77 |
78 | class Meta:
79 | verbose_name_plural = u'权限表'
80 |
81 |
82 | class UserInfo(models.Model):
83 | user = models.CharField(max_length=32)
84 | passwd = models.CharField(max_length=32)
85 | name = models.CharField(max_length=32,verbose_name="用户姓名")
86 | to_group = models.ManyToManyField('Group',verbose_name="组的选择",blank=True)
87 | to_control = models.ManyToManyField('Control',verbose_name="权限的选择",blank=True)
88 |
89 | def __str__(self):
90 | return self.name
91 |
92 | class Meta:
93 | verbose_name_plural = u'用户权限'
--------------------------------------------------------------------------------
/execute_task/task/my_form.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 |
4 | USER = [
5 | {"field": "name", "name": "姓名", "null": False, "min_len": 1, "unique": True},
6 | {"field":"username","name":"系统账号名", "null":False,"min_len":3,"unique":True},
7 | {"field":"passwd","name":"密码", "null":False,"min_len":8,"unique":False}
8 |
9 | ]
--------------------------------------------------------------------------------
/execute_task/task/permission.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 | from django.urls import resolve
5 | from django.shortcuts import render,redirect,HttpResponse
6 | from task.permission_list import perm_dic
7 | from django.conf import settings
8 | from task import models
9 | import json
10 |
11 | def perm_check(*args,**kwargs):
12 |
13 | request = args[1]
14 | resolve_url_obj = resolve(request.path)
15 | current_url_name = resolve_url_obj.url_name # 当前url的url_name
16 | #match_flag = False
17 | match_key = None
18 | permission_list = []
19 | # request.session["user"] = "sunyang"
20 | match_results = [False]
21 |
22 |
23 | for permission_key,permission_val in perm_dic.items():
24 |
25 | per_url_name = permission_val[0]
26 | per_method = permission_val[1]
27 | perm_args = permission_val[2]
28 | perm_kwargs = permission_val[3]
29 | custom_perm_func = None if len(permission_val) == 4 else permission_val[4]
30 |
31 | if per_url_name == current_url_name: #matches current request url
32 | if per_method == request.method: #matches request method
33 | # if not perm_args: #if no args defined in perm dic, then set this request to passed perm
34 |
35 | #逐个匹配参数,看每个参数时候都能对应的上。
36 | args_matched = False #for args only
37 | for item in perm_args:
38 | request_method_func = getattr(request,per_method)
39 | if request_method_func.get(item,None):# request字典中有此参数
40 | args_matched = True
41 | else:
42 | print("arg not match......")
43 | args_matched = False
44 | break # 有一个参数不能匹配成功,则判定为假,退出该循环。
45 | else:
46 | args_matched = True
47 | #匹配有特定值的参数
48 | kwargs_matched = False
49 | for k,v in perm_kwargs.items():
50 | request_method_func = getattr(request, per_method)
51 | arg_val = request_method_func.get(k, None) # request字典中有此参数
52 | print("perm kwargs check:",arg_val,type(arg_val),v,type(v))
53 | if arg_val == str(v): #匹配上了特定的参数 及对应的 参数值, 比如,需要request 对象里必须有一个叫 user_id=3的参数
54 | kwargs_matched = True
55 | else:
56 | kwargs_matched = False
57 | break # 有一个参数不能匹配成功,则判定为假,退出该循环。
58 | else:
59 | kwargs_matched = True
60 |
61 | #自定义权限钩子
62 | perm_func_matched = False
63 | if custom_perm_func:
64 | if custom_perm_func(request,args,kwargs):
65 | perm_func_matched = True
66 | else:
67 | perm_func_matched = False #使整条权限失效
68 |
69 | else: #没有定义权限钩子,所以默认通过
70 | perm_func_matched = True
71 |
72 |
73 |
74 | match_results = [args_matched,kwargs_matched,perm_func_matched]
75 | print("--->match_results ", match_results)
76 | if all(match_results): #都匹配上了
77 | match_key = permission_key
78 | break
79 |
80 |
81 |
82 |
83 | if all(match_results):
84 | b1 = models.UserInfo.objects.filter(user=request.session.get('user',None)).last()
85 | if not b1:
86 | return False
87 |
88 | groups_objs = b1.to_group.all()
89 | control_objs = b1.to_control.all()
90 | for obj in groups_objs:
91 | to_control_objs = obj.to_control.all()
92 | for to_control in to_control_objs:
93 | permission_list.append(to_control.code)
94 | for obj in control_objs:
95 | permission_list.append(obj.code)
96 |
97 | print(permission_list)
98 | print(match_key)
99 | if match_key in permission_list:
100 | print('当前用户有此权限')
101 | return True
102 | else:
103 | print('当前用户没有该权限')
104 | return False
105 |
106 | else:
107 | print("未匹配到权限项,当前用户无权限")
108 |
109 |
110 |
111 |
112 |
113 | def check_permission(func):
114 | def inner(*args,**kwargs):
115 | if not perm_check(*args,**kwargs):
116 | request = args[1]
117 | return HttpResponse(json.dumps({"status":"false"}))
118 | return func(*args,**kwargs)
119 | return inner
--------------------------------------------------------------------------------
/execute_task/task/permission_list.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | # coding=utf8
3 | # author: Sun yang
4 |
5 |
6 |
7 | perm_dic = {
8 | 'command_post_cmd': ['command', 'POST', [], {"status":"cmd"}, ], # 执行命令权限
9 | 'command_post_myadd': ['command', 'POST', [], {"status": "myadd"}, ], # 添加账号权限
10 | 'command_post_mydel': ['command', 'POST', [], {"status": "mydel"}, ], # 账号删除权限
11 | 'command_post_mychange': ['command', 'POST', [], {"status": "mychange"}, ], # 账号修改权限
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/execute_task/task/tests.py:
--------------------------------------------------------------------------------
1 | from django.test import TestCase
2 |
3 | # Create your tests here.
4 |
--------------------------------------------------------------------------------
/execute_task/task/urls.py:
--------------------------------------------------------------------------------
1 | """execute_task URL Configuration
2 |
3 | The `urlpatterns` list routes URLs to views. For more information please see:
4 | https://docs.djangoproject.com/en/1.11/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: url(r'^$', 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: url(r'^$', Home.as_view(), name='home')
12 | Including another URLconf
13 | 1. Import the include() function: from django.conf.urls import url, include
14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
15 | """
16 | from django.conf.urls import url, include
17 | from django.contrib import admin
18 | from task import views
19 |
20 | urlpatterns = [
21 | url(r'Get_put_task/', views.Get_put_task.as_view(),name="Get_put_task"),
22 | url(r'host/', views.Host_info.as_view(),name="Host_info"),
23 | url(r'login/', views.Login.as_view(),name="Login"),
24 | url(r'logout/', views.Logout,name="Logout"),
25 | url(r'task_info/', views.Task_info.as_view(), name="task_info"),
26 | url(r'Get_taskid_all/', views.Get_taskid_all.as_view(),name="Get_taskid_all"),
27 | url(r'Monitor_status/', views.Monitor_status.as_view(), name="Monitor_status"),
28 | url(r'index/', views.Index.as_view(), name="index"),
29 | url(r'command/', views.Command.as_view(), name="command"),
30 | url(r'user/edit/', views.User_edit.as_view(), name="user_edit"),
31 | url(r'user/del/', views.User_del.as_view(), name="user_del"),
32 | url(r'user/', views.User.as_view(), name="user"),
33 | url(r'user_list/', views.User_list.as_view(), name="user_list"),
34 |
35 | ]
36 |
--------------------------------------------------------------------------------
/execute_task/templates/403.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 403 Not Found
8 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 403
42 | 权限限制
43 | 你访问的页面功能没有权限
44 | 请联系管理员>
45 |
46 | |
47 |
48 |
49 | |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/execute_task/templates/host.html:
--------------------------------------------------------------------------------
1 | {% extends 'template_html/index_base.html' %}
2 |
3 | {% block css %}{% endblock %}
4 |
5 | {% block header %}
6 |
7 | - 主机托管平台
8 | - 主机信息
9 |
10 | {% endblock %}
11 | {% block conter %}
12 |
13 |
14 |
19 |
37 |
38 |
39 |
43 |
47 |
48 |
51 |
52 |
53 |
57 |
58 |
62 |
63 |
67 |
68 |
72 |
73 |
76 |
77 |
81 |
82 |
86 |
87 |
91 |
92 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 | {% endblock %}
121 |
122 |
123 | {% block js %}
124 |
203 | {% endblock %}
204 |
--------------------------------------------------------------------------------
/execute_task/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends 'template_html/index_base.html' %}
2 |
3 | {% block style %}
4 |
9 | {% endblock %}
10 |
11 | {% block header %}
12 |
13 | - 图表信息
14 |
15 | {% endblock %}
16 | {% block conter %}
17 |
18 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 | {% endblock %}
94 |
95 | {% block js %}
96 |
148 | {% endblock %}
--------------------------------------------------------------------------------
/execute_task/templates/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | DevOps web
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
企业操作平台
20 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/execute_task/templates/template_html/index_base.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DevOps web
6 |
7 |
8 | {# #}
9 | {# #}
10 |
11 |
12 |
13 | {# #}
14 | {# #}
15 |
16 | {# #}
17 |
18 |
19 |
20 |
21 |
22 | {# #}
23 |
24 |
25 | {% block style %} {% endblock %}
26 |
27 |
28 |
29 |
30 |
31 |
71 |
147 |
148 |
149 |
150 | {% block conter %} {% endblock %}
151 |
152 |
153 |
154 |
159 |
160 |
161 |
162 |
163 |
164 | {# #}
165 |
166 |
167 |
168 | {# #}
169 |
170 | {# #}
171 | {# #}
172 | {# #}
173 |
174 |
175 |
176 |
177 |
178 | {# #}
179 |
198 | {% block js %} {% endblock %}
199 |
200 |
201 |
202 |
--------------------------------------------------------------------------------
/execute_task/templates/user.html:
--------------------------------------------------------------------------------
1 | {% extends 'template_html/index_base.html' %}
2 |
3 | {% block css %}{% endblock %}
4 |
5 | {% block header %}
6 |
7 | - 用户管理
8 | - 用户添加
9 |
10 | {% endblock %}
11 | {% block conter %}
12 |
77 |
78 | {% endblock %}
79 |
80 |
81 | {% block js %}
82 |
134 | {% endblock %}
135 |
--------------------------------------------------------------------------------