소스 검색

[assist] Show a message when no databases are found

This is unlikely to happen but in case the backend for whatever reason returns an empty list for any of the sources it's better to show a message than an empty panel.
Johan Ahlen 9 년 전
부모
커밋
99f31ee3f9
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      desktop/core/src/desktop/templates/assist.mako

+ 3 - 1
desktop/core/src/desktop/templates/assist.mako

@@ -373,7 +373,6 @@ from desktop.views import _ko
       <!-- /ko -->
       <!-- /ko -->
     </ul>
-    <ul></ul>
     <!-- ko template: { if: ! hasEntries() && ! loading() && (definition.isTable || definition.isView), name: 'assist-no-table-entries' } --><!-- /ko -->
     <!-- ko template: { if: ! hasEntries() && ! loading() && definition.isDatabase, name: 'assist-no-database-entries' } --><!-- /ko -->
   </script>
@@ -618,6 +617,9 @@ from desktop.views import _ko
     <div class="assist-flex-fill" data-bind="visible: hasErrors() && ! loading()" style="display: none;">
       <span class="assist-errors">${ _('Error loading databases.') }</span>
     </div>
+    <div class="assist-flex-fill" data-bind="visible: ! hasErrors() && ! loading() && ! hasEntries()" style="display: none;">
+      <span class="assist-errors">${ _('No databases found.') }</span>
+    </div>
   </script>
 
   <script type="text/html" id="assist-tables-template">