Skip to content

feat: web progress bar - #423

Open
NikitaKrinkin wants to merge 10 commits into
mainfrom
web-prog-ui
Open

feat: web progress bar#423
NikitaKrinkin wants to merge 10 commits into
mainfrom
web-prog-ui

Conversation

@NikitaKrinkin

Copy link
Copy Markdown
Collaborator

@NikitaKrinkin
NikitaKrinkin requested a review from Artanias July 7, 2026 14:50
@NikitaKrinkin NikitaKrinkin self-assigned this Jul 7, 2026
@NikitaKrinkin NikitaKrinkin added the enhancement New feature or request label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Coverage

Comment thread src/imgtests/runner.py Outdated
Comment thread src/imgtests/web/tests_interface/views.py Outdated
@Artanias
Artanias requested a review from nhitar July 15, 2026 20:34
Comment thread src/imgtests/logger.py Outdated
Comment thread src/imgtests/logger.py Outdated
Comment thread src/imgtests/logger.py Outdated
Comment thread src/imgtests/logger.py
Comment thread src/imgtests/logger.py Outdated

@Artanias Artanias left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно разрешить конфликты с main веткой.

@Artanias
Artanias requested a review from AndrewGavril July 20, 2026 20:23
Comment thread src/imgtests/runner.py

if (currentRun > 0 && currentRun <= totalRuns) {
runsBar.classList.add('pulse');
runsText.textContent = `Run ${currentRun} out of ${totalRuns} is in progress (${runsPercent}%)`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает переводов.

document.getElementById('last-profile').textContent = data.last_profile_done;
})
.catch(error => {
console.error('JSON processing error:', error);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает переводов.

function updateDashboard(taskId) {
fetch("/current-progress/" + taskId + "/", { cache: "no-store" })
.then(response => {
if (!response.ok) throw new Error('Data load error');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не хватает переводов.

Comment thread src/imgtests/logger.py
Comment on lines +54 to +55
self.progress_data = {}
self.proc_to_task = {}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут потецниальная "утечка" памяти, т.к. от каждого запуска будет забиваться и не вичищаться после тестов.

Comment thread src/imgtests/logger.py
Comment on lines +196 to +202
def __get_progress_handler() -> ProgressHandler:
progress_handle = ProgressHandler()
progress_handle.setLevel(logging.DEBUG)
progress_handle.setFormatter(StreamFormatter())
progress_handle.set_name("progress_handler")

return progress_handle

@Artanias Artanias Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше бы это всё проворачивать более явно, нежели чем через парсинг логов, т.к кажется, что поменяются логи, а они соответственно меняются, то всё сломается и будет сходу не понятно, что делать, где чинить.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Также в БД попадают уже сейчас результаты тестов, может получится их расширить и оттуда вычислять значения?

@X1pster X1pster left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно разрешить конфликт с main-веткой

checkStatus();
}

const PRGORESS_POLLING_INTERVAL = 3000;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нигде не используется, также надо бы исправить название, а то здесь опечатка.
Можно либо совсем удалить, либо использовать в функции pollStatus:

вместо

setTimeout(checkStatus, 2000);

сделать так:

setTimeout(checkStatus, PROGRESS_POLLING_INTERVAL);

</div>

<div id="progress-card" class="progress-card" style="display: none;">
<h2>Progress</h2>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь и далее надо бы тоже добавить переводы.

@AndrewGavril AndrewGavril left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

С переводами зря затеяли усложнение кода (точнее не самого кода, а его контроль). Нужно было остановиться на одном языке -- английском.

Comment thread src/imgtests/logger.py


class ProgressHandler(logging.Handler):
progress_template = { # noqa: RUF012

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще хорошо бы учитывать время теста, которое мы вносим в конфигурацию. Мы можем приблизительно оценить время на тесты исходя из конфигурации. И прогресс считать относительно этого.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants