diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index 771c62fcf..349647422 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -118,4 +118,4 @@ jobs: sleep 10 make create-cachetable make update-openapi-schema - git diff --exit-code -- tools/openapi-schema/ansible-wisdom-service.yaml + git diff --exit-code -- tools/openapi-schema/ansible-ai-connect-service.yaml diff --git a/Makefile b/Makefile index 7795c8599..ca67dfbd5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ ENVIRONMENT ?= development TAG ?= latest +ANSIBLE_AI_PROJECT_NAME ?= "Ansible AI Connect" # Choose between docker and podman based on what is available ifeq (, $(shell which podman)) @@ -91,7 +92,7 @@ stop-backends: .PHONY: update-openapi-schema # Update OpenAPI 3.0 schema while running the service in development env update-openapi-schema: - curl -X GET http://localhost:8000/api/schema/ -o tools/openapi-schema/ansible-wisdom-service.yaml + curl -X GET http://localhost:8000/api/schema/ -o tools/openapi-schema/ansible-ai-connect-service.yaml .PHONY: docker-compose-clean docker-compose-clean: @@ -126,7 +127,7 @@ create-superuser: create-cachetable .PHONY: create-application create-application: create-superuser - wisdom-manage createapplication --name "Ansible Lightspeed for VS Code" --client-id Vu2gClkeR5qUJTUGHoFAePmBznd6RZjDdy5FW2wy --redirect-uris "vscode://redhat.ansible" public authorization-code + wisdom-manage createapplication --name "${ANSIBLE_AI_PROJECT_NAME} for VS Code" --client-id Vu2gClkeR5qUJTUGHoFAePmBznd6RZjDdy5FW2wy --redirect-uris "vscode://redhat.ansible" public authorization-code .PHONY: test test: diff --git a/README.md b/README.md index 8ad4250f6..b88f41cf1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Red Hat Ansible Lightspeed with IBM watsonx Code Assistant. -- [Red Hat Ansible Lightspeed with IBM watsonx Code Assistant.](#red-hat-ansible-lightspeed-with-ibm-watsonx-code-assistant) +# Ansible AI Connect. +- [Ansible AI Connect.](#ansible-ai-connect) - [Wisdom Service](#wisdom-service) - [Admin Portal](#admin-portal) - [Using pre-commit](#using-pre-commit) @@ -419,7 +419,7 @@ and then run the Django command to create the application: ```bash wisdom-manage createapplication \ - --name "Ansible Lightspeed for VS Code" \ + --name "Ansible AI Connect for VS Code" \ --client-id Vu2gClkeR5qUJTUGHoFAePmBznd6RZjDdy5FW2wy \ --redirect-uris "vscode://redhat.ansible vscodium://redhat.ansible vscode-insiders://redhat.ansible code-oss://redhat.ansible checode://redhat.ansible" \ public authorization-code @@ -545,7 +545,7 @@ You can enable postprocess with [Ansible Lint](https://github.com/ansible/ansibl ## Application metrics as a Prometheus-style endpoint We enabled the Prometheus endpoint to scrape the configuration and check the service status to build observability into -the Lightspeed service for monitoring and measuring its availability. +the service for monitoring and measuring its availability. To provide feedback for operational needs as well as for continuous service improvement. @@ -558,7 +558,7 @@ the development environment only**. - **Note:** It is not enabled in the production environment regardless of any settings. -If you want to test Lightspeed APIs using Swagger UI, +If you want to test APIs using Swagger UI, 1. Open http://localhost:8000/ and get an authentication token by following the instructions described in the @@ -581,7 +581,7 @@ Another OpenAPI UI in the ReDoc format is also available at http://localhost:80 ### OpenAPI 3.0 Schema The static OpenAPI Schema YAML file is stored as -[/tools/openapi-schema/ansible-wisdom-service.yaml](https://github.com/ansible/ansible-wisdom-service/blob/main/tools/openapi-schema/ansible-wisdom-service.yaml) +[/tools/openapi-schema/ansible-ai-connect-service.yaml](https://github.com/ansible/ansible-ai-connect-service/blob/main/tools/openapi-schema/ansible-ai-connect-service.yaml) in this repository. When you make code changes, please update the static OpenAPI Schema YAML file @@ -642,7 +642,7 @@ If the execution was successful, results in HTML are showin in Chrome. For executing unit tests from command line, You need to set some environment variables -that are read by Lightspeed Service. +that are read by the Service. If you are using PyCharm for development, you can use [the EnvFile plugin](https://plugins.jetbrains.com/plugin/7861-envfile) with the following `.env` file: diff --git a/ansible_wisdom/ai/api/permissions.py b/ansible_wisdom/ai/api/permissions.py index bdbb31c92..9cc277129 100644 --- a/ansible_wisdom/ai/api/permissions.py +++ b/ansible_wisdom/ai/api/permissions.py @@ -59,7 +59,9 @@ class BlockUserWithoutSeatAndWCAReadyOrg(permissions.BasePermission): """ code = 'permission_denied__org_ready_user_has_no_seat' - message = "Org's LightSpeed subscription is active but user has no seat." + message = ( + f"Org's {settings.ANSIBLE_AI_PROJECT_NAME} subscription is active but user has no seat." + ) def has_permission(self, request, view): user = request.user diff --git a/ansible_wisdom/ai/api/serializers.py b/ansible_wisdom/ai/api/serializers.py index c851ca7df..8fb20c68f 100644 --- a/ansible_wisdom/ai/api/serializers.py +++ b/ansible_wisdom/ai/api/serializers.py @@ -259,7 +259,7 @@ class Meta: required=False, label='Additional Comment', help_text='Additional comment describing why the \ - change was required in Lightspeed suggestion.', + change was required in suggestion.', ) diff --git a/ansible_wisdom/healthcheck/views.py b/ansible_wisdom/healthcheck/views.py index e5e266ae7..675b59238 100644 --- a/ansible_wisdom/healthcheck/views.py +++ b/ansible_wisdom/healthcheck/views.py @@ -87,7 +87,7 @@ def render_to_response_json(self, plugins, status, user): # customize JSON outp class WisdomServiceHealthView(APIView): """ - Lightspeed Service Health Check + Service Health Check """ permission_classes = [permissions.AllowAny] @@ -134,7 +134,7 @@ def get(self, request, *args, **kwargs): class WisdomServiceLivenessProbeView(APIView): """ - Lightspeed Service Liveness Probe View + Service Liveness Probe View """ permission_classes = [permissions.AllowAny] diff --git a/ansible_wisdom/main/settings/base.py b/ansible_wisdom/main/settings/base.py index 11eef5ab4..3516d1d89 100644 --- a/ansible_wisdom/main/settings/base.py +++ b/ansible_wisdom/main/settings/base.py @@ -17,6 +17,7 @@ # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent +ANSIBLE_AI_PROJECT_NAME = os.getenv("ANSIBLE_AI_PROJECT_NAME") or "Ansible AI Connect" # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/ diff --git a/ansible_wisdom/main/settings/development.py b/ansible_wisdom/main/settings/development.py index fb5fdc256..f016bea7e 100644 --- a/ansible_wisdom/main/settings/development.py +++ b/ansible_wisdom/main/settings/development.py @@ -7,7 +7,7 @@ if DEBUG: SPECTACULAR_SETTINGS = { - 'TITLE': 'Ansible Lightspeed with IBM watsonx Code Assistant.', + 'TITLE': f'{ANSIBLE_AI_PROJECT_NAME}.', # noqa: F405 'DESCRIPTION': 'Equip the automation developer at Lightspeed.', 'VERSION': '0.0.8', 'SERVE_INCLUDE_SCHEMA': False, diff --git a/ansible_wisdom/main/templates/base.html b/ansible_wisdom/main/templates/base.html index b94f2aa58..0079437ed 100644 --- a/ansible_wisdom/main/templates/base.html +++ b/ansible_wisdom/main/templates/base.html @@ -2,7 +2,7 @@ - {% block title %}Ansible Lightspeed with IBM watsonx Code Assistant{% endblock title %} + {% block title %}{{ project_name }}{% endblock title %} {% block header %} {% endblock header %} @@ -15,7 +15,7 @@
-

