|
- |
- {['hostname','agent_version','agent_status','cpu_usage','mem_usage','disk_usage','region','ip'].map(f => (
- toggle(f as SortField)}>
- {{hostname:i18n.t('monitor.dashboard.col.hostname'),agent_version:i18n.t('monitor.dashboard.col.agentVersion'),agent_status:i18n.t('monitor.dashboard.col.status'),cpu_usage:i18n.t('monitor.dashboard.col.cpu'),mem_usage:i18n.t('monitor.dashboard.col.memory'),disk_usage:i18n.t('monitor.dashboard.col.disk'),region:i18n.t('monitor.dashboard.col.region'),ip:'IP'}[f]}
- |
- ))}
- {i18n.t('monitor.dashboard.col.action')} | |||||||
|---|---|---|---|---|---|---|---|---|---|
|
- |
- {h.hostname} | -
- {operating.has(h.server_id) ? (
-
- |
- {h.agent_status==='online'? |
- {bar(Number(h.cpu_usage||0), `${Number(h.cpu_usage||0).toFixed(1)}%`)} | -{bar(Number(h.mem_usage||0), `${Number(h.mem_usage||0).toFixed(1)}%`)} | -{bar(Number(h.disk_usage||0), `${Number(h.disk_usage||0).toFixed(1)}%`)} | -{h.region||'—'} | -{h.ip||'—'} | -- - | -
|
+ |
+ {(['hostname', 'agent_version', 'agent_status', 'cpu_usage', 'mem_usage', 'disk_usage', 'region', 'ip'] as SortField[]).map(
+ (f) => (
+ toggle(f)}
+ >
+
+ {
+ {
+ hostname: i18n.t('monitor.dashboard.col.hostname'),
+ agent_version: i18n.t('monitor.dashboard.col.agentVersion'),
+ agent_status: i18n.t('monitor.dashboard.col.status'),
+ cpu_usage: i18n.t('monitor.dashboard.col.cpu'),
+ mem_usage: i18n.t('monitor.dashboard.col.memory'),
+ disk_usage: i18n.t('monitor.dashboard.col.disk'),
+ region: i18n.t('monitor.dashboard.col.region'),
+ ip: 'IP',
+ }[f]
+ }
+
+ |
+ ),
+ )}
+ + {i18n.t('monitor.dashboard.col.action')} + | +|||||||
|---|---|---|---|---|---|---|---|---|---|
|
+ |
+ {h.hostname} | +
+ {operating.has(h.server_id) ? (
+
+ |
+
+ {h.agent_status === 'online' ? (
+ |
+ {bar(Number(h.cpu_usage || 0), `${Number(h.cpu_usage || 0).toFixed(1)}%`)} | +{bar(Number(h.mem_usage || 0), `${Number(h.mem_usage || 0).toFixed(1)}%`)} | +{bar(Number(h.disk_usage || 0), `${Number(h.disk_usage || 0).toFixed(1)}%`)} | +{h.region || '—'} | +{h.ip || '—'} | ++ + | +