fix: 修复报错无法加载policies列表的问题
This commit is contained in:
@@ -1306,12 +1306,13 @@ export function numberWithCommas (num) {
|
|||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
export function switchStatus (status) {
|
export function switchStatus (status) {
|
||||||
switch (status) {
|
switch (status + '') {
|
||||||
case '0':
|
case '0':
|
||||||
return 'detection.create.disabled'
|
return 'detection.create.disabled'
|
||||||
case '1':
|
case '1':
|
||||||
return 'detection.create.enabled'
|
return 'detection.create.enabled'
|
||||||
}
|
}
|
||||||
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="detection-title">
|
<div class="detection-title">
|
||||||
<span>{{ $t('overall.policies') }}</span>
|
<span>{{ $t('overall.policies') }}</span>
|
||||||
<span class="detection-title-label">
|
<span class="detection-title-label">
|
||||||
{{ policyTotal }} {{ $t('detection.policesCreated') }} | {{ policyEnabledNum }} {{ $t('detection.policesEnabled') }}
|
{{ $t('detection.policesCreated', { total: policyTotal }) }} | {{ $t('detection.policesEnabled', { enabled: policyEnabledNum }) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user