| OLD | NEW |
| 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 <link rel="import" href="../bower_components/iron-icons/iron-icons.html"> | 9 <link rel="import" href="../bower_components/iron-icons/iron-icons.html"> |
| 10 <link rel="import" href="../bower_components/iron-icons/av-icons.html"> | 10 <link rel="import" href="../bower_components/iron-icons/av-icons.html"> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 move along with insertions as points of reference. | 269 move along with insertions as points of reference. |
| 270 --> | 270 --> |
| 271 | 271 |
| 272 <div id="logSplit" class="logFetchButtonContainer"> | 272 <div id="logSplit" class="logFetchButtonContainer"> |
| 273 <!-- Insert point (prepend for head, append for tail). --> | 273 <!-- Insert point (prepend for head, append for tail). --> |
| 274 <paper-button id="logSplitUp" | 274 <paper-button id="logSplitUp" |
| 275 class="logFetchButton logSplitUpButton giant" | 275 class="logFetchButton logSplitUpButton giant" |
| 276 text="Load Above" | 276 text="Load Above" |
| 277 disabled="[[streamAnchorsNotClickable]]" | 277 disabled="[[streamAnchorsNotClickable]]" |
| 278 on-click="_handleUpClick"> | 278 on-click="_handleUpClick"> |
| 279 <iron-icon icon="file-upload"></iron-icon> |
| 279 </paper-button> | 280 </paper-button> |
| 280 <paper-button id="logSplitDown" | 281 <paper-button id="logSplitDown" |
| 281 class="logFetchButton logSplitDownButton giant" | 282 class="logFetchButton logSplitDownButton giant" |
| 282 text="Load Below" | 283 text="Load Below" |
| 283 disabled="[[streamAnchorsNotClickable]]" | 284 disabled="[[streamAnchorsNotClickable]]" |
| 284 on-click="_handleDownClick"> | 285 on-click="_handleDownClick"> |
| 286 <iron-icon icon="file-download"></iron-icon> |
| 285 </paper-button> | 287 </paper-button> |
| 286 </div> | 288 </div> |
| 287 | 289 |
| 288 <div id="logBottom" class="logFetchButtonContainer"> | 290 <div id="logBottom" class="logFetchButtonContainer"> |
| 289 <!-- | 291 <!-- |
| 290 Bottom of the log stream (red bottom line). When tail is complete, | 292 Bottom of the log stream (red bottom line). When tail is complete, |
| 291 all future logs get prepended to this. | 293 all future logs get prepended to this. |
| 292 --> | 294 --> |
| 293 <paper-button id="logBottomButton" | 295 <paper-button id="logBottomButton" |
| 294 class="logFetchButton logBottomButton giant" | 296 class="logFetchButton logBottomButton giant" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 | 534 |
| 533 _handleMouseWheel: function(e) { | 535 _handleMouseWheel: function(e) { |
| 534 this._view.handleMouseWheel(); | 536 this._view.handleMouseWheel(); |
| 535 }, | 537 }, |
| 536 | 538 |
| 537 _handleDownClick: function(e) { | 539 _handleDownClick: function(e) { |
| 538 this._view.handleDownClick(); | 540 this._view.handleDownClick(); |
| 539 }, | 541 }, |
| 540 | 542 |
| 541 _handleUpClick: function(e) { | 543 _handleUpClick: function(e) { |
| 542 this._view._handleUpClick(); | 544 this._view.handleUpClick(); |
| 543 }, | 545 }, |
| 544 | 546 |
| 545 _handleBottomClick: function(e) { | 547 _handleBottomClick: function(e) { |
| 546 this._view.handleBottomClick(); | 548 this._view.handleBottomClick(); |
| 547 }, | 549 }, |
| 548 | 550 |
| 549 /** Called when the bound log stream variables has changed. */ | 551 /** Called when the bound log stream variables has changed. */ |
| 550 _streamsChanged: function() { | 552 _streamsChanged: function() { |
| 551 this._view.handleStreamsChanged(); | 553 this._view.handleStreamsChanged(); |
| 552 }, | 554 }, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 this._view.handleFollowChanged(v); | 594 this._view.handleFollowChanged(v); |
| 593 }, | 595 }, |
| 594 | 596 |
| 595 /** Callback when "split" button has been clicked. */ | 597 /** Callback when "split" button has been clicked. */ |
| 596 _splitClicked: function() { | 598 _splitClicked: function() { |
| 597 this._view.handleSplitClicked(); | 599 this._view.handleSplitClicked(); |
| 598 }, | 600 }, |
| 599 | 601 |
| 600 /** Callback when "split" button has been clicked. */ | 602 /** Callback when "split" button has been clicked. */ |
| 601 _scrollToSplit: function() { | 603 _scrollToSplit: function() { |
| 602 this._maybeScrollToElement(this.$.logSplit, true, true); | 604 this._view.handleScrollToSplitClicked(); |
| 603 }, | 605 }, |
| 604 | 606 |
| 605 _updateSplitVisible: function(v) { | 607 _updateSplitVisible: function(v) { |
| 606 this.toggleClass("logFetchButtonVisible", v, this.$.logSplit); | 608 this.toggleClass("logFetchButtonVisible", v, this.$.logSplit); |
| 607 }, | 609 }, |
| 608 | 610 |
| 609 _updateBottomVisible: function(v) { | 611 _updateBottomVisible: function(v) { |
| 610 this.toggleClass("logFetchButtonVisible", v, this.$.logBottom); | 612 this.toggleClass("logFetchButtonVisible", v, this.$.logBottom); |
| 611 }, | 613 }, |
| 612 | 614 |
| 613 _computeAnchorsNotClickable: function(playing, showStreamingControls, | 615 _computeAnchorsNotClickable: function(playing, showStreamingControls, |
| 614 rendering) { | 616 rendering) { |
| 615 // Anchors are not clickable if we're playing or the controls are | 617 // Anchors are not clickable if we're playing or the controls are |
| 616 // not visible. | 618 // not visible. |
| 617 return ( playing || (!showStreamingControls) || rendering ); | 619 return ( playing || (!showStreamingControls) || rendering ); |
| 618 }, | 620 }, |
| 619 | 621 |
| 620 /** Filter function to invert a value. */ | 622 /** Filter function to invert a value. */ |
| 621 _not: function(v) { | 623 _not: function(v) { |
| 622 return (!v); | 624 return (!v); |
| 623 }, | 625 }, |
| 624 | 626 |
| 625 _onSignin: function() { | 627 _onSignin: function() { |
| 626 this._view.handleSignin(); | 628 this._view.handleSignin(); |
| 627 }, | 629 }, |
| 628 }); | 630 }); |
| 629 </script> | 631 </script> |
| OLD | NEW |