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

Side by Side Diff: server/static/rpcexplorer/rpc-method.html

Issue 2275123002: Milo: pRPC endpoint for getting Buildbot master data (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Renamed stuff Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « milo/appengine/settings/config_test.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!-- 1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 --> 5 -->
6 6
7 <link rel="import" href="../bower_components/polymer/polymer.html"> 7 <link rel="import" href="../bower_components/polymer/polymer.html">
8 <link rel="import" href="../bower_components/google-signin/google-signin-aware.h tml"> 8 <link rel="import" href="../bower_components/google-signin/google-signin-aware.h tml">
9 9
10 <link rel="import" href="/static/common/rpc/rpc-client.html"> 10 <link rel="import" href="/static/common/rpc/rpc-client.html">
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 }, 154 },
155 155
156 _onKeypress: function(e) { 156 _onKeypress: function(e) {
157 if (e.key === 'Enter' && e.shiftKey) { 157 if (e.key === 'Enter' && e.shiftKey) {
158 this.send(); 158 this.send();
159 e.preventDefault(); 159 e.preventDefault();
160 } 160 }
161 }, 161 },
162 162
163 getAccessToken: function() { 163 getAccessToken: function() {
164 var user = gapi.auth2.getAuthInstance().currentUser.get(); 164 var authInstance = gapi.auth2.getAuthInstance();
165 if (!authInstance) {
166 return null;
167 }
168 var user = authInstance.currentUser.get();
165 if (!user) { 169 if (!user) {
166 return null; 170 return null;
167 } 171 }
168 return user.getAuthResponse().access_token; 172 return user.getAuthResponse().access_token;
169 }, 173 },
170 174
171 send: function() { 175 send: function() {
172 this.error = null; 176 this.error = null;
173 try { 177 try {
174 this.requestObject = JSON.parse(this.requestText); 178 this.requestObject = JSON.parse(this.requestText);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 isGrpcError: true, 212 isGrpcError: true,
209 code: this.error.code, 213 code: this.error.code,
210 codeName: luci.rpc.CodeName(this.error.code), 214 codeName: luci.rpc.CodeName(this.error.code),
211 description: this.error.description 215 description: this.error.description
212 }; 216 };
213 } 217 }
214 } 218 }
215 }); 219 });
216 </script> 220 </script>
217 </dom-module> 221 </dom-module>
OLDNEW
« no previous file with comments | « milo/appengine/settings/config_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698