mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/1Panel-dev/1Panel.git
synced 2026-09-20 08:03:55 +08:00
chore: update xpack integration references (#12628)
This commit is contained in:
committed by
zhengkunwang223
parent
eb527857f3
commit
5c61217c78
18
.gitignore
vendored
18
.gitignore
vendored
@@ -40,23 +40,23 @@ core/cmd/server/web/index.html
|
|||||||
frontend/auto-imports.d.ts
|
frontend/auto-imports.d.ts
|
||||||
frontend/components.d.ts
|
frontend/components.d.ts
|
||||||
frontend/src/xpack
|
frontend/src/xpack
|
||||||
frontend/src/xpack-ee
|
frontend/src/enterprise
|
||||||
agent/xpack
|
agent/xpack
|
||||||
agent/xpack-ee
|
agent/enterprise
|
||||||
agent/router/entry_xpack.go
|
agent/router/entry_xpack.go
|
||||||
agent/router/entry_xpackee.go
|
agent/router/entry_enterprise.go
|
||||||
agent/server/init_xpack.go
|
agent/server/init_xpack.go
|
||||||
agent/server/init_xpackee.go
|
agent/server/init_enterprise.go
|
||||||
agent/utils/xpack/xpack.go
|
agent/utils/xpack/xpack.go
|
||||||
agent/utils/xpack/xpackee.go
|
agent/utils/xpack/enterprise.go
|
||||||
core/xpack
|
core/xpack
|
||||||
core/xpack-ee
|
core/enterprise
|
||||||
core/router/entry_xpack.go
|
core/router/entry_xpack.go
|
||||||
core/router/entry_xpackee.go
|
core/router/entry_enterprise.go
|
||||||
core/server/init_xpack.go
|
core/server/init_xpack.go
|
||||||
core/server/init_xpackee.go
|
core/server/init_enterprise.go
|
||||||
core/utils/xpack/xpack.go
|
core/utils/xpack/xpack.go
|
||||||
core/utils/xpack/xpackee.go
|
core/utils/xpack/enterprise.go
|
||||||
|
|
||||||
.history/
|
.history/
|
||||||
dist/
|
dist/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !xpack && !xpackee
|
//go:build !xpack && !enterprise
|
||||||
|
|
||||||
package router
|
package router
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !xpack && !xpackee
|
//go:build !xpack && !enterprise
|
||||||
|
|
||||||
package server
|
package server
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !xpack && !xpackee
|
//go:build !xpack && !enterprise
|
||||||
|
|
||||||
package xpack
|
package xpack
|
||||||
|
|
||||||
|
|||||||
@@ -238,16 +238,16 @@ func (b *BaseApi) GetLoginSetting(c *gin.Context) {
|
|||||||
ip := common.GetRealClientIP(c)
|
ip := common.GetRealClientIP(c)
|
||||||
needCaptcha := global.IPTracker.NeedCaptcha(ip)
|
needCaptcha := global.IPTracker.NeedCaptcha(ip)
|
||||||
res := &dto.LoginSetting{
|
res := &dto.LoginSetting{
|
||||||
IsDemo: global.CONF.Base.IsDemo,
|
IsDemo: global.CONF.Base.IsDemo,
|
||||||
IsIntl: global.CONF.Base.Edition == "intl",
|
IsIntl: global.CONF.Base.Edition == "intl",
|
||||||
IsFxplay: global.CONF.Base.IsFxplay,
|
IsFxplay: global.CONF.Base.IsFxplay,
|
||||||
IsOffLine: global.CONF.Base.IsOffLine,
|
IsOffLine: global.CONF.Base.IsOffLine,
|
||||||
IsXPackEE: global.CONF.Base.IsXpackEE,
|
IsEnterprise: global.CONF.Base.IsEnterprise,
|
||||||
Language: settingInfo.Language,
|
Language: settingInfo.Language,
|
||||||
MenuTabs: settingInfo.MenuTabs,
|
MenuTabs: settingInfo.MenuTabs,
|
||||||
PanelName: settingInfo.PanelName,
|
PanelName: settingInfo.PanelName,
|
||||||
Theme: settingInfo.Theme,
|
Theme: settingInfo.Theme,
|
||||||
NeedCaptcha: needCaptcha,
|
NeedCaptcha: needCaptcha,
|
||||||
}
|
}
|
||||||
res.PasskeySetting = xpack.AuthProvider.PasskeyStatus(c)
|
res.PasskeySetting = xpack.AuthProvider.PasskeyStatus(c)
|
||||||
helper.SuccessWithData(c, res)
|
helper.SuccessWithData(c, res)
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ type LoginSetting struct {
|
|||||||
IsIntl bool `json:"isIntl"`
|
IsIntl bool `json:"isIntl"`
|
||||||
IsOffLine bool `json:"isOffLine"`
|
IsOffLine bool `json:"isOffLine"`
|
||||||
IsFxplay bool `json:"isFxplay"`
|
IsFxplay bool `json:"isFxplay"`
|
||||||
IsXPackEE bool `json:"isXpackEE"`
|
IsEnterprise bool `json:"isEnterprise"`
|
||||||
Language string `json:"language"`
|
Language string `json:"language"`
|
||||||
MenuTabs string `json:"menuTabs"`
|
MenuTabs string `json:"menuTabs"`
|
||||||
PanelName string `json:"panelName"`
|
PanelName string `json:"panelName"`
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ base:
|
|||||||
is_demo: false
|
is_demo: false
|
||||||
is_offline: false
|
is_offline: false
|
||||||
is_fxplay: false
|
is_fxplay: false
|
||||||
is_xpackee: true
|
is_enterprise: false
|
||||||
port: 9999
|
port: 9999
|
||||||
username: admin
|
username: admin
|
||||||
password: admin123
|
password: admin123
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type Base struct {
|
|||||||
IsOffLine bool `mapstructure:"is_offline"`
|
IsOffLine bool `mapstructure:"is_offline"`
|
||||||
IsFxplay bool `mapstructure:"is_fxplay"`
|
IsFxplay bool `mapstructure:"is_fxplay"`
|
||||||
Edition string `mapstructure:"edition"`
|
Edition string `mapstructure:"edition"`
|
||||||
IsXpackEE bool `mapstructure:"is_xpackee"`
|
IsEnterprise bool `mapstructure:"is_enterprise"`
|
||||||
Version string `mapstructure:"version"`
|
Version string `mapstructure:"version"`
|
||||||
InstallDir string `mapstructure:"install_dir"`
|
InstallDir string `mapstructure:"install_dir"`
|
||||||
ChangeUserInfo string `mapstructure:"change_user_info"`
|
ChangeUserInfo string `mapstructure:"change_user_info"`
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ ErrLicenseExist: "This license record already exists. You can directly go to the
|
|||||||
ErrXpackNotFound: "This section requires Business Edition. Import a license in Panel Settings > License."
|
ErrXpackNotFound: "This section requires Business Edition. Import a license in Panel Settings > License."
|
||||||
ErrXpackExceptional: "This section requires Business Edition. Sync the license status in Panel Settings > License."
|
ErrXpackExceptional: "This section requires Business Edition. Sync the license status in Panel Settings > License."
|
||||||
ErrXpackLost: "The license retry limit has been reached. Go to Panel Settings > License and run a manual sync."
|
ErrXpackLost: "The license retry limit has been reached. Go to Panel Settings > License and run a manual sync."
|
||||||
ErrXpackEELicenseRequired: "Enterprise Edition license is not imported. Import a license first."
|
ErrEnterpriseLicenseRequired: "Enterprise Edition license is not imported. Import a license first."
|
||||||
ErrDeviceLost: "Required files for license verification are missing, check and try again!"
|
ErrDeviceLost: "Required files for license verification are missing, check and try again!"
|
||||||
ErrDeviceErr: "Current environment does not match the license import environment. Edit the license and re-import."
|
ErrDeviceErr: "Current environment does not match the license import environment. Edit the license and re-import."
|
||||||
ErrXpackTimeout: "Request timeout, network connection might be unstable, try again later!"
|
ErrXpackTimeout: "Request timeout, network connection might be unstable, try again later!"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ ErrXpackNotFound: "Esta sección requiere la edición Business. Importa una lice
|
|||||||
ErrXpackExceptional: "Esta sección requiere la edición Business. Sincroniza el estado de la licencia en Configuración del panel > Licencia."
|
ErrXpackExceptional: "Esta sección requiere la edición Business. Sincroniza el estado de la licencia en Configuración del panel > Licencia."
|
||||||
ErrXpackOutOfDate: "La licencia actual ha expirado, importe nuevamente la licencia en Panel > Ajustes > Licencia"
|
ErrXpackOutOfDate: "La licencia actual ha expirado, importe nuevamente la licencia en Panel > Ajustes > Licencia"
|
||||||
ErrXpackLost: "La licencia alcanzó el límite de reintentos. Ve a Configuración del panel > Licencia y ejecuta una sincronización manual."
|
ErrXpackLost: "La licencia alcanzó el límite de reintentos. Ve a Configuración del panel > Licencia y ejecuta una sincronización manual."
|
||||||
ErrXpackEELicenseRequired: "La licencia de la edición Enterprise no se ha importado. Importa primero una licencia."
|
ErrEnterpriseLicenseRequired: "La licencia de la edición Enterprise no se ha importado. Importa primero una licencia."
|
||||||
ErrDeviceLost: "Faltan archivos necesarios para la verificación de licencia, verifique e intente de nuevo"
|
ErrDeviceLost: "Faltan archivos necesarios para la verificación de licencia, verifique e intente de nuevo"
|
||||||
ErrDeviceErr: "El entorno actual no coincide con el entorno de importación de la licencia. Edite la licencia e impórtela de nuevo"
|
ErrDeviceErr: "El entorno actual no coincide con el entorno de importación de la licencia. Edite la licencia e impórtela de nuevo"
|
||||||
ErrXpackTimeout: "Tiempo de espera de la solicitud, puede que la conexión de red sea inestable, intente más tarde"
|
ErrXpackTimeout: "Tiempo de espera de la solicitud, puede que la conexión de red sea inestable, intente más tarde"
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ ErrLicenseExist: "このライセンス記録は既に存在します。ライ
|
|||||||
ErrXpackNotFound: "この機能は Business Edition で利用できます。パネル設定 > ライセンス でライセンスをインポートしてください"
|
ErrXpackNotFound: "この機能は Business Edition で利用できます。パネル設定 > ライセンス でライセンスをインポートしてください"
|
||||||
ErrXpackExceptional: "この機能は Business Edition で利用できます。パネル設定 > ライセンス でライセンス状態を同期してください"
|
ErrXpackExceptional: "この機能は Business Edition で利用できます。パネル設定 > ライセンス でライセンス状態を同期してください"
|
||||||
ErrXpackLost: "ライセンスの再試行回数が上限に達しました。パネル設定 > ライセンス で手動同期を実行してください"
|
ErrXpackLost: "ライセンスの再試行回数が上限に達しました。パネル設定 > ライセンス で手動同期を実行してください"
|
||||||
ErrXpackEELicenseRequired: "Enterprise Edition のライセンスがインポートされていません。先にライセンスをインポートしてください"
|
ErrEnterpriseLicenseRequired: "Enterprise Edition のライセンスがインポートされていません。先にライセンスをインポートしてください"
|
||||||
ErrDeviceLost: "ライセンス検証に必要なファイルが失われました。確認して再試行してください!"
|
ErrDeviceLost: "ライセンス検証に必要なファイルが失われました。確認して再試行してください!"
|
||||||
ErrDeviceErr: "現在の環境とライセンスのインポート環境が一致しません。ライセンスを編集して再度インポートしてください!"
|
ErrDeviceErr: "現在の環境とライセンスのインポート環境が一致しません。ライセンスを編集して再度インポートしてください!"
|
||||||
ErrXpackTimeout: "リクエストタイムアウト、ネットワーク接続が不安定な可能性があります。後で再試行してください"
|
ErrXpackTimeout: "リクエストタイムアウト、ネットワーク接続が不安定な可能性があります。後で再試行してください"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ErrLicenseExist: "해당 라이선스 기록이 이미 존재합니다. 라이
|
|||||||
ErrXpackNotFound: "이 기능은 Business Edition에서 사용할 수 있습니다. 패널 설정 > 라이선스에서 라이선스를 가져오세요"
|
ErrXpackNotFound: "이 기능은 Business Edition에서 사용할 수 있습니다. 패널 설정 > 라이선스에서 라이선스를 가져오세요"
|
||||||
ErrXpackExceptional: "이 기능은 Business Edition에서 사용할 수 있습니다. 패널 설정 > 라이선스에서 라이선스 상태를 동기화하세요"
|
ErrXpackExceptional: "이 기능은 Business Edition에서 사용할 수 있습니다. 패널 설정 > 라이선스에서 라이선스 상태를 동기화하세요"
|
||||||
ErrXpackLost: "라이선스 재시도 한도에 도달했습니다. 패널 설정 > 라이선스에서 수동 동기화를 실행하세요"
|
ErrXpackLost: "라이선스 재시도 한도에 도달했습니다. 패널 설정 > 라이선스에서 수동 동기화를 실행하세요"
|
||||||
ErrXpackEELicenseRequired: "Enterprise Edition 라이선스를 가져오지 않았습니다. 먼저 라이선스를 가져오세요"
|
ErrEnterpriseLicenseRequired: "Enterprise Edition 라이선스를 가져오지 않았습니다. 먼저 라이선스를 가져오세요"
|
||||||
ErrDeviceLost: "라이센스 검증에 필요한 파일이 누락되었습니다. 확인 후 다시 시도해 주세요"
|
ErrDeviceLost: "라이센스 검증에 필요한 파일이 누락되었습니다. 확인 후 다시 시도해 주세요"
|
||||||
ErrDeviceErr: "현재 환경이 라이선스 가져오기 환경과 일치하지 않습니다. 라이선스를 편집하고 다시 가져오십시오"
|
ErrDeviceErr: "현재 환경이 라이선스 가져오기 환경과 일치하지 않습니다. 라이선스를 편집하고 다시 가져오십시오"
|
||||||
ErrXpackTimeout: "요청 시간 초과, 네트워크 연결이 불안정할 수 있습니다. 나중에 다시 시도해 주세요"
|
ErrXpackTimeout: "요청 시간 초과, 네트워크 연결이 불안정할 수 있습니다. 나중에 다시 시도해 주세요"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ ErrDeviceLost: "Fail yang diperlukan untuk pengesahan lesen hilang, sila semak d
|
|||||||
ErrDeviceErr: "Persekitaran semasa tidak sepadan dengan persekitaran import lesen. Sila edit lesen dan import semula"
|
ErrDeviceErr: "Persekitaran semasa tidak sepadan dengan persekitaran import lesen. Sila edit lesen dan import semula"
|
||||||
ErrXpackTimeout: "Permintaan tamat masa, sambungan rangkaian mungkin tidak stabil, sila cuba lagi kemudian"
|
ErrXpackTimeout: "Permintaan tamat masa, sambungan rangkaian mungkin tidak stabil, sila cuba lagi kemudian"
|
||||||
ErrUnbindMaster: "Terdapat nod dalam pengurusan nod, sila keluarkan dahulu dan cuba lagi"
|
ErrUnbindMaster: "Terdapat nod dalam pengurusan nod, sila keluarkan dahulu dan cuba lagi"
|
||||||
ErrXpackEELicenseRequired: "Lesen Edisi Enterprise belum diimport. Sila import lesen terlebih dahulu"
|
ErrEnterpriseLicenseRequired: "Lesen Edisi Enterprise belum diimport. Sila import lesen terlebih dahulu"
|
||||||
ErrFreeNodeLimit: "Had nod Edisi Community telah dicapai. Pergi ke www.lxware.cn/1panel untuk naik taraf dan cuba lagi"
|
ErrFreeNodeLimit: "Had nod Edisi Community telah dicapai. Pergi ke www.lxware.cn/1panel untuk naik taraf dan cuba lagi"
|
||||||
ErrNodeBound: "Lesen ini telah diikat dengan nod lain, sila semak dan cuba lagi"
|
ErrNodeBound: "Lesen ini telah diikat dengan nod lain, sila semak dan cuba lagi"
|
||||||
ErrNodeBoundDelete: "Lisensi ini telah diikat dan tidak menyokong operasi penghapusan. Sila semak dan cuba lagi"
|
ErrNodeBoundDelete: "Lisensi ini telah diikat dan tidak menyokong operasi penghapusan. Sila semak dan cuba lagi"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ErrLicenseExist: "Este registro de licença já existe. Você pode ir diretament
|
|||||||
ErrXpackNotFound: "Este recurso requer a edição Business. Importe uma licença em Configurações do Painel > Licença."
|
ErrXpackNotFound: "Este recurso requer a edição Business. Importe uma licença em Configurações do Painel > Licença."
|
||||||
ErrXpackExceptional: "Este recurso requer a edição Business. Sincronize o status da licença em Configurações do Painel > Licença."
|
ErrXpackExceptional: "Este recurso requer a edição Business. Sincronize o status da licença em Configurações do Painel > Licença."
|
||||||
ErrXpackLost: "A licença atingiu o limite de tentativas. Acesse Configurações do Painel > Licença e execute uma sincronização manual."
|
ErrXpackLost: "A licença atingiu o limite de tentativas. Acesse Configurações do Painel > Licença e execute uma sincronização manual."
|
||||||
ErrXpackEELicenseRequired: "A licença da edição Enterprise não foi importada. Importe uma licença primeiro."
|
ErrEnterpriseLicenseRequired: "A licença da edição Enterprise não foi importada. Importe uma licença primeiro."
|
||||||
ErrDeviceLost: "Arquivos necessários para a verificação da licença estão faltando, por favor verifique e tente novamente"
|
ErrDeviceLost: "Arquivos necessários para a verificação da licença estão faltando, por favor verifique e tente novamente"
|
||||||
ErrDeviceErr: "O ambiente atual não corresponde ao ambiente de importação da licença. Por favor, edite a licença e reimporte"
|
ErrDeviceErr: "O ambiente atual não corresponde ao ambiente de importação da licença. Por favor, edite a licença e reimporte"
|
||||||
ErrXpackTimeout: "Requisição expirou, a conexão de rede pode estar instável, por favor tente novamente mais tarde"
|
ErrXpackTimeout: "Requisição expirou, a conexão de rede pode estar instável, por favor tente novamente mais tarde"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ErrLicenseExist: "Данная лицензия уже существует. В
|
|||||||
ErrXpackNotFound: "Этот раздел доступен в Business Edition. Импортируйте лицензию в Настройки панели > Лицензия"
|
ErrXpackNotFound: "Этот раздел доступен в Business Edition. Импортируйте лицензию в Настройки панели > Лицензия"
|
||||||
ErrXpackExceptional: "Этот раздел доступен в Business Edition. Синхронизируйте статус лицензии в Настройки панели > Лицензия"
|
ErrXpackExceptional: "Этот раздел доступен в Business Edition. Синхронизируйте статус лицензии в Настройки панели > Лицензия"
|
||||||
ErrXpackLost: "Достигнут лимит повторных попыток по лицензии. Перейдите в Настройки панели > Лицензия и выполните ручную синхронизацию"
|
ErrXpackLost: "Достигнут лимит повторных попыток по лицензии. Перейдите в Настройки панели > Лицензия и выполните ручную синхронизацию"
|
||||||
ErrXpackEELicenseRequired: "Лицензия Enterprise Edition не импортирована. Сначала импортируйте лицензию."
|
ErrEnterpriseLicenseRequired: "Лицензия Enterprise Edition не импортирована. Сначала импортируйте лицензию."
|
||||||
ErrDeviceLost: "Необходимые файлы для проверки лицензии отсутствуют, пожалуйста, проверьте и попробуйте снова"
|
ErrDeviceLost: "Необходимые файлы для проверки лицензии отсутствуют, пожалуйста, проверьте и попробуйте снова"
|
||||||
ErrDeviceErr: "Текущая среда не соответствует среде импорта лицензии. Отредактируйте лицензию и повторите импорт"
|
ErrDeviceErr: "Текущая среда не соответствует среде импорта лицензии. Отредактируйте лицензию и повторите импорт"
|
||||||
ErrXpackTimeout: "Время ожидания запроса истекло, возможно нестабильное сетевое соединение, повторите попытку позже"
|
ErrXpackTimeout: "Время ожидания запроса истекло, возможно нестабильное сетевое соединение, повторите попытку позже"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ErrLicenseExist: "Bu lisans kaydı zaten mevcut. Düğüm bağlama için doğrud
|
|||||||
ErrXpackNotFound: "Bu bölüm Business Sürüm gerektirir. Lisansı Panel Ayarları > Lisans bölümünden içe aktarın"
|
ErrXpackNotFound: "Bu bölüm Business Sürüm gerektirir. Lisansı Panel Ayarları > Lisans bölümünden içe aktarın"
|
||||||
ErrXpackExceptional: "Bu bölüm Business Sürüm gerektirir. Lisans durumunu Panel Ayarları > Lisans bölümünden senkronize edin"
|
ErrXpackExceptional: "Bu bölüm Business Sürüm gerektirir. Lisans durumunu Panel Ayarları > Lisans bölümünden senkronize edin"
|
||||||
ErrXpackLost: "Lisans yeniden deneme sınırına ulaştı. Panel Ayarları > Lisans bölümüne gidip manuel senkronizasyon çalıştırın"
|
ErrXpackLost: "Lisans yeniden deneme sınırına ulaştı. Panel Ayarları > Lisans bölümüne gidip manuel senkronizasyon çalıştırın"
|
||||||
ErrXpackEELicenseRequired: "Enterprise Edition lisansı içe aktarılmamış. Önce bir lisans içe aktarın."
|
ErrEnterpriseLicenseRequired: "Enterprise Edition lisansı içe aktarılmamış. Önce bir lisans içe aktarın."
|
||||||
ErrDeviceLost: "Lisans doğrulama için gerekli dosyalar eksik, lütfen kontrol edip tekrar deneyin"
|
ErrDeviceLost: "Lisans doğrulama için gerekli dosyalar eksik, lütfen kontrol edip tekrar deneyin"
|
||||||
ErrXpackTimeout: "İstek zaman aşımı, ağ bağlantısı kararsız olabilir, lütfen daha sonra tekrar deneyin"
|
ErrXpackTimeout: "İstek zaman aşımı, ağ bağlantısı kararsız olabilir, lütfen daha sonra tekrar deneyin"
|
||||||
ErrUnbindMaster: "Düğüm yönetiminde düğümler tespit edildi, mevcut lisansın bağı çözülemiyor, lütfen önce düğümleri kaldırın ve tekrar deneyin"
|
ErrUnbindMaster: "Düğüm yönetiminde düğümler tespit edildi, mevcut lisansın bağı çözülemiyor, lütfen önce düğümleri kaldırın ve tekrar deneyin"
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ ErrLicenseExist: "該許可證記錄已存在,您可直接前往許可證頁
|
|||||||
ErrXpackNotFound: "此功能需要商業版。請在 面板設定 > 許可證 匯入許可證"
|
ErrXpackNotFound: "此功能需要商業版。請在 面板設定 > 許可證 匯入許可證"
|
||||||
ErrXpackExceptional: "此功能需要商業版。請在 面板設定 > 許可證 同步許可證狀態"
|
ErrXpackExceptional: "此功能需要商業版。請在 面板設定 > 許可證 同步許可證狀態"
|
||||||
ErrXpackLost: "許可證已達重試上限,請前往 面板設定 > 許可證 手動同步"
|
ErrXpackLost: "許可證已達重試上限,請前往 面板設定 > 許可證 手動同步"
|
||||||
ErrXpackEELicenseRequired: "企業版許可證未匯入,請先匯入許可證"
|
ErrEnterpriseLicenseRequired: "企業版許可證未匯入,請先匯入許可證"
|
||||||
ErrDeviceLost: "許可證驗證必要檔案遺失,請檢查後重試。"
|
ErrDeviceLost: "許可證驗證必要檔案遺失,請檢查後重試。"
|
||||||
ErrDeviceErr: "目前環境與許可證匯入環境不一致,請編輯許可證重新匯入!"
|
ErrDeviceErr: "目前環境與許可證匯入環境不一致,請編輯許可證重新匯入!"
|
||||||
ErrXpackTimeout: "請求逾時,網路連接可能不穩定,請稍後再試。"
|
ErrXpackTimeout: "請求逾時,網路連接可能不穩定,請稍後再試。"
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ ErrLicenseExist: "该许可证记录已存在,您可直接前往许可证页
|
|||||||
ErrXpackNotFound: "该部分为专业版功能,请先在 面板设置-许可证 界面导入许可证"
|
ErrXpackNotFound: "该部分为专业版功能,请先在 面板设置-许可证 界面导入许可证"
|
||||||
ErrXpackExceptional: "该部分为专业版功能,请先在 面板设置-许可证 界面同步许可证状态"
|
ErrXpackExceptional: "该部分为专业版功能,请先在 面板设置-许可证 界面同步许可证状态"
|
||||||
ErrXpackLost: "许可证已达到最大重试次数,请进入【面板设置】【许可证】页面手动点击同步按钮,以确保专业版功能正常使用"
|
ErrXpackLost: "许可证已达到最大重试次数,请进入【面板设置】【许可证】页面手动点击同步按钮,以确保专业版功能正常使用"
|
||||||
ErrXpackEELicenseRequired: "企业版许可证未导入,请先导入许可证"
|
ErrEnterpriseLicenseRequired: "企业版许可证未导入,请先导入许可证"
|
||||||
ErrDeviceLost: "许可证校验必要文件丢失,请检查后重试!"
|
ErrDeviceLost: "许可证校验必要文件丢失,请检查后重试!"
|
||||||
ErrDeviceErr: "当前环境与许可证导入环境不一致,请编辑许可证重新导入!"
|
ErrDeviceErr: "当前环境与许可证导入环境不一致,请编辑许可证重新导入!"
|
||||||
ErrXpackTimeout: "请求超时,网络连接可能不稳定,请稍后再试!"
|
ErrXpackTimeout: "请求超时,网络连接可能不稳定,请稍后再试!"
|
||||||
|
|||||||
@@ -61,10 +61,10 @@ func handleUserInfo(tags string, settingRepo repo.ISettingRepo) {
|
|||||||
if strings.Contains(global.CONF.Base.ChangeUserInfo, "entrance") {
|
if strings.Contains(global.CONF.Base.ChangeUserInfo, "entrance") {
|
||||||
settingMap["SecurityEntrance"] = common.RandStrAndNum(10)
|
settingMap["SecurityEntrance"] = common.RandStrAndNum(10)
|
||||||
}
|
}
|
||||||
if global.CONF.Base.IsXpackEE {
|
if global.CONF.Base.IsEnterprise {
|
||||||
if len(settingMap["UserName"]) != 0 || len(settingMap["Password"]) != 0 {
|
if len(settingMap["UserName"]) != 0 || len(settingMap["Password"]) != 0 {
|
||||||
if err := xpack.AuthProvider.ResetSuperAdminUser(settingMap["UserName"], settingMap["Password"]); err != nil {
|
if err := xpack.AuthProvider.ResetSuperAdminUser(settingMap["UserName"], settingMap["Password"]); err != nil {
|
||||||
global.LOG.Fatalf("reset xpackee super admin failed, err: %v", err)
|
global.LOG.Fatalf("reset enterprise super admin failed, err: %v", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ func LoadMenus() string {
|
|||||||
{ID: "12", Disabled: false, Title: "menu.logs", IsShow: true, Label: "Log-Menu", Path: "/logs", Sort: 1200},
|
{ID: "12", Disabled: false, Title: "menu.logs", IsShow: true, Label: "Log-Menu", Path: "/logs", Sort: 1200},
|
||||||
{ID: "13", Disabled: true, Title: "menu.settings", IsShow: true, Label: "Setting-Menu", Path: "/settings", Sort: 1300},
|
{ID: "13", Disabled: true, Title: "menu.settings", IsShow: true, Label: "Setting-Menu", Path: "/settings", Sort: 1300},
|
||||||
}
|
}
|
||||||
if global.CONF.Base.IsXpackEE {
|
if global.CONF.Base.IsEnterprise {
|
||||||
for i := range item {
|
for i := range item {
|
||||||
if item[i].Label != "Xpack-Menu" {
|
if item[i].Label != "Xpack-Menu" {
|
||||||
continue
|
continue
|
||||||
@@ -95,7 +95,7 @@ func LoadMenus() string {
|
|||||||
Title: "xpack.user.userManage",
|
Title: "xpack.user.userManage",
|
||||||
IsShow: true,
|
IsShow: true,
|
||||||
Label: "UserManagement",
|
Label: "UserManagement",
|
||||||
Path: "/xpack-ee/users",
|
Path: "/enterprise/users",
|
||||||
Sort: 350,
|
Sort: 350,
|
||||||
}, "NodeDashboard")
|
}, "NodeDashboard")
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ var InitSetting = &gormigrate.Migration{
|
|||||||
if global.CONF.Base.Language == "zh" {
|
if global.CONF.Base.Language == "zh" {
|
||||||
language = "zh"
|
language = "zh"
|
||||||
}
|
}
|
||||||
if !global.CONF.Base.IsXpackEE {
|
if !global.CONF.Base.IsEnterprise {
|
||||||
if err := tx.Create(&model.Setting{Key: "UserName", Value: global.CONF.Base.Username}).Error; err != nil {
|
if err := tx.Create(&model.Setting{Key: "UserName", Value: global.CONF.Base.Username}).Error; err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -994,9 +994,9 @@ func normalizeAiMenuChild(children []dto.ShowMenu, fallback dto.ShowMenu, labels
|
|||||||
}
|
}
|
||||||
|
|
||||||
var AddUserManagementMenu = &gormigrate.Migration{
|
var AddUserManagementMenu = &gormigrate.Migration{
|
||||||
ID: "20260414-add-user-management-menu",
|
ID: "20260415-add-user-management-menu",
|
||||||
Migrate: func(tx *gorm.DB) error {
|
Migrate: func(tx *gorm.DB) error {
|
||||||
if !global.CONF.Base.IsXpackEE {
|
if !global.CONF.Base.IsEnterprise {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
var menuJSON string
|
var menuJSON string
|
||||||
@@ -1020,7 +1020,7 @@ var AddUserManagementMenu = &gormigrate.Migration{
|
|||||||
Title: "xpack.user.userManage",
|
Title: "xpack.user.userManage",
|
||||||
IsShow: true,
|
IsShow: true,
|
||||||
Label: "UserManagement",
|
Label: "UserManagement",
|
||||||
Path: "/xpack-ee/users",
|
Path: "/enterprise/users",
|
||||||
Sort: 350,
|
Sort: 350,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ func PasswordExpired() gin.HandlerFunc {
|
|||||||
if strings.HasPrefix(c.Request.URL.Path, "/api/v2/core/auth") ||
|
if strings.HasPrefix(c.Request.URL.Path, "/api/v2/core/auth") ||
|
||||||
c.Request.URL.Path == "/api/v2/core/settings/search" ||
|
c.Request.URL.Path == "/api/v2/core/settings/search" ||
|
||||||
c.Request.URL.Path == "/api/v2/core/settings/search/base" ||
|
c.Request.URL.Path == "/api/v2/core/settings/search/base" ||
|
||||||
c.Request.URL.Path == "/api/v2/core/xpackee/licenses/info" ||
|
c.Request.URL.Path == "/api/v2/core/enterprise/licenses/info" ||
|
||||||
c.Request.URL.Path == "/api/v2/core/xpackee/licenses/status" ||
|
c.Request.URL.Path == "/api/v2/core/enterprise/licenses/status" ||
|
||||||
c.Request.URL.Path == "/api/v2/core/xpackee/licenses/upload" {
|
c.Request.URL.Path == "/api/v2/core/enterprise/licenses/upload" {
|
||||||
c.Next()
|
c.Next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !xpack && !xpackee
|
//go:build !xpack && !enterprise
|
||||||
|
|
||||||
package router
|
package router
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !xpack && !xpackee
|
//go:build !xpack && !enterprise
|
||||||
|
|
||||||
package server
|
package server
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build !xpack && !xpackee
|
//go:build !xpack && !enterprise
|
||||||
|
|
||||||
package xpack
|
package xpack
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class RequestHttp {
|
|||||||
});
|
});
|
||||||
return Promise.reject(data);
|
return Promise.reject(data);
|
||||||
}
|
}
|
||||||
if (data.code == ResultEnum.ERRRBAC) {
|
if (data.code == ResultEnum.ERR_RBAC) {
|
||||||
MsgError(data.message || i18n.global.t('commons.res.forbidden'));
|
MsgError(data.message || i18n.global.t('commons.res.forbidden'));
|
||||||
return Promise.reject(data);
|
return Promise.reject(data);
|
||||||
}
|
}
|
||||||
@@ -87,30 +87,30 @@ class RequestHttp {
|
|||||||
router.push({ name: 'Expired' });
|
router.push({ name: 'Expired' });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.code == ResultEnum.ERRXPACK) {
|
if (data.code == ResultEnum.ERR_XPACK) {
|
||||||
globalStore.isProductPro = false;
|
globalStore.isProductPro = false;
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
return Promise.reject(data);
|
return Promise.reject(data);
|
||||||
}
|
}
|
||||||
if (data.code == ResultEnum.ERRXPACKEE) {
|
if (data.code == ResultEnum.ERR_ENTERPRISE) {
|
||||||
globalStore.isXpackEELicensed = false;
|
globalStore.isEnterpriseLicensed = false;
|
||||||
const routeName = router.currentRoute.value.name;
|
const routeName = router.currentRoute.value.name;
|
||||||
if (
|
if (
|
||||||
globalStore.isLogin &&
|
globalStore.isLogin &&
|
||||||
routeName !== 'entrance' &&
|
routeName !== 'entrance' &&
|
||||||
routeName !== 'login' &&
|
routeName !== 'login' &&
|
||||||
routeName !== 'XpackEELicenseRequired'
|
routeName !== 'EnterpriseLicenseRequired'
|
||||||
) {
|
) {
|
||||||
router.push({ name: 'XpackEELicenseRequired' });
|
router.push({ name: 'EnterpriseLicenseRequired' });
|
||||||
}
|
}
|
||||||
return Promise.reject(data);
|
return Promise.reject(data);
|
||||||
}
|
}
|
||||||
if (data.code == ResultEnum.NodeUnBind) {
|
if (data.code == ResultEnum.NODE_UNBIND) {
|
||||||
changeToLocal();
|
changeToLocal();
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (data.code == ResultEnum.ERRGLOBALLOADING) {
|
if (data.code == ResultEnum.ERR_GLOBAL_LOADING) {
|
||||||
globalStore.$patch({
|
globalStore.$patch({
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
loadingText: data.message,
|
loadingText: data.message,
|
||||||
@@ -121,7 +121,7 @@ class RequestHttp {
|
|||||||
globalStore.isLoading = false;
|
globalStore.isLoading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.code == ResultEnum.ERRAUTH) {
|
if (data.code == ResultEnum.ERR_AUTH) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
if (data.code && data.code !== ResultEnum.SUCCESS) {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ export namespace Login {
|
|||||||
panelName: string;
|
panelName: string;
|
||||||
theme: string;
|
theme: string;
|
||||||
isOffLine: boolean;
|
isOffLine: boolean;
|
||||||
isXpackEE: boolean;
|
isEnterprise: boolean;
|
||||||
needCaptcha: boolean;
|
needCaptcha: boolean;
|
||||||
passkeySetting: boolean;
|
passkeySetting: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,18 +56,18 @@ export const listAppNodes = () => {
|
|||||||
return http.get<Array<Setting.NodeAppItem>>(`/core/xpack/nodes/apps/update`, {}, { timeout: TimeoutEnum.T_60S });
|
return http.get<Array<Setting.NodeAppItem>>(`/core/xpack/nodes/apps/update`, {}, { timeout: TimeoutEnum.T_60S });
|
||||||
};
|
};
|
||||||
|
|
||||||
// xpackee
|
// enterprise
|
||||||
export const loadNodeByUser = () => {
|
export const loadNodeByUser = () => {
|
||||||
return http.get<Array<Setting.NodeItem>>(`/core/xpackee/users/nodes`);
|
return http.get<Array<Setting.NodeItem>>(`/core/enterprise/users/nodes`);
|
||||||
};
|
};
|
||||||
export const uploadXpackEELicense = (params: FormData) => {
|
export const uploadEnterpriseLicense = (params: FormData) => {
|
||||||
return http.upload('/core/xpackee/licenses/upload', params);
|
return http.upload('/core/enterprise/licenses/upload', params);
|
||||||
};
|
};
|
||||||
export const getXpackEELicense = () => {
|
export const getEnterpriseLicense = () => {
|
||||||
return http.get<Setting.LicenseEE>(`/core/xpackee/licenses/info`);
|
return http.get<Setting.LicenseEE>(`/core/enterprise/licenses/info`);
|
||||||
};
|
};
|
||||||
export const getXpackEELicenseStatus = () => {
|
export const getEnterpriseLicenseStatus = () => {
|
||||||
return http.get<Setting.LicenseStatus>(`/core/xpackee/licenses/status`);
|
return http.get<Setting.LicenseStatus>(`/core/enterprise/licenses/status`);
|
||||||
};
|
};
|
||||||
|
|
||||||
// agent
|
// agent
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
import { uploadLicense, uploadXpackEELicense } from '@/api/modules/setting';
|
import { uploadLicense, uploadEnterpriseLicense } from '@/api/modules/setting';
|
||||||
import DockerProxy from '@/components/docker-proxy/index.vue';
|
import DockerProxy from '@/components/docker-proxy/index.vue';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
import { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile, genFileId } from 'element-plus';
|
||||||
@@ -126,9 +126,9 @@ const submit = async () => {
|
|||||||
const file = uploaderFiles.value[0];
|
const file = uploaderFiles.value[0];
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file.raw);
|
formData.append('file', file.raw);
|
||||||
if (globalStore.isXpackEE) {
|
if (globalStore.isEnterprise) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await uploadXpackEELicense(formData)
|
await uploadEnterpriseLicense(formData)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
handleAfterSubmit();
|
handleAfterSubmit();
|
||||||
})
|
})
|
||||||
@@ -166,10 +166,10 @@ const handleAfterSubmit = () => {
|
|||||||
open.value = false;
|
open.value = false;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
if (!isImport.value) {
|
if (!isImport.value) {
|
||||||
if (!globalStore.isXpackEE) globalStore.isProductPro = true;
|
if (!globalStore.isEnterprise) globalStore.isProductPro = true;
|
||||||
globalStore.isMasterProductPro = true;
|
globalStore.isMasterProductPro = true;
|
||||||
} else {
|
} else {
|
||||||
globalStore.isXpackEELicensed = true;
|
globalStore.isEnterpriseLicensed = true;
|
||||||
}
|
}
|
||||||
if (!withoutReload.value) {
|
if (!withoutReload.value) {
|
||||||
loadMasterProductProFromDB();
|
loadMasterProductProFromDB();
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="flex flex-wrap items-center">
|
<div class="flex flex-wrap items-center">
|
||||||
<el-link underline="never" type="primary" @click="toLxware">
|
<el-link underline="never" type="primary" @click="toLxware">
|
||||||
<span v-if="isXpackEE">
|
<span v-if="isEnterprise">
|
||||||
{{ $t('license.ee') }}
|
{{ $t('license.ee') }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="isMasterPro">
|
<span v-else-if="isMasterPro">
|
||||||
@@ -79,7 +79,7 @@ const releasesRef = ref();
|
|||||||
const isMasterPro = computed(() => {
|
const isMasterPro = computed(() => {
|
||||||
return globalStore.isMasterPro();
|
return globalStore.isMasterPro();
|
||||||
});
|
});
|
||||||
const isXpackEE = computed(() => {
|
const isEnterprise = computed(() => {
|
||||||
return globalStore.isEE();
|
return globalStore.isEE();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import communityProvider from './community';
|
import communityProvider from './community';
|
||||||
import type { EditionFrontendProvider } from './provider';
|
import type { EditionFrontendProvider } from './provider';
|
||||||
import proProvider from '@xpack-pro/edition';
|
import proProvider from '@xpack-pro/edition';
|
||||||
import eeProvider from '@xpack-ee/edition';
|
import eeProvider from '@enterprise/edition';
|
||||||
|
|
||||||
const edition = (import.meta.env.VITE_FRONTEND_EDITION || 'community').toLowerCase();
|
const edition = (import.meta.env.VITE_FRONTEND_EDITION || 'community').toLowerCase();
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export enum ResultEnum {
|
export enum ResultEnum {
|
||||||
SUCCESS = 200,
|
SUCCESS = 200,
|
||||||
ERRIP = 310,
|
ERR_IP = 310,
|
||||||
ERRDOMAIN = 311,
|
ERR_DOMAIN = 311,
|
||||||
UNSAFETY = 312,
|
UNSAFETY = 312,
|
||||||
EXPIRED = 313,
|
EXPIRED = 313,
|
||||||
|
|
||||||
@@ -9,12 +9,12 @@ export enum ResultEnum {
|
|||||||
OVERDUE = 401,
|
OVERDUE = 401,
|
||||||
FORBIDDEN = 403,
|
FORBIDDEN = 403,
|
||||||
NOTFOUND = 404,
|
NOTFOUND = 404,
|
||||||
ERRAUTH = 406,
|
ERR_AUTH = 406,
|
||||||
ERRGLOBALLOADING = 407,
|
ERR_GLOBAL_LOADING = 407,
|
||||||
ERRXPACK = 410,
|
ERR_XPACK = 410,
|
||||||
NodeUnBind = 411,
|
NODE_UNBIND = 411,
|
||||||
ERRRBAC = 412,
|
ERR_RBAC = 412,
|
||||||
ERRXPACKEE = 413,
|
ERR_ENTERPRISE = 413,
|
||||||
TIMEOUT = 20000,
|
TIMEOUT = 20000,
|
||||||
TYPE = 'success',
|
TYPE = 'success',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ type VueComponent = { template?: string } | Record<string, any>;
|
|||||||
const EmptyComponent: VueComponent = { template: '<div></div>' };
|
const EmptyComponent: VueComponent = { template: '<div></div>' };
|
||||||
const extensionViewModules = {
|
const extensionViewModules = {
|
||||||
...import.meta.glob('@/xpack/views/**/*.vue'),
|
...import.meta.glob('@/xpack/views/**/*.vue'),
|
||||||
...import.meta.glob('@/xpack-ee/views/**/*.vue'),
|
...import.meta.glob('@/enterprise/views/**/*.vue'),
|
||||||
};
|
};
|
||||||
|
|
||||||
function findLoader(suffix: string) {
|
function findLoader(suffix: string) {
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ type RouteModuleMap = Record<string, { default?: ExtensionRouteRecord }>;
|
|||||||
|
|
||||||
export function getXpackRoutes(baseModules: RouteModuleMap = {}): RouteModuleMap {
|
export function getXpackRoutes(baseModules: RouteModuleMap = {}): RouteModuleMap {
|
||||||
const xpackRoutes = import.meta.glob('@/xpack/routers/*.ts', { eager: true }) as RouteModuleMap;
|
const xpackRoutes = import.meta.glob('@/xpack/routers/*.ts', { eager: true }) as RouteModuleMap;
|
||||||
const xpackEERoutes = import.meta.glob('@/xpack-ee/routers/*.ts', { eager: true }) as RouteModuleMap;
|
const enterpriseRoutes = import.meta.glob('@/enterprise/routers/*.ts', { eager: true }) as RouteModuleMap;
|
||||||
const routes = {
|
const routes = {
|
||||||
...xpackRoutes,
|
...xpackRoutes,
|
||||||
...xpackEERoutes,
|
...enterpriseRoutes,
|
||||||
};
|
};
|
||||||
const rawRoutes = (
|
const rawRoutes = (
|
||||||
Object.keys(routes)
|
Object.keys(routes)
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ export function loadXpackStyles() {
|
|||||||
const xpackLoader = findModule(xpackModules, '/styles/index.scss');
|
const xpackLoader = findModule(xpackModules, '/styles/index.scss');
|
||||||
xpackLoader?.();
|
xpackLoader?.();
|
||||||
|
|
||||||
const xpackEEModules = import.meta.glob('@/xpack-ee/styles/index.scss');
|
const enterpriseModules = import.meta.glob('@/enterprise/styles/index.scss');
|
||||||
const xpackEELoader = findModule(xpackEEModules, '/styles/index.scss');
|
const enterpriseLoader = findModule(enterpriseModules, '/styles/index.scss');
|
||||||
xpackEELoader?.();
|
enterpriseLoader?.();
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setXpackPrimaryColor(color: string) {
|
export function setXpackPrimaryColor(color: string) {
|
||||||
@@ -29,12 +29,12 @@ export function setXpackPrimaryColor(color: string) {
|
|||||||
const xpackModule = findModule(xpackModules, '/utils/theme/tool.ts');
|
const xpackModule = findModule(xpackModules, '/utils/theme/tool.ts');
|
||||||
xpackModule?.setPrimaryColor?.(color);
|
xpackModule?.setPrimaryColor?.(color);
|
||||||
|
|
||||||
const xpackEEModules = import.meta.glob('@/xpack-ee/utils/theme/tool.ts', { eager: true }) as Record<
|
const enterpriseModules = import.meta.glob('@/enterprise/utils/theme/tool.ts', { eager: true }) as Record<
|
||||||
string,
|
string,
|
||||||
XpackThemeModule
|
XpackThemeModule
|
||||||
>;
|
>;
|
||||||
const xpackEEModule = findModule(xpackEEModules, '/utils/theme/tool.ts');
|
const enterpriseModule = findModule(enterpriseModules, '/utils/theme/tool.ts');
|
||||||
xpackEEModule?.setPrimaryColor?.(color);
|
enterpriseModule?.setPrimaryColor?.(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const loadExtensionStyles = loadXpackStyles;
|
export const loadExtensionStyles = loadXpackStyles;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ type XpackSettingModule = {
|
|||||||
updateXSettingByKey?: (key: string, value: string) => Promise<any>;
|
updateXSettingByKey?: (key: string, value: string) => Promise<any>;
|
||||||
};
|
};
|
||||||
|
|
||||||
type XpackeeUserModule = {
|
type EnterpriseUserModule = {
|
||||||
getUserInfo?: (currentNode: string) => Promise<any>;
|
getUserInfo?: (currentNode: string) => Promise<any>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -40,16 +40,16 @@ export async function updateXpackSettingByKey(key: string, value: string) {
|
|||||||
return module.updateXSettingByKey(key, value);
|
return module.updateXSettingByKey(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getXpackeeUserModule(): XpackeeUserModule | null {
|
function getEnterpriseUserModule(): EnterpriseUserModule | null {
|
||||||
const xpackModules = import.meta.glob('@/xpack-ee/api/modules/user.ts', { eager: true }) as Record<
|
const enterpriseModules = import.meta.glob('@/enterprise/api/modules/user.ts', { eager: true }) as Record<
|
||||||
string,
|
string,
|
||||||
XpackeeUserModule
|
EnterpriseUserModule
|
||||||
>;
|
>;
|
||||||
return findModule(xpackModules, '/api/modules/user.ts');
|
return findModule(enterpriseModules, '/api/modules/user.ts');
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getXpackeeUserInfo(currentNode: string) {
|
export async function getEnterpriseUserInfo(currentNode: string) {
|
||||||
const module = getXpackeeUserModule();
|
const module = getEnterpriseUserModule();
|
||||||
if (!module?.getUserInfo) {
|
if (!module?.getUserInfo) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ const changeNode = async (command: string) => {
|
|||||||
for (const item of nodes.value) {
|
for (const item of nodes.value) {
|
||||||
if (item.name == command) {
|
if (item.name == command) {
|
||||||
if (command == 'local') {
|
if (command == 'local') {
|
||||||
if (globalStore.isXpackEE) {
|
if (globalStore.isEnterprise) {
|
||||||
await loadCurrentUser('local');
|
await loadCurrentUser('local');
|
||||||
}
|
}
|
||||||
await loadGlobalSetting('local');
|
await loadGlobalSetting('local');
|
||||||
@@ -222,7 +222,7 @@ const changeNode = async (command: string) => {
|
|||||||
localStorage.removeItem('upgradeChecked');
|
localStorage.removeItem('upgradeChecked');
|
||||||
globalStore.currentNode = command;
|
globalStore.currentNode = command;
|
||||||
globalStore.currentNodeAddr = item.addr;
|
globalStore.currentNodeAddr = item.addr;
|
||||||
if (globalStore.isXpackEE) {
|
if (globalStore.isEnterprise) {
|
||||||
await loadCurrentUser(command);
|
await loadCurrentUser(command);
|
||||||
}
|
}
|
||||||
menuStore.setMenuList([]);
|
menuStore.setMenuList([]);
|
||||||
|
|||||||
@@ -772,10 +772,6 @@ const registerPasskey = async () => {
|
|||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
passkeyForm.name = '';
|
passkeyForm.name = '';
|
||||||
await loadPasskeys();
|
await loadPasskeys();
|
||||||
} catch (res: any) {
|
|
||||||
if (res?.message) {
|
|
||||||
console.log(res.message);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
passkeyLoading.value = false;
|
passkeyLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ import { MsgError } from '@/utils/message';
|
|||||||
const axiosCanceler = new AxiosCanceler();
|
const axiosCanceler = new AxiosCanceler();
|
||||||
|
|
||||||
let isRedirecting = false;
|
let isRedirecting = false;
|
||||||
const xpackEELicenseCheckWhiteList = ['XpackEELicenseRequired', 'entrance', 'login', 'Expired'];
|
const enterpriseLicenseCheckWhiteList = ['EnterpriseLicenseRequired', 'entrance', 'login', 'Expired'];
|
||||||
|
|
||||||
const clearLicenseStatus = () => {
|
const clearLicenseStatus = () => {
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
globalStore.isXpackEELicensed = false;
|
globalStore.isEnterpriseLicensed = false;
|
||||||
globalStore.isXpackEELicenseLoaded = false;
|
globalStore.isEnterpriseLicenseLoaded = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const clearLoginStatus = () => {
|
const clearLoginStatus = () => {
|
||||||
@@ -52,17 +52,17 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
NProgress.done();
|
NProgress.done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (globalStore.isLogin && globalStore.isXpackEE && !xpackEELicenseCheckWhiteList.includes(String(to.name))) {
|
if (globalStore.isLogin && globalStore.isEnterprise && !enterpriseLicenseCheckWhiteList.includes(String(to.name))) {
|
||||||
if (!globalStore.isXpackEELicenseLoaded) {
|
if (!globalStore.isEnterpriseLicenseLoaded) {
|
||||||
await loadProductProFromDB();
|
await loadProductProFromDB();
|
||||||
}
|
}
|
||||||
if (!globalStore.isXpackEELicensed) {
|
if (!globalStore.isEnterpriseLicensed) {
|
||||||
next({ name: 'XpackEELicenseRequired', query: { code: String(to.params.code || '') } });
|
next({ name: 'EnterpriseLicenseRequired', query: { code: String(to.params.code || '') } });
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (to.name === 'XpackEELicenseRequired') {
|
if (to.name === 'EnterpriseLicenseRequired') {
|
||||||
if (!globalStore.isLogin) {
|
if (!globalStore.isLogin) {
|
||||||
next({
|
next({
|
||||||
name: 'entrance',
|
name: 'entrance',
|
||||||
@@ -71,7 +71,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
NProgress.done();
|
NProgress.done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!globalStore.isXpackEE || globalStore.isXpackEELicensed) {
|
if (!globalStore.isEnterprise || globalStore.isEnterpriseLicensed) {
|
||||||
next({ name: 'home' });
|
next({ name: 'home' });
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -78,11 +78,11 @@ export const routes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/xpack-ee/license-required',
|
path: '/enterprise/license-required',
|
||||||
name: 'XpackEELicenseRequired',
|
name: 'EnterpriseLicenseRequired',
|
||||||
component: () => import('@/views/setting/license-required/index.vue'),
|
component: () => import('@/views/setting/license-required/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
key: 'xpack-ee-license-required',
|
key: 'enterprise-license-required',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export interface GlobalState {
|
|||||||
isAdmin: boolean;
|
isAdmin: boolean;
|
||||||
permissions: string[];
|
permissions: string[];
|
||||||
nodeRoles: Array<{ nodeId: number; nodeName: string; roleId: number; roleName: string }>;
|
nodeRoles: Array<{ nodeId: number; nodeName: string; roleId: number; roleName: string }>;
|
||||||
isXpackEE: boolean;
|
isEnterprise: boolean;
|
||||||
isIntl: boolean;
|
isIntl: boolean;
|
||||||
docWithRegion: boolean;
|
docWithRegion: boolean;
|
||||||
isFxplay: boolean;
|
isFxplay: boolean;
|
||||||
@@ -67,8 +67,8 @@ export interface GlobalState {
|
|||||||
isProductPro: boolean;
|
isProductPro: boolean;
|
||||||
productProExpires: number;
|
productProExpires: number;
|
||||||
isMasterProductPro: boolean;
|
isMasterProductPro: boolean;
|
||||||
isXpackEELicensed: boolean;
|
isEnterpriseLicensed: boolean;
|
||||||
isXpackEELicenseLoaded: boolean;
|
isEnterpriseLicenseLoaded: boolean;
|
||||||
// multi-node
|
// multi-node
|
||||||
masterAlias: string;
|
masterAlias: string;
|
||||||
currentNode: string;
|
currentNode: string;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ const GlobalStore = defineStore({
|
|||||||
isAdmin: false,
|
isAdmin: false,
|
||||||
permissions: [],
|
permissions: [],
|
||||||
nodeRoles: [],
|
nodeRoles: [],
|
||||||
isXpackEE: false,
|
isEnterprise: false,
|
||||||
isIntl: false,
|
isIntl: false,
|
||||||
docWithRegion: true,
|
docWithRegion: true,
|
||||||
isFxplay: false,
|
isFxplay: false,
|
||||||
@@ -64,8 +64,8 @@ const GlobalStore = defineStore({
|
|||||||
isProductPro: false,
|
isProductPro: false,
|
||||||
productProExpires: 0,
|
productProExpires: 0,
|
||||||
isMasterProductPro: false,
|
isMasterProductPro: false,
|
||||||
isXpackEELicensed: false,
|
isEnterpriseLicensed: false,
|
||||||
isXpackEELicenseLoaded: false,
|
isEnterpriseLicenseLoaded: false,
|
||||||
// multi-node
|
// multi-node
|
||||||
masterAlias: '',
|
masterAlias: '',
|
||||||
currentNode: 'local',
|
currentNode: 'local',
|
||||||
@@ -147,13 +147,13 @@ const GlobalStore = defineStore({
|
|||||||
return this.masterAlias || i18n.global.t('xpack.node.master');
|
return this.masterAlias || i18n.global.t('xpack.node.master');
|
||||||
},
|
},
|
||||||
isEE() {
|
isEE() {
|
||||||
return this.isXpackEE && this.isXpackEELicensed;
|
return this.isEnterprise && this.isEnterpriseLicensed;
|
||||||
},
|
},
|
||||||
isXpackOrEE() {
|
isXpackOrEE() {
|
||||||
return (this.isXpackEE && this.isXpackEELicensed) || this.isMasterProductPro;
|
return (this.isEnterprise && this.isEnterpriseLicensed) || this.isMasterProductPro;
|
||||||
},
|
},
|
||||||
isXpackNodeOrEE() {
|
isXpackNodeOrEE() {
|
||||||
return (this.isXpackEE && this.isXpackEELicensed) || this.isProductPro;
|
return (this.isEnterprise && this.isEnterpriseLicensed) || this.isProductPro;
|
||||||
},
|
},
|
||||||
isMasterPro() {
|
isMasterPro() {
|
||||||
return this.isMasterProductPro;
|
return this.isMasterProductPro;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { getUserInfo } from '@/api/modules/auth';
|
import { getUserInfo } from '@/api/modules/auth';
|
||||||
import { getXpackeeUserInfo } from '@/extensions/xpack';
|
import { getEnterpriseUserInfo } from '@/extensions/xpack';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import type { RouteMeta } from 'vue-router';
|
import type { RouteMeta } from 'vue-router';
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ type RouteAccessTarget = {
|
|||||||
|
|
||||||
export const syncAuthInfo = async (currentNode?: string) => {
|
export const syncAuthInfo = async (currentNode?: string) => {
|
||||||
const globalStore = GlobalStore();
|
const globalStore = GlobalStore();
|
||||||
if (!globalStore.isXpackEE) {
|
if (!globalStore.isEnterprise) {
|
||||||
const res = await getUserInfo();
|
const res = await getUserInfo();
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
const res = await getXpackeeUserInfo(currentNode ?? globalStore.currentNode);
|
const res = await getEnterpriseUserInfo(currentNode ?? globalStore.currentNode);
|
||||||
globalStore.setAuthInfo({
|
globalStore.setAuthInfo({
|
||||||
isAdmin: res.data.role === 'ADMIN',
|
isAdmin: res.data.role === 'ADMIN',
|
||||||
permissions: res.data.permissions || [],
|
permissions: res.data.permissions || [],
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
getLicenseStatus,
|
getLicenseStatus,
|
||||||
getMasterLicenseStatus,
|
getMasterLicenseStatus,
|
||||||
getSettingBaseInfo,
|
getSettingBaseInfo,
|
||||||
getXpackEELicenseStatus,
|
getEnterpriseLicenseStatus,
|
||||||
} from '@/api/modules/setting';
|
} from '@/api/modules/setting';
|
||||||
import { useTheme } from '@/global/use-theme';
|
import { useTheme } from '@/global/use-theme';
|
||||||
import {
|
import {
|
||||||
@@ -83,8 +83,8 @@ const loadDataFromDB = async () => {
|
|||||||
|
|
||||||
export async function loadProductProFromDB() {
|
export async function loadProductProFromDB() {
|
||||||
const globalStore = getGlobalStore();
|
const globalStore = getGlobalStore();
|
||||||
if (!globalStore.isXpackEE) {
|
if (!globalStore.isEnterprise) {
|
||||||
globalStore.isXpackEELicenseLoaded = true;
|
globalStore.isEnterpriseLicenseLoaded = true;
|
||||||
const res = await getLicenseStatus();
|
const res = await getLicenseStatus();
|
||||||
if (!res || !res.data) {
|
if (!res || !res.data) {
|
||||||
globalStore.isProductPro = false;
|
globalStore.isProductPro = false;
|
||||||
@@ -96,19 +96,19 @@ export async function loadProductProFromDB() {
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res = await getXpackEELicenseStatus();
|
const res = await getEnterpriseLicenseStatus();
|
||||||
globalStore.isXpackEELicenseLoaded = true;
|
globalStore.isEnterpriseLicenseLoaded = true;
|
||||||
if (!res || !res.data) {
|
if (!res || !res.data) {
|
||||||
globalStore.isXpackEELicensed = false;
|
globalStore.isEnterpriseLicensed = false;
|
||||||
} else {
|
} else {
|
||||||
globalStore.isXpackEELicensed = res.data.status === 'Bound';
|
globalStore.isEnterpriseLicensed = res.data.status === 'Bound';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function loadMasterProductProFromDB() {
|
export async function loadMasterProductProFromDB() {
|
||||||
const globalStore = getGlobalStore();
|
const globalStore = getGlobalStore();
|
||||||
if (!globalStore.isXpackEE) {
|
if (!globalStore.isEnterprise) {
|
||||||
globalStore.isXpackEELicenseLoaded = true;
|
globalStore.isEnterpriseLicenseLoaded = true;
|
||||||
const res = await getMasterLicenseStatus();
|
const res = await getMasterLicenseStatus();
|
||||||
if (!res || !res.data) {
|
if (!res || !res.data) {
|
||||||
globalStore.isMasterProductPro = false;
|
globalStore.isMasterProductPro = false;
|
||||||
@@ -116,12 +116,12 @@ export async function loadMasterProductProFromDB() {
|
|||||||
globalStore.isMasterProductPro = res.data.status === 'Bound';
|
globalStore.isMasterProductPro = res.data.status === 'Bound';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const res = await getXpackEELicenseStatus();
|
const res = await getEnterpriseLicenseStatus();
|
||||||
globalStore.isXpackEELicenseLoaded = true;
|
globalStore.isEnterpriseLicenseLoaded = true;
|
||||||
if (!res || !res.data) {
|
if (!res || !res.data) {
|
||||||
globalStore.isXpackEELicensed = false;
|
globalStore.isEnterpriseLicensed = false;
|
||||||
} else {
|
} else {
|
||||||
globalStore.isXpackEELicensed = res.data.status === 'Bound';
|
globalStore.isEnterpriseLicensed = res.data.status === 'Bound';
|
||||||
globalStore.isMasterProductPro = res.data.status === 'Bound';
|
globalStore.isMasterProductPro = res.data.status === 'Bound';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import AccountView from '@/views/ai/agents/model/index.vue';
|
|||||||
import LocalView from '@/views/ai/model/local/index.vue';
|
import LocalView from '@/views/ai/model/local/index.vue';
|
||||||
import { loadOptionalComponent } from '@/extensions/optional';
|
import { loadOptionalComponent } from '@/extensions/optional';
|
||||||
|
|
||||||
const AIProxyView = defineAsyncComponent(() => loadOptionalComponent('/src/xpack-ee/views/ai-proxy/index.vue'));
|
const AIProxyView = defineAsyncComponent(() => loadOptionalComponent('/src/enterprise/views/ai-proxy/index.vue'));
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
@@ -185,9 +185,7 @@ const sync = async () => {
|
|||||||
} else {
|
} else {
|
||||||
res = await syncApp(syncReq);
|
res = await syncApp(syncReq);
|
||||||
}
|
}
|
||||||
console.log(res);
|
|
||||||
if (res.message != '' && res.message != 'success') {
|
if (res.message != '' && res.message != 'success') {
|
||||||
console.log(res.message);
|
|
||||||
MsgSuccess(res.message);
|
MsgSuccess(res.message);
|
||||||
} else {
|
} else {
|
||||||
openTaskLog(taskID);
|
openTaskLog(taskID);
|
||||||
|
|||||||
@@ -629,8 +629,8 @@ const getSetting = async () => {
|
|||||||
isFxplay.value = res.data.isFxplay;
|
isFxplay.value = res.data.isFxplay;
|
||||||
globalStore.isFxplay = isFxplay.value;
|
globalStore.isFxplay = isFxplay.value;
|
||||||
globalStore.isOffLine = res.data.isOffLine;
|
globalStore.isOffLine = res.data.isOffLine;
|
||||||
globalStore.isXpackEE = res.data.isXpackEE;
|
globalStore.isEnterprise = res.data.isEnterprise;
|
||||||
globalStore.isXpackEELicenseLoaded = !res.data.isXpackEE;
|
globalStore.isEnterpriseLicenseLoaded = !res.data.isEnterprise;
|
||||||
globalStore.ignoreCaptcha = !res.data.needCaptcha;
|
globalStore.ignoreCaptcha = !res.data.needCaptcha;
|
||||||
passkeySetting.value = res.data.passkeySetting;
|
passkeySetting.value = res.data.passkeySetting;
|
||||||
if (!globalStore.ignoreCaptcha) {
|
if (!globalStore.ignoreCaptcha) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { useGlobalStore } from '@/composables/useGlobalStore';
|
import { useGlobalStore } from '@/composables/useGlobalStore';
|
||||||
const { isOffLine, isFxplay, isAdmin, isXpackEE } = useGlobalStore();
|
const { isOffLine, isFxplay, isAdmin, isEnterprise } = useGlobalStore();
|
||||||
|
|
||||||
const buttons = computed(() => {
|
const buttons = computed(() => {
|
||||||
const items = [
|
const items = [
|
||||||
@@ -44,7 +44,7 @@ const buttons = computed(() => {
|
|||||||
: [
|
: [
|
||||||
{
|
{
|
||||||
label: i18n.global.t('setting.license'),
|
label: i18n.global.t('setting.license'),
|
||||||
path: isXpackEE.value ? '/xpack-ee/license' : '/settings/license',
|
path: isEnterprise.value ? '/enterprise/license' : '/settings/license',
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
...(isFxplay.value
|
...(isFxplay.value
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ import { computed, onMounted, reactive, ref } from 'vue';
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import type { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
import type { UploadFile, UploadFiles, UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
||||||
import { genFileId } from 'element-plus';
|
import { genFileId } from 'element-plus';
|
||||||
import { getXpackEELicense, uploadXpackEELicense } from '@/api/modules/setting';
|
import { getEnterpriseLicense, uploadEnterpriseLicense } from '@/api/modules/setting';
|
||||||
import { getLoginSetting } from '@/api/modules/auth';
|
import { getLoginSetting } from '@/api/modules/auth';
|
||||||
import { GlobalStore } from '@/store';
|
import { GlobalStore } from '@/store';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgSuccess } from '@/utils/message';
|
||||||
@@ -103,8 +103,8 @@ const loadImage = (name: string) => {
|
|||||||
|
|
||||||
const loadLoginTheme = async () => {
|
const loadLoginTheme = async () => {
|
||||||
const res = await getLoginSetting();
|
const res = await getLoginSetting();
|
||||||
globalStore.isXpackEE = res.data.isXpackEE;
|
globalStore.isEnterprise = res.data.isEnterprise;
|
||||||
globalStore.isXpackEELicenseLoaded = !res.data.isXpackEE;
|
globalStore.isEnterpriseLicenseLoaded = !res.data.isEnterprise;
|
||||||
globalStore.isIntl = res.data.isIntl;
|
globalStore.isIntl = res.data.isIntl;
|
||||||
globalStore.isFxplay = res.data.isFxplay;
|
globalStore.isFxplay = res.data.isFxplay;
|
||||||
globalStore.isOffLine = res.data.isOffLine;
|
globalStore.isOffLine = res.data.isOffLine;
|
||||||
@@ -125,7 +125,7 @@ const loadLoginTheme = async () => {
|
|||||||
'--login-loading-mask-color',
|
'--login-loading-mask-color',
|
||||||
adjustColorToRGBA(loginBtnLinkColor.value, 30, 15),
|
adjustColorToRGBA(loginBtnLinkColor.value, 30, 15),
|
||||||
);
|
);
|
||||||
if (!globalStore.isXpackEE) {
|
if (!globalStore.isEnterprise) {
|
||||||
router.replace(
|
router.replace(
|
||||||
globalStore.isLogin ? { name: 'home' } : { name: 'entrance', params: { code: globalStore.entrance } },
|
globalStore.isLogin ? { name: 'home' } : { name: 'entrance', params: { code: globalStore.entrance } },
|
||||||
);
|
);
|
||||||
@@ -157,11 +157,11 @@ const loadBackground = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const loadLicenseInfo = async () => {
|
const loadLicenseInfo = async () => {
|
||||||
const res = await getXpackEELicense();
|
const res = await getEnterpriseLicense();
|
||||||
globalStore.isXpackEELicenseLoaded = true;
|
globalStore.isEnterpriseLicenseLoaded = true;
|
||||||
licenseInfo.deviceID = res.data.deviceID;
|
licenseInfo.deviceID = res.data.deviceID;
|
||||||
if (res.data.status === 'Bound') {
|
if (res.data.status === 'Bound') {
|
||||||
globalStore.isXpackEELicensed = true;
|
globalStore.isEnterpriseLicensed = true;
|
||||||
router.replace({ name: 'home' });
|
router.replace({ name: 'home' });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -188,9 +188,9 @@ const submit = async () => {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file', file.raw);
|
formData.append('file', file.raw);
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await uploadXpackEELicense(formData)
|
await uploadEnterpriseLicense(formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
globalStore.isXpackEELicensed = true;
|
globalStore.isEnterpriseLicensed = true;
|
||||||
globalStore.isMasterProductPro = true;
|
globalStore.isMasterProductPro = true;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
router.replace({ name: 'home' });
|
router.replace({ name: 'home' });
|
||||||
|
|||||||
Reference in New Issue
Block a user