fix worker disable rendering (#15712)

This commit is contained in:
Vadim Ogievetsky 2024-01-18 13:21:32 -08:00 committed by GitHub
parent dd03f7061a
commit c8c04f1032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -554,12 +554,13 @@ ORDER BY
switch (row.service_type) {
case 'middle_manager':
case 'indexer': {
if (deepGet(row, 'worker.version') === '') return 'Disabled';
const { workerInfo } = row;
if (!workerInfo) {
return 'Could not get detail info';
}
if (workerInfo.worker.version === '') return 'Disabled';
const details: string[] = [];
if (workerInfo.lastCompletedTaskTime) {
details.push(`Last completed task: ${workerInfo.lastCompletedTaskTime}`);