NOTE: Due to overwhelming positive demand, we have extended the availability of the Ansible Lightspeed Technical Preview from December 31, 2023 to March 11, 2024.

+

NOTE: Due to overwhelming positive demand, we have extended the availability of the {{ project_name }} Technical Preview from December 31, 2023 to March 11, 2024.


{% endif %} @@ -25,7 +25,7 @@

- The Ansible Lightspeed Technical Preview is no longer available. For continued access to the commercial service, please see Getting started with Red Hat Ansible Lightspeed with IBM watsonx Code Assistant. + The {{ project_name }} Technical Preview is no longer available. For continued access to the commercial service, please see Getting started with {{ project_name }}.


diff --git a/ansible_wisdom/main/templates/console/console.html b/ansible_wisdom/main/templates/console/console.html index 6ed900f0d..d9ca3a68b 100644 --- a/ansible_wisdom/main/templates/console/console.html +++ b/ansible_wisdom/main/templates/console/console.html @@ -3,7 +3,7 @@ {% block header %} - Ansible Wisdom Lightspeed - Admin Portal + {{ project_name }} - Admin Portal {% endblock header %} diff --git a/ansible_wisdom/main/templates/console/denied.html b/ansible_wisdom/main/templates/console/denied.html index 565339b04..3214efc0b 100644 --- a/ansible_wisdom/main/templates/console/denied.html +++ b/ansible_wisdom/main/templates/console/denied.html @@ -3,7 +3,7 @@ {% block header %} - Ansible Wisdom Lightspeed - Admin Portal + {{ project_name }} - Admin Portal {% endblock header %} diff --git a/ansible_wisdom/main/templates/registration/login.html b/ansible_wisdom/main/templates/registration/login.html index 6dad682bf..50205d849 100644 --- a/ansible_wisdom/main/templates/registration/login.html +++ b/ansible_wisdom/main/templates/registration/login.html @@ -12,9 +12,9 @@
- Ansible Lightspeed logo + {{ project_name }} logo
-

