Skip to content

Commit

Permalink
AAP-24584: Remove the banner about tech preview being over (#1069)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Anstis <[email protected]>
  • Loading branch information
manstis and manstis authored May 28, 2024
1 parent c7886ee commit b858d5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
11 changes: 0 additions & 11 deletions ansible_wisdom/main/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@
</div>
<br />
{% endif %}
{% if not use_tech_preview %}
<div class="pf-c-alert pf-m-info" aria-label="Information alert">
<div class="pf-c-alert__icon">
<i class="fas fa-fw fa-info-circle" aria-hidden="true"></i>
</div>
<p class="pf-c-alert__title">
The {{ project_name }} Technical Preview is no longer available. For continued access to the commercial service, please see <a class="pf-l-level__item" href="https://www.redhat.com/en/blog/getting-started-red-hat-ansible-lightspeed-ibm-watsonx-code-assistant" target="_blank" rel="noopener"><span class="fas fa-sharp fa-solid fa-external-link-alt"></span>Getting started with {{ project_name }}</a>.
</p>
</div>
<br />
{% endif %}
{% endblock banner %}
{% if messages %}
<ul class="messages">
Expand Down
11 changes: 1 addition & 10 deletions ansible_wisdom/users/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def test_unauthorized(self):
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Please log in using the button below.", count=1)
self.assertNotContains(response, "Role:")
self.assertContains(response, "pf-c-alert__title", count=1)
self.assertNotContains(response, "Admin Portal")

@override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True)
Expand Down Expand Up @@ -81,7 +80,7 @@ def test_rh_admin_with_seat_and_no_secret(self):
response = self.client.get(reverse("home"))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Role: administrator, licensed user")
self.assertContains(response, "pf-c-alert__title", count=2)
self.assertContains(response, "pf-c-alert__title", count=1)
self.assertContains(response, "model settings have not been configured", count=1)
self.assertContains(response, "Admin Portal", count=1)

Expand All @@ -108,14 +107,12 @@ def test_rh_admin_without_seat_and_with_no_secret_with_tech_preview(self):
def test_rh_admin_without_seat_and_with_no_secret_no_sub_without_tech_preview(self):
response = self.client.get(reverse("home"))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "pf-c-alert__title")
self.assertContains(response, "Your organization doesn't have access to Project Name.")
self.assertContains(
response,
"You do not have an Active subscription to Ansible Automation Platform "
"which is required to use Project Name.",
)
self.assertContains(response, "The Project Name Technical Preview is no longer available")
self.assertContains(response, "Role: administrator")
self.assertContains(response, "Admin Portal")

Expand All @@ -126,7 +123,6 @@ def test_rh_admin_with_a_seat_and_with_secret(self):
response = self.client.get(reverse("home"))
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Role: administrator, licensed user")
self.assertContains(response, "pf-c-alert__title", count=1)
self.assertContains(response, "Admin Portal")


Expand Down Expand Up @@ -189,11 +185,9 @@ def test_rh_user_without_seat_and_no_secret_without_tech_preview(self):
response = self.client.get(reverse("home"))
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 Project Name")
self.assertNotContains(response, "You will be limited to features of the Project Name")
self.assertNotContains(response, "Admin Portal")
self.assertContains(response, "The Project Name Technical Preview is no longer available")

@override_settings(WCA_SECRET_DUMMY_SECRETS='')
@patch.object(ansible_ai_connect.users.models.User, "rh_org_has_subscription", True)
Expand All @@ -214,7 +208,6 @@ def test_rh_user_with_a_seat_and_with_secret(self):
self.assertEqual(response.status_code, 200)
self.assertContains(response, "Role: licensed user")
self.assertContains(response, "Project Name</h1>")
self.assertContains(response, "pf-c-alert__title", count=1)
self.assertNotContains(response, "Admin Portal")

