Skip to content

Commit

Permalink
update live logs with correct revision number (#3698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored Sep 29, 2023
1 parent 81590f8 commit 9fc4e74
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dashboard/src/main/home/app-dashboard/validate-apply/logs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,18 @@ export const useLogs = ({
}
});
const newLogsParsed = parseLogs(newLogs);
newLogs.filter((log) => {
return log.metadata?.raw_labels?.porter_run_app_revision_id != null
&& revisionIdToNumber[log.metadata.raw_labels.porter_run_app_revision_id] != null
&& revisionIdToNumber[log.metadata.raw_labels.porter_run_app_revision_id] != 0
}).forEach((log) => {
if (log.metadata?.raw_labels?.porter_run_app_revision_id != null) {
const revisionNumber = revisionIdToNumber[log.metadata.raw_labels.porter_run_app_revision_id];
if (revisionNumber != null && revisionNumber != 0) {
log.metadata.revision = revisionNumber.toString();
}
}
})
const newLogsFiltered = filterLogs(newLogsParsed);
pushLogs(newLogsFiltered);
},
Expand Down

0 comments on commit 9fc4e74

Please sign in to comment.