mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
feat: 解决两个网站同时开启流量限制报错的BUG
This commit is contained in:
parent
706a1a198f
commit
a28744b907
1
.gitignore
vendored
1
.gitignore
vendored
@ -20,3 +20,4 @@ build
|
|||||||
backend/__debug_bin
|
backend/__debug_bin
|
||||||
cmd/server/__debug_bin
|
cmd/server/__debug_bin
|
||||||
cmd/server/web
|
cmd/server/web
|
||||||
|
frontend/auto-imports.d.ts
|
||||||
|
@ -46,6 +46,5 @@ var ScopeKeyMap = map[NginxKey][]string{
|
|||||||
|
|
||||||
var StaticFileKeyMap = map[NginxKey]struct {
|
var StaticFileKeyMap = map[NginxKey]struct {
|
||||||
}{
|
}{
|
||||||
SSL: {},
|
SSL: {},
|
||||||
LimitConn: {},
|
|
||||||
}
|
}
|
||||||
|
@ -160,9 +160,6 @@ func getNginxParamsFromStaticFile(scope dto.NginxKey, newParams []dto.NginxParam
|
|||||||
switch scope {
|
switch scope {
|
||||||
case dto.SSL:
|
case dto.SSL:
|
||||||
newConfig = parser.NewStringParser(string(nginx_conf.SSL)).Parse()
|
newConfig = parser.NewStringParser(string(nginx_conf.SSL)).Parse()
|
||||||
case dto.LimitConn:
|
|
||||||
updateScope = constant.NginxScopeOut
|
|
||||||
newConfig = parser.NewStringParser(string(nginx_conf.Limit)).Parse()
|
|
||||||
}
|
}
|
||||||
for _, dir := range newConfig.GetDirectives() {
|
for _, dir := range newConfig.GetDirectives() {
|
||||||
addParam := dto.NginxParam{
|
addParam := dto.NginxParam{
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
limit_conn_zone $binary_remote_addr zone=perip:10m;
|
|
||||||
limit_conn_zone $server_name zone=perserver:10m;
|
|
@ -10,8 +10,5 @@ var SSL []byte
|
|||||||
//go:embed website_default.conf
|
//go:embed website_default.conf
|
||||||
var WebsiteDefault []byte
|
var WebsiteDefault []byte
|
||||||
|
|
||||||
//go:embed limit.conf
|
|
||||||
var Limit []byte
|
|
||||||
|
|
||||||
//go:embed index.html
|
//go:embed index.html
|
||||||
var Index []byte
|
var Index []byte
|
||||||
|
@ -94,11 +94,12 @@
|
|||||||
v-if="row.status === 'Running'"
|
v-if="row.status === 'Running'"
|
||||||
link
|
link
|
||||||
type="success"
|
type="success"
|
||||||
|
:icon="VideoPlay"
|
||||||
@click="opWebsite('stop', row.id)"
|
@click="opWebsite('stop', row.id)"
|
||||||
>
|
>
|
||||||
{{ $t('commons.status.running') }}
|
{{ $t('commons.status.running') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-else link type="danger" @click="opWebsite('start', row.id)">
|
<el-button v-else link type="danger" :icon="VideoPause" @click="opWebsite('start', row.id)">
|
||||||
{{ $t('commons.status.stopped') }}
|
{{ $t('commons.status.stopped') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -185,7 +186,7 @@ import { ElMessageBox } from 'element-plus';
|
|||||||
import { dateFormatSimple } from '@/utils/util';
|
import { dateFormatSimple } from '@/utils/util';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { Promotion } from '@element-plus/icons-vue';
|
import { Promotion, VideoPlay, VideoPause } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
const shortcuts = [
|
const shortcuts = [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user