fix: 完善 license 同步失联逻辑 (#7090)
Some checks are pending
Build Test / build-linux-binary (push) Waiting to run
Build / SonarCloud (push) Waiting to run
sync2gitee / repo-sync (push) Waiting to run

This commit is contained in:
ssongliu 2024-11-15 23:22:01 +08:00 committed by GitHub
parent e5b0a1c591
commit 3087c1a6e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 15 deletions

View File

@ -10,6 +10,8 @@ const (
StatusEnable = "Enable"
StatusDisable = "Disable"
StatusNone = "None"
StatusOnRetry = "OnRetry"
StatusLost = "Lost"
OrderDesc = "descending"
OrderAsc = "ascending"

View File

@ -1686,13 +1686,11 @@ const message = {
expiresAt: 'Expiry Date',
productName: 'Product Name',
productStatus: 'Product Status',
Lost01: 'Lost * 1',
Lost02: 'Lost * 2',
Lost03: 'Lost',
Lost: 'Lost',
Enable: 'Enabled',
Disable: 'Disabled',
lostHelper:
'The License needs to be periodically synchronized for availability. Please ensure normal external network access. After three losses of connection, the License binding will be released.',
'The License needs to be periodically synchronized for availability. Please ensure normal external network access.',
quickUpdate: 'Quick Update',
import: 'Import',
power: 'Authorize',

View File

@ -1564,12 +1564,10 @@ const message = {
expiresAt: '到期時間',
productName: '產品名稱',
productStatus: '產品狀態',
Lost01: '失聯 * 1',
Lost02: '失聯 * 2',
Lost03: '已失聯',
Lost: '已失聯',
Enable: '已啟用',
Disable: '未啟用',
lostHelper: '許可證需要定時同步是否可用請保證正常外網訪問失聯三次後將解除許可證綁定',
lostHelper: '許可證需要定時同步是否可用請保證正常外網訪問',
quickUpdate: '快速更新',
import: '導入',
power: ' ',

View File

@ -1565,12 +1565,10 @@ const message = {
expiresAt: '到期时间',
productName: '产品名称',
productStatus: '产品状态',
Lost01: '失联 * 1',
Lost02: '失联 * 2',
Lost03: '已失联',
Lost: '已失联',
Enable: '已激活',
Disable: '未激活',
lostHelper: '许可证需要定时同步是否可用请保证正常外网访问失联三次后将解除许可证绑定',
lostHelper: '许可证需要定时同步是否可用请保证正常外网访问',
quickUpdate: '快速更新',
import: '导入',
power: ' ',

View File

@ -70,7 +70,7 @@ export async function loadProductProFromDB() {
globalStore.isProductPro = false;
} else {
globalStore.isProductPro =
res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02';
res.data.status === 'Enable' || res.data.status === 'OnRetry' || res.data.status === 'Lost';
if (globalStore.isProductPro) {
globalStore.productProExpires = Number(res.data.productPro);
globalStore.isTrial = res.data.trial;
@ -91,7 +91,7 @@ export async function getXpackSettingForTheme() {
return;
}
globalStore.isProductPro =
res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02';
res.data.status === 'Enable' || res.data.status === 'OnRetry' || res.data.status === 'Lost';
if (globalStore.isProductPro) {
globalStore.productProExpires = Number(res.data.productPro);
globalStore.isTrial = res.data.trial;

View File

@ -202,7 +202,7 @@ const search = async () => {
loading.value = false;
license.status = res.data.status;
globalStore.isProductPro =
res.data.status === 'Enable' || res.data.status === 'Lost01' || res.data.status === 'Lost02';
res.data.status === 'Enable' || res.data.status === 'OnRetry' || res.data.status === 'Lost';
if (res.data.status === '') {
hasLicense.value = false;
return;