diff --git a/promgen/templates/promgen/service_block.html b/promgen/templates/promgen/service_block.html index f4958c26..46c843b1 100644 --- a/promgen/templates/promgen/service_block.html +++ b/promgen/templates/promgen/service_block.html @@ -51,26 +51,9 @@ - {% if service.rule_set.count or request.site.rule_set.count %} -
- - {% include "promgen/rule_header.html" %} - {% include "promgen/rule_block.html" with rule_list=service.rule_set.all toggle=1 delete=1 %} - {% include "promgen/rule_block.html" with rule_list=request.site.rule_set.all collapse="service-site-rules-" overwrite_type='service' overwrite_id=service.id %} -
- -
- {% endif %} + {% include "promgen/service_block_panel_rules.inc.html" %} - {% if service.notifiers.count %} -
- {% include "promgen/notifier_block.html" with object=service show_edit=1 %} -
- {% endif %} + {% include "promgen/service_block_panel_notifiers.inc.html" %} {% include "promgen/service_block_projects.html" with project_list=project_list|default:service.project_set.all service=service only %} diff --git a/promgen/templates/promgen/service_block_panel_notifiers.inc.html b/promgen/templates/promgen/service_block_panel_notifiers.inc.html new file mode 100644 index 00000000..608beb4e --- /dev/null +++ b/promgen/templates/promgen/service_block_panel_notifiers.inc.html @@ -0,0 +1,7 @@ +{% load promgen %} + +{% if service.notifiers.count %} +
+ {% include "promgen/notifier_block.html" with object=service show_edit=1 %} +
+{% endif %} diff --git a/promgen/templates/promgen/service_block_panel_rules.inc.html b/promgen/templates/promgen/service_block_panel_rules.inc.html new file mode 100644 index 00000000..5b3c6095 --- /dev/null +++ b/promgen/templates/promgen/service_block_panel_rules.inc.html @@ -0,0 +1,17 @@ +{% load i18n %} +{% load promgen %} + +{% if service.rule_set.count or request.site.rule_set.count %} +
+ + {% include "promgen/rule_header.html" %} + {% include "promgen/rule_block.html" with rule_list=service.rule_set.all toggle=1 delete=1 %} + {% include "promgen/rule_block.html" with rule_list=request.site.rule_set.all collapse="service-site-rules-" overwrite_type='service' overwrite_id=service.id %} +
+ +
+{% endif %} diff --git a/promgen/templates/promgen/service_block_projects.html b/promgen/templates/promgen/service_block_projects.html index fd4540a0..bde08579 100644 --- a/promgen/templates/promgen/service_block_projects.html +++ b/promgen/templates/promgen/service_block_projects.html @@ -10,30 +10,8 @@ ( {{shard.url}} ) {% trans "Register Project" %} - - - - - - - - {% for project in shard_projects %} - {% if service.notifiers.count == 0 and project.notifiers.count == 0 %} - - - - {% endif %} + {% include 'promgen/service_detail_projects_table.html' with shard_projects=shard_projects service=service %} - {% include 'promgen/project_row.html' %} - {% empty %} - - - - {% endfor %} -
ProjectExportersNotifiersActions
- - {% trans "No notifications configured for this project. Please configure some" %} -
No Projects?
{% endfor %} diff --git a/promgen/templates/promgen/service_detail.html b/promgen/templates/promgen/service_detail.html index 556b8e1b..361aaad0 100644 --- a/promgen/templates/promgen/service_detail.html +++ b/promgen/templates/promgen/service_detail.html @@ -8,15 +8,51 @@ {% block content %} -