github.com/GoogleCloudPlatform/testgrid@v0.0.174/web/src/testgrid-grid-row.ts (about) 1 import { LitElement, html, css } from 'lit'; 2 import { map } from 'lit/directives/map.js'; 3 import { customElement, property } from 'lit/decorators.js'; 4 import { ListRowsResponse_Row } from './gen/pb/api/v1/data.js'; 5 import { TestStatus } from './gen/pb/test_status/test_status'; 6 import './testgrid-grid-row-name'; 7 import './testgrid-grid-cell'; 8 9 @customElement('testgrid-grid-row') 10 export class TestgridGridRow extends LitElement { 11 static styles = css` 12 :host { 13 text-align: center; 14 font-family: Roboto, Verdana, sans-serif; 15 display: flex; 16 flex-flow: row nowrap; 17 gap: 0px 2px; 18 margin: 2px; 19 } 20 `; 21 22 @property() rowData: ListRowsResponse_Row; 23 24 render() { 25 return html`<testgrid-grid-row-name .name="${this.rowData?.name}"> 26 </testgrid-grid-row-name> 27 ${map( 28 this.rowData?.cells, 29 cell => 30 html`<testgrid-grid-cell 31 .icon="${cell.icon}" 32 .status="${TestStatus[cell.result]}" 33 ></testgrid-grid-cell>` 34 )} `; 35 } 36 }