diff --git a/promgen/locale/ja/LC_MESSAGES/django.po b/promgen/locale/ja/LC_MESSAGES/django.po index a13701c8f..c06544ec7 100644 --- a/promgen/locale/ja/LC_MESSAGES/django.po +++ b/promgen/locale/ja/LC_MESSAGES/django.po @@ -172,3 +172,7 @@ msgstr "Serviceを登録" #: templates/promgen/project_detail_hosts.html:49 msgid "Silence selected hosts" msgstr "選択したHostをSilence" + +#: templates/promgen/service_detail.html:23 +msgid "Actions" +msgstr "Actions" diff --git a/promgen/static/css/promgen.css b/promgen/static/css/promgen.css index d106ccbc3..ba90ccfd9 100644 --- a/promgen/static/css/promgen.css +++ b/promgen/static/css/promgen.css @@ -81,6 +81,19 @@ a[rel]:after { cursor: pointer; } + +/* service-detail */ +.promgen-flex-space-between-center { + display: flex; + align-items: center; + justify-content: space-between; +} + +hr { + margin-top: 5px !important; + margin-bottom: 5px !important; +} + /* Margin Top */ .mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 0.25rem !important; } diff --git a/promgen/templates/promgen/service_action_button_group.html b/promgen/templates/promgen/service_action_button_group.html new file mode 100644 index 000000000..77bf524fd --- /dev/null +++ b/promgen/templates/promgen/service_action_button_group.html @@ -0,0 +1,48 @@ +{% load i18n %} +{% load promgen %} + + +
+
+ + +
+ {% translate "Silence" %} + + {% translate "Edit Service" %} + +
diff --git a/promgen/templates/promgen/service_block.html b/promgen/templates/promgen/service_block.html index 7d768bc6d..d27003cb8 100644 --- a/promgen/templates/promgen/service_block.html +++ b/promgen/templates/promgen/service_block.html @@ -33,50 +33,19 @@
-
+ -
{% csrf_token %} - - - -
+ {% include "promgen/service_action_button_group.html" %} -
- - -
- - {% trans "Edit Service" %} - {% trans "Silence" %} - - - -
- {% csrf_token %} - -
@@ -89,7 +58,7 @@
diff --git a/promgen/templates/promgen/service_block_projects.html b/promgen/templates/promgen/service_block_projects.html index fd4540a03..bde08579b 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 556b8e1b6..890358e0d 100644 --- a/promgen/templates/promgen/service_detail.html +++ b/promgen/templates/promgen/service_detail.html @@ -8,15 +8,66 @@ {% block content %} -