| OLD | NEW |
| 1 <link rel="import" href="/bower_components/polymer/polymer.html"> | 1 <link rel="import" href="/bower_components/polymer/polymer.html"> |
| 2 <link rel="import" href="/bower_components/iron-ajax/iron-ajax.html"> | 2 <link rel="import" href="/bower_components/iron-ajax/iron-ajax.html"> |
| 3 <link rel="import" href="/bower_components/iron-flex-layout/classes/iron-flex-la
yout.html"> | 3 <link rel="import" href="/bower_components/iron-flex-layout/classes/iron-flex-la
yout.html"> |
| 4 <link rel="import" href="/bower_components/iron-icons/hardware-icons.html"> | 4 <link rel="import" href="/bower_components/iron-icons/hardware-icons.html"> |
| 5 <link rel="import" href="/bower_components/iron-icon/iron-icon.html"> | 5 <link rel="import" href="/bower_components/iron-icon/iron-icon.html"> |
| 6 <link rel="import" href="/bower_components/iron-icons/iron-icons.html"> | 6 <link rel="import" href="/bower_components/iron-icons/iron-icons.html"> |
| 7 <link rel="import" href="/bower_components/iron-location/iron-location.html"> | 7 <link rel="import" href="/bower_components/iron-location/iron-location.html"> |
| 8 <link rel="import" href="/bower_components/iron-pages/iron-pages.html"> | 8 <link rel="import" href="/bower_components/iron-pages/iron-pages.html"> |
| 9 <link rel="import" href="/bower_components/neon-animation/animations/scale-up-an
imation.html"> | 9 <link rel="import" href="/bower_components/neon-animation/animations/scale-up-an
imation.html"> |
| 10 <link rel="import" href="/bower_components/neon-animation/animations/fade-out-an
imation.html"> | 10 <link rel="import" href="/bower_components/neon-animation/animations/fade-out-an
imation.html"> |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 computed: '_computeHaveAlerts(_alerts)', | 252 computed: '_computeHaveAlerts(_alerts)', |
| 253 }, | 253 }, |
| 254 _hideWebkitNotice: { | 254 _hideWebkitNotice: { |
| 255 type: Boolean, | 255 type: Boolean, |
| 256 computed: '_computeHideWebkitNotice(_tree)', | 256 computed: '_computeHideWebkitNotice(_tree)', |
| 257 }, | 257 }, |
| 258 logoutUrl: String, | 258 logoutUrl: String, |
| 259 _path: { | 259 _path: { |
| 260 type: String, | 260 type: String, |
| 261 }, | 261 }, |
| 262 _refreshEnabled: { |
| 263 type: Boolean, |
| 264 computed: '_computeRefreshEnabled(_selectedPage)', |
| 265 }, |
| 262 _refreshPosition: { | 266 _refreshPosition: { |
| 263 type: Number, | 267 type: Number, |
| 264 value: function() { return 0; }, | 268 value: function() { return 0; }, |
| 265 }, | 269 }, |
| 266 _selectedPage: { | 270 _selectedPage: { |
| 267 type: String, | 271 type: String, |
| 268 computed: '_computeSelectedPage(_path)', | 272 computed: '_computeSelectedPage(_path)', |
| 269 }, | 273 }, |
| 270 showInfraFailures: { | 274 showInfraFailures: { |
| 271 type: Boolean, | 275 type: Boolean, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 288 user: String, | 292 user: String, |
| 289 }, | 293 }, |
| 290 | 294 |
| 291 created: function() { | 295 created: function() { |
| 292 this.async(this._refreshAsync, refreshDelayMs); | 296 this.async(this._refreshAsync, refreshDelayMs); |
| 293 }, | 297 }, |
| 294 | 298 |
| 295 ////////////////////// Refresh /////////////////////////// | 299 ////////////////////// Refresh /////////////////////////// |
| 296 | 300 |
| 297 _refresh: function() { | 301 _refresh: function() { |
| 302 if (!this._refreshEnabled) { |
| 303 return; |
| 304 } |
| 298 this._refreshPosition = this.$.mainHeaderPanel.$.mainContainer.scrollTo
p; | 305 this._refreshPosition = this.$.mainHeaderPanel.$.mainContainer.scrollTo
p; |
| 299 this.$.annotations.generateRequest(); | 306 this.$.annotations.generateRequest(); |
| 300 this._alertsGroupsChanged(this._alertsGroups); | 307 this._alertsGroupsChanged(this._alertsGroups); |
| 301 }, | 308 }, |
| 302 | 309 |
| 303 _refreshAsync: function() { | 310 _refreshAsync: function() { |
| 304 this._refresh(); | 311 this._refresh(); |
| 305 this.async(this._refreshAsync, refreshDelayMs); | 312 this.async(this._refreshAsync, refreshDelayMs); |
| 306 }, | 313 }, |
| 307 | 314 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 322 return []; | 329 return []; |
| 323 } | 330 } |
| 324 | 331 |
| 325 if (trees && trees[tree] && trees[tree].alert_streams) { | 332 if (trees && trees[tree] && trees[tree].alert_streams) { |
| 326 return trees[tree].alert_streams | 333 return trees[tree].alert_streams |
| 327 } | 334 } |
| 328 | 335 |
| 329 return [tree]; | 336 return [tree]; |
| 330 }, | 337 }, |
| 331 | 338 |
| 339 _computeRefreshEnabled: function(selectedPage) { |
| 340 return selectedPage == "alertsList"; |
| 341 }, |
| 342 |
| 332 _computeSelectedPage: function(path) { | 343 _computeSelectedPage: function(path) { |
| 333 let pathParts = path.split('/'); | 344 let pathParts = path.split('/'); |
| 334 if (pathParts.length < 2) { | 345 if (pathParts.length < 2) { |
| 335 console.error('error: pathParts < 2', pathParts); | 346 console.error('error: pathParts < 2', pathParts); |
| 336 } | 347 } |
| 337 if (pathParts.length < 3) { | 348 if (pathParts.length < 3) { |
| 338 return 'alertsList'; | 349 return 'alertsList'; |
| 339 } | 350 } |
| 340 if (pathParts[2] == 'examine') { | 351 if (pathParts[2] == 'examine') { |
| 341 return 'examineAlert'; | 352 return 'examineAlert'; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 } | 571 } |
| 561 ).completes.then(() => { | 572 ).completes.then(() => { |
| 562 this.$.snoozeTime.value = ''; | 573 this.$.snoozeTime.value = ''; |
| 563 }); | 574 }); |
| 564 }, | 575 }, |
| 565 | 576 |
| 566 }); | 577 }); |
| 567 })(); | 578 })(); |
| 568 </script> | 579 </script> |
| 569 </dom-module> | 580 </dom-module> |
| OLD | NEW |