Skip to content

Commit 76d2179

Browse files
committed
feat: Enhance main menu display
- Remove outer border from the main menu. - Integrate "Kubernetes Monitoring Tool" as the table title.
1 parent 8c179b1 commit 76d2179

File tree

4 files changed

+464
-10
lines changed

4 files changed

+464
-10
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ NODE_GROUP_LABEL = "node.kubernetes.io/app"
134134
│ │ 4 │ Pod Monitoring (생성된 순서) [옵션: Pod IP 및 Node Name 표시] │ │
135135
│ │ 5 │ Pod Monitoring (Running이 아닌 Pod) [옵션: Pod IP 및 Node Name 표시] │ │
136136
│ │ 6 │ Pod Monitoring (전체/정상/비정상 Pod 개수 출력) │ │
137-
│ │ 7 │ Node Monitoring (생성된 순서) [AZ, NodeGroup 표시 및 필터링 가능] │ │
138-
│ │ 8 │ Node Monitoring (Unhealthy Node 확인) [AZ, NodeGroup 표시 및 필터링 가능] │ │
139-
│ │ 9 │ Node Monitoring (CPU/Memory 사용량 높은 순 정렬) [NodeGroup 필터링 가능] │ │
137+
│ │ 7 │ Node Monitoring (생성된 순서) [AZ, NodeGroup 표시 및 필터링 가능] │ │
138+
│ │ 8 │ Node Monitoring (Unhealthy Node 확인) [AZ, NodeGroup 표시 및 필터링 가능] │ │
139+
│ │ 9 │ Node Monitoring (CPU/Memory 사용량 높은 순 정렬) [NodeGroup 필터링 가능] │ │
140140
│ │ Q │ Quit │ │
141141
│ ╰───┴───────────────────────────────────────────────────────────────────────────────────────╯ │
142142
╰───────────────────────────────────────────────────────────────────────────────────────────────╯

kubernetes_monitoring.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from rich.prompt import Prompt
2222
from rich.style import Style
2323
from rich.table import Table
24+
from rich.markdown import Markdown
2425

2526
console = Console()
2627

@@ -497,6 +498,9 @@ def main_menu() -> str:
497498
box=box.ROUNDED,
498499
padding=(0, 1),
499500
highlight=True,
501+
title="Kubernetes Monitoring Tool",
502+
title_style="bold yellow",
503+
title_justify="center",
500504
)
501505
menu_table.add_column("Option", style="bold green")
502506
menu_table.add_column("Description", style="white")
@@ -525,13 +529,7 @@ def main_menu() -> str:
525529

526530
for option, description in menu_options:
527531
menu_table.add_row(option, description)
528-
529-
menu_panel = Panel(
530-
menu_table,
531-
title="[bold yellow]Kubernetes Monitoring Tool[/bold yellow]",
532-
expand=False,
533-
)
534-
console.print(Padding(menu_panel, (1, 0, 1, 0)))
532+
console.print(menu_table)
535533
return Prompt.ask("Select an option")
536534

537535

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import os
2+
import sys
3+
4+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)))
5+
import kubernetes_monitoring
6+
7+
8+
def test_main_function_exists():
9+
assert callable(kubernetes_monitoring.main)

0 commit comments

Comments
 (0)