| <!-- |
| 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. |
| --> |
| |
| <!doctype html> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Snippets Internals</title> |
| <link rel="stylesheet" href="chrome://resources/css/text_defaults.css"> |
| <link rel="stylesheet" href="snippets_internals.css"> |
| |
| <script src="chrome://resources/js/cr.js"></script> |
| <script src="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js"></script> |
| <script src="chrome://resources/js/jstemplate_compiled.js"></script> |
| <script src="chrome://resources/js/util.js"></script> |
| |
| <script src="snippets_internals.mojom-lite.js"></script> |
| <script src="snippets_internals.js"></script> |
| </head> |
| |
| <body id="info"> |
| <!-- Top level properties table. --> |
| <div> |
| <h2>Properties</h2> |
| <table class="section-details"> |
| <tr> |
| <td class="name">Article Suggestions enabled</td> |
| <td id="flag-article-suggestions" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Offlining Recent Tabs enabled</td> |
| <td id="flag-offlining-recent-pages-feature" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Snippets fetch URL</td> |
| <td id="switch-fetch-url" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Server-provided experiment IDs</td> |
| <td id="experiment-ids" class="value"></td> |
| </tr> |
| </table> |
| </div> |
| |
| <!-- User classifier table with clear classification button.--> |
| <div> |
| <h2>User Classifier</h2> |
| <table class="section-details"> |
| <tr> |
| <td class="name">User class</td> |
| <td id="user-class" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Estimated average time to open NTP</td> |
| <td id="avg-time-to-open-ntp" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Estimated average time to show suggestions</td> |
| <td id="avg-time-to-show" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Estimated average time to use suggestions</td> |
| <td id="avg-time-to-use" class="value"></td> |
| </tr> |
| </table> |
| <button id="clear-classification"> |
| Clear my classification |
| </button> |
| </div> |
| |
| <!-- Category ranker table, populated dynamically. --> |
| <div> |
| <!-- Template cloned and populated by js. --> |
| <template id="category-ranker-row"> |
| <tr> |
| <td class="name"></td> |
| <td class="value"></td> |
| </tr> |
| </template> |
| <h2>Category Ranker</h2> |
| <table class="section-details"> |
| <tbody id="category-ranker-table"></tbody> |
| </table> |
| </div> |
| |
| <div> |
| <h2>Content Suggestions Service Actions</h2> |
| <div class="forms"> |
| <button id="reload-suggestions">Reload suggestions</button> |
| <button id="clear-cached-suggestions"> |
| Clear cached suggestions |
| </button> |
| </div> |
| </div> |
| |
| <div id="remote-content-suggestions"> |
| <h2>Remote content suggestions</h2> |
| <table class="section-details"> |
| <tr> |
| <td class="name">Last Fetch Status</td> |
| <td id="remote-status" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Last Fetch Type</td> |
| <td id="remote-authenticated" class="value"></td> |
| </tr> |
| <tr> |
| <td class="name">Last Background Fetch Time:</td> |
| <td id="last-background-fetch-time" class="value"></td> |
| </tr> |
| </table> |
| <button id="background-fetch-button"> |
| Fetch remote suggestions in the background in 2 seconds |
| </button> |
| <button id="last-json-button">Show the last JSON</button> |
| <div id="last-json-container" class="hidden"> |
| <div id="last-json-text"></div> |
| <button id="last-json-dump">Dump the last JSON</button> |
| </div> |
| </div> |
| |
| <div id="content-suggestions"> |
| <h2>Content suggestions by category |
| <span class="detail">(click for details)</span> |
| <button id="submit-dump">Dump the list</button> |
| </h2> |
| |
| <div jsselect="categories" style="display:none"> |
| <div> |
| <h3 style="margin-bottom: 0px; padding-bottom: 0px;"> |
| <span jscontent="categoryTitle"></span> |
| <span class="detail"> |
| (id = <span jscontent="categoryId"></span>, |
| <span jscontent="status"></span>) |
| </span> |
| </h3> |
| </div> |
| <div class="vertical-buttons"> |
| <button jsvalues="data-category-id:categoryId" |
| class="toggle-dismissed-suggestions"> |
| Show dismissed suggestions |
| </button> |
| <button jsvalues="data-category-id:categoryId" |
| class="submit-clear-dismissed-suggestions"> |
| Clear dismissed suggestions |
| </button> |
| </div> |
| |
| <!-- Suggestions --> |
| <table class="section-details"> |
| <tr jsselect="suggestions" style="display:none"> |
| <td class="title-link"> |
| <span class="hidden-toggler content-suggestion-title" |
| jsvalues="hidden-id:suggestionId"> |
| <span jscontent="suggestionTitle"></span>>> |
| </span> |
| <div jsvalues="id:suggestionId" class="content-suggestion-detail hidden"> |
| <table> |
| <tr> |
| <td>ID</td> |
| <td jscontent="suggestionIdWithinCategory"></td> |
| </tr> |
| <tr> |
| <td>URL</td> |
| <td><a class="url" jsvalues="href:url" jscontent="url"></a></td> |
| </tr> |
| <tr> |
| <td>URL with favicon</td> |
| <td> |
| <a class="url" jsvalues="href:faviconUrl" |
| jscontent="faviconUrl"></a> |
| </td> |
| </tr> |
| <tr> |
| <td>Snippet text</td> |
| <td jscontent="snippet"></td> |
| </tr> |
| <tr> |
| <td>Publish date</td> |
| <td class="expiry"></td> |
| <span class="date" jscontent="publishDate"></span> |
| </td> |
| </tr> |
| <tr> |
| <td>Publisher name</td> |
| <td jscontent="publisherName"></td> |
| </tr> |
| <tr> |
| <td>Score</td> |
| <td jscontent="score"></td> |
| </tr> |
| </table> |
| </div> |
| </td> |
| </tr> |
| </table> |
| |
| <!-- Dismissed suggestions --> |
| <table jsvalues="id: 'dismissed-category-' + categoryId" |
| class="section-details hidden"> |
| <thead> |
| <tr> |
| <th style="text-align:left">Dismissed suggestions |
| </thead> |
| <tr jsselect="dismissedSuggestions" style="display:none"> |
| <td class="title-link"> |
| <span class="hidden-toggler content-suggestion-title" |
| jsvalues="hidden-id:suggestionId"> |
| <span jscontent="suggestionTitle"></span> (dismissed)>> |
| </span> |
| <div jsvalues="id:suggestionId" class="content-suggestion-detail hidden"> |
| <table> |
| <tr> |
| <td>ID</td> |
| <td jscontent="suggestionIdWithinCategory"></td> |
| </tr> |
| <tr> |
| <td>URL</td> |
| <td><a class="url" jsvalues="href:url" jscontent="url"></a></td> |
| </tr> |
| <tr> |
| <td>Snippet text</td> |
| <td jscontent="snippet"></td> |
| </tr> |
| <tr> |
| <td>Publish date</td> |
| <td class="expiry"> |
| <span class="date" jscontent="publishDate"></span> |
| </td> |
| </tr> |
| <tr> |
| <td>Publisher name</td> |
| <td jscontent="publisherName"></td> |
| </tr> |
| <tr> |
| <td>Score</td> |
| <td jscontent="score"></td> |
| </tr> |
| </table> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="detail" id="content-suggestions-empty"></div> |
| </div> |
| </body> |