feat: XID 권장 조치사항의 영문 원문 및 한글 번역 동시 제공 및 UI 이원화(st.tabs)
This commit is contained in:
@@ -706,8 +706,20 @@ def page_analyze():
|
|||||||
st.markdown(f"**PCI 주소:** `{event.pci_address}`")
|
st.markdown(f"**PCI 주소:** `{event.pci_address}`")
|
||||||
st.markdown(f"**설명:** {event.description}")
|
st.markdown(f"**설명:** {event.description}")
|
||||||
st.markdown("**권장 조치:**")
|
st.markdown("**권장 조치:**")
|
||||||
for ln in event.action.split("\n"):
|
action_ko = getattr(event, "action_ko", event.action)
|
||||||
st.markdown(f" {ln}")
|
action_en = getattr(event, "action_en", "")
|
||||||
|
|
||||||
|
if action_ko and action_en:
|
||||||
|
act_tab1, act_tab2 = st.tabs(["🇰🇷 한글 가이드", "🇺🇸 영문 가이드"])
|
||||||
|
with act_tab1:
|
||||||
|
for ln in action_ko.split("\n"):
|
||||||
|
st.markdown(f" {ln}")
|
||||||
|
with act_tab2:
|
||||||
|
for ln in action_en.split("\n"):
|
||||||
|
st.markdown(f" {ln}")
|
||||||
|
else:
|
||||||
|
for ln in action_ko.split("\n"):
|
||||||
|
st.markdown(f" {ln}")
|
||||||
|
|
||||||
# 커널 이벤트
|
# 커널 이벤트
|
||||||
st.markdown("---")
|
st.markdown("---")
|
||||||
@@ -957,7 +969,17 @@ def page_xid_stats():
|
|||||||
st.markdown(f"### {sev.get('emoji', '')} XID {selected_xid}: {xid_info['name']}")
|
st.markdown(f"### {sev.get('emoji', '')} XID {selected_xid}: {xid_info['name']}")
|
||||||
st.markdown(f"**설명:** {xid_info['description']}")
|
st.markdown(f"**설명:** {xid_info['description']}")
|
||||||
st.markdown("**권장 조치:**")
|
st.markdown("**권장 조치:**")
|
||||||
st.markdown(xid_info["action"])
|
action_ko = xid_info.get("action_ko", xid_info.get("action", ""))
|
||||||
|
action_en = xid_info.get("action_en", "")
|
||||||
|
|
||||||
|
if action_ko and action_en:
|
||||||
|
tab_ko, tab_en = st.tabs(["🇰🇷 한글 가이드", "🇺🇸 영문 가이드"])
|
||||||
|
with tab_ko:
|
||||||
|
st.markdown(action_ko)
|
||||||
|
with tab_en:
|
||||||
|
st.markdown(action_en)
|
||||||
|
else:
|
||||||
|
st.markdown(action_ko)
|
||||||
|
|
||||||
# 전체 XID DB 조회
|
# 전체 XID DB 조회
|
||||||
st.markdown("---")
|
st.markdown("---")
|
||||||
@@ -970,7 +992,17 @@ def page_xid_stats():
|
|||||||
st.markdown(f"심각도: {sev.get('label', xid_info['severity'])}")
|
st.markdown(f"심각도: {sev.get('label', xid_info['severity'])}")
|
||||||
st.markdown(xid_info['description'])
|
st.markdown(xid_info['description'])
|
||||||
st.markdown("**권장 조치:**")
|
st.markdown("**권장 조치:**")
|
||||||
st.markdown(xid_info["action"])
|
action_ko = xid_info.get("action_ko", xid_info.get("action", ""))
|
||||||
|
action_en = xid_info.get("action_en", "")
|
||||||
|
|
||||||
|
if action_ko and action_en:
|
||||||
|
tab_ko, tab_en = st.tabs(["🇰🇷 한글 가이드", "🇺🇸 영문 가이드"])
|
||||||
|
with tab_ko:
|
||||||
|
st.markdown(action_ko)
|
||||||
|
with tab_en:
|
||||||
|
st.markdown(action_en)
|
||||||
|
else:
|
||||||
|
st.markdown(action_ko)
|
||||||
else:
|
else:
|
||||||
st.warning(f"XID {xid_lookup}에 대한 정보가 데이터베이스에 없습니다.")
|
st.warning(f"XID {xid_lookup}에 대한 정보가 데이터베이스에 없습니다.")
|
||||||
|
|
||||||
|
|||||||
+516
-172
File diff suppressed because it is too large
Load Diff
+7
-1
@@ -31,6 +31,8 @@ class XidEvent:
|
|||||||
severity: str = "info"
|
severity: str = "info"
|
||||||
description: str = ""
|
description: str = ""
|
||||||
action: str = ""
|
action: str = ""
|
||||||
|
action_ko: str = ""
|
||||||
|
action_en: str = ""
|
||||||
gpu_index: int = -1
|
gpu_index: int = -1
|
||||||
gpu_name: str = ""
|
gpu_name: str = ""
|
||||||
gpu_serial: str = ""
|
gpu_serial: str = ""
|
||||||
@@ -41,12 +43,16 @@ class XidEvent:
|
|||||||
self.name = xid_info["name"]
|
self.name = xid_info["name"]
|
||||||
self.severity = xid_info["severity"]
|
self.severity = xid_info["severity"]
|
||||||
self.description = xid_info["description"]
|
self.description = xid_info["description"]
|
||||||
self.action = xid_info["action"]
|
self.action = xid_info.get("action_ko", xid_info.get("action", ""))
|
||||||
|
self.action_ko = xid_info.get("action_ko", xid_info.get("action", ""))
|
||||||
|
self.action_en = xid_info.get("action_en", "NVIDIA official documentation does not specify a detailed action for this code.")
|
||||||
else:
|
else:
|
||||||
self.name = f"Unknown XID {self.xid_code}"
|
self.name = f"Unknown XID {self.xid_code}"
|
||||||
self.severity = "warning"
|
self.severity = "warning"
|
||||||
self.description = f"XID {self.xid_code}에 대한 정보가 데이터베이스에 없습니다."
|
self.description = f"XID {self.xid_code}에 대한 정보가 데이터베이스에 없습니다."
|
||||||
self.action = "NVIDIA 공식 문서에서 해당 XID 코드를 확인하세요."
|
self.action = "NVIDIA 공식 문서에서 해당 XID 코드를 확인하세요."
|
||||||
|
self.action_ko = "NVIDIA 공식 문서에서 해당 XID 코드를 확인하세요."
|
||||||
|
self.action_en = "Please check this XID code in NVIDIA official documentation."
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
Reference in New Issue
Block a user