Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: dashboard/dashboard/elements/chart-title.html

Issue 2881193003: Add a button to chart-title to populate the test-picker. (Closed)
Patch Set: comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dashboard/dashboard/elements/report-page.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/elements/chart-title.html
diff --git a/dashboard/dashboard/elements/chart-title.html b/dashboard/dashboard/elements/chart-title.html
index ea3f7834b19986ebe248ef72e0f1a19266212e26..a45e325888c38212e322caccb92d8edbc71b9c21 100644
--- a/dashboard/dashboard/elements/chart-title.html
+++ b/dashboard/dashboard/elements/chart-title.html
@@ -23,8 +23,22 @@ found in the LICENSE file.
text-decoration: none;
cursor: default;
}
+ paper-button {
+ color: white;
+ font-weight: bold;
+ min-width: initial;
+ padding: 5px;
+ margin: 0;
+ background: #4285f4;
+ font-size: 18px;
+ }
+ h3 {
+ display: inline-block;
+ }
</style>
+ <paper-button raised on-click="populateTestPicker_">&#8632;</paper-button>
+
<h3>
<template is="dom-repeat" items="{{titleParts}}">
<a class="title disabled" href="javascript:void(0);"
@@ -97,6 +111,21 @@ found in the LICENSE file.
this.suiteDescriptions = this.getSuitesAndDescriptions();
},
+ populateTestPicker_(event) {
+ // chart-title's testPaths have a different structure from test-picker's
+ // testPaths.
+ let testPath = [];
+ for (const part of this.titleParts) {
+ testPath.push.apply(testPath, part.split('/'));
+ }
+
+ // chart-title's testPaths are in a different order from test-picker's
+ // testPaths.
+ testPath = [testPath[2], testPath[1]].concat(testPath.slice(3));
+
+ this.fire('populateTestPicker', {testPath});
+ },
+
onClicked(event) {
const index = event.model.index;
if (index == this.currentIndex) {
« no previous file with comments | « no previous file | dashboard/dashboard/elements/report-page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698