Log in to Ansible Lightspeed with IBM watsonx Code Assistant

+

Log in to {{ project_name }}

{% if not user.is_authenticated %}
You are currently not logged in. Please log in using the button below.
@@ -27,7 +27,7 @@

Log in to Ansible Lightspeed with IBM watsonx Cod

{% endif %} -
+
Chat Documentation Status diff --git a/ansible_wisdom/main/views.py b/ansible_wisdom/main/views.py index c2a8a5d34..4d865e39c 100644 --- a/ansible_wisdom/main/views.py +++ b/ansible_wisdom/main/views.py @@ -25,6 +25,7 @@ def get_context_data(self, **kwargs): context['use_github_team'] = settings.USE_GITHUB_TEAM context["use_tech_preview"] = settings.ANSIBLE_AI_ENABLE_TECH_PREVIEW context["deployment_mode"] = settings.DEPLOYMENT_MODE + context["project_name"] = settings.ANSIBLE_AI_PROJECT_NAME return context def dispatch(self, request, *args, **kwargs): @@ -76,6 +77,7 @@ def get_template_names(self): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) + context["project_name"] = settings.ANSIBLE_AI_PROJECT_NAME user = self.request.user if user: context["user_name"] = user.username diff --git a/ansible_wisdom/users/templates/users/home.html b/ansible_wisdom/users/templates/users/home.html index 3f1507bf4..bd467c232 100644 --- a/ansible_wisdom/users/templates/users/home.html +++ b/ansible_wisdom/users/templates/users/home.html @@ -13,8 +13,8 @@

