| <link rel="import" href="/components/polymer/polymer.html"> |
| <link rel="import" href="/components/core-icons/core-icons.html"> |
| |
| <script async> |
| 'use strict'; |
| /** |
| * Opens a window with new Chromium bug, pre-filled with some info. |
| * @param {string} summary The title of the bug. |
| * @param {string} comment The description of the bug. |
| * @param {Array} labels A list of labels to apply to the bug. |
| * @param {Array} cc A list of email addresses to cc on the bug. |
| */ |
| function openCrBugWindow(summary, comment, labels, cc) { |
| var url = 'https://code.google.com/p/chromium/issues/entry?'; |
| url += [ |
| 'summary=' + encodeURIComponent(summary), |
| 'comment=' + encodeURIComponent(comment), |
| 'labels=' + encodeURIComponent(labels.join(',')), |
| 'cc=' + encodeURIComponent(cc.join(',')) |
| ].join('&'); |
| window.open(url, '_blank'); |
| } |
| |
| /** |
| * Opens a window with new GitHub issue, pre-filled with some info. |
| * @param {string} summary The title of the bug. |
| * @param {string} comment The description of the bug. |
| * @param {string} label Label to apply to the bug. |
| */ |
| function openGitHubIssueWindow(summary, comment, label) { |
| var url = 'https://github.com/catapult-project/catapult/issues/new?'; |
| url += [ |
| 'title=' + encodeURIComponent(summary), |
| 'body=' + encodeURIComponent(comment), |
| 'labels=' + encodeURIComponent(label), |
| ].join('&'); |
| window.open(url, '_blank'); |
| } |
| |
| /** |
| * Opens a window to report a general dashboard bug. |
| */ |
| function reportBug() { |
| var os = guessOS(); |
| var chromeVersion = 'unknown'; |
| var chromeVersionMatch = navigator.userAgent.match(/Chrome\/(\S*)/); |
| if (chromeVersionMatch) { |
| chromeVersion = chromeVersionMatch[1]; |
| } |
| var description = 'Chrome version: ' + chromeVersion + ' (' + os + ')\n'; |
| description += 'URL: ' + document.location.href + '\n\n'; |
| description += 'Please copy and paste any errors from JavaScript console ('; |
| description += (os == 'Mac' ? 'Command+Option+J' : 'Ctrl+Shift+J'); |
| description += ' to open):\n\n'; |
| description += 'Please describe the problem:\n'; |
| openGitHubIssueWindow('Perf Dashboard: ', description, 'Perf Dashboard'); |
| } |
| |
| /** |
| * Guesses user's OS from user agent string (for pre-filling bug labels). |
| * @return {string} The name of an OS. |
| */ |
| function guessOS() { |
| var userAgentContains = function(s) { |
| return navigator.userAgent.indexOf(s) != -1; |
| }; |
| if (userAgentContains('CrOS')) { |
| return 'Chrome OS'; |
| } else if (userAgentContains('Windows')) { |
| return 'Windows'; |
| } else if (userAgentContains('Macintosh')) { |
| return 'Mac'; |
| } else if (userAgentContains('Linux')) { |
| return 'Linux'; |
| } else if (userAgentContains('Android')) { |
| return 'Android'; |
| } |
| return 'unknown'; |
| } |
| |
| function fileIpWhitelistRequest() { |
| var description = 'Please whitelist the following IP addresses ' + |
| 'to send data to the Chrome Perf Dashboard:\n' + |
| '<IP ADDRESSES HERE>\n\n' + |
| 'These buildbots are for:\n'; |
| var labels = ['Performance-Dashboard-IPWhitelist', 'Restrict-View-Google']; |
| openCrBugWindow('IP Whitelist Request', description, labels, []); |
| } |
| |
| function fileBotWhitelistRequest() { |
| var description = 'Please make the following bots and all their data ' + |
| 'publicly available, with no google.com login required: \n' + |
| '<BOT NAMES HERE>\n\n'; |
| var labels = ['Performance-Dashboard-BotWhitelist', 'Restrict-View-Google']; |
| openCrBugWindow('Bot Whitelist Request', description, labels, []); |
| } |
| |
| function fileMonitoringRequest() { |
| var description = 'Please add monitoring for the following tests:\n\n' + |
| 'Test owner (see http://go/perf-test-owners):\n' + |
| 'Buildbot master name:\n' + |
| 'Test suite names:\n' + |
| 'Restrict to these specific traces (if any):\n' + |
| 'Email address and/or URL of sheriff rotation: \n' + |
| 'Receive individual email alerts immediately or as a daily summary?\n' + |
| 'Should these alerts be Google-internal?\n'; |
| var labels = [ |
| 'Performance-Dashboard-MonitoringRequest', |
| 'Restrict-View-Google' |
| ]; |
| openCrBugWindow('Monitoring Request', description, labels, []); |
| } |
| </script> |
| |
| <style> |
| #navbar { |
| width: 100%; |
| } |
| |
| #navbar ul { |
| list-style: none; |
| padding: 0; |
| margin: 0; |
| border: 0; |
| font-size: 100%; |
| font: inherit; |
| vertical-align: baseline; |
| z-index: 1000; |
| margin-left: -10px; /* Ignore body's padding left. */ |
| padding-right: 20px; /* Ignore body's padding right. */ |
| } |
| |
| #navbar > ul { |
| display: flex; |
| display: -webkit-flex; |
| width: 100%; |
| background-color: #2D2D2D; |
| border-bottom: black; |
| margin-bottom: 6px; |
| } |
| |
| #navbar li { |
| padding: 6px 10px; |
| } |
| |
| #navbar li > a { |
| cursor: pointer; |
| text-decoration: none; |
| } |
| |
| #navbar > ul > li, #navbar > ul > li > a { |
| color: #ddd; |
| font-weight: bold; |
| } |
| |
| /* The addition of the icons to the <core-icon> elements to the submenus |
| * makes the submenu title text lower; the below style rule is intended |
| * to align the other menu items. */ |
| #navbar .menu > li a { |
| display: inline-block; |
| padding-top: 3px; |
| } |
| |
| #navbar .submenu li, #navbar .submenu a { |
| color: #ddd; |
| font-weight: normal; |
| } |
| |
| /* This is a spacer in the navbar list that pushes the items after it |
| * all the way to the right side. */ |
| .spacer { |
| flex: 100; |
| } |
| |
| #navbar .menu li:hover > ul { |
| margin-top: 6px; |
| background-color: #2D2D2D; |
| border: 1px solid rgba(0, 0, 0, .2); |
| } |
| |
| #navbar li:hover, #navbar a:hover { |
| color: white; |
| } |
| |
| #navbar .menu-drop-arrow { |
| border-top-color: #aaa; |
| position: relative; |
| top: -1px; |
| border-style: solid dashed dashed; |
| border-color: transparent; |
| border-top-color: #c0c0c0; |
| display: -moz-inline-box; |
| display: inline-block; |
| font-size: 0; |
| height: 0; |
| line-height: 0; |
| width: 0; |
| border-width: 3px 3px 0; |
| padding-top: 1px; |
| left: 4px; |
| } |
| |
| /* Basic select menus. */ |
| .menu ul { |
| display: none; |
| } |
| |
| .menu li:hover > ul { |
| display: block; |
| position: absolute; |
| } |
| |
| .report-issue { |
| color: #dd4b39 !important; |
| } |
| </style> |
| |
| <nav id="navbar"> |
| <ul class="menu"> |
| <li><a href="/">Home</a></li> |
| <li><a href="/alerts">Alerts</a></li> |
| <li><a href="/report">Browse Graphs</a></li> |
| <li><a href="https://code.google.com/p/chromium/issues/list?q=label%3AType-Bug-Regression+label%3APerformance&sort=-id" |
| target="_blank">Perf Bugs</a></li> |
| <li>Other Pages<core-icon icon="arrow-drop-down"></core-icon> |
| <ul class="submenu"> |
| <li><a href="/edit_test_owners">Edit Test Owners</a></li> |
| <li><a href="/bisect_stats">Bisect Stat Graphs</a></li> |
| <li><a href="/new_points">Recently Added Points</a></li> |
| <li><a href="/debug_alert">Debug Alert</a></li> |
| </ul> |
| </li> |
| <li>Waterfalls<core-icon icon="arrow-drop-down"></core-icon> |
| <ul class="submenu"> |
| <li><a href="http://build.chromium.org/p/chromium.perf/waterfall?show_events=true&failures_only=true&reload=120" |
| target="_blank">chromium.perf</a></li> |
| <li><a href="http://build.chromium.org/p/chromium.webkit/waterfall?builder=Win7%20Perf&builder=Mac10.6%20Perf&builder=Linux%20Perf" |
| target="_blank">chromium.webkit</a></li> |
| <li><a href="http://build.chromium.org/p/chromium.gpu/waterfall?show_events=true&failures_only=true&reload=120" |
| target="_blank">chromium.gpu</a></li> |
| <li><a href="http://build.chromium.org/p/tryserver.chromium.perf/builders" |
| target="_blank">Bisect bots</a></li> |
| </ul> |
| </li> |
| <li>Help<core-icon icon="arrow-drop-down"></core-icon> |
| <ul class="submenu"> |
| <li><a href="http://www.chromium.org/developers/speed-infra/performance-dashboard" |
| target="_blank">Perf Dashboard Public Documentation</a></li> |
| <li><a href="http://www.chromium.org/developers/speed-infra/performance-dashboard/endpoints" |
| target="_blank">Documented Endpoints</a></li> |
| <li><a href="http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs" |
| target="_blank">About Chromium Perf Sheriffing</a></li> |
| <li><a href="https://docs.google.com/a/chromium.org/document/d/1kIMZ8jNA2--4JsCtUJ_OprnlfT6aM3BfHrQ8o4s3bDI/edit" |
| target="_blank">Chromium Perf Sheriff Status</a></li> |
| <li><a href="http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs/bisecting-performance-regressions" |
| target="_blank">Bisecting Performance Regressions</a></li> |
| <li><a href="http://www.chromium.org/developers/how-tos/gpu-wrangling" |
| target="_blank">GPU Bots & Pixel Wrangling</a></li> |
| <li><a href="https://docs.google.com/a/google.com/spreadsheets/d/1R_1BAOd3xeVtR0jn6wB5HHJ2K25mIbKp3iIRQKkX38o/view" |
| target="_blank">Benchmark Owners Spreadsheet</a></li> |
| <li><a href="https://docs.google.com/document/d/1cF2Ny3UYbXq2y3fZaygUSz_3lVc0SOrSRZwXqGjjKgo/view" |
| target="_blank">Triaging Stoppage Alerts</a></li> |
| </ul> |
| </li> |
| |
| {% if is_admin %} |
| <li>Admin<core-icon icon="arrow-drop-down"></core-icon> |
| <ul class="submenu"> |
| <li><a href="/edit_site_config" target="_blank">Edit Site Config</a></li> |
| <li><a href="/edit_site_config?ip_whitelist" target="_blank">Edit IP Whitelist</a></li> |
| <li><a href="/edit_sheriffs" target="_blank">Edit Sheriff Rotations</a></li> |
| <li><a href="/edit_anomaly_configs" target="_blank">Edit Anomaly Configs</a></li> |
| <li><a href="/edit_bug_labels" target="_blank">Edit Bug Labels</a></li> |
| <li><a href="/stats" target="_blank">View Statistics</a></li> |
| <li><a href="/migrate_test_names" target="_blank">Migrate Test Names</a></li> |
| <li><a href="/bot_whitelist" target="_blank">Bot Whitelist</a></li> |
| <li><a href="/change_internal_only" target="_blank">Change internal_only</a></li> |
| </ul> |
| </li> |
| {% endif %} |
| <li class="report-issue"> |
| <core-icon icon="bug-report"></core-icon> Report Issue |
| <core-icon icon="arrow-drop-down"></core-icon> |
| <ul class="submenu"> |
| <li><a href="javascript:reportBug()">Report a Perf Dashboard Bug</a></li> |
| <li><a href="javascript:fileIpWhitelistRequest()">Request Buildbot IP Whitelisting</a></li> |
| <li><a href="javascript:fileBotWhitelistRequest()">Request to Make Buildbots Publicly Visible</a></li> |
| <li><a href="javascript:fileMonitoringRequest()">Request Monitoring for Tests</a></li> |
| </ul> |
| </li> |
| <li class="spacer"></li> |
| <li>{{user_info | safe}}</li> |
| </ul> |
| </nav> |