@override_settings(ANSIBLE_AI_ENABLE_TECH_PREVIEW=True)
Expand All @@ -241,7 +234,6 @@ def test_user_without_seat_and_with_secret_without_tech_preview(self):
response, "Contact your Red Hat Organization's administrator for more information."
)
self.assertContains(response, "fa-exclamation-circle")
self.assertContains(response, "The Project Name Technical Preview is no longer available")


@override_settings(AUTHZ_BACKEND_TYPE='dummy')
Expand Down Expand Up @@ -286,7 +278,6 @@ 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 Project Name.")
self.assertIn(settings.COMMERCIAL_DOCUMENTATION_URL, str(r.content))

Expand Down

1 comment on commit b858d5e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClamAV Virus Definition DB Files:
----
total 228984
-rw-r--r--  1 root root        28 May 28 06:07 whitelist.ign2
-rw-r--r--  1 root root 170479789 May 28 06:08 main.cvd
-rw-r--r--  1 root root        69 May 28 06:07 freshclam.dat
-rw-r--r--  1 root root  63685486 May 28 06:07 daily.cvd
-rw-r--r--  1 root root    289733 May 28 06:08 bytecode.cvd
drwxr-xr-x 16 root root      4096 May 28 12:20 ..
drwxr-xr-x  2 root root      4096 May 28 12:20 .
----
File: /var/lib/clamav/bytecode.cvd
Build time: 27 Feb 2024 10:37 -0500
Version: 335
Signatures: 86
Functionality level: 90
Builder: raynman
MD5: 16d388f042f5c44628a66228df427c20
Digital signature: 7fD3mweaw4tqQH9Dl7ZewBLXZBSrLKX5no/rYN/6NQBmhnWUyTBt3uzd7ZjEnIT5yN1ygLwsDcuzoKRoA+syrfk3PcDHf5/h6Wb/d8uikXSALygH5VYAPo2ksV5Pitn3reECJ90q2m9m0CH2VpT1tDkkcVi05LLV5PwBle2Ufpe
Verification OK.
----
File: /var/lib/clamav/daily.cvd
Build time: 27 May 2024 04:29 -0400
Version: 27288
Signatures: 2061829
Functionality level: 90
Builder: raynman
MD5: 9eac0d4a0279d4a14dc57108e6b1d78a
Digital signature: oaQevAiBsZTVuBp7fu9o7lR/xkJIb0y3m6O1pM7k9cvR4RFJ7vb6m8pFYqY+leMyoXVFjmz+QU6hTZhoKkqjBfSYmDFp0gYUQVC8rq99qzMFWC6qX5E7igOTikIGpGhno8vgvKqEqh6w0pPV8B8KD8TElgKJd+IeGB+UwUP9Jrf
Verification OK.
----
File: /var/lib/clamav/main.cvd
Build time: 16 Sep 2021 08:32 -0400
Version: 62
Signatures: 6647427
Functionality level: 90
Builder: sigmgr
MD5: 137eccce31aacb21b5a98bb8c21cefd6
Digital signature: twaJBls8V5q64R7QY10AatEtPNuPWoVoxTaNO1jpBg7s5jIMMXpitgG1000YLp6rb0TWkEKjRqxneGTxuxWaWm7XBjsgwX2BRWh/y4fhs7uyImdKRLzQ5y8e2EkSChegF/i8clqfn+1qetq9j4gbktJ3JZpOXPoHlyr2Dv9S/Bg
Verification OK.
----
Scanning Results:
ClamAV 1.0.6/27288/Mon May 27 08:29:01 2024
LibClamAV Warning: Max file-size was set to 4194304000 bytes. Unfortunately, scanning files greater than 2147483647 bytes (2 GiB - 1) is not supported.

----------- SCAN SUMMARY -----------
Known viruses: 8693656
Engine version: 1.0.6
Scanned directories: 31514
Scanned files: 194737
Infected files: 0
Data scanned: 6716.05 MB
Data read: 3521.66 MB (ratio 1.91:1)
Time: 1417.235 sec (23 m 37 s)
Start Date: 2024:05:28 12:22:05
End Date:   2024:05:28 12:45:42

Please sign in to comment.