- You are a Red Hat organization administrator for Ansible Lightspeed. IBM watsonx Code Assistant model settings have not been configured for your organization. - Click here to access the Lightspeed admin portal to complete configuration. + You are a Red Hat organization administrator for {{ project_name }}. IBM watsonx Code Assistant model settings have not been configured for your organization. + Click here to access the {{ project_name }} admin portal to complete configuration.

{% elif user.rh_org_has_subscription and not user.rh_user_is_org_admin and org_has_api_key and not user.rh_user_has_seat %} @@ -23,7 +23,7 @@

- You do not have a licensed seat for Ansible Lightspeed and your organization has configured a commercial model. + You do not have a licensed seat for {{ project_name }} and your organization has configured a commercial model. Contact your Red Hat account organization administrator for more information on how to assign a named seat.

@@ -33,7 +33,7 @@

- You do not have a licensed seat for Ansible Lightspeed. You will be limited to features of the Lightspeed tech preview until you are assigned a named seat. + You do not have a licensed seat for {{ project_name }}. You will be limited to features of the {{ project_name }} tech preview until you are assigned a named seat. Contact your Red Hat account organization administrator for more information on how to assign a named seat.

@@ -55,7 +55,7 @@

-

Your organization doesn't have access to Ansible Lightspeed. +

Your organization doesn't have access to {{ project_name }}.

Contact your Red Hat Organization's administrator for more information. @@ -69,7 +69,7 @@

- You do not have a licensed seat for Ansible Lightspeed. + You do not have a licensed seat for {{ project_name }}.

Contact your Red Hat Organization's administrator for more information on how to get a licensed seat. @@ -82,8 +82,8 @@

-

You are a licensed Lightspeed user but your administrator has not configured the service for your organization. -

Contact your organization administrator to have them complete Lightspeed configuration. +

You are a licensed {{ project_name }} user but your administrator has not configured the service for your organization. +

Contact your organization administrator to have them complete {{ project_name }} configuration.

Contact your Red Hat Organization's administrator for more information. @@ -91,10 +91,10 @@

{% else %}
- Ansible Lightspeed logo + {{ project_name }} logo
-

Red Hat Ansible Lightspeed with IBM watsonx Code Assistant

+

{{ project_name }}

{% endif %} @@ -116,7 +116,7 @@

Red Hat Ansible Lightspeed with IBM watsonx Code Log in {% endif %} -
+
Chat Documentation Status diff --git a/ansible_wisdom/users/templates/users/unauthorized.html b/ansible_wisdom/users/templates/users/unauthorized.html index 0de9a2462..bbfdfd8e4 100644 --- a/ansible_wisdom/users/templates/users/unauthorized.html +++ b/ansible_wisdom/users/templates/users/unauthorized.html @@ -8,7 +8,7 @@
-

You currently do not have access to Ansible Lightspeed with IBM watsonx Code Assistant.

+

You currently do not have access to {{ project_name }}.

