Files
tuend-work 4478491d73 z
2025-11-13 07:41:56 +07:00

1 line
12 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[65],{1727:function(t,e,n){"use strict";n.r(e);var o=n(3838),a=n(2085);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n(3188);var i=n(0),s=n(3190),u=n.n(s),l=Object(i.a)(a.default,o.a,o.b,!1,null,"63b8e99e",null);"function"==typeof u.a&&u()(l),e.default=l.exports},1901:function(t,e,n){"use strict";n.r(e);var o=n(1902),a=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e.default=a.a},1902:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n(13),n(15),n(21),n(62),n(5);var o={data:function(){return{search:"",hideEmpty:!0}},props:{tokens:{type:Array,required:!0,default:function(){return[]}}},computed:{filtered:function(){var t=this,e=function(t,e){return t.toLowerCase().includes(e.toLowerCase())};return this.tokens.filter((function(e){return!t.hideEmpty||e.value})).filter((function(n){var o=n.value,a=n.token;return!t.search||(e(a,t.search)||e(o,t.search))}))}}};e.default=o},1923:function(t,e,n){"use strict";n(7),n(10),n(6),n(8),n(11);var o=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.getDiff=e.savePhpFpmTokens=e.getPhpFpmTokens=e.getPhpFpmConfiguration=e.saveDomainCustomization=e.getDomainCustomization=e.getDomainConfig=e.rewriteConfs=e.getDomains=void 0;var a=o(n(2)),r=o(n(38));n(57),n(5),n(13),n(15),n(21),n(79),n(40);var i=o(n(78)),s=n(32);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f=s.fp.flow(s.fp.convert.toAppString,s.fp.convert.toLines),p=s.fp.flow((function(t){return t||""}),s.fp.convert.toAppString,s.fp.convert.toAppText),c="/CMD_CUSTOM_HTTPD",d=i.default.get({id:"CUSTOM_HTTPD_DOMAINS",url:c,pagination:!0,after:function(){return s.fp.flow(s.fp.mapProp("domains",s.fp.toTable()),s.fp.mapProp("file",s.fp.feedWith(1,(function(t){return["nginx","nginx_proxy","openlitespeed","httpd"].find((function(e){return"1"===t["have_".concat(e)]}))||"httpd"}))))}});e.getDomains=d;var m=i.default.post({url:c,params:{action:"all",rewrite_confs:!0}});e.rewriteConfs=m;var _=i.default.get({url:c,id:"CH_DOMAIN_CONFIG",schema:{domain:i.default.REQUIRED_STRING,proxy:i.default.OPTIONAL_BOOL},after:function(){return s.fp.flow((function(t){return{tokens:t.AVAILABLE_TOKENS,error:t.CONFIG_ERROR,test:t.CONFIG_TEST,data:t.HTTPD,templates:t}}),s.fp.mapProps({error:s.fp.isEqual("1"),nginx:s.fp.isEqual("1"),data:f,test:p,templates:s.fp.flow(s.fp.filter((function(t,e){return e.includes("VH")})),s.fp.filter(s.fp.getProp("data")),s.fp.toArray,s.fp.mapArrayProps({data:f,custom:s.fp.isEqual("1")})),tokens:s.fp.flow(s.fp.mapValues((function(t,e){return{token:e,value:t}})),s.fp.toArray)}))}});e.getDomainConfig=_;var O=i.default.get({url:c,id:"CH_DOMAIN_CUSTOMIZATION_VALUES",schema:{domain:i.default.REQUIRED_STRING,proxy:i.default.OPTIONAL_BOOL},after:function(){return s.fp.flow(s.fp.project({config:"CONFIG",custom1:"CUSTOM1",custom2:"CUSTOM2",custom3:"CUSTOM3",custom4:"CUSTOM4",custom5:"CUSTOM5",custom6:"CUSTOM6",custom7:"CUSTOM7",custom8:"CUSTOM8",tokens:"AVAILABLE_TOKENS",appendix:"VH1.custom_global_pre_post",tokensCount:"NUM_CUSTOM_TOKENS"}),s.fp.mapProps({config:p,custom1:p,custom2:p,custom3:p,custom4:p,custom5:p,custom6:p,custom7:p,custom8:p,nginx:s.fp.convert.toAppBoolean,tokensCount:s.fp.convert.toAppNumber,tokens:s.fp.flow(s.fp.mapValues((function(t,e){return{token:e,value:t}})),s.fp.toArray),appendix:s.fp.flow(s.fp.setDefault({}),s.fp.filter((function(t,e){return e.includes("CUSTOM")})),s.fp.mapValues(p),s.fp.transformObject((function(t,e){var n=e.match(/^.*(CUSTOM.*)$/),o=(0,r.default)(n,2)[1];return(0,a.default)({},o,{data:t,name:e})})))}))}});e.getDomainCustomization=O;var v=i.default.post({url:c,schema:{proxy:i.default.OPTIONAL_STRING,domain:i.default.REQUIRED_STRING,config:i.default.OPTIONAL_STRING,custom1:i.default.OPTIONAL_STRING,custom2:i.default.OPTIONAL_STRING,custom3:i.default.OPTIONAL_STRING,custom4:i.default.OPTIONAL_STRING,custom5:i.default.OPTIONAL_STRING,custom6:i.default.OPTIONAL_STRING,custom7:i.default.OPTIONAL_STRING,custom8:i.default.OPTIONAL_STRING}});e.saveDomainCustomization=v;var T=i.default.get({url:c,id:"CH_PHP_FPM_CONFIGURATION",schema:{user:i.default.REQUIRED_STRING,"php-fpm":i.default.REQUIRED_STRING},after:function(){return s.fp.flow(s.fp.project({error:"CONFIG_ERROR",test:"CONFIG_TEST",custom1:"CUSTOM1",custom2:"CUSTOM2",global_custom1:"GLOBAL_CUSTOM1",global_custom2:"GLOBAL_CUSTOM2","config.data":"FPM_CONFIG","config.file":"FPM_CONFIG_FILE","config.version":"FPM_VER","template.custom":"PHP_FPM_IS_CUSTOM_TEMPLATE","template.data":"PHP_FPM_TEMPLATE","template.name":"PHP_FPM_TEMPLATE_NAME","template.short":"PHP_FPM_TEMPLATE_NAME_SHORT"}),s.fp.mapProps({error:s.fp.isEqual("1"),test:p,custom1:p,custom2:p,config:s.fp.mapProp("data",f),template:s.fp.mapProps({custom:s.fp.isEqual("1"),data:f})}))}});e.getPhpFpmConfiguration=T;var g=i.default.get({id:"CH_PHP_FPM_TOKENS",url:c,schema:{user:i.default.REQUIRED_STRING,"php-fpm":i.default.REQUIRED_STRING},after:function(){return s.fp.flow(s.fp.getProp("AVAILABLE_TOKENS"),s.fp.mapValues((function(t,e){return{token:e,value:t}})),s.fp.toArray)}});e.getPhpFpmTokens=g;var h=i.default.post({url:c,schema:{user:i.default.REQUIRED_STRING,"php-fpm":i.default.REQUIRED_STRING,custom1:i.default.OPTIONAL_STRING,custom2:i.default.OPTIONAL_STRING,all_php_versions:i.default.OPTIONAL_BOOL}});e.savePhpFpmTokens=h;var P=i.default.get({id:"CH_DIFF",url:"/CMD_TEMPLATE_DIFF",schema:{name:i.default.REQUIRED_STRING},after:function(){return s.fp.flow(s.fp.deleteProp("lines"),s.fp.mapValues((function(t,e){return l(l({},t),{},{number:e})})),s.fp.toArray,s.fp.mapArray(s.fp.moveProp("line","content")),s.fp.mapArrayProps({number:s.fp.convert.toAppNumber,content:function(t){return t?t.replace(/\t/g," "):""}}),s.fp.sortBy("number"))}});e.getDiff=P},2004:function(t,e,n){"use strict";n.r(e);var o=n(2024),a=n(1901);for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var i=n(0),s=Object(i.a)(a.default,o.a,o.b,!1,null,null,null);e.default=s.exports},2024:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ui-dialog",{attrs:{id:"VIEW_ALL_AVAILABLE_TOKENS",size:"normal"}},[n("translate",{attrs:{slot:"title"},slot:"title"},[t._v("View All Available Tokens")]),t._v(" "),n("div",{attrs:{slot:"content"},slot:"content"},[n("ui-form-element",{attrs:{underline:!1}},[n("translate",{attrs:{slot:"title"},slot:"title"},[t._v("\n Filter Tokens\n ")]),t._v(" "),n("ui-input-group",{attrs:{slot:"content"},slot:"content"},[n("input-text",{attrs:{slot:"input"},slot:"input",model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),t._v(" "),n("ui-button",{attrs:{slot:"additions:right",theme:"light"},on:{click:function(e){t.hideEmpty=!t.hideEmpty}},slot:"additions:right"},[n("input-checkbox",{model:{value:t.hideEmpty,callback:function(e){t.hideEmpty=e},expression:"hideEmpty"}},[n("translate",[t._v("Hide Empty")])],1)],1)],1)],1),t._v(" "),n("ui-r-table",t._b({attrs:{verticalLayout:t.$_Client.isPhone,disablePagination:"",hideBeforeControls:"",unstickHeaders:""}},"ui-r-table",{rows:t.filtered,columns:[{id:"token",label:t.$gettext("Token"),width:"200px"},{id:"value",label:t.$gettext("Value")}],isCheckable:!1},!1))],1)],1)},a=[]},2085:function(t,e,n){"use strict";n.r(e);var o=n(2086),a=n.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e.default=a.a},2086:function(t,e,n){"use strict";var o=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n(13);var a=n(1923),r=o(n(1903)),i=o(n(2004)),s={preload:function(t){var e=t.dom,n=t.file;return(0,a.getDomainConfig)({domain:e,proxy:"nginx_proxy"===n})},api:[{command:a.getDomainConfig,bind:"config"}],components:{InputTextEditor:r.default,AvailableTokensDialog:i.default},props:{dom:{type:String,required:!0},file:{type:String,required:!0,validator:function(t){return["nginx_proxy","nginx","httpd","openlitespeed"].includes(t)}}},data:function(){return{template:{}}},computed:{filename:function(){return"nginx_proxy"===this.file?"nginx.conf":"".concat(this.file,".conf")}},methods:{showTemplate:function(t){this.template=t,this.$dialog("SHOW_TEMPLATE_DIALOG").open()}}};e.default=s},2867:function(t,e,n){var o=n(3189);o.__esModule&&(o=o.default),"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(4).default)("3fade30f",o,!0,{})},3188:function(t,e,n){"use strict";n(2867)},3189:function(t,e,n){},3190:function(t,e){},3838:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("app-page",{attrs:{id:"custom-httpd-domain",actions:[{handler:function(){return t.$router.push("/admin/custom-httpd/"+t.dom+"/"+t.file+"/customize")},icon:"#console",label:t.$gettext("Customize")}]}},[n("ui-button-link",{attrs:{slot:"header:buttons",name:"admin/custom-httpd/customize",params:{dom:t.dom,file:t.file},theme:"primary"},slot:"header:buttons"},[n("translate",[t._v("Customize")])],1),t._v(" "),n("ui-grid",{attrs:{slot:"page:title"},slot:"page:title"},[n("translate",[t._v("View Domain Configuration")]),t._v(" "),t.$api.config.error?n("ui-badge",{attrs:{theme:"danger",size:"big"}},[n("translate",[t._v("Syntax Error")])],1):t._e()],1),t._v(" "),n("app-page-section",[n("translate",{attrs:{slot:"section:title","translate-params":{domain:t.$p6e.toU(t.dom),filename:t.filename}},slot:"section:title"},[t._v("\n Contents of the %{ filename } file for %{ domain }\n ")]),t._v(" "),n("ol",{staticClass:"config limited"},t._l(t.$api.config.data,(function(e,o){return n("li",{key:o+"-"+e,staticClass:"line"},[n("pre",{staticClass:"line-content",domProps:{textContent:t._s(e)}})])})),0)],1),t._v(" "),t.$api.config.error?n("app-page-section",[n("translate",{attrs:{slot:"section:title"},slot:"section:title"},[t._v("\n Configuration Check\n ")]),t._v(" "),n("pre",{staticClass:"configuration-check",domProps:{textContent:t._s(t.$api.config.test)}})],1):t._e(),t._v(" "),n("app-page-section",[n("translate",{attrs:{slot:"section:title"},slot:"section:title"},[t._v("\n Templates\n ")]),t._v(" "),n("table",{staticClass:"table table-elem"},[n("tbody",t._l(t.$api.config.templates,(function(e){return n("tr",{key:e.name_short,staticClass:"table-row"},[n("td",{attrs:{width:"1%"}},[n("ui-link",{on:{click:function(n){return t.showTemplate(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])],1),t._v(" "),n("td",[n("ui-link",{attrs:{name:"admin/custom-httpd/diff",params:{name:e.name_short}}},[e.custom?n("ui-badge",{attrs:{theme:"primary"}},[n("translate",[t._v("Custom")])],1):t._e()],1)],1)])})),0)])],1),t._v(" "),n("ui-link",{attrs:{slot:"bottom:links",bullet:""},on:{click:function(e){t.$dialog("VIEW_ALL_AVAILABLE_TOKENS").open()}},slot:"bottom:links"},[n("translate",[t._v("View All Available Tokens")])],1),t._v(" "),n("ui-dialog",{attrs:{id:"SHOW_TEMPLATE_DIALOG",size:"normal"}},[n("span",{staticClass:"lowercase",attrs:{slot:"title"},slot:"title"},[t._v("\n "+t._s(t.template.name_short)+"\n ")]),t._v(" "),t.template.data?n("input-text-editor",{attrs:{slot:"content",value:t.template.data.join("\n"),"read-only":"","disable-themes":"","disable-modes":""},slot:"content"}):t._e()],1),t._v(" "),n("available-tokens-dialog",{attrs:{tokens:t.$api.config.tokens}})],1)},a=[]}}]);