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

Unified Diff: appengine/config_service/ui/src/config-ui/front-page.html

Issue 2980973002: config_service: Fixed multiple ajax requests in the front page while the page determines whether a … (Closed)
Patch Set: Nit: formatting of if statement Created 3 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/config_service/ui/src/config-ui/front-page.html
diff --git a/appengine/config_service/ui/src/config-ui/front-page.html b/appengine/config_service/ui/src/config-ui/front-page.html
index b7d31a9c9827edac319b2eb3557510df83087874..81f2fa0474d06a0fff84cbe537820736ce95c8f4 100644
--- a/appengine/config_service/ui/src/config-ui/front-page.html
+++ b/appengine/config_service/ui/src/config-ui/front-page.html
@@ -48,7 +48,6 @@
</style>
<iron-ajax
- auto
id="requestConfigs"
url="/_ah/api/config/v1/config-sets?include_last_import_attempt=true"
handle-as="json"
@@ -90,6 +89,12 @@
is: 'front-page',
properties: {
+ auth_headers: {
+ type: Object,
+ value: () => null,
+ observer: '_fetchConfigs'
+ },
+
configSetList: {
type: Array,
value: () => []
@@ -108,6 +113,27 @@
searchResults: {
type: Array,
value: () => []
+ },
+
+ user: {
+ type: Object,
+ value: () => null,
+ notify: true,
+ observer: '_fetchConfigs'
+ }
+ },
+
+ _fetchConfigs: function() {
+ if (this.initialized && this.user) {
+ if (this.user.getBasicProfile()) {
+ if (this.auth_headers) {
+ this.isLoading = true;
+ this.$.requestConfigs.generateRequest();
+ }
+ } else {
+ this.isLoading = true;
+ this.$.requestConfigs.generateRequest();
+ }
}
},

Powered by Google App Engine
This is Rietveld 408576698