PG1204 commented on code in PR #6213:
URL: https://github.com/apache/texera/pull/6213#discussion_r3889951586
##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts:
##########
@@ -515,6 +516,24 @@ export class JointUIService {
jointPaper.getModelById(operator.operatorID).attr("rect.body/fill",
JointUIService.getOperatorFillColor(operator));
}
+ /**
+ * Paints an operator's body fill for the performance heat-map overlay. The
heat-map owns only
+ * `rect.body/fill`, so it coexists with the execution-status border
(`rect.body/stroke`).
+ * A `score` of undefined means "no metrics captured yet" and paints a
neutral color.
Review Comment:
addressed in
[999e096](https://github.com/apache/texera/pull/6213/commits/999e096f81662849f84da21758a13a496e60f5b9)
##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts:
##########
@@ -515,6 +516,24 @@ export class JointUIService {
jointPaper.getModelById(operator.operatorID).attr("rect.body/fill",
JointUIService.getOperatorFillColor(operator));
}
+ /**
+ * Paints an operator's body fill for the performance heat-map overlay. The
heat-map owns only
+ * `rect.body/fill`, so it coexists with the execution-status border
(`rect.body/stroke`).
+ * A `score` of undefined means "no metrics captured yet" and paints a
neutral color.
+ */
+ public applyHeatmapColor(jointPaper: joint.dia.Paper, operatorID: string,
score: number | undefined): void {
+ const fill = score === undefined ? HEATMAP_NO_DATA_COLOR :
scoreToColor(score);
+ jointPaper.getModelById(operatorID)?.attr("rect.body/fill", fill);
+ }
+
+ /**
+ * Restores an operator's default body fill (used when the heat-map overlay
is turned off),
+ * reusing the same source as the normal type/disable coloring.
Review Comment:
addressed in
[999e096](https://github.com/apache/texera/pull/6213/commits/999e096f81662849f84da21758a13a496e60f5b9)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]