You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2018/08/27 22:21:31 UTC
[incubator-superset] branch update-annotation-model updated: add
new column to view
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch update-annotation-model
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/update-annotation-model by this push:
new 6220966 add new column to view
6220966 is described below
commit 6220966e2a0a0cf3e6d87925491f8920fe8a3458
Author: Hugh Miles <hm...@lyft.com>
AuthorDate: Mon Aug 27 15:21:13 2018 -0700
add new column to view
---
superset/views/annotations.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/superset/views/annotations.py b/superset/views/annotations.py
index 648be25..986b3b2 100644
--- a/superset/views/annotations.py
+++ b/superset/views/annotations.py
@@ -22,9 +22,9 @@ class AnnotationModelView(SupersetModelView, DeleteMixin): # noqa
add_title = _('Add Annotation')
edit_title = _('Edit Annotation')
- list_columns = ['layer', 'short_descr', 'start_dttm', 'end_dttm']
+ list_columns = ['layer', 'short_descr', 'start_dttm', 'end_dttm', 'annotation_metadata']
edit_columns = [
- 'layer', 'short_descr', 'long_descr', 'start_dttm', 'end_dttm']
+ 'layer', 'short_descr', 'long_descr', 'start_dttm', 'end_dttm', 'annotation_metadata']
add_columns = edit_columns
label_columns = {
@@ -33,6 +33,11 @@ class AnnotationModelView(SupersetModelView, DeleteMixin): # noqa
'start_dttm': _('Start Dttm'),
'end_dttm': _('End Dttm'),
'long_descr': _('Long Descr'),
+ 'annotation_metadata': _('JSON Metadata'),
+ }
+
+ description_columns = {
+ 'annotation_metadata': 'This JSON represents any additional metadata this annotation needs to add more context.'
}
def pre_add(self, obj):