This is an automated email from the ASF dual-hosted git repository. bmahler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git
commit ece54e2585f5cad29a17f2d5b46132a8ae8d947c Author: Benjamin Mahler <[email protected]> AuthorDate: Tue Jun 18 16:17:07 2019 -0400 Updated webui Roles tab to consistently display '-' for 0 entries. The Roles tab currently uses an inconsistent mix of '0', '0 B' and '-' for displaying the allocation, guarantee, and limit. Since it's easier to scan the table for non-empty entries when '-' is used, this updates the every empty case to use '-'. We may also want to consider using the empty string '' in the future, as that may help make the table even easier to scan visually than '-'. Review: https://reviews.apache.org/r/70879 --- src/webui/app/roles/roles.html | 48 +++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/src/webui/app/roles/roles.html b/src/webui/app/roles/roles.html index c8ac1ef..8dc4d8e 100644 --- a/src/webui/app/roles/roles.html +++ b/src/webui/app/roles/roles.html @@ -38,23 +38,47 @@ <td>{{role.name}}</td> <td>{{role.weight | number}}</td> <td>{{role.frameworks.length | number}}</td> - <td class="begin-group-column">{{role.resources.cpus | decimalFloat}}</td> - <td>{{role.resources.gpus | decimalFloat}}</td> - <td>{{role.resources.mem * (1024 * 1024) | dataSize}}</td> - <td class="end-group-column">{{role.resources.disk * (1024 * 1024) | dataSize}}</td> + <td class="begin-group-column"> + {{(role.resources.cpus | decimalFloat) || "-"}} + </td> + <td> + {{(role.resources.gpus | decimalFloat) || "-"}} + </td> + <td> + {{((role.resources.mem * (1024 * 1024) || NaN) | dataSize) || "-"}} + </td> + <td class="end-group-column"> + {{((role.resources.disk * (1024 * 1024) || NaN) | dataSize) || "-"}} + </td> - <td class="begin-group-column">{{(role.quota.guarantee.cpus | decimalFloat) || "-"}}</td> - <td>{{(role.quota.guarantee.gpus | decimalFloat) || "-"}}</td> - <td>{{(role.quota.guarantee.mem * (1024 * 1024) | dataSize) || "-"}}</td> - <td class="end-group-column">{{(role.quota.guarantee.disk * (1024 * 1024) | dataSize) || "-"}}</td> + <td class="begin-group-column"> + {{(role.quota.guarantee.cpus | decimalFloat) || "-"}} + </td> + <td> + {{(role.quota.guarantee.gpus | decimalFloat) || "-"}} + </td> + <td> + {{((role.quota.guarantee.mem * (1024 * 1024) || NaN) | dataSize) || "-"}} + </td> + <td class="end-group-column"> + {{((role.quota.guarantee.disk * (1024 * 1024) || NaN) | dataSize) || "-"}} + </td> <!-- TODO(ArmandGrillet): Replace by (role.quota.limit.<> | decimalFloat) || (role.quota.guarantee.<> | decimalFloat) || "-" once the limit field is introduced. --> - <td class="begin-group-column">{{(role.quota.guarantee.cpus | decimalFloat) || "-"}}</td> - <td>{{(role.quota.guarantee.gpus | decimalFloat) || "-"}}</td> - <td>{{(role.quota.guarantee.mem * (1024 * 1024) | dataSize) || "-"}}</td> - <td class="end-group-column">{{(role.quota.guarantee.disk * (1024 * 1024) | dataSize) || "-"}}</td> + <td class="begin-group-column"> + {{(role.quota.guarantee.cpus | decimalFloat) || "-"}} + </td> + <td> + {{(role.quota.guarantee.gpus | decimalFloat) || "-"}} + </td> + <td> + {{((role.quota.guarantee.mem * (1024 * 1024) || NaN) | dataSize) || "-"}} + </td> + <td class="end-group-column"> + {{((role.quota.guarantee.disk * (1024 * 1024) || NaN) | dataSize) || "-"}} + </td> </tr> </tbody> </table>
