diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e7d2cec --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +使用协议:https://www.skycaiji.com/licenses \ No newline at end of file diff --git a/readme.txt b/README.md similarity index 57% rename from readme.txt rename to README.md index e8108f6..7f826e3 100644 --- a/readme.txt +++ b/README.md @@ -1,4 +1,6 @@ 将本压缩包上传至您的服务器,如果根目录有站点建议放在子目录里,解压后打开浏览器输入您的服务器域名或ip地址(存放在子目录则加上子目录的名称)进入安装界面。 -使用手册:https://www.skycaiji.com/manual -安装协议:https://www.skycaiji.com/licenses \ No newline at end of file + +入门手册:[https://www.skycaiji.com/manual](https://www.skycaiji.com/manual) + +使用协议:[https://www.skycaiji.com/licenses](https://www.skycaiji.com/licenses) \ No newline at end of file diff --git a/public/static/css/admin.css b/public/static/css/admin.css index 5ab0e46..2885a1f 100644 --- a/public/static/css/admin.css +++ b/public/static/css/admin.css @@ -64,7 +64,7 @@ div.in-line-mg{display:inline;margin-right:5px;} .table-responsive .table:last-child{margin-bottom:0;} .table-responsive .table input.form-control{min-width:150px;} .table-responsive .table textarea.form-control{min-width:150px;} -.table-responsive .table select.form-control{min-width:70px;} +.table-responsive .table select.form-control{min-width:90px;} .icon-info-tips{font-size:12px;cursor:pointer;color:#bbb;} .icon-info-tips:hover{color:#3c8dbc;} @@ -435,6 +435,7 @@ table.table thead .sorting_desc:after { } /**/ #cms_bind em{color:red;} +#toapi_app_params em{color:red;} /*my store*/ .nav-tabs-color li.active{border-top-color:#3c8dbc!important;} @@ -623,4 +624,6 @@ footer.footer-end{display:none;} .c-p-url-web-form td:first-child,.c-p-url-web-header td:first-child{width:auto;} .p-m-api-table td:first-child,.p-m-api-header-table td:first-child{width:auto;} .toapi-param-table td:first-child,.toapi-header-table td:first-child{width:auto;} + + .list-footer .form-control{width:100%!important;} } \ No newline at end of file diff --git a/public/static/js/admin.js b/public/static/js/admin.js index 936fa94..f105e63 100644 --- a/public/static/js/admin.js +++ b/public/static/js/admin.js @@ -41,7 +41,7 @@ html+=''}}} funcObj.append(html);if(params.cache){window[winCacheName]=html}}}},error:function(xhr,status,error){funcObj.removeAttr('data-is-loaded');toastr.error('函数插件载入失败:'+status+' '+error)},complete:function(xhr,status){setFuncVal()}})}}} function tipsPluginFunc(module){var tips='';if(module=='process'){tips='
如需扩展系统函数,请在根目录/data/config.php中添加配置:
'+"'EXTEND_PROCESS_FUNC'=>array('PHP函数名'=>'描述')
"+'如需扩展插件函数,可创建函数插件
'}else if(module=='processIf'){tips='选择函数,取反可获取函数结果的相反值
'+'默认将当前字段作为参数传入,如需传入多个参数,一行一个值,可输入任何内容或调用字段
'+'请按函数传参,否则运行出错!
'+'如需扩展系统函数,请在根目录/data/config.php中添加配置:
'+"'EXTEND_PROCESS_IF'=>array('PHP函数名'=>'描述')
"+'如需扩展插件函数,可创建函数插件
'}else if(module=='downloadImg'||module=='contentSign'){window.open(ulink('develop/func?module='+module));return!1} confirmRight({msg:tips,yes:'确定',width:500,textAlign:'left'})} -function tipsCurlPost(){var tips='表单数据:模拟form表单输入的数据
表单上传:模拟form表单输入并上传的数据
'+'JSON数组:以json格式发送数据,可在“发送数据”的值中直接输入json字符串,根节点名称使用###表示,子节点名称使用.分隔,例如:a.b.c
';confirmRight({msg:tips,yes:'确定',width:500,textAlign:'left'})} +function tipsCurlPost(){var tips='表单数据:模拟form表单输入的数据
表单上传:模拟form表单输入并上传的数据
'+'JSON数组:以json格式发送数据,可在“发送数据”的“值”中直接输入json字符串。在“名称”中填入json数组键名,根节点名称使用###表示,子节点名称使用.分隔,例如:a.b.c
';confirmRight({msg:tips,yes:'确定',width:500,textAlign:'left'})} function collectorWindow(title,uri,uriVals,options){options=options?options:{};options.backdrop_static=1;title=isNull(title)?'':title;title+='';window.win_collector_window_params={title:title,uri:uri,uriVals:uriVals,options:options};windowModal(title,ulink('admin/collector/echo_msg?op=run'),{lg:options.lg})} var collectorEchoMsg={config:{},processes:{},close_non_stop:!1,end_set_timeout:null,run:function(config){collectorEchoMsg.config=isObject(config)?config:{};collectorEchoMsg.processes={};collectorEchoMsg.close_non_stop=!1;var winParams=window.win_collector_window_params;winParams=isObject(winParams)?winParams:{};var uri=winParams.uri?winParams.uri:'';var uriVals=isObject(winParams.uriVals)?winParams.uriVals:{};var options=isObject(winParams.options)?winParams.options:{};var winProcessBox=$('#myModal #win_cem_process_box').clone();if(uri){var title=winParams.title+'日志读取间隔秒';var closeFuncs=new Array();if(!isNull(options.close_func)){if(isObject(options.close_func)){closeFuncs=options.close_func}else{closeFuncs.push(options.close_func)}} closeFuncs.push(function(){if(!collectorEchoMsg.close_non_stop){collectorEchoMsg.stop_all()}});options.close_func=closeFuncs;windowIframe(title,'',options);$('#myModal #myModalIframe').hide();$('#myModal #win_cem_interval_btn').bind('click',function(){collectorEchoMsg.set_interval($('#win_cem_interval').val())});var runUrl=ulink(uri,uriVals);ajaxOpen({type:'get',url:runUrl,dataType:'json',async:!0,success:function(data){if(data.code==1){var processes=data.data?data.data:{};var collectorKey=processes.collector_key?processes.collector_key:'';var processKeys=isObject(processes.process_keys)?processes.process_keys:[];var processNum=processKeys.length;if(!collectorKey||processNum<=0){return} diff --git a/public/static/js/admin/collected.js b/public/static/js/admin/collected.js index 2b839ac..e1d5a63 100644 --- a/public/static/js/admin/collected.js +++ b/public/static/js/admin/collected.js @@ -8,7 +8,7 @@ |-------------------------------------------------------------------------- */ 'use strict';function CollectedClass(){} -CollectedClass.prototype={constructor:CollectedClass,init_list:function(){$('#list_table .delete').bind('click',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){ajaxOpen({type:"GET",url:obj.attr('url'),dataType:"json",success:function(data){data.code==1?toastr.success(data.msg):toastr.error(data.msg);if(data.code==1){obj.parents('tr').eq(0).remove()}}})})});$('#deleteall').bind('click',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){ajaxOpen({type:"POST",url:ulink('collected/op?op=deleteall'),dataType:"json",data:$('#form_list').serialize(),success:function(data){data.code==1?toastr.success(data.msg):toastr.error(data.msg);window.setTimeout("window.location.reload();",2500)}})})});$('#btn_clear_error').bind('click',function(){windowModal('清理失败的数据',ulink('collected/clearError'))})},chart_init:function(){$('#chart_date [data-chart-op]').bind('click',function(){if(!$('#chart_date').attr('data-chart-tpl')){$('#chart_date').attr('data-chart-tpl',$('#chart_date .chart-box').prop('outerHTML'))} +CollectedClass.prototype={constructor:CollectedClass,init_list:function(){$('#list_table .delete').bind('click',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){ajaxOpen({type:"GET",url:obj.attr('url'),dataType:"json",success:function(data){data.code==1?toastr.success(data.msg):toastr.error(data.msg);if(data.code==1){obj.parents('tr').eq(0).remove()}}})})});$('#deleteall').bind('click',function(){var obj=$(this);confirmRight(window.tpl_lang.confirm_delete,function(){ajaxOpen({type:"POST",url:ulink('collected/op?op=deleteall'),dataType:"json",data:$('#form_list').serialize(),success:function(data){data.code==1?toastr.success(data.msg):toastr.error(data.msg);window.setTimeout("window.location.reload();",2500)}})})});$('#btn_clear_error').bind('click',function(){windowModal('清理失败的数据',ulink('collected/clearError'))});$.datetimepicker.setLocale('zh');$('#form_search input[name="begin"],#form_search input[name="end"]').datetimepicker()},chart_init:function(){$('#chart_date [data-chart-op]').bind('click',function(){if(!$('#chart_date').attr('data-chart-tpl')){$('#chart_date').attr('data-chart-tpl',$('#chart_date .chart-box').prop('outerHTML'))} $('#chart_date .nav-tabs>li').removeClass('active');$(this).parents('li').eq(0).addClass('active');$('#chart_date .chart-loading').show();$('#chart_date .chart-canvas').remove();var chartOp=$(this).attr('data-chart-op');ajaxOpen({type:"GET",url:ulink('collected/chartOp?op='+chartOp),dataType:"json",success:function(data){var chartData={labels:[],datasets:[{label:"发布成功",data:[],backgroundColor:'rgba(54, 162, 235, 0.2)',borderColor:'rgba(54, 162, 235, 1)',borderWidth:1,},{label:"发布失败",data:[],backgroundColor:'rgba(255, 99, 132, 0.2)',borderColor:'rgba(255, 99, 132, 1)',borderWidth:1,}]};if(data.code==1&&data.data){var nameData=data.data.name;var successData=data.data.success;var failedData=data.data.failed;if(nameData){for(var i in nameData){chartData.labels.push(nameData[i]);chartData.datasets[0].data.push(successData[i]?successData[i]:0);chartData.datasets[1].data.push(failedData[i]?failedData[i]:0)}}} $('#chart_date .chart-box').html($('#chart_date').attr('data-chart-tpl'));$('#chart_date .chart-loading').hide();var chart=$("#chart_date .chart-canvas").get(0).getContext("2d");chart=new Chart(chart,{type:'line',data:chartData,options:{maintainAspectRatio:!1,tooltips:{mode:'index',intersect:!1,}}});chart.canvas.parentNode.style.height='300px'}})});$('#chart_date [data-chart-op="today"]').trigger('click');ajaxOpen({type:"GET",url:ulink('collected/chartOp?op=release'),dataType:"json",success:function(data){var chartData={labels:[],datasets:[{label:"发布成功",data:[],backgroundColor:'rgba(54, 162, 235, 0.2)',borderColor:'rgba(54, 162, 235, 1)',pointBackgroundColor:'rgba(54, 162, 235, 0.2)',pointBorderColor:'rgba(54, 162, 235, 1)',borderWidth:1,},{label:"发布失败",data:[],backgroundColor:'rgba(255, 99, 132, 0.2)',borderColor:'rgba(255, 99, 132, 1)',pointBackgroundColor:'rgba(255, 99, 132, 0.2)',pointBorderColor:'rgba(255, 99, 132, 1)',borderWidth:1,}]};if(data.code==1&&data.data){var nameData=data.data.name;var successData=data.data.success;var failedData=data.data.failed;if(nameData){for(var i in nameData){chartData.labels.push(nameData[i]);chartData.datasets[0].data.push(successData[i]?successData[i]:0);chartData.datasets[1].data.push(failedData[i]?failedData[i]:0)}} $('#chart_release .chart-loading').hide();$('#chart_release .chart-canvas').show();var chart=$("#chart_release .chart-canvas").get(0).getContext("2d");chart=new Chart(chart,{type:'radar',data:chartData,options:{maintainAspectRatio:!1,tooltips:{mode:'index',intersect:!1,}}});chart.canvas.parentNode.style.height='300px'}}});ajaxOpen({type:"GET",url:ulink('collected/chartOp?op=task'),dataType:"json",success:function(data){var chartData={labels:[],datasets:[{label:"采集数量",data:[],backgroundColor:'rgba(54, 162, 235, 0.2)',}]};if(data.code==1&&data.data){var nameData=data.data.name;var totalData=data.data.total;if(nameData){for(var i in nameData){if(nameData[i]&&totalData[i]){chartData.labels.push(nameData[i]);chartData.datasets[0].data.push(totalData[i])}}} diff --git a/public/static/js/admin/collector.js b/public/static/js/admin/collector.js index e961816..6b593d4 100644 --- a/public/static/js/admin/collector.js +++ b/public/static/js/admin/collector.js @@ -187,7 +187,7 @@ $($_o.processBox+' .process-add').bind('click',function(){var module=$($_o.proce $($_o.processForm).on('click','.p-m-html-tags a[data-val]',function(){var tag=$(this).attr('data-val');var moduleHtml=$(this).parents('.p-m-html-tags').eq(0).attr('module-html');var tagsObj=$(this).parents('section').eq(0).find('input[data-process="html:'+moduleHtml+'"]');var tags=tagsObj.val()+','+tag;tags=tags.replace(/(^,+)|(,+$)/,'');tagsObj.val(tags)});$($_o.processForm).on('change','[data-process="insert:insert_loc"]',function(){var helpEle=$(this).siblings('.help-block');if($(this).val()=='rand'){helpEle.show()}else{helpEle.hide()}});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="translate:translate_from"]',ipt:'[data-process="translate:translate_from_custom"]'});inputSelectCustom(null,null,{box:$_o.processForm,slt:'[data-process="translate:translate_to"]',ipt:'[data-process="translate:translate_to_custom"]'});$_o.txt_insert_field($_o.processForm,'.p-m-func-field',function(sltObj){return $(sltObj).parents('section').eq(0).find('[data-process="func:func_param"]')});$($_o.processForm).on('click','.p-m-if-add',function(){var ifTable=$(this).parents('section').eq(0).find('.p-m-if-table');ifTable.append('执行顺序:从上至下判断,逻辑符“并且”的优先级高于“或者”
'+'例如(字母表示条件):
'+'a && b || c && d && e || f || g && h && i && j 等同于
'+'(a && b) || (c && d && e) || f || (g && h && i && j)
'+'括号中的条件都为真时才是真否则为假,整条语句中任意一个括号的结果为真最终结果为真,都为假最终结果为假
';confirmRight({msg:tips,yes:'确定',width:500,textAlign:'left'})});$($_o.processForm).on('click','.p-m-api-add',function(){var apiTable=$(this).parents('section').eq(0).find('.p-m-api-table table');apiTable.find('tbody').append('点击选择CMS
';for(var x in data.data){var list=data.data[x];html+='点击选择CMS
';for(var x in data.data){var list=data.data[x];html+='