update project list template to only show valid projects

Not all projects have project guides, so only link to the ones that do
have the guides.

Change-Id: I9367a5a257d7b19f333c6fb5f71865e818602667
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-09-12 13:31:42 -04:00
parent 3ec2574f2f
commit e873abafbe
2 changed files with 12 additions and 6 deletions

View File

@ -282,6 +282,12 @@ def load_project_data(source_directory,
for project in raw_data:
deliverable_name = project.get('deliverable-name', project['name'])
# Set the defaults for the flags so that the templates can
# assume the flags with true defaults are defined.
for url_info in _URLS:
if url_info.flag_name not in project:
project[url_info.flag_name] = url_info.default
if (series == 'latest' and
deliverable_name not in governed_deliverables):
msg = ('{} is no longer part of an official project, '

View File

@ -30,7 +30,7 @@
<div class="docs-link-sections">
<h3><i class="fa fa-cog"></i>OpenStack Services</h3>
{% for project in projects|sort(attribute='service') %}
{% if project.type in ['service', 'other'] %}
{% if project.type in ['service', 'other'] and project.has_project_guide %}
<a href="/{{project.name}}/{{SERIES}}/">
{{project.service}} ({{project.name}})</a><br />
{% endif %}
@ -40,7 +40,7 @@
<div class="docs-link-sections">
<h3><i class="fa fa-cog"></i>Bare Metal Sub Projects</h3>
{% for project in projects|sort(attribute='service') %}
{% if project.type == 'baremetal' %}
{% if project.type == 'baremetal' and project.has_project_guide %}
<a href="/{{project.name}}/{{SERIES}}/">
{{project.service}} ({{project.name}})</a><br />
{% endif %}
@ -50,7 +50,7 @@
<div class="docs-link-sections">
<h3><i class="fa fa-cog"></i>Networking Sub Projects</h3>
{% for project in projects|sort(attribute='service') %}
{% if project.type == 'networking' %}
{% if project.type == 'networking' and project.has_project_guide %}
<a href="/{{project.name}}/{{SERIES}}/">
{{project.service}} ({{project.name}})</a><br />
{% endif %}
@ -60,7 +60,7 @@
<div class="docs-link-sections">
<h3><i class="fa fa-cog"></i>Deployment Projects</h3>
{% for project in projects|sort(attribute='service') %}
{% if project.type == 'deployment' %}
{% if project.type == 'deployment' and project.has_project_guide %}
<a href="/{{project.name}}/{{SERIES}}/">
{{project.service}}</a><br />
{% endif %}
@ -72,7 +72,7 @@
<div class="docs-link-sections">
<h3><i class="fa fa-cog"></i>Contributor Tools</h3>
{% for project in projects|sort(attribute='name') %}
{% if project.type in ['tool'] %}
{% if project.type in ['tool'] and project.has_project_guide %}
<a href="/{{project.name}}/{{SERIES}}/">{{project.name}}</a><br />
<p>{{project.service}} </p>
{% endif %}
@ -85,7 +85,7 @@
<div class="docs-link-sections">
<h3><i class="fa fa-pencil"></i>Using Libraries</h3>
{% for project in projects|sort(attribute='name') %}
{% if project.type == 'library' %}
{% if project.type == 'library' and project.has_project_guide %}
<a href="/{{project.name}}/{{SERIES}}/">{{project.name}}</a><br />
<p>{{project.service}}</p>
{% endif %}