feat(platform): expose amap runtime health

This commit is contained in:
lingniu
2026-07-04 15:30:51 +08:00
parent 5bbd110743
commit 1f069178d6
6 changed files with 64 additions and 10 deletions

View File

@@ -7457,7 +7457,7 @@ test('shows production AMap integration status on realtime page', async () => {
window.history.replaceState(null, '', '/#/realtime');
Object.defineProperty(window, '__LINGNIU_APP_CONFIG__', {
configurable: true,
value: { amapWebJsKey: 'amap-key', amapSecurityServiceHost: '/_AMapService' }
value: {}
});
vi.spyOn(globalThis, 'fetch').mockImplementation(async (input) => {
const path = String(input);
@@ -7465,7 +7465,20 @@ test('shows production AMap integration status on realtime page', async () => {
return {
ok: true,
json: async () => ({
data: { linkHealth: [], kafkaLag: 0, redisOnlineKeys: 0, tdengineWritable: true, mysqlWritable: true, runtime: { requestTimeoutMs: 5000 } },
data: {
linkHealth: [],
kafkaLag: 0,
redisOnlineKeys: 0,
tdengineWritable: true,
mysqlWritable: true,
runtime: {
requestTimeoutMs: 5000,
amapWebJsConfigured: true,
amapSecurityProxyEnabled: true,
amapSecurityCodeExposed: false,
amapSecurityServiceHost: '/_AMapService'
}
},
traceId: 'trace-test',
timestamp: 1783094400000
})