refactor: Point Builder 행별 is_active 램프 제거 + 등록/상태 컬럼 확장
- 🟢/🔴 is_active 토글 램프 삭제 (등록/상태 색상과 중복, is_active 전역 TRUE라 무의미) - 미사용 pbToggleOne 함수 제거 - 등록/상태 75→120px(긴 라벨 대응), 관리 110→80px(삭제만 남음) - 개별 활성/비활성은 상단 일괄 버튼으로 일원화 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -301,8 +301,7 @@ function pbRenderPoints(res) {
|
||||
<td>${item.controllerId}</td>
|
||||
<td style="${statusStyle}">${statusLabel}</td>
|
||||
<td style="white-space:nowrap">
|
||||
<span style="cursor:pointer;font-size:14px" onclick="pbToggleOne(${item.id}, ${!item.isActive})" title="${item.isActive ? '비활성화' : '활성화'}">${item.isActive ? '🟢' : '🔴'}</span>
|
||||
<button class="btn-b btn-sm" style="margin-left:6px;color:var(--red,#e55);border-color:var(--red,#e55)" onclick="pbDeleteOne(${item.id})">🗑 삭제</button>
|
||||
<button class="btn-b btn-sm" style="color:var(--red,#e55);border-color:var(--red,#e55)" onclick="pbDeleteOne(${item.id})">🗑 삭제</button>
|
||||
</td>
|
||||
</tr>`;
|
||||
}).join('');
|
||||
@@ -325,14 +324,6 @@ function pbUpdateBulkBar() {
|
||||
bar.hidden = checked.length === 0;
|
||||
}
|
||||
|
||||
async function pbToggleOne(id, active) {
|
||||
const res = await pbApi(`/api/hc900/tags/${id}/active`, 'PUT', active);
|
||||
if (res) {
|
||||
pbRefresh();
|
||||
pbLoadSummary();
|
||||
}
|
||||
}
|
||||
|
||||
async function pbDeleteOne(id) {
|
||||
if (!confirm('이 태그를 비활성화하고 realtime_table에서 제거합니다. 계속하시겠습니까?')) return;
|
||||
const res = await pbApi(`/api/pointbuilder/${id}`, 'DELETE');
|
||||
|
||||
@@ -313,8 +313,8 @@
|
||||
<th style="width:85px">데이터 타입</th>
|
||||
<th style="width:85px">Modbus</th>
|
||||
<th style="width:50px">컨트롤러</th>
|
||||
<th style="width:75px">등록/상태</th>
|
||||
<th style="width:110px">관리</th>
|
||||
<th style="width:120px">등록/상태</th>
|
||||
<th style="width:80px">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="pb-points-tbody">
|
||||
|
||||
Reference in New Issue
Block a user