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

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

Issue 2174903002: Add stub pages and oauth-blessed request to /newui (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Remove unneeded headers 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
« no previous file with comments | « appengine/swarming/elements/imp/common/auth-signin.html ('k') | appengine/swarming/elements/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/elements/imp/index/swarming-index.html
diff --git a/appengine/swarming/elements/imp/index/swarming-index.html b/appengine/swarming/elements/imp/index/swarming-index.html
new file mode 100644
index 0000000000000000000000000000000000000000..59ff911d0306bbc787f4a935a78ca39f9478c65a
--- /dev/null
+++ b/appengine/swarming/elements/imp/index/swarming-index.html
@@ -0,0 +1,68 @@
+<!--
+ 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>
+
+ Usage:
+
+ <swarming-index></swarming-index>
+
+ Properties:
+ None.
+
+ Methods:
+ None.
+
+ Events:
+ None.
+-->
+
+<link rel="import" href="../../bower_components/polymer/polymer.html">
+<link rel="import" href="../../bower_components/iron-ajax/iron-ajax.html">
+
+<link rel="import" href="../common/auth-signin.html">
+
+<dom-module id="swarming-index">
+ <template>
+ <style>
+ :host {
+ display: block;
+ }
+ </style>
+
+ <h1>HELLO WORLD<h1>
+
+ <!-- TODO(kjlubick) Remove this hard-coded client-id.-->
+ <auth-signin
+ auth-headers="{{auth}}"
+ client-id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent.com"
+ on-auth-signin="signIn">
+ </auth-signin>
+
+ <iron-ajax id="request"
+ url="/_ah/api/swarming/v1/server/details"
+ headers="[[auth]]"
+ handle-as="json"
+ on-response="handleResponse">
+ </iron-ajax>
+
+ </template>
+ <script>
+ Polymer({
+ is: 'swarming-index',
+
+ signIn: function(){
+ this.$.request.generateRequest();
+ },
+
+ handleResponse: function(a,b){
+ console.log(this.$.request.lastResponse);
+ }
+ });
+ </script>
+</dom-module>
« no previous file with comments | « appengine/swarming/elements/imp/common/auth-signin.html ('k') | appengine/swarming/elements/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698