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) { switch (row.service_type) {
case 'middle_manager': case 'middle_manager':
case 'indexer': { case 'indexer': {
if (deepGet(row, 'worker.version') === '') return 'Disabled';
const { workerInfo } = row; const { workerInfo } = row;
if (!workerInfo) { if (!workerInfo) {
return 'Could not get detail info'; return 'Could not get detail info';
} }
if (workerInfo.worker.version === '') return 'Disabled';
const details: string[] = []; const details: string[] = [];
if (workerInfo.lastCompletedTaskTime) { if (workerInfo.lastCompletedTaskTime) {
details.push(`Last completed task: ${workerInfo.lastCompletedTaskTime}`); details.push(`Last completed task: ${workerInfo.lastCompletedTaskTime}`);