forked from AkkomaGang/admin-fe
add explanations to rate limit input
This commit is contained in:
parent
eed89a24ad
commit
c4e16b1e15
3 changed files with 30 additions and 24 deletions
|
@ -471,6 +471,8 @@ export default {
|
||||||
setLimits: 'Set different limits for unauthenticated and authenticated users',
|
setLimits: 'Set different limits for unauthenticated and authenticated users',
|
||||||
unauthenticatedUsers: 'Unauthenticated users',
|
unauthenticatedUsers: 'Unauthenticated users',
|
||||||
authenticatedUsers: 'Authenticated users',
|
authenticatedUsers: 'Authenticated users',
|
||||||
|
scale: 'Timespan (ms)',
|
||||||
|
limit: 'Requests',
|
||||||
setLimitsForAll: 'Set limit for all users',
|
setLimitsForAll: 'Set limit for all users',
|
||||||
ref: 'Ref',
|
ref: 'Ref',
|
||||||
file: 'File',
|
file: 'File',
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<div :data-search="setting.key || setting.group" class="rate-limit-container">
|
<div :data-search="setting.key || setting.group" class="rate-limit-container">
|
||||||
<div v-if="!rateLimitAuthUsers">
|
<div v-if="!rateLimitAuthUsers">
|
||||||
<el-input-number
|
<label>{{ $t('settings.limit') }}:</label>
|
||||||
:value="rateLimitAllUsers[0]"
|
|
||||||
:controls="false"
|
|
||||||
placeholder="scale"
|
|
||||||
class="scale-input"
|
|
||||||
@input="parseRateLimiter($event, setting.key, 'scale', 'oneLimit', rateLimitAllUsers)"/>
|
|
||||||
<span>:</span>
|
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:value="rateLimitAllUsers[1]"
|
:value="rateLimitAllUsers[1]"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
placeholder="limit"
|
placeholder="limit"
|
||||||
class="limit-input"
|
class="limit-input"
|
||||||
@input="parseRateLimiter($event, setting.key, 'limit', 'oneLimit', rateLimitAllUsers)"/>
|
@input="parseRateLimiter($event, setting.key, 'limit', 'oneLimit', rateLimitAllUsers)"/>
|
||||||
|
<label>{{ $t('settings.scale') }}:</label>
|
||||||
|
<el-input-number
|
||||||
|
:value="rateLimitAllUsers[0]"
|
||||||
|
:controls="false"
|
||||||
|
placeholder="scale"
|
||||||
|
class="scale-input"
|
||||||
|
@input="parseRateLimiter($event, setting.key, 'scale', 'oneLimit', rateLimitAllUsers)"/>
|
||||||
<div class="limit-button-container">
|
<div class="limit-button-container">
|
||||||
<el-button :size="isDesktop ? 'medium' : 'mini'" icon="el-icon-plus" circle @click="toggleLimits([['', ''], ['', '']], setting.key)"/>
|
<el-button :size="isDesktop ? 'medium' : 'mini'" icon="el-icon-plus" circle @click="toggleLimits([['', ''], ['', '']], setting.key)"/>
|
||||||
<p class="expl limit-expl">{{ $t('settings.setLimits') }}</p>
|
<p class="expl limit-expl">{{ $t('settings.setLimits') }}</p>
|
||||||
|
@ -27,15 +28,7 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rate-limit-content">
|
<div class="rate-limit-content">
|
||||||
<el-input-number
|
<label>{{ $t('settings.limit') }}:</label>
|
||||||
:value="rateLimitUnauthUsers[0]"
|
|
||||||
:controls="false"
|
|
||||||
placeholder="scale"
|
|
||||||
class="scale-input"
|
|
||||||
@input="parseRateLimiter(
|
|
||||||
$event, setting.key, 'scale', 'unauthUsersLimit', [rateLimitUnauthUsers, rateLimitAuthUsers]
|
|
||||||
)"/>
|
|
||||||
<span>:</span>
|
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:value="rateLimitUnauthUsers[1]"
|
:value="rateLimitUnauthUsers[1]"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
|
@ -44,6 +37,15 @@
|
||||||
@input="parseRateLimiter(
|
@input="parseRateLimiter(
|
||||||
$event, setting.key, 'limit', 'unauthUsersLimit', [rateLimitUnauthUsers, rateLimitAuthUsers]
|
$event, setting.key, 'limit', 'unauthUsersLimit', [rateLimitUnauthUsers, rateLimitAuthUsers]
|
||||||
)"/>
|
)"/>
|
||||||
|
<label>{{ $t('settings.scale') }}:</label>
|
||||||
|
<el-input-number
|
||||||
|
:value="rateLimitUnauthUsers[0]"
|
||||||
|
:controls="false"
|
||||||
|
placeholder="scale"
|
||||||
|
class="scale-input"
|
||||||
|
@input="parseRateLimiter(
|
||||||
|
$event, setting.key, 'scale', 'unauthUsersLimit', [rateLimitUnauthUsers, rateLimitAuthUsers]
|
||||||
|
)"/>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="rate-limit">
|
<el-form-item class="rate-limit">
|
||||||
|
@ -53,6 +55,14 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rate-limit-content">
|
<div class="rate-limit-content">
|
||||||
|
<label>{{ $t('settings.limit') }}:</label>
|
||||||
|
<el-input-number
|
||||||
|
:value="rateLimitAuthUsers[1]"
|
||||||
|
:controls="false"
|
||||||
|
placeholder="limit"
|
||||||
|
class="limit-input"
|
||||||
|
@input="parseRateLimiter($event, setting.key, 'limit', 'authUserslimit', [rateLimitUnauthUsers, rateLimitAuthUsers])"/>
|
||||||
|
<label>{{ $t('settings.scale') }}:</label>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
:value="rateLimitAuthUsers[0]"
|
:value="rateLimitAuthUsers[0]"
|
||||||
:controls="false"
|
:controls="false"
|
||||||
|
@ -60,12 +70,6 @@
|
||||||
class="scale-input"
|
class="scale-input"
|
||||||
@input="parseRateLimiter($event, setting.key, 'scale', 'authUserslimit', [rateLimitUnauthUsers, rateLimitAuthUsers])"/>
|
@input="parseRateLimiter($event, setting.key, 'scale', 'authUserslimit', [rateLimitUnauthUsers, rateLimitAuthUsers])"/>
|
||||||
<span>:</span>
|
<span>:</span>
|
||||||
<el-input-number
|
|
||||||
:value="rateLimitAuthUsers[1]"
|
|
||||||
:controls="false"
|
|
||||||
placeholder="limit"
|
|
||||||
class="limit-input"
|
|
||||||
@input="parseRateLimiter($event, setting.key, 'limit', 'authUserslimit', [rateLimitUnauthUsers, rateLimitAuthUsers])"/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="limit-button-container">
|
<div class="limit-button-container">
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
.limit-input {
|
.limit-input {
|
||||||
width: 47%;
|
width: 27%;
|
||||||
margin: 0 0 5px 1%
|
margin: 0 0 5px 1%
|
||||||
}
|
}
|
||||||
.line {
|
.line {
|
||||||
|
@ -492,7 +492,7 @@
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
.limit-input {
|
.limit-input {
|
||||||
width: 45%;
|
width: 27%;
|
||||||
}
|
}
|
||||||
.proxy-url-input {
|
.proxy-url-input {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
Loading…
Reference in a new issue