blob: c3d5808cbf59cbd99194ea32ca3431656ec95342 [file] [log] [blame]
<!--
Copyright (C) 2018 The Android Open Source Project
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="../../../bower_components/polymer/polymer.html">
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<dom-module id="gr-included-in-dialog">
<template>
<style include="shared-styles">
:host {
display: block;
max-height: 80vh;
overflow-y: auto;
padding: 4.5em 1em 1em 1em;
}
header {
background: #fff;
border-bottom: 1px solid #cdcdcd;
left: 0;
padding: 1em;
position: absolute;
right: 0;
top: 0;
}
#title {
display: inline-block;
font-size: 1.2rem;
margin-top: .2em;
}
h2 {
font-size: 1rem;
}
#filterInput {
display: inline-block;
float: right;
margin: 0 1em;
padding: .2em;
}
.closeButtonContainer {
float: right;
}
ul {
margin-bottom: 1em;
}
ul li {
border-radius: .2em;
background: #eee;
display: inline-block;
margin: 0 .2em .4em .2em;
padding: .2em .4em;
}
.loading.loaded {
display: none;
}
</style>
<header>
<h1 id="title">Included In:</h1>
<span class="closeButtonContainer">
<gr-button id="closeButton"
link
on-tap="_handleCloseTap">Close</gr-button>
</span>
<input
id="filterInput"
is="iron-input"
placeholder="Filter"
on-bind-value-changed="_onFilterChanged">
</header>
<div class$="[[_computeLoadingClass(_loaded)]]">Loading...</div>
<template
is="dom-repeat"
items="[[_computeGroups(_includedIn, _filterText)]]"
as="group">
<div>
<h2>[[group.title]]:</h2>
<ul>
<template is="dom-repeat" items="[[group.items]]">
<li>[[item]]</li>
</template>
</ul>
</div>
</template>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
</template>
<script src="gr-included-in-dialog.js"></script>
</dom-module>