|
| 1 | +/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. |
| 2 | +
|
| 3 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +you may not use this file except in compliance with the License. |
| 5 | +You may obtain a copy of the License at |
| 6 | +
|
| 7 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +
|
| 9 | +Unless required by applicable law or agreed to in writing, software |
| 10 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +See the License for the specific language governing permissions and |
| 13 | +limitations under the License. |
| 14 | +==============================================================================*/ |
| 15 | + |
| 16 | +import {customElement, property} from '@polymer/decorators'; |
| 17 | +import {html, PolymerElement} from '@polymer/polymer'; |
| 18 | +import '../../../components/polymer/irons_and_papers'; |
| 19 | +import {LegacyElementMixin} from '../../../components/polymer/legacy_element_mixin'; |
| 20 | + |
| 21 | +/** |
| 22 | + * A frontend that directs users to install the Learning Interoperability Plugin |
| 23 | + * (LIT) instead of the What-If Tools, since the latter is no longer maintained. |
| 24 | + */ |
| 25 | +@customElement('tf-wit-redirect-dashboard') |
| 26 | +class TfWITRedirectDashboard extends LegacyElementMixin(PolymerElement) { |
| 27 | + static readonly template = html` |
| 28 | + <div class="message"> |
| 29 | + <h3>The What-If Tool is no longer supported.</h3> |
| 30 | + <p> |
| 31 | + The <a href="https://pair-code.github.io/lit/">Learning Interpretability Tool (LIT)</a> |
| 32 | + is an actively maintained alternative. Please follow the instructions |
| 33 | + <a href="https://pair-code.github.io/lit/setup/">here</a> to install and |
| 34 | + use this tool. |
| 35 | + </p> |
| 36 | + <style> |
| 37 | + :host { |
| 38 | + display: flex; |
| 39 | + } |
| 40 | +
|
| 41 | + .message { |
| 42 | + margin: 80px auto 0 auto; |
| 43 | + max-width: 540px; |
| 44 | + } |
| 45 | + #commandTextarea { |
| 46 | + margin-top: 1ex; |
| 47 | + padding: 1ex 1em; |
| 48 | + resize: vertical; |
| 49 | + width: 100%; |
| 50 | + } |
| 51 | + #copyContainer { |
| 52 | + display: flex; |
| 53 | + } |
| 54 | + #copiedMessage { |
| 55 | + align-self: center; |
| 56 | + flex-grow: 1; |
| 57 | + font-style: italic; |
| 58 | + padding-right: 1em; |
| 59 | + text-align: right; |
| 60 | + } |
| 61 | + </style> |
| 62 | + `; |
| 63 | +} |
0 commit comments