build frontend at local

This commit is contained in:
Jacky 2021-07-20 20:01:20 +08:00
parent c79639794b
commit b37c1e8eac
31 changed files with 118 additions and 10 deletions

1
.gitignore vendored
View file

@ -3,5 +3,4 @@
database.db
tmp
node_modules
dist
app.ini

View file

@ -7,15 +7,6 @@ echo "Copyright (c) 0xJacky 2021"
echo
echo "=========================="
echo "installing yarn..."
npm install -g yarn
echo "Compiling frontend..."
cd nginx-ui-frontend || exit 1
yarn build
cd ..
echo "Compiling api server..."
cd server || exit 1
go build -o nginx-ui-server main.go

BIN
nginx-ui-frontend/dist/favicon.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

1
nginx-ui-frontend/dist/index.html vendored Normal file
View file

@ -0,0 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta content="IE=edge" http-equiv="X-UA-Compatible"><meta content="width=device-width,initial-scale=1,user-scalable=0" name="viewport"><link href="/favicon.ico" rel="icon"><title>Nginx UI</title><link href="/js/chunk-1195d4b2.9ad1b5d6.js" rel="prefetch"><link href="/js/chunk-1dac5fde.c49ebcdf.js" rel="prefetch"><link href="/js/chunk-1e5147a5.956086b5.js" rel="prefetch"><link href="/js/chunk-23e3da44.d41ac57a.js" rel="prefetch"><link href="/js/chunk-2d0aa22f.74fa99d5.js" rel="prefetch"><link href="/js/chunk-2d0cf277.a3f15415.js" rel="prefetch"><link href="/js/chunk-2d213afc.3c8b4a2d.js" rel="prefetch"><link href="/js/chunk-4dbdf2dd.a0ef634c.js" rel="prefetch"><link href="/js/chunk-518a8c66.f5a1081f.js" rel="prefetch"><link href="/js/chunk-7895dd6b.202a75af.js" rel="prefetch"><link href="/js/chunk-86603b7c.5fbe9cef.js" rel="prefetch"><link href="/js/chunk-vendors.04f32dfa.js" rel="modulepreload" as="script"><link href="/js/index.e5ead8ca.js" rel="modulepreload" as="script"></head><body><noscript><strong>We're sorry but Nginx UI doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script type="module" src="/js/chunk-vendors.04f32dfa.js"></script><script type="module" src="/js/index.e5ead8ca.js"></script><script>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script src="/js/chunk-vendors-legacy.04f32dfa.js" nomodule></script><script src="/js/index-legacy.f1e0a308.js" nomodule></script></body></html>

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1195d4b2"],{"0073":function(e,t,n){"use strict";n("8d2e")},"393c":function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,".egg[data-v-2efc3950]{padding:10px 0}.ant-btn[data-v-2efc3950]{margin:10px 10px 0 0}",""]),e.exports=t},"8d2e":function(e,t,n){var r=n("393c");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var a=n("499e").default;a("558d65f4",r,!0,{sourceMap:!1,shadowMode:!1})},f820:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-card",[n("h2",[e._v("Nginx UI")]),n("p",[e._v("Yet another WebUI for Nginx")]),n("p",[e._v("Version: "+e._s(e.version)+" ("+e._s(e.build_id)+")")]),n("h3",[e._v("项目组")]),n("p",[e._v("Designer"),n("a",{attrs:{href:"https://jackyu.cn/"}},[e._v("@0xJacky")])]),n("h3",[e._v("技术栈")]),n("p",[e._v("Go")]),n("p",[e._v("Gin")]),n("p",[e._v("Vue")]),n("p",[e._v("Websocket")]),n("h3",[e._v("开源协议")]),n("p",[e._v("GNU General Public License v2.0")]),n("p",[e._v("Copyright © 2020 - "+e._s(e.this_year)+" 0xJacky ")])])},a=[],s=n("1da1"),c=(n("96cf"),{name:"About",data:function(){var e=new Date;return{this_year:e.getFullYear(),version:"0.1.1",build_id:"2",api_root:"/api"}},methods:{changeUserPower:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$store.dispatch("update_mock_user",{power:e});case 2:return n.next=4,t.$api.user.info();case 4:return n.next=6,t.$message.success("修改成功");case 6:case"end":return n.stop()}}),n)})))()}}}),i=c,o=(n("0073"),n("2877")),u=Object(o["a"])(i,r,a,!1,null,"2efc3950",null);t["default"]=u.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1195d4b2"],{"0073":function(e,t,n){"use strict";n("8d2e")},"393c":function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,".egg[data-v-2efc3950]{padding:10px 0}.ant-btn[data-v-2efc3950]{margin:10px 10px 0 0}",""]),e.exports=t},"8d2e":function(e,t,n){var r=n("393c");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var a=n("499e").default;a("558d65f4",r,!0,{sourceMap:!1,shadowMode:!1})},f820:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("a-card",[n("h2",[e._v("Nginx UI")]),n("p",[e._v("Yet another WebUI for Nginx")]),n("p",[e._v("Version: "+e._s(e.version)+" ("+e._s(e.build_id)+")")]),n("h3",[e._v("项目组")]),n("p",[e._v("Designer"),n("a",{attrs:{href:"https://jackyu.cn/"}},[e._v("@0xJacky")])]),n("h3",[e._v("技术栈")]),n("p",[e._v("Go")]),n("p",[e._v("Gin")]),n("p",[e._v("Vue")]),n("p",[e._v("Websocket")]),n("h3",[e._v("开源协议")]),n("p",[e._v("GNU General Public License v2.0")]),n("p",[e._v("Copyright © 2020 - "+e._s(e.this_year)+" 0xJacky ")])])},a=[],s=n("1da1"),c=(n("96cf"),{name:"About",data:function(){var e=new Date;return{this_year:e.getFullYear(),version:"0.1.1",build_id:"2",api_root:"/api"}},methods:{changeUserPower:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$store.dispatch("update_mock_user",{power:e});case 2:return n.next=4,t.$api.user.info();case 4:return n.next=6,t.$message.success("修改成功");case 6:case"end":return n.stop()}}),n)})))()}}}),i=c,o=(n("0073"),n("2877")),u=Object(o["a"])(i,r,a,!1,null,"2efc3950",null);t["default"]=u.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e5147a5"],{"22e7":function(e,t,r){var a=r("24fb");t=a(!1),t.push([e.i,".project-title{margin:50px}.project-title h1{font-size:50px;font-weight:100;text-align:center}.login-form{max-width:500px;margin:0 auto}footer{padding:30px;text-align:center}",""]),e.exports=t},4871:function(e,t,r){var a=r("22e7");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var s=r("499e").default;s("749337a0",a,!0,{sourceMap:!1,shadowMode:!1})},"4fde":function(e,t,r){"use strict";r("4871")},a55b:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-form"},[e._m(0),r("a-form",{staticClass:"login-form",attrs:{id:"components-form-demo-normal-login",form:e.form},on:{submit:e.handleSubmit}},[r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"Please input your username!"}]}],expression:"[\n 'name',\n { rules: [{ required: true, message: 'Please input your username!' }] },\n ]"}],attrs:{placeholder:"Username"}},[r("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"Please input your Password!"}]}],expression:"[\n 'password',\n { rules: [{ required: true, message: 'Please input your Password!' }] },\n ]"}],attrs:{type:"password",placeholder:"Password"}},[r("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),r("a-form-item",[r("a-button",{attrs:{type:"primary",block:!0,"html-type":"submit"}},[e._v(" Log in ")])],1)],1),r("footer",[e._v(" Copyright © 2020 - "+e._s(e.thisYear)+" 0xJacky ")])],1)},s=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"project-title"},[r("h1",[e._v("Nginx UI")])])}],o=r("1da1"),n=(r("96cf"),r("b0c0"),{name:"Login",data:function(){return{form:{},thisYear:(new Date).getFullYear()}},created:function(){this.$store.state.user.token&&this.$router.push("/"),this.form=this.$form.createForm(this)},methods:{handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e,r){e||t.$api.auth.login(r.name,r.password).then(Object(o["a"])(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$message.success("登录成功",1);case 2:return r=t.$route.query.next?t.$route.query.next:"/",e.next=5,t.$router.push(r);case 5:case"end":return e.stop()}}),e)})))).catch((function(e){console.log(e),t.$message.error(e.message)}))}))}}}),i=n,u=(r("4fde"),r("2877")),c=Object(u["a"])(i,a,s,!1,null,null,null);t["default"]=c.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e5147a5"],{"22e7":function(e,t,r){var a=r("24fb");t=a(!1),t.push([e.i,".project-title{margin:50px}.project-title h1{font-size:50px;font-weight:100;text-align:center}.login-form{max-width:500px;margin:0 auto}footer{padding:30px;text-align:center}",""]),e.exports=t},4871:function(e,t,r){var a=r("22e7");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var s=r("499e").default;s("749337a0",a,!0,{sourceMap:!1,shadowMode:!1})},"4fde":function(e,t,r){"use strict";r("4871")},a55b:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-form"},[e._m(0),r("a-form",{staticClass:"login-form",attrs:{id:"components-form-demo-normal-login",form:e.form},on:{submit:e.handleSubmit}},[r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["name",{rules:[{required:!0,message:"Please input your username!"}]}],expression:"[\n 'name',\n { rules: [{ required: true, message: 'Please input your username!' }] },\n ]"}],attrs:{placeholder:"Username"}},[r("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"user"},slot:"prefix"})],1)],1),r("a-form-item",[r("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["password",{rules:[{required:!0,message:"Please input your Password!"}]}],expression:"[\n 'password',\n { rules: [{ required: true, message: 'Please input your Password!' }] },\n ]"}],attrs:{type:"password",placeholder:"Password"}},[r("a-icon",{staticStyle:{color:"rgba(0,0,0,.25)"},attrs:{slot:"prefix",type:"lock"},slot:"prefix"})],1)],1),r("a-form-item",[r("a-button",{attrs:{type:"primary",block:!0,"html-type":"submit"}},[e._v(" Log in ")])],1)],1),r("footer",[e._v(" Copyright © 2020 - "+e._s(e.thisYear)+" 0xJacky ")])],1)},s=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"project-title"},[r("h1",[e._v("Nginx UI")])])}],o=r("1da1"),n=(r("96cf"),r("b0c0"),{name:"Login",data:function(){return{form:{},thisYear:(new Date).getFullYear()}},created:function(){this.$store.state.user.token&&this.$router.push("/"),this.form=this.$form.createForm(this)},methods:{handleSubmit:function(e){var t=this;e.preventDefault(),this.form.validateFields((function(e,r){e||t.$api.auth.login(r.name,r.password).then(Object(o["a"])(regeneratorRuntime.mark((function e(){var r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$message.success("登录成功",1);case 2:return r=t.$route.query.next?t.$route.query.next:"/",e.next=5,t.$router.push(r);case 5:case"end":return e.stop()}}),e)})))).catch((function(e){console.log(e),t.$message.error(e.message)}))}))}}}),i=n,u=(r("4fde"),r("2877")),c=Object(u["a"])(i,a,s,!1,null,null,null);t["default"]=c.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-23e3da44"],{b2cd:function(t,a,e){"use strict";e("e49f")},dda8:function(t,a,e){"use strict";e.r(a);var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"wrapper"},[e("h1",{staticClass:"title"},[t._v(t._s(t.$route.meta.status_code?t.$route.meta.status_code:404))]),e("p",[t._v(t._s(t.$route.meta.error?t.$route.meta.error:"找不到文件"))])])},i=[],r={name:"Error"},c=r,n=(e("b2cd"),e("2877")),s=Object(n["a"])(c,o,i,!1,null,"c0697242",null);a["default"]=s.exports},e49f:function(t,a,e){var o=e("fdbe");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=e("499e").default;i("6f232624",o,!0,{sourceMap:!1,shadowMode:!1})},fdbe:function(t,a,e){var o=e("24fb");a=o(!1),a.push([t.i,"body[data-v-c0697242],div[data-v-c0697242],h1[data-v-c0697242],html[data-v-c0697242]{padding:0;margin:0}body[data-v-c0697242],html[data-v-c0697242]{color:#444;position:relative;font-family:PingFang SC,Helvetica Neue,Helvetica,Arial,CustomFont,Microsoft YaHei UI,Microsoft YaHei,Hiragino Sans GB,sans-serif;background:#fcfcfc;height:100%}h1[data-v-c0697242]{font-size:8em;font-weight:100}a[data-v-c0697242]{color:#4181b9;text-decoration:none;transition:all .3s ease}a[data-v-c0697242]:active,a[data-v-c0697242]:hover{color:#5bb0ed}.wrapper[data-v-c0697242]{position:absolute;top:0;bottom:0;left:0;right:0;font-size:1em;font-weight:400;width:100%;height:30%;line-height:1;margin:auto;text-align:center}",""]),t.exports=a}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-23e3da44"],{b2cd:function(t,a,e){"use strict";e("e49f")},dda8:function(t,a,e){"use strict";e.r(a);var o=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"wrapper"},[e("h1",{staticClass:"title"},[t._v(t._s(t.$route.meta.status_code?t.$route.meta.status_code:404))]),e("p",[t._v(t._s(t.$route.meta.error?t.$route.meta.error:"找不到文件"))])])},i=[],r={name:"Error"},c=r,n=(e("b2cd"),e("2877")),s=Object(n["a"])(c,o,i,!1,null,"c0697242",null);a["default"]=s.exports},e49f:function(t,a,e){var o=e("fdbe");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=e("499e").default;i("6f232624",o,!0,{sourceMap:!1,shadowMode:!1})},fdbe:function(t,a,e){var o=e("24fb");a=o(!1),a.push([t.i,"body[data-v-c0697242],div[data-v-c0697242],h1[data-v-c0697242],html[data-v-c0697242]{padding:0;margin:0}body[data-v-c0697242],html[data-v-c0697242]{color:#444;position:relative;font-family:PingFang SC,Helvetica Neue,Helvetica,Arial,CustomFont,Microsoft YaHei UI,Microsoft YaHei,Hiragino Sans GB,sans-serif;background:#fcfcfc;height:100%}h1[data-v-c0697242]{font-size:8em;font-weight:100}a[data-v-c0697242]{color:#4181b9;text-decoration:none;transition:all .3s ease}a[data-v-c0697242]:active,a[data-v-c0697242]:hover{color:#5bb0ed}.wrapper[data-v-c0697242]{position:absolute;top:0;bottom:0;left:0;right:0;font-size:1em;font-weight:400;width:100%;height:30%;line-height:1;margin:auto;text-align:center}",""]),t.exports=a}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa22f"],{1071:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-card",{attrs:{title:"配置文件"}},[a("std-table",{attrs:{api:t.api,columns:t.columns,deletable:!1,disable_search:!0,data_key:"configs"},on:{clickEdit:function(e){t.$router.push({path:"/config/"+e.name})}}})],1)},o=[],i=a("d3a9"),s=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"名称"},sorter:!0,pithy:!0},{title:"修改时间",dataIndex:"modify",datetime:!0,scopedSlots:{customRender:"modify"},sorter:!0,pithy:!0},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],c={name:"Config",components:{StdTable:i["a"]},data:function(){return{api:this.$api.config,columns:s}}},d=c,l=a("2877"),r=Object(l["a"])(d,n,o,!1,null,"329a6828",null);e["default"]=r.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aa22f"],{1071:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("a-card",{attrs:{title:"配置文件"}},[a("std-table",{attrs:{api:t.api,columns:t.columns,deletable:!1,disable_search:!0,data_key:"configs"},on:{clickEdit:function(e){t.$router.push({path:"/config/"+e.name})}}})],1)},o=[],i=a("d3a9"),s=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"名称"},sorter:!0,pithy:!0},{title:"修改时间",dataIndex:"modify",datetime:!0,scopedSlots:{customRender:"modify"},sorter:!0,pithy:!0},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],c={name:"Config",components:{StdTable:i["a"]},data:function(){return{api:this.$api.config,columns:s}}},d=c,l=a("2877"),r=Object(l["a"])(d,n,o,!1,null,"329a6828",null);e["default"]=r.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cf277"],{6304:function(e,n,t){"use strict";t.r(n);var c=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("router-view")},r=[],u={name:"BaseRouterView"},a=u,o=t("2877"),s=Object(o["a"])(a,c,r,!1,null,"375df1cc",null);n["default"]=s.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cf277"],{6304:function(e,n,t){"use strict";t.r(n);var c=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("router-view")},r=[],u={name:"BaseRouterView"},a=u,o=t("2877"),s=Object(o["a"])(a,c,r,!1,null,"375df1cc",null);n["default"]=s.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d213afc"],{ae79:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=this,a=t.$createElement,n=t._self._c||a;return n("a-card",{attrs:{title:"网站管理"}},[n("std-table",{ref:"table",attrs:{api:t.api,columns:t.columns,data_key:"configs",disable_search:!0},on:{clickEdit:function(t){return e.$router.push({path:"/domain/"+t.name})}},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.record;return[a.enabled?n("a",{on:{click:function(e){return t.disable(a.name)}}},[t._v("禁用")]):n("a",{on:{click:function(e){return t.enable(a.name)}}},[t._v("启用")]),n("a-divider",{attrs:{type:"vertical"}})]}}])})],1)},s=[],o=a("d3a9"),i=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"名称"},sorter:!0,pithy:!0},{title:"状态",dataIndex:"enabled",badge:!0,scopedSlots:{customRender:"enabled"},mask:{true:"启用",false:"未启用"},sorter:!0,pithy:!0},{title:"修改时间",dataIndex:"modify",datetime:!0,scopedSlots:{customRender:"modify"},sorter:!0,pithy:!0},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],c={name:"Domain",components:{StdTable:o["a"]},data:function(){return{api:this.$api.domain,columns:i}},methods:{enable:function(e){var t=this;this.$api.domain.enable(e).then((function(){t.$message.success("启用成功"),t.$refs.table.get_list()})).catch((function(e){console.log(e),t.$message.error("启用失败")}))},disable:function(e){var t=this;this.$api.domain.disable(e).then((function(){t.$message.success("禁用成功"),t.$refs.table.get_list()})).catch((function(e){console.log(e),t.$message.error("禁用失败")}))}}},r=c,d=a("2877"),l=Object(d["a"])(r,n,s,!1,null,"6b76b78c",null);t["default"]=l.exports}}]);

