Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ZMSSqlDb:
package = "com.zms.foundation"

# Revision
revision = "5.0.0"
revision = "5.1.0"

# Type
type = "ZMSObject"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
<!-- ZMSSqlDb.renderShort -->

<tal:block tal:define="zmscontext options/zmscontext">
<tal:block tal:define="
zmscontext options/zmscontext;
entities python:zmscontext.getEntities()">
<p class="my-2" style="color:#008ac7;">
<i class="fas fa-database"></i>
<strong tal:content="python:zmscontext.connection_id">the connection-id</strong>
</p>
<ul class="fa-ul">
<li tal:repeat="table python:[x for x in zmscontext.getEntities() if x['type']=='table']">
<ul class="fa-ul mb-5" tal:condition="entities">
<li tal:repeat="table python:[x for x in entities if x['type']=='table']">
<a class="font-monospace" tal:attributes="href python:'%s/manage_main?qentity=%s'%(zmscontext.id,table['id'])" >
<span class="fa-li"><i class="fas fa-table"></i></span>
<span class="table_id" tal:content="table/id">the table</span>
</a>
</li>
</ul>
<br/>
<div class="alert alert-warning ml-0" tal:condition="not:entities">
No tables found in this database.
<a href="#" target="_blank"
tal:attributes="
href python:'%s/%s/manage_main'%(zmscontext.getHome().absolute_url(),zmscontext.connection_id);
title python:'%s/%s/manage_main'%(zmscontext.getHome().absolute_url(),zmscontext.connection_id);">
Database connection
</a>
may be closed.
</div>
</tal:block>

<!-- /ZMSSqlDb.renderShort -->
3 changes: 2 additions & 1 deletion Products/zms/zmssqldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,8 @@ def getEntities(self):

entities = []
da = self.getDA()
if da is None: return entities
if da is None or da.connected() is None:
return entities

tableBrwsrs = da.tpValues()

Expand Down