diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..29f81d812f3e768fa89638d1f72920dbfd1413a8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/app/common/__init__.py b/app/common/__init__.py index ec26afeedc501d5135a973098c6a0fc9d624190c..0b39d29a979a19d9e68eccea9b5235161a17291c 100644 --- a/app/common/__init__.py +++ b/app/common/__init__.py @@ -1,12 +1,26 @@ # -*- coding: utf-8 -*- from .model import * -def error(err,data): - if 'GET' == request.HEADER.Method(): - return response.tpl("/intapp/html/error.html",title="页面错误",content=str(err),imgsrc=config.domain['kcwebimg']+"/icon/error.png") - else: - return errorjson(msg=str(err),data=data) -def serlogin(username,sign,timestamp,random): - "登录" +import math,random,socket +if get_sysinfo()['uname'][0]=='Linux': + config.app['appmode']='produc' +# def error(err,data): +# if 'GET' == request.HEADER.Method(): +# return response.tpl("/common/html/error.html",title="页面错误",content=str(err),imgsrc=config.domain['kcwebimg']+"/icon/error.png") +# else: +# return errorjson(msg=str(err),data=data) +def serlogin(username,sign,timestamp,random,types="session"): + """登录方法 + + username + + sign + + timestamp + + random + + types 登录类型 session浏览器默认会话登录 否则返回account_token + """ if (times()-int(timestamp))>3600 or times()-int(timestamp)<-3600: return False,3,"时间戳错误" inifo=sqlite('admin',model_app_path).where([('username','eq',username),'or',('phone','eq',username)]).find() @@ -18,50 +32,55 @@ def serlogin(username,sign,timestamp,random): if usign!=sign: return False,2,"密码错误" inifo['role']=sqlite("role",model_app_path).where('id',inifo['role']).find() - set_session("userinfo",inifo) sqlite('admin',model_app_path).where('id',inifo['id']).update({'logintime':times()}) - #根据权限给当前登录用户初始化菜单 - systemrolelist=[ #系统菜单权限 - {'title':'首页','icon':config.domain['kcwebimg']+'/icon/home.png','url':'/intapp/index/index/home',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'管理员','icon':config.domain['kcwebimg']+'/icon/admin.png','url':'/intapp/index/admin',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'导航管理','icon':config.domain['kcwebimg']+'/icon/menu.png','url':'/intapp/index/menu',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'模块管理','icon':config.domain['kcwebimg']+'/icon/modular.png','url':'/intapp/index/modular',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'插件管理','icon':config.domain['kcwebimg']+'/icon/plug.png','url':'/intapp/index/plug',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'计划任务','icon':config.domain['kcwebimg']+'/icon/plan.png','url':'/intapp/index/plan',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'任务队列','icon':config.domain['kcwebimg']+'/icon/task.png','url':'/intapp/index/task',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, - {'title':'系统配置','icon':config.domain['kcwebimg']+'/icon/setup.png','url':'/intapp/index/setup',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000} - ] - plugmenu=sqlite('plug',model_app_path).select() - for k in plugmenu: #插件菜单权限 - if k['name']!='index': - systemrolelist.append({'title':k['title'],'icon':k['icon'],'url':'/'+k['modular']+'/'+k['name'],"types":"left","pid":0,"admin_id":inifo['id'],"sort":1000}) - if inifo['role']: - rolelist=[] - if inifo['role']['id']==1: #开拓者权限 - rolelist=systemrolelist - else: - for k in systemrolelist: - for kk in json_decode(inifo['role']['roleroute']): - # strs=kk.split("/") - # print(k['url'],kk) - # if k['url'] in kk: - # rolelist.append(k) - if k['url'] in kk: - # rolelist.append(k) - tttt=True - for ttt in rolelist: - if ttt['title'] == k['title']: - tttt=False - break - if tttt: - rolelist.append(k) - if len(rolelist): - urlstr="0" - for k in systemrolelist: - urlstr+=",'"+k['url']+"'" - sqlite("menu",model_app_path).where("admin_id="+str(inifo['id'])+" and url in ("+urlstr+")").delete() - sqlite("menu",model_app_path).insert(rolelist) - return True,0,"登录成功" + account_token='' + if types=='session': #如果使用sess登录,要分配系统菜单权限 + #根据权限给当前登录用户初始化菜单 + systemrolelist=[ #系统菜单权限 + {'title':'首页','icon':config.domain['kcwebimg']+'/icon/home.png','url':'/intapp/index/index/home',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'管理员','icon':config.domain['kcwebimg']+'/icon/admin.png','url':'/intapp/index/admin',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'导航管理','icon':config.domain['kcwebimg']+'/icon/menu.png','url':'/intapp/index/menu',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'模块管理','icon':config.domain['kcwebimg']+'/icon/modular.png','url':'/intapp/index/modular',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'插件管理','icon':config.domain['kcwebimg']+'/icon/plug.png','url':'/intapp/index/plug',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'计划任务','icon':config.domain['kcwebimg']+'/icon/plan.png','url':'/intapp/index/plan',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'任务队列','icon':config.domain['kcwebimg']+'/icon/task.png','url':'/intapp/index/task',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000}, + {'title':'系统配置','icon':config.domain['kcwebimg']+'/icon/setup.png','url':'/intapp/index/setup',"types":"left","pid":0,"admin_id":inifo['id'],"sort":10000} + ] + plugmenu=sqlite('plug',model_app_path).select() + for k in plugmenu: #插件菜单权限 + if k['name']!='index': + systemrolelist.append({'title':k['title'],'icon':k['icon'],'url':'/'+k['modular']+'/'+k['name'],"types":"left","pid":0,"admin_id":inifo['id'],"sort":1000}) + if inifo['role']: + rolelist=[] + if inifo['role']['id']==1: #开拓者权限 + rolelist=systemrolelist + else: + for k in systemrolelist: + for kk in json_decode(inifo['role']['roleroute']): + # strs=kk.split("/") + # print(k['url'],kk) + # if k['url'] in kk: + # rolelist.append(k) + if k['url'] in kk: + # rolelist.append(k) + tttt=True + for ttt in rolelist: + if ttt['title'] == k['title']: + tttt=False + break + if tttt: + rolelist.append(k) + if len(rolelist): + urlstr="0" + for k in systemrolelist: + urlstr+=",'"+k['url']+"'" + sqlite("menu",model_app_path).where("admin_id="+str(inifo['id'])+" and url in ("+urlstr+")").delete() + sqlite("menu",model_app_path).insert(rolelist) + set_session("userinfo",inifo) + else: + account_token=md5(str(username)+str(inifo['password'])) + set_cache(account_token,inifo,86400) + return True,0,"登录成功",account_token def check_role(): t=request.getroutecomponent() ts="/"+t[1]+"/"+t[2]+"/"+t[3]+"/"+t[4] @@ -94,7 +113,8 @@ def before_request(): """请求拦截, 进行登录验证,权限验证 """ - return check_login() + if not config.app['cli']: + return check_login() def after_request(): "响应拦截" pass @@ -203,12 +223,28 @@ def insert_Boot_up(cmd): return True else: return False -def del_Boot_up(cmd): - "删除开机启动命令" +def del_Boot_up(cmd,vague=False): + """删除开机启动命令 + + vague 是否模糊匹配 + """ if 'Linux' in get_sysinfo()['uname'][0]: - content=file_get_content("/usr/bin/startkcweb") - content=content.replace("\n"+cmd+"\n","") - file_set_content("/usr/bin/startkcweb",content) + if vague: + f = open("/usr/bin/startkcweb") + con='' + while True: + line = f.readline() + if not line: + break + if 'cmd' in line: + line='' + con=con+line + f.close() + file_set_content("/usr/bin/startkcweb",con) + else: + content=file_get_content("/usr/bin/startkcweb") + content=content.replace("\n"+cmd+"\n","") + file_set_content("/usr/bin/startkcweb",content) return True else: return False diff --git a/app/common/autoload.py b/app/common/autoload.py index ffb60062f4c40cf62e27cd2049b91df564968038..fee1f6f09f98914ad2ca65e7b509e7281efd39ea 100644 --- a/app/common/autoload.py +++ b/app/common/autoload.py @@ -1,7 +1,3 @@ from kcweb.common import * from app import config -import math,random,socket,multiprocessing -G=globals.G - -if get_sysinfo()['uname'][0]=='Linux': - config.app['appmode']='produc' \ No newline at end of file +G=globals.G \ No newline at end of file diff --git a/app/intapp/html/error.html b/app/common/html/error.html similarity index 100% rename from app/intapp/html/error.html rename to app/common/html/error.html diff --git a/app/intapp/common/__init__.py b/app/intapp/common/__init__.py index 6b23e23a4f1cc8bc65212a2415b4e9c9923fe3d8..5d0898e3c379872bd9fab63e7353b4bd832dacc9 100644 --- a/app/intapp/common/__init__.py +++ b/app/intapp/common/__init__.py @@ -1,2 +1,3 @@ # -*- coding: utf-8 -*- -from .autoload import * \ No newline at end of file +from .autoload import * +import socket,multiprocessing \ No newline at end of file diff --git a/app/intapp/controller/__init__.py b/app/intapp/controller/__init__.py index 6a0389200c3dbfe0c77443814666268ed08060c3..f4dbb41806865dbf404d8e22172a59b9a51cb25a 100644 --- a/app/intapp/controller/__init__.py +++ b/app/intapp/controller/__init__.py @@ -1,2 +1,3 @@ -from . import index \ No newline at end of file +from . import index +from . import soft \ No newline at end of file diff --git a/app/intapp/controller/index/common/file/sqlite/.gitignore b/app/intapp/controller/index/common/file/sqlite/.gitignore index 72a3e83b95c3b825bfa74389fa7962abef8cf27f..14f4f439b3f8242f7e34d0f7bc9f713ba93df48f 100644 --- a/app/intapp/controller/index/common/file/sqlite/.gitignore +++ b/app/intapp/controller/index/common/file/sqlite/.gitignore @@ -1 +1,2 @@ -intappindex \ No newline at end of file +intappindex +strconfig \ No newline at end of file diff --git a/app/intapp/controller/index/common/plantask.py b/app/intapp/controller/index/common/plantask.py index 3948a0971bb91d289c06774a015041bd490bb77e..017ed102283759bb7ffa0642497ddf05266e1fd9 100644 --- a/app/intapp/controller/index/common/plantask.py +++ b/app/intapp/controller/index/common/plantask.py @@ -80,6 +80,13 @@ class PLANTASK(): elif data['types']=='openurl': func=PLANTASK.openurls args=(data['value'],iden) + elif data['types']=='backupmysql': #备份mysql + # data['value'] #备份目录 + func=PLANTASK.shells + if data['oss']=='1': + args=("python3 server.py /intapp/soft/mysql/backups/whole/bankup_all_databases/1 --cli",iden) + else: + args=("python3 server.py /intapp/soft/mysql/backups/whole/bankup_all_databases --cli",iden) elif data['types']=='restart-php-fpm': #重启php func=PLANTASK.shells phpname=data['value'].replace(".", "") @@ -139,6 +146,7 @@ class PLANTASK(): try: if not PLANTASK.BlockingSchedulers: PLANTASK.BlockingSchedulers = BlockingScheduler() + #进程可能影响cli运行 multiprocessing.Process(target=PLANTASK.plantaskdsfsdfsafdsafsd,args=(PLANTASK.BlockingSchedulers,func,targger,args,year,month,week,day_of_week,day,hour,minute,second,iden)).start() # t=threading.Thread(target=PLANTASK.plantaskdsfsdfsafdsafsd,args=(PLANTASK.BlockingSchedulers,func,targger,args,year,month,week,day_of_week,day,hour,minute,second,iden)) # t.daemon=True diff --git a/app/intapp/controller/index/plan.py b/app/intapp/controller/index/plan.py index 329deb4579bfb3eb4b17f757006e24ba478f0d44..b76653cf7aaf72e22dd4fd7ca5be29982fa404f4 100644 --- a/app/intapp/controller/index/plan.py +++ b/app/intapp/controller/index/plan.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from .common import * +indexconfigpath=os.path.split(os.path.realpath(__file__))[0]+"/common/file/sqlite/" def index(): return response.tpl() def get(id=0): @@ -21,12 +22,16 @@ def get(id=0): lists=sqlite("interval").page(pagenow,pagesize).select() count=sqlite("interval").where(where).count() data=return_list(lists,count,pagenow,pagesize) + data['strconfig']=json_decode(file_get_content(indexconfigpath+"strconfig")) return successjson(data) def add(): "添加任务" if sqlite("interval").count() >=100: return errorjson(code=1,msg="您已超过系统预设最大限制") data=request.get_json() + if data['types']=='backupmysql': + if sqlite("interval").where("types","backupmysql").count(): + return errorjson(code=1,msg="该计划已添加,不可重复提交") data['addtime']=times() data['updtime']=times() if data['oss']==True: @@ -34,7 +39,7 @@ def add(): else: data['oss']=0 data['iden']=md5(str(times())) - if not data['name'] or not data['value']: + if data['types'] != 'backupmysql' and (not data['name'] or not data['value']): return errorjson(code=1,msg="参数不全") # PLANTASK.plantask(data) Queues.insert(target=PLANTASK.plantask,args=(data,),title="添加任务任务:"+data['name']) @@ -47,4 +52,13 @@ def delpl(): return successjson(msg="任务已删除,重启控制板后生效") def log(iden): "任务日志" - return successjson(PLANTASK.log(iden)) \ No newline at end of file + return successjson(PLANTASK.log(iden)) + +def setconfig(types='set',paths='strconfig'): + if types=='set': + data=request.get_json() + file_set_content(indexconfigpath+paths,json_encode(data)) + return successjson(data) + elif types=='get': + data=json_decode(file_get_content(indexconfigpath+paths)) + return successjson(data) \ No newline at end of file diff --git a/app/intapp/controller/index/plug.py b/app/intapp/controller/index/plug.py index d7361611e6cd986fdfa08c3e633dc515c1b09d3a..b7e201331355f12995acb51fca562e5e626d6c75 100644 --- a/app/intapp/controller/index/plug.py +++ b/app/intapp/controller/index/plug.py @@ -71,7 +71,7 @@ def uploadplug(): return errorjson(msg=data1[1]) return errorjson(msg=data1[1]) else: - return errorjson("请先配置kcweb账号") + return errorjson(msg="请先配置kcweb账号") def installplug(): "安装插件" arr=request.get_json() diff --git a/app/intapp/controller/index/pub.py b/app/intapp/controller/index/pub.py index a32ec9dfa15c62de9c0d2bdc4eb6160a770f60ec..c377a05ff7d67bcef5aae5ce99e572cccacfa71b 100644 --- a/app/intapp/controller/index/pub.py +++ b/app/intapp/controller/index/pub.py @@ -11,11 +11,11 @@ def outlogin(): # else: del_session('userinfo') return successjson() -def login(username,sign,timestamp,random): +def login(username,sign,timestamp,random,types="session"): "登录" - status,code,msg=serlogin(username,sign,timestamp,random) + status,code,msg,account_token=serlogin(username,sign,timestamp,random,types) if status: - return successjson(msg=msg) + return successjson(data=account_token,msg=msg) else: return errorjson(code=code,msg=msg) def images(pre="cir",ContentType=""): diff --git a/app/intapp/controller/index/tpl/index/index.html b/app/intapp/controller/index/tpl/index/index.html index 58458e790d6d6e37d24366ac1c4bf07e86f1034e..01010bd526429b57559a4799fd857f170b846da0 100644 --- a/app/intapp/controller/index/tpl/index/index.html +++ b/app/intapp/controller/index/tpl/index/index.html @@ -36,6 +36,7 @@ +
diff --git a/app/intapp/controller/index/tpl/modular/index.html b/app/intapp/controller/index/tpl/modular/index.html index 1e8096e93df0a26a7c33c3f3297a8059e591675a..f35db7a3af0d143e386a4b26a1adf53b874b1846 100644 --- a/app/intapp/controller/index/tpl/modular/index.html +++ b/app/intapp/controller/index/tpl/modular/index.html @@ -67,7 +67,7 @@
- + +
+ +
- + @@ -43,7 +43,7 @@ - + @@ -66,12 +66,18 @@
- - - - - 您需要在软件管理中安装aliyun-oss并且设置后才能生效,如已安装可忽略 +
+ +
同时备份到阿里云对象存储OSS
+ + + > + + 保存
+
@@ -209,7 +215,7 @@ 执行命令:{{scope.row.value}} 访问URL:{{scope.row.value}} 重启php-fpm,版本:{{scope.row.value}} - 备份mysql数据库到:{{scope.row.value}},同时上传到阿里云对象存储oss + 备份mysql数据库 {{scope.row.value}},同时上传到阿里云对象存储oss @@ -256,7 +262,14 @@ var vm = new Vue({ },adminChange:[], mysql57:{}, currentPage: 5, - planstatus:false,log:'' + planstatus:false,log:'', + strconfig:{ + backmysqlpath:'', //mysql备份目录 + endpoint:'http://oss-cn-beijing.aliyuncs.com', + Bucket:'', + access_key_id:'', + access_key_secret:'' + } }, mounted:function(){ self=this @@ -270,9 +283,18 @@ var vm = new Vue({ self=this self.get("/intapp/index/plan/get",{'pagesize':self.data.pagesize,'pagenow':self.data.pagenow},'获取中...').then(function(res){ self.data=res.data - // self.get("/intapp/soft/index/gettitle/mysql/5.7",null,'获取中...').then(function(res){ - // self.mysql57=res.data - // }) + if(res.data.strconfig && res.data.strconfig.endpoint){ + self.strconfig=res.data.strconfig + } + self.get("/intapp/soft/index/gettitle/mysql/5.7",null,'获取中...').then(function(res){ + self.mysql57=res.data + }) + }) + }, + setconfig:function(path=""){ + self=this + self.post("/intapp/index/plan/setconfig/set/"+path,self.strconfig,'保存中...').then(function(res){ + self.$message({type: 'success',message:res.msg}); }) }, getlog:function(iden){ diff --git a/app/intapp/controller/index/tpl/plug/index.html b/app/intapp/controller/index/tpl/plug/index.html index 3f9b848c519d7b41f6280cc6cd9767d394d761cd..fa61dcad827380415e4bd7d9e8166bf03e2b97cd 100644 --- a/app/intapp/controller/index/tpl/plug/index.html +++ b/app/intapp/controller/index/tpl/plug/index.html @@ -56,6 +56,7 @@ @@ -71,7 +72,7 @@
- + +
+ +
- - -
+ + + + + + + + + + + +
+
+ + + 搜索 + + 备份、网站 、软件列表、php扩展 + 恢复 + 更新软件列表 + +
+
+ + % if config.app['appmode']=='develop': + + + + % endif + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + 如:/usr/local/php/ + + + + + + + + + + 注:需要在后端接口上配置wget文件地址 + + + + Linux + Windows + + + + + + +
+ + + diff --git a/app/intapp/controller/soft/tpl/index/web.html b/app/intapp/controller/soft/tpl/index/web.html new file mode 100644 index 0000000000000000000000000000000000000000..53d06a962960a465a2b0828fa273a605ea81aa32 --- /dev/null +++ b/app/intapp/controller/soft/tpl/index/web.html @@ -0,0 +1,479 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+
+    + + + 搜索 + 添加网站 + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
域名
端口 + 上传限制:MB
网站名
配置文件模板 + + + + +
备注
网站目录
+
+ + + + + + + + +
+ + + + + + + + + +   + + +
+ nginx负载均衡是一个代理均衡转发器 + +
+ +
+ + 取 消 + 修改添加 + +
+ + +
+ +
+
+ 您已配置Let's证书


+ ssl_certificate :{{admin.ssl_certificate}}

+ ssl_certificate_key :{{admin.ssl_certificate_key}}

+ 使用自有证书 +
+
+
+ 密钥(KEY) + +
+
+ 证书(PEM格式) + +
+ 确定 +
+
+ + +
+ + + + + +
+ 保存
+ 选择伪静态模板就可以了,修改了记得要保存哦!重启nginx生效 +
+ +
+ + 确定 +
+
+ +
+ + + + + + + +
支持域名有效期
+ + {{item1.domain}}     + + + + {{time_date(item.config.createtime+7776000,true)}} + + + + 使用 + +
+
+
+
+ + + diff --git a/app/intapp/controller/soft/tpl/soft/frp.html b/app/intapp/controller/soft/tpl/soft/frp.html new file mode 100644 index 0000000000000000000000000000000000000000..c137b73fa594dc8e2d6120875746dc88d0e181b3 --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/frp.html @@ -0,0 +1,250 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+ + + + + 重启 + 停止 + + 保存 + + + + + + +
+ 重启 + 停止 + + + + 这是服端监听的地址 + + + + 这是服端监听的端口 + + + + 这是upd监听的端口 + + + + 这是kcp监听的端口 + + + + 这是http监听的端口 + + + + 这是https监听的端口 + + + + 这是dashboard监听的ip地址 + + + + 这是dashboard监听的端口 + + + + 这是dashboard监听的用户名 + + + + 这是dashboard监听的密码 + + + + 这是frp的验证机制 + + + + 这是frp的验证串的有效时间 + + + + + + + + 日志保持多少天 + + + + + + + + 白名单端口 + + + + 最大值进程数 + + + + + + + + + + + + + + + 保存 + + +
+ +
+ + + 保存 + +
+
+
+
+ + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/git.html b/app/intapp/controller/soft/tpl/soft/git.html new file mode 100644 index 0000000000000000000000000000000000000000..9f6b6b0c2e3b8361183f526edd61e6341087ba10 --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/git.html @@ -0,0 +1,69 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+
+ +
+ 您可以使用以下命令生成ssh密钥

+ +
+
+
+ + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/kodexplorer.html b/app/intapp/controller/soft/tpl/soft/kodexplorer.html new file mode 100644 index 0000000000000000000000000000000000000000..6fb3f59b95946d8504b9f3fe4bf5c9a78b85169b --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/kodexplorer.html @@ -0,0 +1,89 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + 添加 + +
+
+
+ + + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/mongodb.html b/app/intapp/controller/soft/tpl/soft/mongodb.html new file mode 100644 index 0000000000000000000000000000000000000000..417da13b4af6bd477526929f68caee0f9ac9015b --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/mongodb.html @@ -0,0 +1,436 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +

可以在终端中执行以下命令创建可以 +

+ WORK_DIR=/data/mongodb
+ mkdir -p $WORK_DIR/key/
+ cd $WORK_DIR/key/
+ openssl rand -base64 756 > mongo.key
+ chmod 600 mongo.key
+
+

+ 保存 +
+
+ +
+ config服务 (注:这是一个config服务) + + + + + + +
+ 通常生产环境每台机器应该只有一个,您可以在其他机器上开启config服务后手动添加到副本集中
+ +
+ 运行中 + 停止服务 + 重启服务 +
+
+ 已停止 + 启动服务 +
+
+ 待初始化 + 初始化 +
+

+
+ 副本集初始化(如果需要,生产环境应该是内网ip而不是127.0.0.1)
+
+ +
+增加副本集示例 +
+mongo --port {{data.configs.server[0]['port']}}
+use admin
+rs.add({_id:1,host:'{{data.get_local_ip}}:27002',priority:2})#增加主机 priority:优先级
+
+删除副本集示例 +
+mongo --port {{data.configs.server[0]['port']}}
+use admin
+rs.remove('{{data.get_local_ip}}:27002')
+
+
+ +
+
+ +
+ configdb: +
示例:configdb = configs/192.168.1.101:27001,192.168.1.102:27001,192.168.1.103:27001,则无法扩展外部服务器
+ 上述ip和端口是已经启动的配置服务,可以是其他机器上的mongodb配置服务 +
+ 路由服务 (注:这是一个路由服务) + + + + + + +
+ +
+
+ 运行中 + 停止服务 + 重启服务 +
+
+ 已停止 + 启动服务 +
+
+ 待初始化 + 初始化 +
+
+
+ 初始化用户
+
+ +
+ 在路由中添加分片,如下示例
+
+mongo --port {{data.mongos.server[0]['port']}}
+use admin
+db.auth('admin','admin')
+sh.addShard("shard1/192.168.1.101:29001,192.168.1.102:29001") #shard1是分片集群id
+sh.status()
+
+
+
+
+ +
+
+ 分片服务名{{indexs+1}}: + + + + + + + +
+ 通常生产环境每台机器应该只有一个,您可以在其他机器上开启分片服务后手动添加到副本集中
+ +
+ 运行中 + 停止服务 + 重启服务 +
+
+ 已停止 + 启动服务 +
+
+ 待初始化 + 初始化 +
+

+
+ 副本集初始化(生产环境应该是内网ip而不是127.0.0.1)
+ +
+
+ +
+
+
+ + + +
+ + + + + + + + + + + + + +
绑定ip端口服务目录
+ + 运行中 + 停止 + + + 已停止 + 启动 + + +
+
+ + 保存 +
+ +
+
+ + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/mysql.html b/app/intapp/controller/soft/tpl/soft/mysql.html new file mode 100644 index 0000000000000000000000000000000000000000..ebeb98f3f6c12135106c911353e835173f336cc6 --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/mysql.html @@ -0,0 +1,106 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + 建议与mysql安装目录分开 + + 保存 + + + +
+ + 保存 +
+
+
+
+
+ + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/nginx.html b/app/intapp/controller/soft/tpl/soft/nginx.html new file mode 100644 index 0000000000000000000000000000000000000000..8956ac72e8acef1bcbb5de4b3fef3b1d27bdc2fd --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/nginx.html @@ -0,0 +1,113 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+ + + + + + 保存 + 该配置文件只对该网站有效,修改后重启nginx生效
+
+ +
+ +
+
+ + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/php.html b/app/intapp/controller/soft/tpl/soft/php.html new file mode 100644 index 0000000000000000000000000000000000000000..f281a401bfe1f0e1c50e3399e08feabe09d5e6fe --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/php.html @@ -0,0 +1,331 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + + MB + + + 单个请求上传的文件的最大数量 + + + 秒 + + + 秒 + + + MB + + + MB + + + + + + 是否允许将url(如http://或 ftp://)作为文件处理。 + + + + + + 是否允许include/require以文件形式打开url(如http://或 ftp://)。 + + + + 基于套接字的流的默认超时(秒) + + + 保存 +
+
+ +
+ + + + + + + + + + 允许创建的最大子进程数 + + + + 起始进程数(服务启动后初始进程数量) + + + + 最小空闲进程数(清理空闲进程后的保留数量) + + + + 最大空闲进程数(当空闲进程达到此值时清理) + + + 保存 +
+
+ +
+ % if config.app['appmode']=='develop': + + % endif + + + + + + + + +
名称说明状态操作
{{item.title}}{{item.describes}} + % if config.app['appmode']=='develop': + {{item.filename}} + % endif + + + + + + 安装 + + + 等待下载 + + + 正在下载 + + + 正在安装 + + + 卸载 + + + 正在卸载... + + % if config.app['appmode']=='develop': + 删除 + % endif +
+
+
+ + + + + 保存 + 该配置文件只对{{data.php.title}}有效,修改后重启{{data.php.title}}生效
+
+ + + + 保存 + 该配置文件只对{{data.php.title}}有效,修改后重启{{data.php.title}}生效
+
+
+ + + + + + + + + + + + + + + + + + + 添加 + +
+ + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/phpmyadmin.html b/app/intapp/controller/soft/tpl/soft/phpmyadmin.html new file mode 100644 index 0000000000000000000000000000000000000000..5dd49d6bdafd1c4864f98aaf6c71eb967fc0fcb8 --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/phpmyadmin.html @@ -0,0 +1,91 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + 添加 + +
+
+
+ + + + \ No newline at end of file diff --git a/app/intapp/controller/soft/tpl/soft/redis.html b/app/intapp/controller/soft/tpl/soft/redis.html new file mode 100644 index 0000000000000000000000000000000000000000..64eac893a14c59ec96efcf712ab918ef24a21f09 --- /dev/null +++ b/app/intapp/controller/soft/tpl/soft/redis.html @@ -0,0 +1,127 @@ + + + + + +kcwebplus + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + 绑定IP + + + 端口 + + + 空闲连接超时时间,0表示不断开 + + + 最大连接数 + + + 数据库数量 + + + redis密码,留空代表没有设置密码 + + + MB,最大使用内存,0表示不限制 + + + 保存 +
+
+ + + + + 保存 + 修改后重启redis生效
+
+
+
+ + + \ No newline at end of file diff --git a/app/static/js/function.js b/app/static/js/function.js index 10a5a943ac442f16af6323615e60abcc230524a6..5e7615e53fec6b440c63746b16d200e3cc2edbb5 100644 --- a/app/static/js/function.js +++ b/app/static/js/function.js @@ -59,21 +59,19 @@ Vue.prototype.get=function(url,params,text){ if(text){setTimeout(function(){Loading.close();},100)} if (err.response) { if(err.response.status==500){ - self.$message({message: "服务器内部错误",type: 'error'}); + self.$notify({title: '错误',duration:3000,message: '服务器内部错误',type: 'error'}); }else if(err.response.status==401){ - self.$message({message: "您无此时接口权限,可联系管理员申请",type: 'error'}); + self.$notify({title: '访问受限',duration:5000,message:"您无此时接口权限,可联系管理员申请",type: 'warning'}); }else{ if (err.response.data.hasOwnProperty('msg')){ msg=err.response.data.msg - }else{ - msg=err.response.data + self.$notify({title: '警告',duration:10000,message: msg,type: 'warning'}); } - self.$message({message: "错误码:"+err.response.status+","+msg,type: 'error'}); } }else if (err.request){ - self.$message({message: "无法链接到服务器",type: 'error'}); + self.$notify({title: '请求失败',duration:3000,message: '无法链接到服务器',type: 'error'}); }else{ - self.$message({message: "网络异常,",type: 'error'}); + self.$notify({title: '请求失败',duration:3000,message: '网络异常',type: 'error'}); } reject(err) }) @@ -129,19 +127,19 @@ Vue.prototype.post=function(url,params,text){ if(text){setTimeout(function(){Loading.close();},100)} if (err.response) { if(err.response.status==500){ - self.$message({message: "服务器内部错误",type: 'error'}); + self.$notify({title: '错误',duration:3000,message: '服务器内部错误',type: 'error'}); }else if(err.response.status==401){ - self.$message({message: "您无此时接口权限,可联系管理员申请",type: 'error'}); + self.$notify({title: '访问受限',duration:5000,message:"您无此时接口权限,可联系管理员申请",type: 'warning'}); }else{ if (err.response.data.hasOwnProperty('msg')){ msg=err.response.data.msg - self.$message({message: "错误码:"+err.response.status+","+msg,type: 'error'}); + self.$notify({title: '警告',duration:10000,message: msg,type: 'warning'}); } } }else if (err.request){ - self.$message({message: "无法链接到服务器",type: 'error'}); + self.$notify({title: '请求失败',duration:3000,message: '无法链接到服务器',type: 'error'}); }else{ - self.$message({message: "网络异常,",type: 'error'}); + self.$notify({title: '请求失败',duration:3000,message: '网络异常',type: 'error'}); } reject(err) }) diff --git a/kcweb/app.py b/kcweb/app.py index 3eaa571173e7337ebd3611e2b70f80636ef5e00d..ed03af0f9b4acf196a4b1822d45651a1b1642c78 100644 --- a/kcweb/app.py +++ b/kcweb/app.py @@ -79,7 +79,7 @@ class web: port=port, filename=filename ) - elif len(sys.argv)==3 and sys.argv[2]!='--cli': + elif len(sys.argv)==3 and sys.argv[2]=='--cli': try: RAW_URI=sys.argv[1] except:pass diff --git a/kcweb/common/autoload.py b/kcweb/common/autoload.py index c06572e2dfa116cd1dee3eaefc3cd7ad70d3f644..48fc6357b2004fa3e7f5ef5fd27bec975174980d 100644 --- a/kcweb/common/autoload.py +++ b/kcweb/common/autoload.py @@ -399,6 +399,8 @@ class create: return False,"失败" def uploadplug(self,plug,username='',password='',cli=False): "上传一个插件" + if not os.path.isfile(self.appname+"/"+self.modular+"/controller/"+plug+".zip"): + self.packplug(plug=plug) i=0 http=Http() http.set_timeout=300 @@ -461,8 +463,10 @@ class create: else: http=Http() i=0 + tplug=plug + modular=self.modular while True: - http.openurl(config.domain['kcwebapi']+"/pub/plug","POST",data={"modular":self.modular,"name":str(plug),"edition":str(edition),"token":token}) + http.openurl(config.domain['kcwebapi']+"/pub/plug","POST",data={"modular":modular,"name":str(tplug),"edition":str(edition),"token":token}) arr=json_decode(http.get_text) if arr: if arr['code']==-1 and cli: @@ -475,7 +479,10 @@ class create: i+=1 elif arr['code']==-1: return False,plug+"插件授权码错误" - elif arr['code']==0: + elif not arr['data']: + modular="api" + tplug="index" #默认插件 + elif arr['code']==0 and arr['data']: arr=arr['data'] r=requests.get(arr['dowurl']) f = open(self.appname+"/"+self.modular+"/controller/"+plug+".zip", "wb") @@ -534,11 +541,19 @@ class create: f.close() text=re.sub("\nfrom . import "+plug,"",text) text=re.sub("from . import "+plug,"",text) - f=open(self.appname+"/"+self.modular+"/controller/__init__.py","w",encoding='utf-8') text+="\nfrom . import "+plug f.write(text) f.close() + + f=open(self.appname+"/"+self.modular+"/controller/"+plug+"/common/autoload.py","r",encoding='utf-8') + text=f.read() + f.close() + text=re.sub("app.api",self.appname+"."+self.modular,text) + f=open(self.appname+"/"+self.modular+"/controller/"+plug+"/common/autoload.py","w",encoding='utf-8') + f.write(text) + f.close() + return True,"插件安装成功,"+plug+"=="+str(arr['edition']) else: return False,str(plug)+"插件下载失败" @@ -567,6 +582,8 @@ class create: return False,"失败" def uploadmodular(self,username='',password='',cli=False): "上传模块" + if not os.path.isfile(self.appname+"/"+self.modular+".zip"): + self.packmodular() i=0 http=Http() http.set_timeout=300 @@ -634,7 +651,7 @@ class create: if chunk: f.write(chunk) f.close() - zip.unzip_file("./app.zip","./") + zip.unzip_file("./app.zip","./"+self.appname) os.remove("./app.zip") if not os.path.isfile("./server.py"): if "Windows" in platform.platform(): @@ -651,6 +668,17 @@ class create: f=open("./server.py","w+",encoding='utf-8') f.write(servertext) f.close() + f=open(self.appname+"/common/autoload.py","w",encoding='utf-8') + f.write("from kcweb.common import *\n"+ + "from "+self.appname+" import config\n"+ + "G=globals.G") + f.close() + f=open(self.appname+"/"+self.modular+"/common/autoload.py","w",encoding='utf-8') + f.write("from "+self.appname+".common import *") + f.close() + f=open(self.appname+"/"+self.modular+"/controller/index/common/autoload.py","w",encoding='utf-8') + f.write("from "+self.appname+"."+self.modular+".common import *") + f.close() return True,"应用创建成功" else: if not os.path.isfile(self.appname+"/__init__.py") or not os.path.exists(self.appname+"/common"): @@ -660,8 +688,9 @@ class create: else: http=Http() i=0 + modular=self.modular while True: - http.openurl(config.domain['kcwebapi']+"/pub/modular","POST",data={"name":self.modular,"token":token}) + http.openurl(config.domain['kcwebapi']+"/pub/modular","POST",data={"name":modular,"token":token}) arr=json_decode(http.get_text) if arr: if arr['code']==-1 and cli: @@ -674,7 +703,9 @@ class create: i+=1 elif arr['code']==-1: return False,self.modular+"模块授权码错误" - elif arr['code']==0: + elif not arr['data']: + modular="api" + elif arr['code']==0 and arr['data']: arr=arr['data'] r=requests.get(arr['dowurl']) f = open(self.appname+"/"+self.modular+".zip", "wb") @@ -730,6 +761,15 @@ class create: f=open(self.appname+"/__init__.py","a",encoding='utf-8') f.write(content) f.close() + + + f.close() + f=open(self.appname+"/"+self.modular+"/common/autoload.py","w",encoding='utf-8') + f.write("from "+self.appname+".common import *") + f.close() + f=open(self.appname+"/"+self.modular+"/controller/index/common/autoload.py","w",encoding='utf-8') + f.write("from "+self.appname+"."+self.modular+".common import *") + f.close() else: return False,self.modular+"模块下载失败" if not os.path.isfile("./server.py"): @@ -750,6 +790,7 @@ class create: f.close() return True,"安装成功" else: + return False,"模块下载失败" else: return False,"找不到"+self.modular+"模块" diff --git a/kcweb/config/__init__.py b/kcweb/config/__init__.py index 0a01684d3fc98738bed57ade7586575390b21245..8c813499bd97507bb36c972478cbd2841dc94886 100644 --- a/kcweb/config/__init__.py +++ b/kcweb/config/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # 应用配置 +import sys app={} app['app_debug']=True #是否开启调试模式 app['tpl_folder']='./tpl' #设置模板文件目录名 注意:不能配置目录路径 @@ -97,7 +98,7 @@ email['recNick']='' #默认收件人昵称 kcweb={} kcweb['name']='kcweb' #项目的名称 -kcweb['version']='4.11.5' #项目版本 +kcweb['version']='4.11.7' #项目版本 kcweb['description']='' #项目的简单描述 kcweb['long_description']='' #项目详细描述 kcweb['license']='MIT' #开源协议 mit开源 diff --git a/kcweb/setup.py b/kcweb/setup.py index 3d812bf1141fbfadfbd96e07dcdbf5a81d4a4152..8f2c47e27ca5618e7bbe39e2f2e07c8be68be41d 100644 --- a/kcweb/setup.py +++ b/kcweb/setup.py @@ -16,7 +16,7 @@ def file_get_content(k): return con confkcw={} confkcw['name']='kcweb' #项目的名称 -confkcw['version']='4.11.5' #项目版本 +confkcw['version']='4.11.7' #项目版本 confkcw['description']='' #项目的简单描述 confkcw['long_description']="" #项目详细描述 confkcw['license']='MIT License' #开源协议 mit开源 diff --git a/server b/server index 6feb3e7a7d354fd0523526bfe8f152a0862891d4..de2115c4281b0a3432adf805d10f8d30cb5d93be 100644 --- a/server +++ b/server @@ -1,5 +1,5 @@ #!/usr/bin/env python3.6kcw_plus -# windows系统上无法运行该文件 +# 请不要在windows系统上运行该文件 import re,sys,os from gunicorn.app.wsgiapp import run import getopt