{% if user.is_authenticated %} Logout {% endif %} diff --git a/ansible_wisdom/users/tests/test_views.py b/ansible_wisdom/users/tests/test_views.py index 4df0dd279..f20e2b680 100644 --- a/ansible_wisdom/users/tests/test_views.py +++ b/ansible_wisdom/users/tests/test_views.py @@ -71,6 +71,7 @@ def test_rh_admin_with_seat_and_no_secret(self): self.assertContains(response, "Admin Portal", count=1) @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", False) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) def test_rh_admin_without_seat_and_with_no_secret_with_tech_preview(self): @@ -79,15 +80,14 @@ def test_rh_admin_without_seat_and_with_no_secret_with_tech_preview(self): self.assertNotContains(response, "Role:") self.assertContains(response, "pf-c-alert__title", count=1) self.assertNotContains(response, "Admin Portal") + self.assertNotContains(response, "Your organization doesn't have access to Project Name.") + self.assertNotContains(response, "You will be limited to features of the Project Name") self.assertNotContains( - response, "Your organization doesn't have access to Ansible Lightspeed." - ) - self.assertNotContains(response, "You will be limited to features of the Lightspeed") - self.assertNotContains( - response, "The Ansible Lightspeed Technical Preview is no longer available" + response, "The Project Name Technical Preview is no longer available" ) @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", False) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) def test_rh_admin_without_seat_and_with_no_secret_no_sub_without_tech_preview(self): @@ -96,12 +96,8 @@ def test_rh_admin_without_seat_and_with_no_secret_no_sub_without_tech_preview(se self.assertNotContains(response, "Role:") self.assertContains(response, "pf-c-alert__title") self.assertNotContains(response, "Admin Portal") - self.assertNotContains( - response, "Your organization doesn't have access to Ansible Lightspeed." - ) - self.assertContains( - response, "The Ansible Lightspeed Technical Preview is no longer available" - ) + self.assertNotContains(response, "Your organization doesn't have access to Project Name.") + self.assertContains(response, "The Project Name Technical Preview is no longer available") @override_settings(WCA_SECRET_DUMMY_SECRETS='1234567:valid') @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", True) @@ -129,6 +125,7 @@ def tearDown(self): super().tearDown() @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @override_settings(WCA_SECRET_DUMMY_SECRETS='') @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", True) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) @@ -137,15 +134,16 @@ def test_rh_user_without_seat_and_no_secret_with_tech_preview(self): self.assertEqual(response.status_code, 200) self.assertNotContains(response, "Role:") self.assertContains(response, "pf-c-alert__title", count=2) - self.assertContains(response, "You do not have a licensed seat for Ansible Lightspeed") - self.assertContains(response, "You will be limited to features of the Lightspeed") + self.assertContains(response, "You do not have a licensed seat for Project Name") + self.assertContains(response, "You will be limited to features of the Project Name") self.assertNotContains(response, "fas fa-exclamation-circle") self.assertNotContains(response, "Admin Portal") self.assertNotContains( - response, "The Ansible Lightspeed Technical Preview is no longer available" + response, "The Project Name Technical Preview is no longer available" ) @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @override_settings(WCA_SECRET_DUMMY_SECRETS='valid') @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", True) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) @@ -154,15 +152,16 @@ def test_rh_user_without_seat_with_secret_with_tech_preview(self): self.assertEqual(response.status_code, 200) self.assertNotContains(response, "Role:") self.assertContains(response, "pf-c-alert__title", count=2) - self.assertContains(response, "You do not have a licensed seat for Ansible Lightspeed") - self.assertContains(response, "You will be limited to features of the Lightspeed") + self.assertContains(response, "You do not have a licensed seat for Project Name") + self.assertContains(response, "You will be limited to features of the Project Name") self.assertNotContains(response, "fas fa-exclamation-circle") self.assertNotContains(response, "Admin Portal") self.assertNotContains( - response, "The Ansible Lightspeed Technical Preview is no longer available" + response, "The Project Name Technical Preview is no longer available" ) @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @override_settings(WCA_SECRET_DUMMY_SECRETS='') @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", True) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) @@ -171,12 +170,10 @@ def test_rh_user_without_seat_and_no_secret_without_tech_preview(self): self.assertEqual(response.status_code, 200) self.assertNotContains(response, "Role:") self.assertContains(response, "pf-c-alert__title", count=1) - self.assertContains(response, "You do not have a licensed seat for Ansible Lightspeed") - self.assertNotContains(response, "You will be limited to features of the Lightspeed") + self.assertContains(response, "You do not have a licensed seat for Project Name") + self.assertNotContains(response, "You will be limited to features of the Project Name") self.assertNotContains(response, "Admin Portal") - self.assertContains( - response, "The Ansible Lightspeed Technical Preview is no longer available" - ) + self.assertContains(response, "The Project Name Technical Preview is no longer available") @override_settings(WCA_SECRET_DUMMY_SECRETS='') @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", True) @@ -189,15 +186,14 @@ def test_rh_user_with_a_seat_and_no_secret(self): self.assertNotContains(response, "Admin Portal") @override_settings(WCA_SECRET_DUMMY_SECRETS='1234567:valid') + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", True) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", True) def test_rh_user_with_a_seat_and_with_secret(self): response = self.client.get(reverse("home")) self.assertEqual(response.status_code, 200) self.assertContains(response, "Role: licensed user") - self.assertContains( - response, "Red Hat Ansible Lightspeed with IBM watsonx Code Assistant

