Skip to content

Commit

Permalink
Add neck to the multihead setup
Browse files Browse the repository at this point in the history
  • Loading branch information
matejak committed Feb 6, 2024
1 parent 58079e8 commit c414d67
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
1 change: 0 additions & 1 deletion estimage/plugins/redhat_compliance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Statuses="Statuses",
Workloads="Workloads",
)
# TEMPLATE_EXPORTS = dict(base="rhc-base.html")


QUARTER_TO_MONTH_NUMBER = None
Expand Down
6 changes: 3 additions & 3 deletions estimage/webapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def supply_with_plugins(self, head, plugins_dict):
self._populate_template_overrides_map(plugins_dict, self._template_overrides_maps[head])

def translate_path(self, template_name):
head = self.current_head
maybe_overriden_path = self._template_overrides_maps[head].get(template_name, template_name)
return maybe_overriden_path
if self.current_head in self.NON_HEAD_BLUEPRINTS:
return template_name
return self._template_overrides_maps[self.current_head].get(template_name, template_name)

def store_plugins_to_config(self, head):
self.config["head"][head]["classes"] = self._plugin_resolvers[head].class_dict
Expand Down
24 changes: 24 additions & 0 deletions estimage/webapp/templates/portal.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{% extends "base.html" %}

{% from 'bootstrap5/form.html' import render_form %}

{% block navbar_common %}
{% endblock %}

{% block content %}
<h1>Available Heads</h1>
<div class="container">
{% for name, summary in summaries.items() -%}
<div class="row">
<h1>{{ name }}</h1>
{%- if summary %}
<p>
{{ summary }}
</p>
{% endif -%}
<a href="{{ url_for(name ~ '.main.index') }}">link</a>
</div>
{% endfor -%}
</div>
{% endblock %}

0 comments on commit c414d67

Please sign in to comment.