View file

@ -0,0 +1 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d213afc"],{ae79:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=this,a=t.$createElement,n=t._self._c||a;return n("a-card",{attrs:{title:"网站管理"}},[n("std-table",{ref:"table",attrs:{api:t.api,columns:t.columns,data_key:"configs",disable_search:!0},on:{clickEdit:function(t){return e.$router.push({path:"/domain/"+t.name})}},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.record;return[a.enabled?n("a",{on:{click:function(e){return t.disable(a.name)}}},[t._v("禁用")]):n("a",{on:{click:function(e){return t.enable(a.name)}}},[t._v("启用")]),n("a-divider",{attrs:{type:"vertical"}})]}}])})],1)},s=[],o=a("d3a9"),i=[{title:"名称",dataIndex:"name",scopedSlots:{customRender:"名称"},sorter:!0,pithy:!0},{title:"状态",dataIndex:"enabled",badge:!0,scopedSlots:{customRender:"enabled"},mask:{true:"启用",false:"未启用"},sorter:!0,pithy:!0},{title:"修改时间",dataIndex:"modify",datetime:!0,scopedSlots:{customRender:"modify"},sorter:!0,pithy:!0},{title:"操作",dataIndex:"action",scopedSlots:{customRender:"action"}}],c={name:"Domain",components:{StdTable:o["a"]},data:function(){return{api:this.$api.domain,columns:i}},methods:{enable:function(e){var t=this;this.$api.domain.enable(e).then((function(){t.$message.success("启用成功"),t.$refs.table.get_list()})).catch((function(e){console.log(e),t.$message.error("启用失败")}))},disable:function(e){var t=this;this.$api.domain.disable(e).then((function(){t.$message.success("禁用成功"),t.$refs.table.get_list()})).catch((function(e){console.log(e),t.$message.error("禁用失败")}))}}},r=c,d=a("2877"),l=Object(d["a"])(r,n,s,!1,null,"6b76b78c",null);t["default"]=l.exports}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
nginx-ui-frontend/dist/version.json vendored Normal file
View file

@ -0,0 +1 @@
{"version":"0.1.1","build_id":2}