File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed
Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 55
66class DashboardESDocument (ElasticsearchDocument ):
77 """
8- Schema for the Search index document
8+ Schema for the ES dashboard ES document
99 """
1010 def __init__ (self ,
1111 dashboard_group , # type: str
1212 dashboard_name , # type: str
1313 description , # type: Union[str, None]
14- last_reload_time , # type: str
15- user_id , # type: str
16- user_name , # type: str
17- tags # type: list
14+ total_usage , # type: int
15+ product = '' , # type: Optional[ str]
16+ dashboard_group_description = None , # type: Optional[ str]
17+ tags = None # type: list
1818 ):
1919 # type: (...) -> None
2020 self .dashboard_group = dashboard_group
2121 self .dashboard_name = dashboard_name
2222 self .description = description
23- self .last_reload_time = last_reload_time
24- self .user_id = user_id
25- self .user_name = user_name
23+ self .product = product
24+ self .total_usage = total_usage
25+ self .dashboard_group_description = dashboard_group_description
2626 self .tags = tags
Original file line number Diff line number Diff line change 22from setuptools import setup , find_packages
33
44
5- __version__ = '2.3.2 '
5+ __version__ = '2.3.3 '
66
77
88requirements_path = os .path .join (os .path .dirname (os .path .realpath (__file__ )), 'requirements.txt' )
Original file line number Diff line number Diff line change @@ -14,17 +14,17 @@ def test_to_json(self):
1414 test_obj = DashboardESDocument (dashboard_group = 'test_dashboard_group' ,
1515 dashboard_name = 'test_dashboard_name' ,
1616 description = 'test_description' ,
17- last_reload_time = 'test_last_reload_time ' ,
18- user_id = 'test_user_id ' ,
19- user_name = 'test_user_name' ,
17+ product = 'mode ' ,
18+ dashboard_group_description = 'work space group ' ,
19+ total_usage = 10 ,
2020 tags = ['test' ])
2121
2222 expected_document_dict = {"dashboard_group" : "test_dashboard_group" ,
2323 "dashboard_name" : "test_dashboard_name" ,
2424 "description" : "test_description" ,
25- "last_reload_time " : "test_last_reload_time " ,
26- "user_id " : "test_user_id " ,
27- "user_name " : "test_user_name" ,
25+ "product " : "mode " ,
26+ "dashboard_group_description " : "work space group " ,
27+ "total_usage " : 10 ,
2828 "tags" : ["test" ]
2929 }
3030
You can’t perform that action at this time.
0 commit comments