Skip to content
Merged
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
4 changes: 4 additions & 0 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def creator(self): # noqa
def changed_by_(self):
return '{}'.format(self.changed_by or '')

@renders('changed_on')
def changed_on_(self):
return '<span class="no-wrap">{}</span>'.format(self.changed_on)

@renders('changed_on')
def modified(self):
s = humanize.naturaltime(datetime.now() - self.changed_on)
Expand Down
4 changes: 2 additions & 2 deletions caravel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class DruidMetricInlineView(CompactCRUDMixin, CaravelModelView): # noqa

class DatabaseView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.Database)
list_columns = ['database_name', 'sql_link', 'creator', 'changed_on']
list_columns = ['database_name', 'sql_link', 'creator', 'changed_on_']
add_columns = [
'database_name', 'sqlalchemy_uri', 'cache_timeout', 'extra']
search_exclude_columns = ('password',)
Expand Down Expand Up @@ -235,7 +235,7 @@ class TableModelView(CaravelModelView, DeleteMixin): # noqa
datamodel = SQLAInterface(models.SqlaTable)
list_columns = [
'table_link', 'database', 'sql_link', 'is_featured',
'changed_by_', 'changed_on', 'perm']
'changed_by_', 'changed_on_']
add_columns = [
'table_name', 'database', 'schema',
'default_endpoint', 'offset', 'cache_timeout']
Expand Down