update
This commit is contained in:
@@ -112,8 +112,8 @@ class Framework:
|
||||
if os.path.exists(_):
|
||||
plugins = os.listdir(_)
|
||||
|
||||
if self.config['path_plugins_dev'] != None and os.path.exists(self.config['path_plugins_dev']):
|
||||
plugins += os.listdir(self.config['path_plugins_dev'])
|
||||
if self.config['path_dev'] != None and os.path.exists(self.config['path_dev']):
|
||||
plugins += os.listdir(self.config['path_dev'])
|
||||
|
||||
for package_name in plugins:
|
||||
db_path = os.path.join(self.config['path_data'], 'db', f'{package_name}.db')
|
||||
@@ -346,8 +346,8 @@ class Framework:
|
||||
self.config['plugin_loading_list'] = []
|
||||
if self.config.get('plugin_except_list') == None:
|
||||
self.config['plugin_except_list'] = []
|
||||
if self.config.get('path_plugins_dev') == None:
|
||||
self.config['path_plugins_dev'] = None
|
||||
if self.config.get('path_dev') == None:
|
||||
self.config['path_dev'] = None
|
||||
|
||||
|
||||
def __make_default_dir(self):
|
||||
|
||||
@@ -7,10 +7,6 @@ from .setup import *
|
||||
name = 'plugin'
|
||||
|
||||
class ModulePlugin(PluginModuleBase):
|
||||
db_default = {
|
||||
'plugin_dev_path': os.path.join(F.config['path_data'], 'dev'),
|
||||
}
|
||||
|
||||
def __init__(self, P):
|
||||
super(ModulePlugin, self).__init__(P, name=name, first_menu='list')
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ __menu = {
|
||||
'uri': 'plugin',
|
||||
'name': '플러그인',
|
||||
'list': [
|
||||
{'uri': 'setting', 'name': '설정'},
|
||||
#{'uri': 'setting', 'name': '설정'},
|
||||
{'uri': 'list', 'name': '로딩 플러그인'},
|
||||
{'uri': 'all', 'name': '플러그인 목록'},
|
||||
],
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div>
|
||||
{{ macros.setting_input_text_and_buttons('_plugin_git', '플러그인 설치', [['plugin_install_btn', '설치']], value='https://github.com/', desc=None) }}
|
||||
{{ macros.m_hr_head_top() }}
|
||||
{{ macros.m_row_start('0') }}
|
||||
{{ macros.m_col_wide(1, macros.m_strong('Idx'), 'center') }}
|
||||
@@ -23,6 +24,11 @@ $(document).ready(function(){
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#plugin_install_btn', function(e){
|
||||
e.preventDefault();
|
||||
globalSendCommand('plugin_install', $('#_plugin_git').val());
|
||||
});
|
||||
|
||||
function make_plugin_list(data) {
|
||||
current_data = data;
|
||||
console.log(data);
|
||||
@@ -72,19 +78,6 @@ $("body").on('click', '#json_btn', function(e){
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$("body").on('click', '#uninstall_btn', function(e){
|
||||
e.preventDefault();
|
||||
$("#confirm_title").html("삭제 확인");
|
||||
@@ -97,12 +90,10 @@ $("body").on('click', '#uninstall_btn', function(e){
|
||||
|
||||
function uninstall(package_name) {
|
||||
globalSendCommand('uninstall', package_name, null, null, null, function(ret) {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$("body").on('click', '#plugin_uninstall_btn', function(e){
|
||||
e.preventDefault();
|
||||
plugin_name = $(this).data('plugin_name')
|
||||
@@ -126,7 +117,5 @@ $("body").on('click', '#plugin_uninstall_btn', function(e){
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{{ macros.m_button_group([['globalSettingSaveBtn', '설정 저장']])}}
|
||||
{{ macros.m_row_start('5') }}
|
||||
{{ macros.m_row_end() }}
|
||||
{{ macros.m_hr() }}
|
||||
<form id='setting' name='setting'>
|
||||
{{ macros.setting_input_text_and_buttons('plugin_dev_path', '개발용 플러그인 경로', [['select_btn', '폴더 선택']], value=arg['plugin_dev_path'], desc=['개발용 플러그인 패키지 폴더가 있는 경로']) }}
|
||||
{{ macros.m_hr() }}
|
||||
{{ macros.setting_input_text_and_buttons('_plugin_git', '플러그인 설치', [['plugin_install_btn', '설치']], value='https://github.com/', desc=['플러그인 Git 주소']) }}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$("body").on('click', '#select_btn', function(e){
|
||||
e.preventDefault();
|
||||
globalSelectLocalFolder("폴더 선택", $('#plugin_dev_path').val(), function(ret) {
|
||||
$('#plugin_dev_path').val(ret);
|
||||
});
|
||||
});
|
||||
|
||||
$("body").on('click', '#plugin_install_btn', function(e){
|
||||
e.preventDefault();
|
||||
globalSendCommand('plugin_install', $('#_plugin_git').val());
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -11,6 +11,7 @@
|
||||
'App을 재시작 해야 적용됩니다.',
|
||||
'',
|
||||
'path_data : 필수. 데이터 폴더 경로. 윈도우의 경우 폴더 구분 기호 \ 를 두개 사용',
|
||||
'path_dev : 개발용 플러그인 폴더',
|
||||
'use_gevent : 생략시 true',
|
||||
'use_celery : 생략시 true',
|
||||
'redis_port : 생략시 6379',
|
||||
|
||||
Reference in New Issue
Block a user