diff --git a/polygerrit-ui/app/elements/gr-ajax.html b/polygerrit-ui/app/elements/gr-ajax.html index d8b76314b4..58b647e4b0 100644 --- a/polygerrit-ui/app/elements/gr-ajax.html +++ b/polygerrit-ui/app/elements/gr-ajax.html @@ -24,6 +24,7 @@ limitations under the License. url="[[url]]" params="[[params]]" json-prefix=")]}'" + last-error="{{lastError}}" last-response="{{lastResponse}}" loading="{{loading}}" on-response="_handleResponse" @@ -65,6 +66,10 @@ limitations under the License. return {}; }, }, + lastError: { + type: Object, + notify: true, + }, lastResponse: { type: Object, notify: true, diff --git a/polygerrit-ui/app/elements/gr-change-list-view.html b/polygerrit-ui/app/elements/gr-change-list-view.html index fecba9d574..633b467fb3 100644 --- a/polygerrit-ui/app/elements/gr-change-list-view.html +++ b/polygerrit-ui/app/elements/gr-change-list-view.html @@ -27,11 +27,17 @@ limitations under the License. display: block; margin: 0 1.25rem; } - .loading { + .loading, + .error { margin-top: 1em; - color: #666; background-color: #f1f2f3; } + .loading { + color: #666; + } + .error { + color: #D32F2F; + } gr-change-list { margin-top: 1em; width: 100%; @@ -51,7 +57,8 @@ limitations under the License. :host { margin: 0; } - .loading { + .loading, + .error { padding: 0 1.25rem; } } @@ -61,9 +68,13 @@ limitations under the License. url="/changes/" params="[[_computeQueryParams(_query, _offset)]]" last-response="{{_changes}}" + last-error="{{_lastError}}" loading="{{_loading}}"> -