aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorboard/components/tf_text_dashboard/tf-text-dashboard.html
blob: 4c0b34055d09f1b87e0eaf2faefc6d349c8c94c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!--
@license
Copyright 2017 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../paper-dialog/paper-dialog.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../tf-backend/tf-backend.html">
<link rel="import" href="../tf-color-scale/tf-color-scale.html">
<link rel="import" href="../tf-dashboard-common/tf-dashboard.html">
<link rel="import" href="../tf-dashboard-common/tf-panes-helper.html">
<link rel="import" href="../tf-dashboard-common/tf-sidebar-helper.html">
<link rel="import" href="tf-text-loader.html">

<!--
tf-text-dashboard displays a dashboard that loads texts from a TensorFlow run.
-->
<dom-module id="tf-text-dashboard">
  <template>
    <paper-dialog with-backdrop id="actual-text-size-dialog"></paper-dialog>
    <div id="plumbing">
      <tf-color-scale
        id="colorScale"
        runs="[[runs]]"
        out-color-scale="{{_colorScale}}"
        ></tf-color-scale>
    </div>

    <tf-dashboard-layout>
      <div class="sidebar">
        <tf-sidebar-helper
          backend="[[backend]]"
          categories="{{_categories}}"
          color-scale="[[_colorScale]]"
          run2tag="[[run2tag]]"
          runs="[[runs]]"
          selected-runs="{{_selectedRuns}}"
          >
        </tf-sidebar-helper>
      </div>
      <div class="center">
        <tf-panes-helper
          categories="[[_categories]]"
          color-scale="[[_colorScale]]"
          data-type="[[dataType]]"
          data-provider="[[dataProvider]]"
          data-not-found="[[dataNotFound]]"
          run2tag="[[run2tag]]"
          selected-runs="[[_selectedRuns]]"
          repeat-for-runs
          >
          <template>
            <tf-text-loader color-scale="[[_colorScale]]"></tf-text-loader>
          </template>
        </tf-panes-helper>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      tf-panes-helper {
        --card-width: 100%;
        --card-height: auto;
        --card-expanded-width: 100%;
        --card-expanded-height: 1000px;
        --card-padding: 0 5px 5px 5px;
        --show-expand-button: none;
      }

    </style>
  </template>
  <script>
    TF.Dashboard.TfTextDashboard = Polymer({
      is: "tf-text-dashboard",
      factoryImpl: function(backend) {
        this.backend = backend;
      },
      properties: {
        backend: Object,
        dataType: {
          type: String,
          value: "text"
        },
      },
      behaviors: [
        TF.Dashboard.DashboardBehavior("text"),
        TF.Dashboard.ReloadBehavior("tf-chart-scaffold"),
        TF.Backend.BackendBehavior,
      ],
      attached: function() {
        this.async(function() {
          this.fire("rendered");
        });
      },
    });
  </script>
</dom-module>