Skip to content

Commit

Permalink
[refs #140815] Set FGAS new urls
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaboiangiu committed Jan 18, 2022
1 parent 0d54607 commit 9422495
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Products/Reportek/Collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def aggregated_licences(self, all_years=False):
res["message"] = None
# FLOAT_REPR is deprecated in python 3.6
json.encoder.FLOAT_REPR = (
lambda o: ("%.16f" % o).rstrip("0") if o != 0 else 0
lambda o: ("%.7f" % o).rstrip("0") if o != 0 else 0
)

return json.dumps(res, indent=4)
Expand Down
18 changes: 18 additions & 0 deletions Products/Reportek/views/satellite_registry_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,24 @@ def get_url(self):
return settings["BASE_URL_FGAS"]
return settings["BASE_URL"]

def get_url_ods(self):
api = self.get_api()
if not api:
return None

settings = api.getSettings()
if settings:
return settings["BASE_URL_ODS"]

def get_url_fgas(self):
api = self.get_api()
if not api:
return None

settings = api.getSettings()
if settings:
return settings["BASE_URL_FGAS"]

def get_emails(self):
api = self.get_api()
if not api:
Expand Down
2 changes: 1 addition & 1 deletion Products/Reportek/zpt/registry/data_sync_log.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<h1 i18n:translate="">Data synchronisation logs</h1>
<p i18n:translate="">
Latest 100 syncronisation jobs made against
<a tal:attributes="href view/get_url" i18n:translate="">FGAS and ODS portal</a> and the number of companies fetched.
<a tal:attributes="href view/get_url_fgas" i18n:translate="">FGAS</a> and <a tal:attributes="href view/get_url_ods" i18n:translate="">ODS</a> portal and the number of companies fetched.
</p>
<div class="obligation-select-container">
<label for="domain" i18n:translate="">Filter companies by obligation:</label>
Expand Down
2 changes: 1 addition & 1 deletion Products/Reportek/zpt/registry/notifications_settings.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<p i18n:translate="">
Each time an FGAS or ODS company is validated in BDR, an email is sent to the
addresses from the list below. By <em>validated</em>, we mean companies
registered in the <a tal:attributes="href view/get_url">FGAS and ODS portal</a> and matched with old records from the
registered in the <a tal:attributes="href view/get_url_fgas">FGAS</a> and <a tal:attributes="href view/get_url_ods">ODS</a> portal and matched with old records from the
BDR-Registry.
</p>

Expand Down
2 changes: 1 addition & 1 deletion Products/Reportek/zpt/registry/organisation_listing.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<h1 i18n:translate="">Companies</h1>

<p i18n:translate="">Companies registered in <a tal:attributes="href view/get_url">FGAS and ODS portal</a> and approved in BDR. Click on a company name to see the details and the reporters. Alternatively, export companies in <a class="export" href="organisations_excel">
<p i18n:translate="">Companies registered in <a tal:attributes="href view/get_url_fgas">FGAS</a> and <a tal:attributes="href view/get_url_ods">ODS</a> portal and approved in BDR. Click on a company name to see the details and the reporters. Alternatively, export companies in <a class="export" href="organisations_excel">
Excel</a> or <a class="export" href="organisations_json">JSON </a> format or reporters in <a class="export" href="users_xls">Excel</a> format.
</p>
<div class="obligation-select-container">
Expand Down
3 changes: 2 additions & 1 deletion Products/Reportek/zpt/registry/organisation_matching.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<h1 i18n:translate="">Pending Companies</h1>

<p i18n:translate="">
Companies registered in the <a tal:attributes="href view/get_url">FGAS and ODS portal</a>.
Companies registered in the <a tal:attributes="href view/get_url_fgas">FGAS</a> and
<a tal:attributes="href view/get_url_ods">ODS</a> portal.
You can match them with old records taken from <a href="/registry">
BDR-Registry</a>, based on suggestions (candidates) made by the system.
Please click on the company name to view the suggestions and approve the company.
Expand Down
3 changes: 2 additions & 1 deletion Products/Reportek/zpt/registry/organisation_verification.zpt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

<p i18n:translate="">
Company details (as registered in the
<a tal:attributes="href view/get_url">FGAS and ODS portal</a>)
<a tal:attributes="href view/get_url_fgas">FGAS</a> and
<a tal:attributes="href view/get_url_ods">ODS</a> portal)
and match it with the old record from
<a href="/registry">
BDR-Registry</a>, based on suggestions (candidates) made by the system.
Expand Down

0 comments on commit 9422495

Please sign in to comment.