Unverified Commit b4c24ef8 authored by Arjun Landes's avatar Arjun Landes Committed by GitHub

fix: Variable organization in Model URL (#293)

The Mode dashboard URL should change based on organization name passed in the config.
parent de2a9e13
...@@ -54,7 +54,7 @@ class ModeDashboardExtractor(Extractor): ...@@ -54,7 +54,7 @@ class ModeDashboardExtractor(Extractor):
dashboard_group_url_transformer.init( dashboard_group_url_transformer.init(
conf=Scoped.get_scoped_conf(self._conf, dashboard_group_url_transformer.get_scope()).with_fallback( conf=Scoped.get_scoped_conf(self._conf, dashboard_group_url_transformer.get_scope()).with_fallback(
ConfigFactory.from_dict({VAR_FIELD_NAME: 'dashboard_group_url', ConfigFactory.from_dict({VAR_FIELD_NAME: 'dashboard_group_url',
TEMPLATE: 'https://app.mode.com/lyft/spaces/{dashboard_group_id}'}))) TEMPLATE: 'https://app.mode.com/{organization}/spaces/{dashboard_group_id}'})))
transformers.append(dashboard_group_url_transformer) transformers.append(dashboard_group_url_transformer)
...@@ -62,7 +62,7 @@ class ModeDashboardExtractor(Extractor): ...@@ -62,7 +62,7 @@ class ModeDashboardExtractor(Extractor):
dashboard_url_transformer.init( dashboard_url_transformer.init(
conf=Scoped.get_scoped_conf(self._conf, dashboard_url_transformer.get_scope()).with_fallback( conf=Scoped.get_scoped_conf(self._conf, dashboard_url_transformer.get_scope()).with_fallback(
ConfigFactory.from_dict({VAR_FIELD_NAME: 'dashboard_url', ConfigFactory.from_dict({VAR_FIELD_NAME: 'dashboard_url',
TEMPLATE: 'https://app.mode.com/lyft/reports/{dashboard_id}'}))) TEMPLATE: 'https://app.mode.com/{organization}/reports/{dashboard_id}'})))
transformers.append(dashboard_url_transformer) transformers.append(dashboard_url_transformer)
dict_to_model_transformer = DictToModel() dict_to_model_transformer = DictToModel()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment