viberadar 0.3.109 → 0.3.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/dashboard.html +19 -9
- package/package.json +1 -1
package/dist/ui/dashboard.html
CHANGED
|
@@ -2448,9 +2448,16 @@ function obsUpdateSelectedCount(groupId) {
|
|
|
2448
2448
|
const checked = container.querySelectorAll('input[type="checkbox"]:checked').length;
|
|
2449
2449
|
const btn = container.querySelector('.obs-run-selected');
|
|
2450
2450
|
if (btn) {
|
|
2451
|
-
const
|
|
2452
|
-
|
|
2453
|
-
|
|
2451
|
+
const fieldName = btn.dataset.obsFieldName;
|
|
2452
|
+
if (fieldName) {
|
|
2453
|
+
const n = checked;
|
|
2454
|
+
const suffix = n === 1 ? 'модуль' : n < 5 ? 'модуля' : 'модулей';
|
|
2455
|
+
btn.textContent = n > 0 ? `Добавить \`${fieldName}\` в ${n} ${suffix}` : `Добавить \`${fieldName}\``;
|
|
2456
|
+
} else {
|
|
2457
|
+
const baseLabel = btn.dataset.baseLabel || btn.textContent.replace(/\s*\(\d+\)$/, '');
|
|
2458
|
+
btn.dataset.baseLabel = baseLabel;
|
|
2459
|
+
btn.textContent = checked > 0 ? `${baseLabel} (${checked})` : baseLabel;
|
|
2460
|
+
}
|
|
2454
2461
|
btn.disabled = checked === 0;
|
|
2455
2462
|
}
|
|
2456
2463
|
// Update floating action bar
|
|
@@ -2458,11 +2465,12 @@ function obsUpdateSelectedCount(groupId) {
|
|
|
2458
2465
|
if (!bar) return;
|
|
2459
2466
|
if (checked > 0) {
|
|
2460
2467
|
const action = container.dataset.obsAction || '';
|
|
2461
|
-
const actionLabels = { missing: 'добавить логи', field: '
|
|
2468
|
+
const actionLabels = { missing: 'добавить логи', field: 'Добавить поле', rec: 'исправить' };
|
|
2462
2469
|
const groupLabel = container.dataset.obsLabel || '';
|
|
2470
|
+
const fieldMeta = action === 'field' && container.dataset.obsMeta ? JSON.parse(container.dataset.obsMeta) : null;
|
|
2463
2471
|
bar.dataset.groupId = groupId;
|
|
2464
2472
|
document.getElementById('obsFloatingCount').textContent = `${checked} выбрано`;
|
|
2465
|
-
document.getElementById('obsFloatingLabel').textContent = groupLabel;
|
|
2473
|
+
document.getElementById('obsFloatingLabel').textContent = fieldMeta ? `\`${fieldMeta.fieldName}\`` : groupLabel;
|
|
2466
2474
|
document.getElementById('obsFloatingBtn').textContent = actionLabels[action] || 'исправить';
|
|
2467
2475
|
bar.classList.add('visible');
|
|
2468
2476
|
} else {
|
|
@@ -3124,7 +3132,9 @@ function renderObsGlobalDetail(c, filterFeatureKey) {
|
|
|
3124
3132
|
const expandBtn = hasAgent ? `<button class="obs-expand-btn" onclick="event.stopPropagation();toggleObsDetail('${groupId}')">▼</button>` : '';
|
|
3125
3133
|
const detailItems = affectedItems.map(ci => {
|
|
3126
3134
|
const catIdx = catalog.indexOf(ci);
|
|
3127
|
-
|
|
3135
|
+
const otherMissing = (ci.missingFields||[]).filter(f => f !== name);
|
|
3136
|
+
const otherHint = otherMissing.length > 0 ? `<span style="color:var(--dim);font-size:0.8em;flex-shrink:0" title="также отсутствуют: ${escapeHtml(otherMissing.join(', '))}">+${escapeHtml(otherMissing.join(', '))}</span>` : '';
|
|
3137
|
+
return `<label class="obs-detail-item"><input type="checkbox" data-idx="${catIdx}" onchange="obsUpdateSelectedCount('${groupId}')"><span title="${escapeHtml(ci.modulePath)}">${escapeHtml(ci.modulePath.split('/').slice(-2).join('/'))}</span><span style="color:var(--dim);flex-shrink:0">${ci.format}</span>${otherHint}</label>`;
|
|
3128
3138
|
}).join('');
|
|
3129
3139
|
const detail = hasAgent ? `
|
|
3130
3140
|
<div id="obs-detail-${groupId}" class="obs-detail" data-obs-action="field" data-obs-meta='{"fieldName":"${escapeHtml(name)}"}' data-obs-label="поле ${escapeHtml(name)}">
|
|
@@ -3133,13 +3143,13 @@ function renderObsGlobalDetail(c, filterFeatureKey) {
|
|
|
3133
3143
|
</div>
|
|
3134
3144
|
<div class="obs-detail-list">${detailItems}</div>
|
|
3135
3145
|
<div class="obs-detail-bar">
|
|
3136
|
-
<button class="obs-run-selected" disabled onclick="obsRunSelected('${groupId}','obs-fix-selected',{fieldName:'${escapeHtml(name)}'})"
|
|
3146
|
+
<button class="obs-run-selected" disabled data-obs-field-name="${escapeHtml(name)}" onclick="obsRunSelected('${groupId}','obs-fix-selected',{fieldName:'${escapeHtml(name)}'})">Добавить \`${escapeHtml(name)}\`</button>
|
|
3137
3147
|
</div>
|
|
3138
3148
|
</div>` : '';
|
|
3139
3149
|
return `<div>
|
|
3140
3150
|
<div class="obs-list-item">
|
|
3141
3151
|
<span><code>${escapeHtml(name)}</code></span>
|
|
3142
|
-
<strong style="color:${count > 20 ? 'var(--red)' : count > 5 ? 'var(--yellow)' : 'var(--muted)'}">${count}
|
|
3152
|
+
<strong style="color:${count > 20 ? 'var(--red)' : count > 5 ? 'var(--yellow)' : 'var(--muted)'}">${count} пропусков в ${affectedItems.length} модул${affectedItems.length === 1 ? 'е' : affectedItems.length < 5 ? 'ях' : 'ях'}</strong>
|
|
3143
3153
|
${expandBtn}
|
|
3144
3154
|
</div>
|
|
3145
3155
|
${detail}
|
|
@@ -3479,7 +3489,7 @@ function renderObsGlobalDetail(c, filterFeatureKey) {
|
|
|
3479
3489
|
</div>
|
|
3480
3490
|
<div class="obs-hint-section">
|
|
3481
3491
|
<div class="obs-hint-section-title">Как использовать</div>
|
|
3482
|
-
<p>Каждая строчка — пропущенное поле и сколько раз оно отсутствует. Раскрой строку, выбери затронутые модули и нажми <strong
|
|
3492
|
+
<p>Каждая строчка — пропущенное поле и сколько раз оно отсутствует. Раскрой строку, выбери затронутые модули и нажми <strong>«Добавить `поле`»</strong> — агент добавит поле во все лог-вызовы выбранных модулей.</p>
|
|
3483
3493
|
</div>
|
|
3484
3494
|
</div>
|
|
3485
3495
|
</div>
|