fix template conditions

This commit is contained in:
Jordan Blasenhauer 2024-03-05 13:12:19 +01:00
parent f0693329b6
commit dd69d82322
3 changed files with 7 additions and 7 deletions

View file

@ -56,7 +56,7 @@
</div>
{% set global_info = {
"message" : "Pro version" if is_pro_version else "Pro version but exceeding services" if pro_status == "active" and pro_overlapped else "Pro version is expired" if pro_status == "expired" else "Pro version suspended" if pro_status == "suspended" else "You are using free version",
"link_message" : "All features available" if is_pro_version else "Awaiting compliance" if pro_status == "active" and pro_overlapped "Renew license" if pro_status == "expired" else "Talk to team" if pro_status == "suspended" else "Upgrade to pro",
"link_message" : "All features available" if is_pro_version else "Awaiting compliance" if pro_status == "active" and pro_overlapped else "Renew license" if pro_status == "expired" else "Talk to team" if pro_status == "suspended" else "Upgrade to pro",
"icon" : "pro" if is_pro_version else "free"
} %}
<div data-tab-item="global"
@ -108,9 +108,9 @@
{% endif %}
{% if not is_pro_version and pro_status == "active" and pro_overlapped %}
<div class="mt-2 flex flex-col justify-center items-center">
<p class="my-2 mr-2 text-red-500 text-center">
You have more services than your license allows. Delete or draft some services to reach the number of {{ pro_services }} services.
</p>
<p class="my-2 mr-2 text-red-500 text-center">
You have more services than your license allows. Delete or draft some services to reach the number of {{ pro_services }} services.
</p>
</div>
{% endif %}
</div>

View file

@ -1,9 +1,9 @@
{% extends "base.html" %}
{% block content %}
{% set cards = [
{'name' : 'Version', 'title' : "PRO" if is_pro_version else "PRO LOCKED" if pro_status == "active" and pro_overlapped else "EXPIRED" if pro_status == "expired" else "SUSPENDED" if pro_status == "suspended" else "FREE", 'link' : 'https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui#pro', 'subtitle' : "all features available" if is_pro_version else "awaiting compliance" if pro_status == "active" and pro_overlapped "renew license" if pro_status == "expired" else "talk to team" if pro_status == "suspended" else "upgrade to pro", 'subtitle_color' : 'success' if is_pro_version else 'warning' },
{'name' : 'Version', 'title' : 'PRO' if is_pro_version else 'PRO LOCKED' if pro_status == 'active' and pro_overlapped else 'EXPIRED' if pro_status == 'expired' else 'SUSPENDED' if pro_status == 'suspended' else 'FREE', 'link' : 'https://panel.bunkerweb.io/?utm_campaign=self&utm_source=ui#pro', 'subtitle' : 'all features available' if is_pro_version else 'awaiting compliance' if pro_status == 'active' and pro_overlapped else 'renew license' if pro_status == 'expired' else 'talk to team' if pro_status == 'suspended' else 'upgrade to pro', 'subtitle_color' : 'success' if is_pro_version else 'warning' },
{'name' : 'Version number', 'title' : version, 'link' : 'https://github.com/bunkerity/bunkerweb', 'subtitle' : "couldn'd fint remote" if not remote_version else "latest version" if remote_version and check_version else 'Update to ' + remote_version , 'subtitle_color' : "error" if not remote_version else "success" if remote_version and check_version else 'warning'},
{'name' : 'Instances', 'title' : instances_number, 'link' : 'loading?next=' + url_for('instances') , 'subtitle' : instance_health_count|string + ' / ' + instances_number|string + ' is working' , 'subtitle_color' : "info",},
{'name' : 'Instances', 'title' : instances_number, 'link' : 'loading?next=' + url_for('instances') , 'subtitle' : instance_health_count|string + ' / ' + instances_number|string + ' is working' , 'subtitle_color' : "info"},
{'name' : 'Services', 'title' : services_number, 'link' : 'loading?next=' + url_for('services') , 'subtitle' : services_ui_count|string + ' ui, ' + services_scheduler_count|string + ' scheduler, ' + services_autoconf_count|string + ' autoconf ' , 'subtitle_color' : "info"},
{'name' : 'Plugins', 'title' : config["CONFIG"].get_plugins()|length, 'link' : 'loading?next=' + url_for('plugins') , 'subtitle' : plugins_errors|string + ' errors' if plugins_errors > 0 else 'no error' , 'subtitle_color' : "error" if plugins_errors > 0 else 'success'}
] %}

View file

@ -23,7 +23,7 @@
{% endfor %}
{% if plugins_count_pro > 0 and not is_pro_version %}
<p class="ml-2 mt-0 mb-2 mr-2 text-red-500 font-bold dark:brightness-95 text-sm">
You have pro plugins without pro version.
You have pro plugins without active pro version.
</p>
{% endif %}
</div>