Skip to content
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
22 changes: 21 additions & 1 deletion highlight/RUST_SAM.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,30 @@
"level": "warn",
"pattern": "\\b(?:warn(?:ing)?|timeout|timed?\\s*out|retry|retries|retrying|busy|skip(?:ped)?)\\b"
},
{
"name": "PowerSequence",
"level": "pwrseq",
"pattern": "-{3,}(?:Start\\s+[A-Za-z0-9]+\\s*->\\s*[A-Za-z0-9]+|Press\\s+Power\\s+Button)-{3,}|\\b(?:power\\s*sequence|power\\s+(?:on|off)|cold\\s+boot|warm\\s+(?:boot|reset)|reset\\s+reason|reboot|shutdown)\\b"
},
{
"name": "SocSubsystem",
"level": "socss",
"pattern": "-{3,}(?:Start\\s+[A-Za-z0-9]+\\s*->\\s*[A-Za-z0-9]+|Press\\s+Power\\s+Button)-{3,}|\\b(?:powersequence|boot\\s+failure|reset\\s+reason)\\b"
"pattern": "\\bboot\\s+failure\\b"
},
{
"name": "DebugSSH",
"level": "debugssh",
"pattern": "^\\s*\\.[a-z][a-z0-9_]*\\b"
},
{
"name": "KeyboardHID",
"level": "kbdhid",
"pattern": "\\b(?:i2c_hid_host_task|i2c_hid_device_task|kb)\\s*:"
},
{
"name": "Interrupt",
"level": "intr",
"pattern": "\\b(?:interrupts?|irqs?|(?:de)?asserting\\s+interrupt|host\\s+interrupt\\s+(?:de)?asserted)\\b"
},
{
"name": "UEFI_SSH",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "m2-log-tool",
"version": "0.0.7",
"version": "0.0.8",
"description": "Experiment LOG collector and exporter (UEFI / SAM) - Electron desktop app",
"author": "OA Hsiao",
"license": "MIT",
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@
"ana.version": "Version",
"ana.boot": "Boot Point",
"ana.membucket": "Memory Bucket",
"ana.pwrseq": "Power Sequence",
"ana.socss": "SocSubsystem",
"ana.debugssh": "Debug SSH Cmd",
"ana.kbdhid": "Keyboard HID",
"ana.intr": "Interrupt",
"ana.uefissh": "UEFI_SSH",
"ana.pd": "PD",
"ana.level.toggle": "Select: include in count / up-down navigation",
Expand Down
4 changes: 4 additions & 0 deletions src/renderer/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@
"ana.version": "版號",
"ana.boot": "開機點",
"ana.membucket": "記憶體配置",
"ana.pwrseq": "電源序列",
"ana.socss": "SoC子系統",
"ana.debugssh": "Debug SSH 指令",
"ana.kbdhid": "鍵盤 HID",
"ana.intr": "中斷",
"ana.uefissh": "UEFI_SSH",
"ana.pd": "PD",
"ana.level.toggle": "選取:是否納入計數與上下導覽",
Expand Down
23 changes: 21 additions & 2 deletions src/renderer/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@ async function anaPopulateHl() {
sel.value = ana.hl || 'auto';
}

const ANA_RANK = { info: 1, warn: 2, error: 3 };
const ANA_RANK = { info: 1, intr: 1.5, warn: 2, error: 3 };

function anaHighlightLine(line, rules) {
// Match against the RAW text (not HTML-escaped) so patterns can use real
Expand Down Expand Up @@ -2228,7 +2228,22 @@ function anaNavGo(dir) {
/* ---------- Highlight levels (dynamic, expandable nav chips) ---------- */
// Known level colors; unknown levels (e.g. BOOTMODE) get a palette color.
const ANA_LEVEL_COLORS = { error: '#ff6b81', warn: '#fbbf24', info: '#60a5fa' };
const ANA_LEVEL_PALETTE = ['#34d399', '#a78bfa', '#22d3ee', '#f472b6', '#f59e0b', '#38bdf8', '#c084fc', '#4ade80'];
// Palette for custom levels. Deliberately avoids the hue bands of the three
// reserved colours — error (red/pink ~350°), warn (amber ~45°) and info
// (blue ~215°) — so a custom chip never looks like error/warn/info. Ordered to
// maximise hue distance between neighbours; only repeats after 10 levels.
const ANA_LEVEL_PALETTE = [
'#34d399', // emerald ~157°
'#a78bfa', // violet ~255°
'#22d3ee', // cyan ~187°
'#e879f9', // fuchsia ~291°
'#a3e635', // lime ~ 82°
'#c084fc', // purple ~270°
'#4ade80', // green ~142°
'#2dd4bf', // teal ~172°
'#d8b4fe', // lavender ~270°
'#5eead4', // aqua ~166°
];
const ANA_BUILTIN_LEVELS = new Set(['error', 'warn', 'info']);
const anaLevelColorMap = {};
let anaLevelPaletteIdx = 0;
Expand All @@ -2253,7 +2268,11 @@ function anaLevelLabel(level) {
if (level === 'version') return t('ana.version', '版號');
if (level === 'boot') return t('ana.boot', '開機點');
if (level === 'membucket') return t('ana.membucket', '記憶體配置');
if (level === 'pwrseq') return t('ana.pwrseq', '電源序列');
if (level === 'socss') return t('ana.socss', 'SoC子系統');
if (level === 'debugssh') return t('ana.debugssh', 'DebugSSH');
if (level === 'kbdhid') return t('ana.kbdhid', 'Keyboard HID');
if (level === 'intr') return t('ana.intr', '中斷');
if (level === 'uefissh') return t('ana.uefissh', 'UEFI_SSH');
if (level === 'pd') return t('ana.pd', 'PD');
if (anaIsMarkLevel(level)) return anaMarkLabel(level);
Expand Down
Loading