mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +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
|
||||
cmd/server/__debug_bin
|
||||
cmd/server/web
|
||||
frontend/auto-imports.d.ts
|
||||
|
@ -46,6 +46,5 @@ var ScopeKeyMap = map[NginxKey][]string{
|
||||
|
||||
var StaticFileKeyMap = map[NginxKey]struct {
|
||||
}{
|
||||
SSL: {},
|
||||
LimitConn: {},
|
||||
SSL: {},
|
||||
}
|
||||
|
@ -160,9 +160,6 @@ func getNginxParamsFromStaticFile(scope dto.NginxKey, newParams []dto.NginxParam
|
||||
switch scope {
|
||||
case dto.SSL:
|
||||
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() {
|
||||
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
|
||||
var WebsiteDefault []byte
|
||||
|
||||
//go:embed limit.conf
|
||||
var Limit []byte
|
||||
|
||||
//go:embed index.html
|
||||
var Index []byte
|
||||
|
@ -94,11 +94,12 @@
|
||||
v-if="row.status === 'Running'"
|
||||
link
|
||||
type="success"
|
||||
:icon="VideoPlay"
|
||||
@click="opWebsite('stop', row.id)"
|
||||
>
|
||||
{{ $t('commons.status.running') }}
|
||||
</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') }}
|
||||
</el-button>
|
||||
</template>
|
||||
@ -185,7 +186,7 @@ import { ElMessageBox } from 'element-plus';
|
||||
import { dateFormatSimple } from '@/utils/util';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { Promotion } from '@element-plus/icons-vue';
|
||||
import { Promotion, VideoPlay, VideoPause } from '@element-plus/icons-vue';
|
||||
|
||||
const shortcuts = [
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user