HA 푸시 알림 경로를 정리

This commit is contained in:
seo
2026-06-29 06:02:30 +09:00
parent cd14bb2e5e
commit c5ab60a6e6
7 changed files with 12 additions and 652 deletions
-36
View File
@@ -35,7 +35,6 @@
statusBatteryRemaining: $('#statusBatteryRemaining'),
batteryRuntimeTooltip: $('#batteryRuntimeTooltip'),
spikeLogList: $('#spikeLogList'),
haNotifyList: $('#haNotifyList'),
customServiceList: $('#customServiceList'),
noticeBaseline: $('#noticeBaseline'),
rebootBtn: $('#rebootBtn'),
@@ -173,8 +172,6 @@
diagnostics: 'Diagnostics',
noticeHistory: 'Notice History',
noNoticeHistory: 'No system notice history.',
haNotifyHistory: 'HA Notify History',
noHaNotifyHistory: 'No HA notify history.',
customServices: 'Custom Services',
noCustomServices: 'No custom services.',
serviceLogs: 'Logs',
@@ -184,8 +181,6 @@
wifiAliasTitle: 'WiFi Hostname',
wifiAliasPrompt: 'Enter a name to keep for this MAC address.',
wifiAliasSaved: 'WiFi hostname saved.',
notifySuccess: 'success',
notifyFailed: 'failed',
show: 'Show',
hide: 'Hide',
translateButton: 'Translate',
@@ -324,8 +319,6 @@
diagnostics: '진단',
noticeHistory: '알림 이력',
noNoticeHistory: '시스템 알림 이력이 없습니다.',
haNotifyHistory: 'HA 알림 이력',
noHaNotifyHistory: 'HA 알림 이력이 없습니다.',
customServices: '사용자 서비스',
noCustomServices: '사용자 생성 서비스가 없습니다.',
serviceLogs: '로그',
@@ -335,8 +328,6 @@
wifiAliasTitle: 'WiFi 호스트명',
wifiAliasPrompt: '이 MAC 주소에 계속 표시할 이름을 입력하세요.',
wifiAliasSaved: 'WiFi 호스트명을 저장했습니다.',
notifySuccess: '성공',
notifyFailed: '실패',
show: '보기',
hide: '숨기기',
translateButton: '번역',
@@ -1624,32 +1615,6 @@
: `<div class="spike-log-empty">${escapeHtml(t('noNoticeHistory'))}</div>`;
}
function renderHaNotifyHistory(rows = []) {
if (!els.haNotifyList) return;
els.haNotifyList.innerHTML = rows.length
? rows.map((row, index) => {
const ok = row.event === 'send_success';
const statusText = ok ? t('notifySuccess') : t('notifyFailed');
const detail = [
row.target ? `${t('hostLabel')}: ${row.target}` : '',
row.http_code ? `HTTP ${row.http_code}` : '',
row.channel || '',
row.error || '',
].filter(Boolean).join(' / ');
return `
<div class="spike-log-item ${index === 0 ? 'latest' : ''} ${ok ? '' : 'alert'}">
<strong>${escapeHtml(row.created_at || '-')} · ${escapeHtml(statusText)}</strong>
<span>${escapeHtml(row.title || '-')}</span>
<span>${escapeHtml(row.tag || '-')}</span>
${detail ? `<span>${escapeHtml(detail)}</span>` : ''}
</div>
`;
}).join('')
: `<div class="spike-log-empty">${escapeHtml(t('noHaNotifyHistory'))}</div>`;
}
function renderCustomServices(rows = []) {
if (!els.customServiceList) return;
@@ -1696,7 +1661,6 @@
? `${baselineTemp.toFixed(1)}°C / ${Math.round(baselineRpm).toLocaleString()} RPM · ${stateText}`
: stateText;
renderSpikeHistory(data.fan_spike_history || []);
renderHaNotifyHistory(data.ha_notify_history || []);
renderCustomServices(data.custom_services || []);
setText(els.noticeBaseline, baselineText);