Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
aedd87fb
Unverified
Commit
aedd87fb
authored
Mar 10, 2020
by
Tao Feng
Committed by
GitHub
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dashboard ES doc (#218)
parent
1c72ef16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
dashboard_elasticsearch_document.py
databuilder/models/dashboard_elasticsearch_document.py
+8
-8
setup.py
setup.py
+1
-1
test_dashboard_elasticsearch_document.py
tests/unit/models/test_dashboard_elasticsearch_document.py
+6
-6
No files found.
databuilder/models/dashboard_elasticsearch_document.py
View file @
aedd87fb
...
...
@@ -5,22 +5,22 @@ from databuilder.models.elasticsearch_document import ElasticsearchDocument
class
DashboardESDocument
(
ElasticsearchDocument
):
"""
Schema for the
Search index
document
Schema for the
ES dashboard ES
document
"""
def
__init__
(
self
,
dashboard_group
,
# type: str
dashboard_name
,
# type: str
description
,
# type: Union[str, None]
last_reload_time
,
# type: str
user_id
,
# type: str
user_name
,
# type: str
tags
# type: list
total_usage
,
# type: int
product
=
''
,
# type: Optional[str]
dashboard_group_description
=
None
,
# type: Optional[str]
tags
=
None
# type: list
):
# type: (...) -> None
self
.
dashboard_group
=
dashboard_group
self
.
dashboard_name
=
dashboard_name
self
.
description
=
description
self
.
last_reload_time
=
last_reload_time
self
.
user_id
=
user_id
self
.
user_name
=
user_name
self
.
product
=
product
self
.
total_usage
=
total_usage
self
.
dashboard_group_description
=
dashboard_group_description
self
.
tags
=
tags
setup.py
View file @
aedd87fb
...
...
@@ -2,7 +2,7 @@ import os
from
setuptools
import
setup
,
find_packages
__version__
=
'2.3.
2
'
__version__
=
'2.3.
3
'
requirements_path
=
os
.
path
.
join
(
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
)),
'requirements.txt'
)
...
...
tests/unit/models/test_dashboard_elasticsearch_document.py
View file @
aedd87fb
...
...
@@ -14,17 +14,17 @@ class TestDashboardElasticsearchDocument(unittest.TestCase):
test_obj
=
DashboardESDocument
(
dashboard_group
=
'test_dashboard_group'
,
dashboard_name
=
'test_dashboard_name'
,
description
=
'test_description'
,
last_reload_time
=
'test_last_reload_tim
e'
,
user_id
=
'test_user_id
'
,
user_name
=
'test_user_name'
,
product
=
'mod
e'
,
dashboard_group_description
=
'work space group
'
,
total_usage
=
10
,
tags
=
[
'test'
])
expected_document_dict
=
{
"dashboard_group"
:
"test_dashboard_group"
,
"dashboard_name"
:
"test_dashboard_name"
,
"description"
:
"test_description"
,
"
last_reload_time"
:
"test_last_reload_tim
e"
,
"
user_id"
:
"test_user_id
"
,
"
user_name"
:
"test_user_name"
,
"
product"
:
"mod
e"
,
"
dashboard_group_description"
:
"work space group
"
,
"
total_usage"
:
10
,
"tags"
:
[
"test"
]
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment