()
| 78 | return wsAdminRouterList.some((item: string) => to?.path?.startsWith(item)) |
| 79 | } |
| 80 | const loadXpackStatic = () => { |
| 81 | if (document.getElementById('sqlbot_xpack_static')) { |
| 82 | return Promise.resolve() |
| 83 | } |
| 84 | const url = `/xpack_static/license-generator.umd.js?t=${Date.now()}` |
| 85 | return new Promise((resolve, reject) => { |
| 86 | request |
| 87 | .loadRemoteScript(url, 'sqlbot_xpack_static', () => { |
| 88 | LicenseGenerator?.init(import.meta.env.VITE_API_BASE_URL).then(() => { |
| 89 | resolve(true) |
| 90 | }) |
| 91 | }) |
| 92 | .catch((error) => { |
| 93 | console.error('Failed to load xpack_static script:', error) |
| 94 | ElMessage.error('Failed to load license generator script') |
| 95 | reject(error) |
| 96 | }) |
| 97 | }) |
| 98 | } |
no test coverage detected