mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-07-07 19:11:39 +08:00
✨ feat(jvm-ui): 完善 JVM 工作台与监控入口
- 新增 JVM 持续监控仪表盘、图表、状态卡和详情面板 - 统一概览、资源浏览、审计页面的 JVM 工作台布局 - Sidebar 和 TabManager 支持监控入口、诊断入口兜底和上下文切换 - 补充前端状态模型、展示文案和组件回归测试
This commit is contained in:
@@ -119,6 +119,51 @@ describe('store appearance persistence', () => {
|
||||
expect(useStore.getState().connections[0]?.config.password).toBe('secret');
|
||||
});
|
||||
|
||||
it('preserves JVM Arthas diagnostic config when replacing saved connections', async () => {
|
||||
const { useStore } = await importStore();
|
||||
|
||||
useStore.getState().replaceConnections([
|
||||
{
|
||||
id: 'jvm-1',
|
||||
name: 'Orders JVM',
|
||||
config: {
|
||||
id: 'jvm-1',
|
||||
type: 'jvm',
|
||||
host: '127.0.0.1',
|
||||
port: 9010,
|
||||
user: '',
|
||||
jvm: {
|
||||
allowedModes: ['jmx'],
|
||||
preferredMode: 'jmx',
|
||||
diagnostic: {
|
||||
enabled: true,
|
||||
transport: 'arthas-tunnel',
|
||||
baseUrl: 'http://127.0.0.1:7777',
|
||||
targetId: 'gonavi-local-test',
|
||||
apiKey: 'diag-token',
|
||||
allowObserveCommands: true,
|
||||
allowTraceCommands: true,
|
||||
allowMutatingCommands: false,
|
||||
timeoutSeconds: 20,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
expect(useStore.getState().connections[0]?.config.jvm?.diagnostic).toEqual({
|
||||
enabled: true,
|
||||
transport: 'arthas-tunnel',
|
||||
baseUrl: 'http://127.0.0.1:7777',
|
||||
targetId: 'gonavi-local-test',
|
||||
apiKey: 'diag-token',
|
||||
allowObserveCommands: true,
|
||||
allowTraceCommands: true,
|
||||
allowMutatingCommands: false,
|
||||
timeoutSeconds: 20,
|
||||
});
|
||||
});
|
||||
|
||||
it('keeps legacy global proxy password during hydration until explicit cleanup', async () => {
|
||||
storage.setItem('lite-db-storage', JSON.stringify({
|
||||
state: {
|
||||
|
||||
Reference in New Issue
Block a user