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

Unified Diff: appengine/swarming/elements/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: Fix presubmits to ignore build files 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/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
index 59ff911d0306bbc787f4a935a78ca39f9478c65a..be979eef9d7e2d3539f886cee7fae1550c619bfc 100644
--- a/appengine/swarming/elements/imp/index/swarming-index.html
+++ b/appengine/swarming/elements/imp/index/swarming-index.html
@@ -13,7 +13,7 @@
<swarming-index></swarming-index>
Properties:
- None.
+ None. This is a top-level element.
Methods:
None.
@@ -25,7 +25,7 @@
<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">
+<link rel="import" href="../common/swarming-app.html">
<dom-module id="swarming-index">
<template>
@@ -35,34 +35,45 @@
}
</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>
+ <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();
},
- handleResponse: function(a,b){
- console.log(this.$.request.lastResponse);
- }
});
</script>
</dom-module>

Powered by Google App Engine
This is Rietveld 408576698