mengw15 commented on code in PR #7745:
URL: https://github.com/apache/texera/pull/7745#discussion_r3816299034
##########
amber/src/main/scala/org/apache/texera/web/resource/dashboard/user/warehouse/WarehouseResource.scala:
##########
@@ -53,16 +55,34 @@ object WarehouseResource {
name: String,
warehouseName: String,
flavor: String,
- createdAtMillis: Long
+ createdAtMillis: Long,
+ // Owner display info, mirroring DashboardWorkflowComputingUnit: today
every
+ // warehouse belongs to the caller, but the UI binds to the entry rather
than
+ // the session user so shared warehouses render the right person (#7743).
+ ownerName: String,
+ ownerAvatar: String
)
- private def toDashboardWarehouse(row: UserWarehouseRecord):
DashboardWarehouse =
+ // (name, avatar), null for either when the user has not set it.
+ private type Owner = (String, String)
+
+ private def ownerOf(name: String, avatar: String): Owner =
+ (Option(name).filter(_.nonEmpty).orNull,
Option(avatar).filter(_.nonEmpty).orNull)
Review Comment:
Done — `StringUtils.trimToNull`, which also collapses whitespace-only values.
--
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]