mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 完善 license 同步失联逻辑 (#7090)
This commit is contained in:
parent
e5b0a1c591
commit
3087c1a6e8
@ -10,6 +10,8 @@ const (
|
|||||||
StatusEnable = "Enable"
|
StatusEnable = "Enable"
|
||||||
StatusDisable = "Disable"
|
StatusDisable = "Disable"
|
||||||
StatusNone = "None"
|
StatusNone = "None"
|
||||||
|
StatusOnRetry = "OnRetry"
|
||||||
|
StatusLost = "Lost"
|
||||||
|
|
||||||
OrderDesc = "descending"
|
OrderDesc = "descending"
|
||||||
OrderAsc = "ascending"
|
OrderAsc = "ascending"
|
||||||
|
@ -1686,13 +1686,11 @@ const message = {
|
|||||||
expiresAt: 'Expiry Date',
|
expiresAt: 'Expiry Date',
|
||||||
productName: 'Product Name',
|
productName: 'Product Name',
|
||||||
productStatus: 'Product Status',
|
productStatus: 'Product Status',
|
||||||
Lost01: 'Lost * 1',
|
Lost: 'Lost',
|
||||||
Lost02: 'Lost * 2',
|
|
||||||
Lost03: 'Lost',
|
|
||||||
Enable: 'Enabled',
|
Enable: 'Enabled',
|
||||||
Disable: 'Disabled',
|
Disable: 'Disabled',
|
||||||
lostHelper:
|
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',
|
quickUpdate: 'Quick Update',
|
||||||
import: 'Import',
|
import: 'Import',
|
||||||
power: 'Authorize',
|
power: 'Authorize',
|
||||||
|
@ -1564,12 +1564,10 @@ const message = {
|
|||||||
expiresAt: '到期時間',
|
expiresAt: '到期時間',
|
||||||
productName: '產品名稱',
|
productName: '產品名稱',
|
||||||
productStatus: '產品狀態',
|
productStatus: '產品狀態',
|
||||||
Lost01: '失聯 * 1',
|
Lost: '已失聯',
|
||||||
Lost02: '失聯 * 2',
|
|
||||||
Lost03: '已失聯',
|
|
||||||
Enable: '已啟用',
|
Enable: '已啟用',
|
||||||
Disable: '未啟用',
|
Disable: '未啟用',
|
||||||
lostHelper: '許可證需要定時同步是否可用,請保證正常外網訪問,失聯三次後將解除許可證綁定',
|
lostHelper: '許可證需要定時同步是否可用,請保證正常外網訪問。',
|
||||||
quickUpdate: '快速更新',
|
quickUpdate: '快速更新',
|
||||||
import: '導入',
|
import: '導入',
|
||||||
power: '授 權',
|
power: '授 權',
|
||||||
|
@ -1565,12 +1565,10 @@ const message = {
|
|||||||
expiresAt: '到期时间',
|
expiresAt: '到期时间',
|
||||||
productName: '产品名称',
|
productName: '产品名称',
|
||||||
productStatus: '产品状态',
|
productStatus: '产品状态',
|
||||||
Lost01: '失联 * 1',
|
Lost: '已失联',
|
||||||
Lost02: '失联 * 2',
|
|
||||||
Lost03: '已失联',
|
|
||||||
Enable: '已激活',
|
Enable: '已激活',
|
||||||
Disable: '未激活',
|
Disable: '未激活',
|
||||||
lostHelper: '许可证需要定时同步是否可用,请保证正常外网访问,失联三次后将解除许可证绑定',
|
lostHelper: '许可证需要定时同步是否可用,请保证正常外网访问。',
|
||||||
quickUpdate: '快速更新',
|
quickUpdate: '快速更新',
|
||||||
import: '导入',
|
import: '导入',
|
||||||
power: '授 权',
|
power: '授 权',
|
||||||
|
@ -70,7 +70,7 @@ export async function loadProductProFromDB() {
|
|||||||
globalStore.isProductPro = false;
|
globalStore.isProductPro = false;
|
||||||
} else {
|
} else {
|
||||||
globalStore.isProductPro =
|
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) {
|
if (globalStore.isProductPro) {
|
||||||
globalStore.productProExpires = Number(res.data.productPro);
|
globalStore.productProExpires = Number(res.data.productPro);
|
||||||
globalStore.isTrial = res.data.trial;
|
globalStore.isTrial = res.data.trial;
|
||||||
@ -91,7 +91,7 @@ export async function getXpackSettingForTheme() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
globalStore.isProductPro =
|
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) {
|
if (globalStore.isProductPro) {
|
||||||
globalStore.productProExpires = Number(res.data.productPro);
|
globalStore.productProExpires = Number(res.data.productPro);
|
||||||
globalStore.isTrial = res.data.trial;
|
globalStore.isTrial = res.data.trial;
|
||||||
|
@ -202,7 +202,7 @@ const search = async () => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
license.status = res.data.status;
|
license.status = res.data.status;
|
||||||
globalStore.isProductPro =
|
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 === '') {
|
if (res.data.status === '') {
|
||||||
hasLicense.value = false;
|
hasLicense.value = false;
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user