Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add customize panel in machine panel overview #245

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/MetricCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const MetricCard = forwardRef((props: IProps, ref) => {
), [queries, chartRef.current]);

const defaultMetricTypeFn = (resultNum: number, refId: string, resultMetric: PromResultMetric) => {
return resultNum > 1 ? resultMetric.device + intl.get(`metric_description.${refId}`) : intl.get(`metric_description.${refId}`);
return resultNum > 1 ? resultMetric.device + intl.get(`metric_description.overview_label.${refId}`) : intl.get(`metric_description.overview_label.${refId}`);
}

const asyncGetMetricData = async (queries) => {
Expand Down
116 changes: 67 additions & 49 deletions src/config/locale/en-US/metric_description.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"cpu_utilization": "The percentage of used CPU",
"cpu_idle": "The percentage of idled CPU",
"cpu_wait": "The percentage of CPU waiting for IO operations",
"cpu_user": "The percentage of CPU used by users",
"cpu_system": "The percentage of CPU used by the system",
"memory_utilization": "The percentage of used memory",
"memory_used": "The memory space used (including cache and buffer)",
"memory_used_percentage": "The percentage of used memory(including cache and buffer)",
"memory_actual_used": "The memory space used (not including cache and buffer)",
"memory_actual_used_percentage": "The percentage of used memory (not including cache and buffer)",
"memory_free": "The memory space available",
"cpu_io_wait_used": "The percentage of CPU waiting for IO operations",
"cpu_user_used": "The percentage of CPU used by users",
"cpu_system_used": "The percentage of CPU used by the system",
"memory_used_utilization": "The percentage of used memory",
"memory_avaliable_utilization": "The percentage of avaliable memory",
"memory_swap_utilization": "The percentage of used swap",
"memory_cached_utilization": "The percentage of used cached",
"memory_total": "The total memory",
"memory_used": "The memory space used",
"memory_avaliable": "The memory space available",
"memory_swap_total": "The total memory space of the swap",
"memory_cached_buffer_used": "The memory space used by cache and buffer",
"memory_cached_buffer_used_percentage": "The percentage of used memory by cache and buffer",
"memory_swap_used": "The swap used",
"memory_cached": "The memory space used by cache and buffer",
"root_fs_used_percentage": "The percentage of used disk space of the root file system",
"load_1m": "The average load of the system in the last 1 minute",
"load_5m": "The average load of the system in the last 5 minutes",
"load_15s": "The average load of the system in the last 15 seconds",
"load_15m": "The average load of the system in the last 15 minutes",
"load_1": "The average load of the system in the last 1 minute",
"load_5": "The average load of the system in the last 5 minutes",
"load_15": "The average load of the system in the last 15 minutes",
"disk_used": "The disk space used",
"disk_free": "The disk space available",
"disk_readbytes": "The number of bytes that the system reads in the disk per second",
Expand Down Expand Up @@ -142,38 +142,56 @@
"appendLogs_latency_us": "The latency of appending logs.",
"more": "More",
"enable_space_level_metrics_tip": "To enable space-level metrics, please set the value of enable_space_level_metrics to true in the Graph service configuration",
"cpu_total_used": "total used",
"cpu_system_used": "system used",
"cpu_user_used": "user used",
"cpu_io_wait_used": "io wait used",
"memory_total": "total",
"memory_currnet_used": "used",
"memory_avaliable": "avaliable",
"memory_cached": "cache + buffer",
"memory_swap_used": "SWAP used",
"memory_currnet_used_utilization": "used",
"memory_avaliable_utilization": "available",
"memory_cached_utilization": "cache + buffer",
"memory_swap_utilization": "SWAP",
"cpu_load_1": "load 1min",
"cpu_load_5": "load 5min",
"cpu_load_15": "load 15min",
"disk_read_rate": "read",
"disk_write_rate": "write",
"open_file_desc": "open file desc",
"context_switch_rate": "conetxt switch",
"graphd_latency": "Graphd Latency",
"graphd_queries": "Graphd Query",
"graphd_sessions": "Graphd Session",
"process_memory": "Process Memory Usage",
"process_resource": "Process Disk Read/Write Bytes",
"process_cpu": "Process Cpu Usage",
"process_context_switch": "Process Context Switch & open file desc",
"metad_latency": "Metad Latency",
"metad_nums": "Metad Num Related",
"storage_latency": "Storage Latency",
"storaged_edge_nums": "Edge Num Related",
"storaged_vertices_nums": "Vertices Num Related",
"storaged_tag_and_dst_nums": "Tag and Src&Dst Num Related",
"storaged_other_nums": "Other Num Related"
"overview_label": {
"cpu_system_used": "cpu system used",
"cpu_utilization": "cpu total used",
"cpu_user_used": "cpu user used",
"cpu_io_wait_used": "cpu io wait used",
"cpu_idle": "cpu idle",
"memory_total": "memory total",
"memory_used": "memory used",
"memory_avaliable": "memory avaliable",
"memory_cached": "memory cache + buffer",
"memory_swap_total": "SWAP total",
"memory_swap_used": "SWAP used",
"memory_used_utilization": "memory used",
"memory_avaliable_utilization": "memory available",
"memory_cached_utilization": "memory cache + buffer",
"memory_swap_utilization": "SWAP",
"load_1": "load 1min",
"load_5": "load 5min",
"load_15": "load 15min",
"disk_used": "disk used",
"disk_free": "disk free",
"disk_readbytes": "disk read",
"disk_writebytes": "disk write",
"inode_utilization": "innode used",
"open_file_desc": "open file desc",
"disk_readiops": "disk read",
"disk_writeiops": "disk write",
"disk_used_percentage": "disk used",
"disk_size": "disk size",
"root_fs_used_percentage": "root fs used",
"network_in_rate": "network in",
"network_out_rate": "network out",
"network_in_errs": "netowrk in errors",
"network_out_errs": "netowrk out errors",
"network_in_packets": "netowrk in packets",
"network_out_packets": "netowrk out packets",
"context_switch_rate": "context switch",
"graphd_latency": "Graphd Latency",
"graphd_queries": "Graphd Query",
"graphd_sessions": "Graphd Session",
"process_memory": "Process Memory Usage",
"process_resource": "Process Disk Read/Write Bytes",
"process_cpu": "Process Cpu Usage",
"process_context_switch": "Process Context Switch & open file desc",
"metad_latency": "Metad Latency",
"metad_nums": "Metad Num Related",
"storage_latency": "Storage Latency",
"storaged_edge_nums": "Edge Num Related",
"storaged_vertices_nums": "Vertices Num Related",
"storaged_tag_and_dst_nums": "Tag and Src&Dst Num Related",
"storaged_other_nums": "Other Num Related"
}
}
114 changes: 67 additions & 47 deletions src/config/locale/zh-CN/metric_description.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{
"cpu_utilization": "CPU已使用百分比",
"cpu_idle": "CPU总空闲百分比",
"cpu_wait": "等待IO操作使用的CPU百分比",
"cpu_user": "用户空间占用的CPU百分比",
"cpu_system": "系统空间占用的CPU百分比",
"memory_used": "已使用内存(包括Buffer缓存和Cached缓存)",
"memory_used_percentage": "已使用内存百分比(包括Buffer缓存和Cached缓存)",
"memory_actual_used": "实际使用内存(不包括Buffer缓存和Cached缓存)",
"memory_actual_used_percentage": "实际使用内存百分比(不包括Buffer缓存和Cached缓存)",
"cpu_io_wait_used": "等待IO操作使用的CPU百分比",
"cpu_user_used": "用户空间占用的CPU百分比",
"cpu_system_used": "系统空间占用的CPU百分比",
"memory_used": "已使用内存",
"memory_used_utilization": "已使用内存百分比",
"memory_avaliable_utilization": "可用内存百分比",
"memory_cached_utilization": "已使用的Cached缓存百分比",
"memory_swap_utilization": "已使用的SWAP交换分区百分比",
"memory_free": "空闲内存",
"memory_swap_total": "SWAP 交换分区的大小",
"root_fs_used_percentage": "根文件系统磁盘使用率",
"memory_cached_buffer_used": "已使用的Buffer缓存和Cached缓存大小",
"memory_cached_buffer_used_percentage": "已使用的Buffer缓存和Cached缓存百分比",
"load_1m": "最近1分钟系统平均负载",
"load_5m": "最近5分钟系统平均负载",
"load_15s": "最近15秒系统平均负载",
"load_15m": "最近15分钟系统平均负载",
"memory_total": "总内存",
"memory_avaliable": "可用内存",
"memory_cached": "已使用的Cached缓存大小",
"memory_swap_used": "已使用的SWAP交换分区大小",
"load_1": "最近1分钟系统平均负载",
"load_5": "最近5分钟系统平均负载",
"load_15": "最近15分钟系统平均负载",
"disk_used": "磁盘已使用存储空间",
"disk_free": "磁盘剩余存储空间",
"disk_readbytes": "磁盘每秒读取的字节数",
Expand Down Expand Up @@ -141,40 +145,56 @@
"appendLogs_latency_us": "写日志的延迟时间。",
"more": "更多参数说明",
"enable_space_level_metrics_tip": "如需开启图空间监控指标,请先在 Graph 服务的配置文件中将enable_space_level_metrics参数的值修改为true",
"cpu_total_used": "总使用率",
"cpu_system_used": "系统使用率",
"cpu_user_used": "用户使用率",
"cpu_io_wait_used": "磁盘IO使用率",
"memory_total": "总内存",
"memory_currnet_used": "已使用",
"memory_avaliable": "可用",
"memory_cached": "缓存",
"memory_swap_used": "SWAP 用量",
"memory_currnet_used_utilization": "已使用率",
"memory_avaliable_utilization": "可用率",
"memory_cached_utilization": "缓存使用率",
"memory_swap_utilization": "SWAP 使用率",
"cpu_load_1": "1分钟负载",
"cpu_load_5": "5分钟负载",
"cpu_load_15": "15分钟负载",
"disk_read_rate": "读取",
"disk_write_rate": "写入",
"network_in": "上行流量速率",
"network_out": "下行流量速率",
"open_file_desc": "打开文件描述符",
"context_switch_rate": "每秒上下文切换次数",
"graphd_latency": "Graphd 延迟",
"graphd_queries": "Graphd 查询",
"graphd_sessions": "Graphd Session",
"process_memory": "进程内存使用",
"process_disk": "进程磁盘读写",
"process_cpu": "进程CPU使用率",
"process_context_open_file_desc": "进程上下文切换 & 文件句柄",
"metad_latency": "Metad 延迟",
"metad_nums": "Metad 数值相关",
"storage_latency": "Storage 延迟",
"storaged_edge_nums": "边数据相关",
"storaged_vertices_nums": "点数据相关",
"storaged_tag_and_dst_nums": "tag与路径相关",
"storaged_other_nums": "其他数值指标"
"overview_label": {
"cpu_utilization": "cpu 总使用率",
"cpu_system_used": "cpu 系统使用率",
"cpu_user_used": "cpu 用户使用率",
"cpu_io_wait_used": "cpu 磁盘IO使用率",
"cpu_idle": "cpu 空闲率",
"memory_total": "总内存",
"memory_used": "已使用内存",
"memory_avaliable": "可用内存",
"memory_cached": "缓存",
"memory_swap_used": "SWAP 用量",
"memory_swap_total":"SWAP 总量",
"memory_used_utilization": "内存已使用率",
"memory_avaliable_utilization": "内存可用率",
"memory_cached_utilization": "缓存使用率",
"memory_swap_utilization": "SWAP 使用率",
"load_1": "1分钟负载",
"load_5": "5分钟负载",
"load_15": "15分钟负载",
"disk_used": "磁盘已使用",
"disk_free": "磁盘剩余",
"disk_readbytes": "磁盘读取",
"disk_writebytes": "磁盘写入",
"inode_utilization": "innode 使用率",
"disk_readiops": "磁盘读取",
"disk_writeiops": "磁盘写入",
"disk_size": "磁盘大小",
"root_fs_used_percentage": "根文件系统磁盘使用率",
"disk_used_percentage": "磁盘使用率",
"network_in_rate": "上行流量速率",
"network_out_rate": "下行流量速率",
"network_in_errs": "上行流量报错",
"network_out_errs": "下行流量报错",
"network_in_packets": "上行流量数据包",
"network_out_packets": "下行流量数据包",
"open_file_desc": "打开文件描述符",
"context_switch_rate": "每秒上下文切换次数",
"graphd_latency": "Graphd 延迟",
"graphd_queries": "Graphd 查询",
"graphd_sessions": "Graphd Session",
"process_memory": "进程内存使用",
"process_disk": "进程磁盘读写",
"process_cpu": "进程CPU使用率",
"process_context_open_file_desc": "进程上下文切换 & 文件句柄",
"metad_latency": "Metad 延迟",
"metad_nums": "Metad 数值相关",
"storage_latency": "Storage 延迟",
"storaged_edge_nums": "边数据相关",
"storaged_vertices_nums": "点数据相关",
"storaged_tag_and_dst_nums": "tag与路径相关",
"storaged_other_nums": "其他数值指标"
}
}
47 changes: 0 additions & 47 deletions src/pages/MachineDashboard/MachinePanelDetail/index.module.less

This file was deleted.

Loading