Skip to content

Commit

Permalink
remove some legacy tech_preview related logic
Browse files Browse the repository at this point in the history
  • Loading branch information
goneri committed Sep 11, 2024
1 parent 88fad3e commit d71bf42
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 36 deletions.
9 changes: 0 additions & 9 deletions ansible_ai_connect/main/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@

<body>
{% block banner %}
{% if use_tech_preview %}
<div class="pf-c-alert pf-m-warning ls_tech_preview_banner">
<div class="pf-c-alert__icon">
<i class="fas fa-fw fa-exclamation-triangle" aria-hidden="true"></i>
</div>
<p class="pf-c-alert__title ls_font_normal"><b>NOTE</b>: Due to overwhelming positive demand, we have extended the availability of the {{ project_name }} Technical Preview from December 31, 2023 to <b>March 11, 2024</b>.</p>
</div>
<br />
{% endif %}
{% endblock banner %}
{% if messages %}
<ul class="messages">
Expand Down
9 changes: 0 additions & 9 deletions ansible_ai_connect/main/templates/registration/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ <h1 class="pf-c-title pf-m-lg">Log in to {{ project_name }}</h1>
{% if deployment_mode == 'saas' and user.is_authenticated and user.rh_org_has_subscription and user.rh_user_is_org_admin %}
<a class="pf-l-level__item" href="/console"><span class="fas fa-solid fa-cog"></span> Admin Portal</a>
{% endif %}
{% if not user.is_authenticated %}
{% if use_tech_preview %}
{% if use_github_team %}
<a class="pf-l-level__item" href="{% url 'social:begin' 'github-team' %}{% if next %}?next={{ next|urlencode }}{% endif %}"><span class="fas fa-sign-in-alt"></span> Log in to Tech Preview</a>
{% else %}
<a class="pf-l-level__item" href="{% url 'social:begin' 'github' %}{% if next %}?next={{ next|urlencode }}{% endif %}"><span class="fas fa-sign-in-alt"></span> Log in to Tech Preview</a>
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
</div>
Expand Down
5 changes: 0 additions & 5 deletions ansible_ai_connect/main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
class LoginView(auth_views.LoginView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
try:
context["use_github_team"] = bool(settings.SOCIAL_AUTH_GITHUB_TEAM_KEY)
except AttributeError:
context["use_github_team"] = False
context["use_tech_preview"] = settings.ANSIBLE_AI_ENABLE_TECH_PREVIEW
context["deployment_mode"] = settings.DEPLOYMENT_MODE
context["project_name"] = settings.ANSIBLE_AI_PROJECT_NAME
context["aap_api_provider_name"] = settings.AAP_API_PROVIDER_NAME
Expand Down
16 changes: 3 additions & 13 deletions ansible_ai_connect/users/templates/users/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@
Contact your Red Hat account organization administrator for more information on how to assign a named seat.
</p>
</div>
{% elif use_tech_preview and user.rh_org_has_subscription and not user.rh_user_has_seat %}
<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">
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.
</p>
</div>
{% endif %}

<section class="pf-c-page__main-section pf-m-light">
Expand All @@ -47,7 +37,7 @@
<div class="pf-c-empty-state__content">

{# https://issues.redhat.com/browse/AAP-18386 #}
{% if user.is_authenticated and not use_tech_preview and not user.rh_user_is_org_admin and not user.rh_org_has_subscription %}
{% if user.is_authenticated and not user.rh_user_is_org_admin and not user.rh_org_has_subscription %}
<span class="pf-c-icon pf-m-xl pf-m-inline">
<span class="pf-c-icon__content pf-m-danger">
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
Expand All @@ -62,7 +52,7 @@ <h1 class="pf-c-title pf-m-lg">
</div>

{# https://issues.redhat.com/browse/AAP-22398 #}
{% elif user.is_authenticated and not use_tech_preview and user.rh_user_is_org_admin and not user.rh_org_has_subscription %}
{% elif user.is_authenticated and user.rh_user_is_org_admin and not user.rh_org_has_subscription %}
<span class="pf-c-icon pf-m-xl pf-m-inline">
<span class="pf-c-icon__content pf-m-danger">
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
Expand All @@ -76,7 +66,7 @@ <h1 class="pf-c-title pf-m-lg">
<p>You do not have an Active subscription to Ansible Automation Platform which is required to use {{ project_name }}.
</div>

{% elif user.is_authenticated and not use_tech_preview and user.rh_org_has_subscription and not user.rh_user_has_seat %}
{% elif user.is_authenticated and user.rh_org_has_subscription and not user.rh_user_has_seat %}
<span class="pf-c-icon pf-m-xl pf-m-inline">
<span class="pf-c-icon__content pf-m-danger">
<i class="fas fa-exclamation-circle" aria-hidden="true"></i>
Expand Down

0 comments on commit d71bf42

Please sign in to comment.