| Index: appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
|
| diff --git a/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html b/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
|
| index e9ac9028b6cd551d4c427a12bb9b9714e93f3690..87b3be3234ba4c864e69e6268d21d03d7fb13368 100644
|
| --- a/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
|
| +++ b/appengine/sheriff_o_matic/ui/ct-failure-card-buttons.html
|
| @@ -33,6 +33,7 @@ found in the LICENSE file.
|
| padding: 6px 22px;
|
| }
|
| </style>
|
| + <ct-user-prefs id="userPrefs"></ct-user-prefs>
|
| <a is="pushstate-anchor" href="{{ group.examineUrl }}" id="examineLink">Examine</a>
|
| <template if="{{ !group.isSnoozed }}">
|
| <ct-button id="snooze" on-tap="{{ snooze }}" label="Snooze"></ct-button>
|
| @@ -57,12 +58,32 @@ found in the LICENSE file.
|
| <ct-button on-tap="{{ removeBug }}" dismissive role="button" id="dialogRemoveBug" label="Remove bug link"></ct-button>
|
| <ct-button on-tap="{{ saveBug }}" affirmative role="button" id="dialogOk" label="OK"></ct-button>
|
| </paper-action-dialog>
|
| + <paper-action-dialog heading="Error" transition="paper-transition-center" id="loginDialog">
|
| + <div id="accessDeniedMessage">
|
| + Please <a href="{{ $.userPrefs.values.loginUrl }}">log in</a> to modify alerts.
|
| + </div>
|
| + <div id="otherMessage"></div>
|
| + </paper-action-dialog>
|
| </template>
|
| <script>
|
| Polymer({
|
| group: null,
|
| _fileBugClicked: false,
|
|
|
| + ready: function() {
|
| + this.group.errorCallback = this.errorCallback.bind(this);
|
| + },
|
| +
|
| + errorCallback: function(args) {
|
| + if (args.message == "Forbidden") {
|
| + this.$.otherMessage.hidden = true;
|
| + } else {
|
| + this.$.accessDeniedMessage.hidden = true;
|
| + this.$.otherMessage.textContent = args.message;
|
| + }
|
| + this.$.loginDialog.open();
|
| + },
|
| +
|
| snooze: function() {
|
| this.group.snoozeUntil(Date.now() + 60 * 60 * 1000);
|
| ga('send', 'event', 'snooze', 'click');
|
|
|