* refactor(chalice): upgraded dependencies

* refactor(chalice): upgraded dependencies
feat(chalice): support heatmaps

* feat(chalice): support table-of-browsers showing user-count

* feat(chalice): support table-of-devices showing user-count

* feat(chalice): support table-of-URLs showing user-count

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Elasticsearch-integration
This commit is contained in:
Kraiem Taha Yassine 2024-07-09 17:40:21 +02:00 committed by GitHub
parent f05055f9b7
commit bf8126639f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View file

@ -1,10 +1,11 @@
from elasticsearch import Elasticsearch
from chalicelib.core import log_tools
import logging
from elasticsearch import Elasticsearch
from chalicelib.core import log_tools
from schemas import schemas
logging.getLogger('elasticsearch').level = logging.ERROR
logger = logging.getLogger(__name__)
IN_TY = "elasticsearch"
@ -63,9 +64,9 @@ def __get_es_client(host, port, api_key_id, api_key, use_ssl=False, timeout=15):
try:
args = {
"hosts": [{"host": host, "port": port, "scheme": scheme}],
"verify_certs": False,
"verify_certs": use_ssl,
"request_timeout": timeout,
"api_key": (api_key_id, api_key)
"api_key": api_key
}
es = Elasticsearch(
**args
@ -76,8 +77,8 @@ def __get_es_client(host, port, api_key_id, api_key, use_ssl=False, timeout=15):
if not r:
return None
except Exception as err:
print("================exception connecting to ES host:")
print(err)
logger.error("================exception connecting to ES host:")
logger.exception(err)
return None
return es

View file

@ -323,7 +323,7 @@ class IntegrationCloudwatchSchema(IntegrationCloudwatchBasicSchema):
class IntegrationElasticsearchTestSchema(IntegrationBase):
host: str = Field(...)
port: int = Field(...)
api_key_id: str = Field(...)
api_key_id: Optional[str] = Field(default=None)
api_key: str = Field(...)