Merge "Replace the placeholders in checks tab with something more decent"

This commit is contained in:
Ben Rohlfs
2021-01-27 15:01:46 +00:00
committed by Gerrit Code Review

View File

@@ -25,6 +25,8 @@ import {allResults$, allRuns$} from '../../services/checks/checks-model';
import './gr-checks-runs'; import './gr-checks-runs';
import './gr-checks-results'; import './gr-checks-results';
import {sharedStyles} from '../../styles/shared-styles'; import {sharedStyles} from '../../styles/shared-styles';
import {currentPatchNum$} from '../../services/change/change-model';
import {PatchSetNum} from '../../types/common';
/** /**
* The "Checks" tab on the Gerrit change page. Gets its data from plugins that * The "Checks" tab on the Gerrit change page. Gets its data from plugins that
@@ -37,10 +39,14 @@ export class GrChecksTab extends GrLitElement {
results: CheckResult[] = []; results: CheckResult[] = [];
@property()
currentPatchNum: PatchSetNum | undefined = undefined;
constructor() { constructor() {
super(); super();
this.subscribe('runs', allRuns$); this.subscribe('runs', allRuns$);
this.subscribe('results', allResults$); this.subscribe('results', allResults$);
this.subscribe('currentPatchNum', currentPatchNum$);
} }
static get styles() { static get styles() {
@@ -80,10 +86,18 @@ export class GrChecksTab extends GrLitElement {
} }
render() { render() {
const ps = `Patchset ${this.currentPatchNum} (Latest)`;
return html` return html`
<div class="header"> <div class="header">
<span>Patchset-Dropdown-Placeholder</span> <gr-dropdown-list
<span>Filter-Dropdown-Placeholder</span> value="${ps}"
.items="${[
{
value: `${ps}`,
text: `${ps}`,
},
]}"
></gr-dropdown-list>
</div> </div>
<div class="container"> <div class="container">
<gr-checks-runs class="runs" .runs="${this.runs}"></gr-checks-runs> <gr-checks-runs class="runs" .runs="${this.runs}"></gr-checks-runs>