Explorar o código

[notebook] Add a query expired message

Romain Rigaux %!s(int64=10) %!d(string=hai) anos
pai
achega
80b9dde

+ 2 - 0
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -568,6 +568,8 @@
           else if (self.status() == 'success') {
             self.progress(99);
           }
+        } else if (data.status == -3) {
+          self.status('expired');
         } else {
           self._ajaxError(data);
         }

+ 4 - 0
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -386,6 +386,10 @@ ${ require.config() }
       <pre class="margin-top-10 no-margin-bottom"><i class="fa fa-check muted"></i> ${ _("Done. 0 results.") }</pre>
     </div>
 
+    <div data-bind="visible: status() == 'expired', css: resultsKlass" style="display:none;">
+      <pre class="margin-top-10 no-margin-bottom"><i class="fa fa-check muted"></i> ${ _("Result has expired.") }</pre>
+    </div>
+
     <div data-bind="visible: status() == 'available' && ! result.fetchedOnce(), css: resultsKlass" style="display:none;">
       <pre class="margin-top-10 no-margin-bottom"><i class="fa fa-spin fa-spinner"></i> ${ _('Loading...') }</pre>
     </div>