blob: de6a22089d55d4895422f91eb9c97e8c7375ceff [file] [log] [blame]
Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
<link rel="import" href="./cr-buildbucket-client.html">
<dom-module id="binary-size-view">
:host {
border-top: 1px solid #ddd;
display: block;
margin: 1em 0;
.container {
align-items: center;
display: flex;
flex-wrap: wrap;
.header {
background-color: #fafafa;
border-bottom: 1px solid #ddd;
justify-content: space-between;
min-height: 3.2em;
padding: .5em var(--default-horizontal-margin, 1rem);
.header .label {
font: inherit;
font-family: var(--font-family-bold);
font-size: 1.17em;
margin-right: 1em;
.header .update {
color: rgba(0, 0, 0, .7);
table {
border-collapse: collapse;
th, td {
padding: .2em .4em;
text-align: left;
td {
border-top: 1px solid #ddd;
td.size {
text-align: right;
a {
color: #1a4494;
text-decoration: none;
a:hover {
text-decoration: underline;
<template is="dom-if" if="[[_binarySizeInfo.length]]">
<div class="header container">
<div class="container">
<h3 class="label">Binary size changes</h3>
<div class="update">[[_statusString]]</div>
<section class="builds">
<th>Size before</th>
<th>Size after</th>
<th colspan="2">Size difference</th>
<template is="dom-repeat" items="[[_binarySizeInfo]]" as="row">
<td class="size" title="[[row.ciSize]] B">
<a href="[[row.ciUrl]]" target="blank">[[_humanByteSize(row.ciSize)]]</a>
<td class="size" title="[[row.trySize]] B">
<a href="[[row.tryUrl]]" target="blank">[[_humanByteSize(row.trySize)]]</a>
<td class="size" title="[[_subtract(row.trySize, row.ciSize)]] B">
[[_humanByteSizeDelta(row.ciSize, row.trySize)]]
<td class="size">
[[_percentSizeDelta(row.ciSize, row.trySize)]]
id="client" base-url="[[baseUrl]]" plugin="[[plugin]]"></cr-buildbucket-client>
<script src="binary-size-view.js"></script>