Repository navigation
panel: число инструментов строки берётся из каталога набора - #33
Merged
Merged
Conversation
…ко из проверки Колонка TOOLS в таблице серверов набора и на странице всех серверов стояла прочерком у всех, пока каждую строку не проверят кнопкой «Проверить»: число бралось только из пробы, а проба — действие человека. Теперь у сервера работающего набора число берётся из каталога этого набора (`GET /api/sets/<id>/tools` — дескрипторы, которые помнит `tools.lock.json`): один запрос на открытие набора, счёт по серверам в `st.setTools`, чтение через `toolCount()`. Проба по-прежнему сильнее каталога и заменяет число живым счётом; у остановленного набора и у сервера, которого каталог не знает, остаётся `—`. Подсказка колонки говорит, откуда число. Приёмка панели: шаг W4 открывает страницу с чистой памятью и требует число без проверки — на прежнем коде шаг красный («колонка tools пуста до проверки»), теперь зелёный; шагов 38 с `ACC_DAP`, 26 без него.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
The Tools column of the servers table (set page and All servers page) showed
—for every row until each server was probed by hand with Check. The count came only from a probe, and a probe is a person's action, so a fresh page started empty.Now a server of a running set takes its count from that set's catalog —
GET /api/sets/<id>/tools, the descriptorstools.lock.jsonalready remembers. The catalog is read once per set open (ensureSetTools,web/app.js:2001), counted per server, and read throughtoolCount()(web/app.js:2019). A probe still wins when it exists: Check replaces the catalog number with a live count of the same server. A stopped set, and a server no catalog knows, keeps—. Both tables use the same helper, so the all-servers page is covered too.Test
Acceptance step
W4(DAP-gated, like the neighbouring steps): it opens the servers page with a reloaded document (the probe cache lives in page memory, a hash change alone kept it), then requires a number in the row without touching Check, and repeats the check on the all-servers page.web/app.js, new step:failed: 1—W4 инструментов… колонка tools пуста до проверкиweb/app.js, same step:total 38, skipped 0, failed 0Docs
docs/en|ru/panel.mddescribe the two sources of the number,web/codemap.mdgains the paragraph ontoolCount()/ensureSetTools(),CHANGELOG.mdandCHANGELOG.ru.mdcarry the line under[Unreleased], acceptance step counts are updated (38 withACC_DAP, 26 without).Что исправлено
Колонка Инструментов в таблице серверов (страница набора и Все серверы) стояла прочерком у всех, пока каждую строку не проверят кнопкой Проверить: число бралось только из пробы, а проба — действие человека.
Теперь у сервера работающего набора число берётся из каталога этого набора —
GET /api/sets/<id>/tools, дескрипторы, которые помнитtools.lock.json. Каталог читается один раз на открытие набора (ensureSetTools,web/app.js:2001), считается по серверам и читается черезtoolCount()(web/app.js:2019). Проба по-прежнему сильнее: Проверить заменяет число из каталога живым счётом того же сервера. У остановленного набора и у сервера, которого каталог не знает, остаётся—. Обе таблицы ходят через один помощник, поэтому страница всех серверов закрыта тем же исправлением.Тест
Шаг приёмки
W4(подACC_DAP, как соседние): открывает страницу серверов с перезагруженным документом (кэш проб живёт в памяти страницы, смены хеша не хватало), требует число в строке, не нажимая Проверить, и повторяет проверку на странице всех серверов.web/app.js, новый шаг:failed: 1—W4 … колонка tools пуста до проверкиweb/app.js, тот же шаг:total 38, skipped 0, failed 0Документация
docs/en|ru/panel.mdописывают два источника числа, вweb/codemap.mdдобавлен абзац проtoolCount()/ensureSetTools(),CHANGELOG.mdиCHANGELOG.ru.md— строка в[Unreleased], счётчики шагов приёмки обновлены (38 сACC_DAP, 26 без).