mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 14:54:00 +08:00
fix: 解决网站目录重复的问题 (#695)
This commit is contained in:
parent
d660b7d315
commit
ad0c859b54
@ -7,6 +7,7 @@
|
||||
<el-form ref="limitForm" label-position="left" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item :label="$t('website.limit')">
|
||||
<el-select v-model="ruleKey" @change="changeRule(ruleKey)">
|
||||
<el-option :label="$t('website.current')" :value="'current'"></el-option>
|
||||
<el-option
|
||||
v-for="(limit, index) in limitRules"
|
||||
:key="index"
|
||||
@ -94,7 +95,7 @@ const search = (scopeReq: Website.NginxScopeReq) => {
|
||||
loading.value = true;
|
||||
GetNginxConfig(scopeReq)
|
||||
.then((res) => {
|
||||
ruleKey.value = limitRules[0].key;
|
||||
ruleKey.value = 'current';
|
||||
if (res.data) {
|
||||
enable.value = res.data.enable;
|
||||
if (res.data.enable == false) {
|
||||
@ -102,14 +103,14 @@ const search = (scopeReq: Website.NginxScopeReq) => {
|
||||
}
|
||||
for (const param of res.data.params) {
|
||||
if (param.name === 'limit_conn') {
|
||||
if (param.params[0] === 'perserver') {
|
||||
if (param.params[0] === 'perserver' && param.params[1]) {
|
||||
form.perserver = Number(param.params[1].match(/\d+/g));
|
||||
}
|
||||
if (param.params[0] === 'perip') {
|
||||
if (param.params[0] === 'perip' && param.params[1]) {
|
||||
form.perip = Number(param.params[1].match(/\d+/g));
|
||||
}
|
||||
}
|
||||
if (param.name === 'limit_rate') {
|
||||
if (param.name === 'limit_rate' && param.params[0]) {
|
||||
form.rate = Number(param.params[0].match(/\d+/g));
|
||||
}
|
||||
}
|
||||
|
@ -163,6 +163,7 @@ const getDirs = async () => {
|
||||
loading.value = true;
|
||||
await GetFilesList(dirReq)
|
||||
.then((res) => {
|
||||
dirs.value = [];
|
||||
const items = res.data.items || [];
|
||||
for (const item of items) {
|
||||
dirs.value.push(item.name);
|
||||
|
Loading…
Reference in New Issue
Block a user