" - ) + self.assertContains(response, "Project Name") self.assertContains(response, "pf-c-alert__title", count=1) self.assertNotContains(response, "Admin Portal") @@ -213,18 +209,15 @@ def test_rh_user_with_no_seat_and_with_secret(self): self.assertNotContains(response, "Admin Portal") @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_wisdom.users.models.User, "rh_org_has_subscription", False) @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) def test_user_without_seat_and_with_secret_without_tech_preview(self): response = self.client.get(reverse("home")) self.assertEqual(response.status_code, 200) - self.assertContains( - response, "Your organization doesn't have access to Ansible Lightspeed." - ) + self.assertContains(response, "Your organization doesn't have access to Project Name.") self.assertContains(response, "fa-exclamation-circle") - self.assertContains( - response, "The Ansible Lightspeed Technical Preview is no longer available" - ) + self.assertContains(response, "The Project Name Technical Preview is no longer available") @override_settings(AUTHZ_BACKEND_TYPE='dummy') @@ -260,6 +253,7 @@ def test_docs_url_for_unseated_user_with_tech_preview(self): self.assertIn("https://community_docs", str(r.content)) @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=False) + @override_settings(ANSIBLE_AI_PROJECT_NAME="Project Name") @patch.object(ansible_wisdom.users.models.User, "rh_user_has_seat", False) def test_docs_url_for_unseated_user_without_tech_preview(self): self.user = create_user( @@ -269,7 +263,7 @@ def test_docs_url_for_unseated_user_without_tech_preview(self): self.client.login(username=self.user.username, password=self.password) r = self.client.get(reverse('home')) self.assertContains(r, "pf-c-alert__title", count=1) - self.assertContains(r, "Your organization doesn't have access to Ansible Lightspeed.") + self.assertContains(r, "Your organization doesn't have access to Project Name.") self.assertIn(settings.COMMERCIAL_DOCUMENTATION_URL, str(r.content)) @override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True) diff --git a/ansible_wisdom/users/views.py b/ansible_wisdom/users/views.py index 9b9e1ef2e..892ca2ddb 100644 --- a/ansible_wisdom/users/views.py +++ b/ansible_wisdom/users/views.py @@ -30,6 +30,7 @@ def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context["use_tech_preview"] = settings.ANSIBLE_AI_ENABLE_TECH_PREVIEW context["deployment_mode"] = settings.DEPLOYMENT_MODE + context["project_name"] = settings.ANSIBLE_AI_PROJECT_NAME try: secret_manager = apps.get_app_config("ai").get_wca_secret_manager() diff --git a/ansible_wisdom_console_react/README.md b/ansible_wisdom_console_react/README.md index 0ce929b8f..4a52a0555 100644 --- a/ansible_wisdom_console_react/README.md +++ b/ansible_wisdom_console_react/README.md @@ -1,4 +1,4 @@ -# Ansible Lightspeed "Admin Portal" +# Ansible AI Connect "Admin Portal" > **Warning:** `package.json homepage` setting. > @@ -8,7 +8,7 @@ ## Build from source -To start building the Ansible Lightspeed "Admin Portal" project, you're going to need: +To start building the "Admin Portal" project, you're going to need: - Node `18.0.0` or higher - npm `7.0.0` or higher @@ -50,4 +50,4 @@ This can be accomplished using `make admin-portal-bundle`. The `wisdom-service.Containerfile` is configured to compile and link the "Admin Portal" into the container image. This is used by both the GitHub Action `Build_Push_Image.yml`, `make build-wisdom-container` and `make docker-compose`. -Ansible Lightspeed container images built by our Continuous Integration pipeline on GitHub should therefore be pre-configured to include the "Admin Portal". +Container images built by our Continuous Integration pipeline on GitHub should therefore be pre-configured to include the "Admin Portal". diff --git a/ansible_wisdom_console_react/public/denied.html b/ansible_wisdom_console_react/public/denied.html index 20d75bad4..9647a92a9 100644 --- a/ansible_wisdom_console_react/public/denied.html +++ b/ansible_wisdom_console_react/public/denied.html @@ -3,8 +3,8 @@ - Ansible Lightspeed Console - + Ansible AI Connect Console + diff --git a/ansible_wisdom_console_react/public/index.html b/ansible_wisdom_console_react/public/index.html index 83514c5f4..36688dc0e 100644 --- a/ansible_wisdom_console_react/public/index.html +++ b/ansible_wisdom_console_react/public/index.html @@ -3,8 +3,8 @@ - Ansible Lightspeed Console - + Ansible AI Connect Console + diff --git a/tools/openapi-schema/ansible-wisdom-service.yaml b/tools/openapi-schema/ansible-wisdom-service.yaml index 6a217963e..411affb8e 100644 --- a/tools/openapi-schema/ansible-wisdom-service.yaml +++ b/tools/openapi-schema/ansible-wisdom-service.yaml @@ -1,6 +1,6 @@ openapi: 3.0.3 info: - title: Ansible Lightspeed with IBM watsonx Code Assistant. + title: Ansible AI Connect. version: 0.0.8 description: Equip the automation developer at Lightspeed. paths: @@ -586,7 +586,7 @@ paths: /check/: get: operationId: check_retrieve - description: Lightspeed Service Liveness Probe View + description: Service Liveness Probe View summary: Liveness probe tags: - check @@ -599,7 +599,7 @@ paths: /check/status/: get: operationId: check_status_retrieve - description: Lightspeed Service Health Check + description: Service Health Check summary: Health check with backend server status tags: - check @@ -1002,7 +1002,7 @@ components: type: string title: Additional Comment description: Additional comment describing why the change - was required in Lightspeed suggestion. + was required in suggestion. required: - expectedSuggestion - prompt diff --git a/tools/scripts/launch-wisdom.sh b/tools/scripts/launch-wisdom.sh index cc1405761..edcdf55cf 100755 --- a/tools/scripts/launch-wisdom.sh +++ b/tools/scripts/launch-wisdom.sh @@ -31,7 +31,7 @@ if [ "${DEPLOYMENT_MODE}" == "upstream" ]; then /var/www/venv/bin/python ansible_wisdom/manage.py createtoken --username testuser --password testuser --token-name testuser_token --create-user fi if [ ! "${DEPLOYMENT_MODE}" == "saas" ]; then - /var/www/venv/bin/wisdom-manage createapplication --name "Ansible Lightspeed for VS Code" --client-id Vu2gClkeR5qUJTUGHoFAePmBznd6RZjDdy5FW2wy --redirect-uris "vscode://redhat.ansible vscodium://redhat.ansible vscode-insiders://redhat.ansible code-oss://redhat.ansible checode://redhat.ansible" public authorization-code + /var/www/venv/bin/wisdom-manage createapplication --name "${ANSIBLE_AI_PROJECT_NAME:-Ansible AI Connect} for VS Code" --client-id Vu2gClkeR5qUJTUGHoFAePmBznd6RZjDdy5FW2wy --redirect-uris "vscode://redhat.ansible vscodium://redhat.ansible vscode-insiders://redhat.ansible code-oss://redhat.ansible checode://redhat.ansible" public authorization-code fi /var/www/venv/bin/wisdom-manage collectstatic --noinput