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

Unified Diff: appengine/swarming/elements/res/imp/index/swarming-index.html

Issue 2177353002: Add top level app element (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@hello-oauth
Patch Set: Address feedback and introduce new res/ layer of direction Created 4 years, 5 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/swarming/elements/res/imp/index/swarming-index.html
diff --git a/appengine/swarming/elements/res/imp/index/swarming-index.html b/appengine/swarming/elements/res/imp/index/swarming-index.html
new file mode 100644
index 0000000000000000000000000000000000000000..16128a2485ed7817c3fb530b69c5046a5a498021
--- /dev/null
+++ b/appengine/swarming/elements/res/imp/index/swarming-index.html
@@ -0,0 +1,81 @@
+<!--
+ Copyright 2016 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.
+
+ This in an HTML Import-able file that contains the definition
+ of the following elements:
+
+ <swarming-index>
+
+ Swarming Index is the landing page for the Swarming UI.
+ It will have links to all other pages and a high-level overview of the fleet.
+
+ Usage:
+
+ <swarming-index></swarming-index>
+
+ Properties:
+ None. This is a top-level element.
+
+ Methods:
+ None.
+
+ Events:
+ None.
+-->
+
+<link rel="import" href="/res/imp/bower_components/iron-ajax/iron-ajax.html">
+
+<link rel="import" href="/res/imp/common/swarming-app.html">
+
+<dom-module id="swarming-index">
+ <template>
+ <style>
+ :host {
+ display: block;
+ }
+ </style>
+
+ <swarming-app
+ auth_headers="{{auth_headers}}"
+ name="Swarming"
+ busy="[[busy]]">
+
+ <iron-ajax id="request"
+ url="/_ah/api/swarming/v1/server/details"
+ headers="[[auth_headers]]"
+ handle-as="json"
+ last-response="{{serverDetails}}"
+ loading="{{busy}}">
+ </iron-ajax>
+
+ <h1>HELLO WORLD</h1>
+
+ <div>Server Version: [[serverDetails.server_version]]</div>
+
+ </swarming-app>
+
+ </template>
+ <script>
+ Polymer({
+ is: 'swarming-index',
+
+ properties: {
+ auth_headers: {
+ type: Object,
+ observer: "signIn",
+ },
+
+ serverDetails: {
+ type: String,
+ }
+ },
+
+ signIn: function(){
+ this.$.request.generateRequest();
+ },
+
+ });
+ </script>
+</dom-module>

Powered by Google App Engine
This is Rietveld 408576698