Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1726)

Unified Diff: appengine/config_service/ui/src/config-ui/config-file-card.html

Issue 2959833002: config_service: add last import validation and tests (Closed)
Patch Set: Add test files. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/config_service/ui/src/config-ui/config-file-card.html
diff --git a/appengine/config_service/ui/src/config-ui/config-file-card.html b/appengine/config_service/ui/src/config-ui/config-file-card.html
new file mode 100644
index 0000000000000000000000000000000000000000..07ee73992e46bf8cd17ce4399cb9ea0f5ecd41cd
--- /dev/null
+++ b/appengine/config_service/ui/src/config-ui/config-file-card.html
@@ -0,0 +1,59 @@
+<!--
+ Copyright 2017 The LUCI Authors. All rights reserved.
+ Use of this source code is governed under the Apache License, Version 2.0
+ that can be found in the LICENSE file.
+-->
+
+<link rel="import" href="../../bower_components/paper-item/paper-item.html">
+<link rel="import" href="../../bower_components/polymer/polymer.html">
+<link rel="import" href="../../bower_components/iron-icons/maps-icons.html">
+<link rel="import" href="../../bower_components/iron-flex-layout/iron-flex-layout.html">
+
+<dom-module id="config-file-card">
+ <template>
+ <style include="iron-flex iron-flex-alignment">
+ .center {
+ margin: auto;
+ width: 25%;
+ border-style: solid;
+ border-width: 2px;
+ }
+
+ iron-icon {
+ float: right;
+ }
+
+ </style>
+
+ <paper-item class="center">
+ <!-- TODO(cwpayton): Currently, each card contains a link to the
+ corresponding file in gitiles. We would like to pretty print the
+ contents of the file in the UI instead of externally linking. -->
+ <div class="horizontal layout wrap" style="width: 100%">
+ [[name]]
+ <iron-icon icon="icons:link" on-tap="_handleClick"></iron-icon>
+ </div>
+
+ </paper-item>
+ </template>
+ <script>
+ Polymer({
+ is: "config-file-card",
+
+ properties: {
+ name: {
+ type: String
+ },
+
+ link: {
+ type: String
+ }
+ },
+
+ _handleClick: function(event) {
+ window.location = this.link;
+ },
+
+ });
+ </script>
+</dom-module>

Powered by Google App Engine
This is Rietveld 408576698