diff --git a/atst/domain/csp/cloud.py b/atst/domain/csp/cloud.py index 3b071b8d..529897ad 100644 --- a/atst/domain/csp/cloud.py +++ b/atst/domain/csp/cloud.py @@ -38,6 +38,10 @@ class CloudProviderInterface: """ raise NotImplementedError() + def calculator_url(self): # pragma: no cover + """Returns a URL for the CSP's estimate calculator.""" + raise NotImplementedError() + class MockCloudProvider(CloudProviderInterface): def create_application(self, name): @@ -64,3 +68,6 @@ class MockCloudProvider(CloudProviderInterface): env_id = environment_role.environment.cloud_id or "" role_details = environment_role.role return "::".join([user_id, env_id, role_details]) + + def calculator_url(self): + return "https://www.rackspace.com/en-us/calculator" diff --git a/atst/routes/__init__.py b/atst/routes/__init__.py index a3f50306..ac05105f 100644 --- a/atst/routes/__init__.py +++ b/atst/routes/__init__.py @@ -146,4 +146,4 @@ def csp_environment_access(): @bp.route("/jedi-csp-calculator") def jedi_csp_calculator(): - return render_template("mock_csp.html", text="service and price calculator") + return redirect(app.csp.cloud.calculator_url()) diff --git a/templates/task_orders/new/funding.html b/templates/task_orders/new/funding.html index 82417e2c..a466a399 100644 --- a/templates/task_orders/new/funding.html +++ b/templates/task_orders/new/funding.html @@ -24,7 +24,7 @@
{{ "task_orders.new.funding.estimate_usage_description" | translate }}
-
+
{{ Icon("link")}} Cloud Service Provider's estimate calculator
{{ "task_orders.new.funding.estimate_usage_paragraph" | translate }}