Skip to content

Commit

Permalink
add new line
Browse files Browse the repository at this point in the history
trans tag was renamed to translate

revert button name changing

Update button type

Co-authored-by: Paul Traylor <kungfudiscomonkey@gmail.com>

pull out service_action_button to new template

Bump docker/build-push-action from 5.3.0 to 6.1.0

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.3.0 to 6.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@v5.3.0...v6.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump actions/checkout from 4.1.6 to 4.1.7

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4.1.6...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
bai1024 committed Jul 3, 2024
1 parent 1936946 commit 29772b5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 38 deletions.
6 changes: 1 addition & 5 deletions promgen/locale/ja/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ msgstr "Serviceを登録"
msgid "Silence selected hosts"
msgstr "選択したHostをSilence"

#: templates/promgen/service_detail.html:52
msgid "Edit"
msgstr "Serviceを編集"

#: templates/promgen/service_detail.html:23
msgid "Actions"
msgstr "Actions"
msgstr "Actions"
28 changes: 28 additions & 0 deletions promgen/templates/promgen/service_action_button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{% load i18n %}
{% load promgen %}

<div class="btn-group btn-group-sm" role="group" aria-label="...">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% translate "Actions" %} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li role="presentation"><a href="{% urlqs 'audit-list' service=service.id %}">{% translate "Edit History" %}</a></li>
<li role="presentation"><a href="{% urlqs 'alert-list' service=service.name %}">{% translate "Alert History" %}</a></li>

<hr>

<li role="presentation"><a href="{% url 'api:service-rules' name=service.name %}">{% translate "Export Rules" %}</a></li>
<li role="presentation"><a href="{% url 'api:service-targets' name=service.name %}">{% translate "Export Service" %}</a></li>

<hr>

<li role="presentation">
<a href="">
<form method="post" action="{% url 'service-delete' service.id %}" onsubmit="return confirm('{% translate "Delete this service?" %}')" style="display: inline">
{% csrf_token %}
<button style="background:none;border: none;padding: 0;">{% translate "Delete Service" %}</button>
</form>
</a>
</li>
</ul>
</div>
38 changes: 7 additions & 31 deletions promgen/templates/promgen/service_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,17 @@
<div>
<h1>Service: {{ service.name }}</h1>
{% if service.owner %}
<p>{% trans 'Contact' %}: {{service.owner.username}}</p>
<p>{% translate 'Contact' %}: {{service.owner.username}}</p>
{% endif %}
</div>

<div>

<div class="btn-group btn-group-sm" role="group" aria-label="...">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{% trans "Actions" %} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li role="presentation"><a href="{% urlqs 'audit-list' service=service.id %}">{% trans "Edit History" %}</a></li>
<li role="presentation"><a href="{% urlqs 'alert-list' service=service.name %}">{% trans "Alert History" %}</a></li>
{% include "promgen/service_action_button.html" %}

<hr>
<a @click="setSilenceDataset" data-service="{{service.name}}" class="btn btn-warning btn-sm ml-2 mr-2">{% translate "Silence" %}</a>

<li role="presentation"><a href="{% url 'api:service-rules' name=service.name %}">{% trans "Export Rules" %}</a></li>
<li role="presentation"><a href="{% url 'api:service-targets' name=service.name %}">{% trans "Export Service" %}</a></li>

<hr>

<li role="presentation">
<a href="">
<form method="post" action="{% url 'service-delete' service.id %}" onsubmit="return confirm('{% trans "Delete this service?" %}')" style="display: inline">
{% csrf_token %}
<button style="background:none;border: none;padding: 0;">{% trans "Delete Service" %}</button>
</form>
</a>
</li>
</ul>
</div>

<a @click="setSilenceDataset" data-service="{{service.name}}" class="btn btn-warning btn-sm ml-2 mr-2">{% trans "Silence" %}</a>

<a href="{% url 'service-update' service.id %}" class="btn btn-primary btn-sm">{% trans "Edit" %}</a>
<a href="{% url 'service-update' service.id %}" class="btn btn-warning btn-sm">{% translate "Edit Service" %}</a>

</div>
</div>
Expand All @@ -68,7 +44,7 @@ <h1>Service: {{ service.name }}</h1>

<div role="tabpanel" class="tab-pane" id="rule">
<div class="text-right mb-4">
<a href="{% url 'rule-new' 'service' service.id %}" class="btn btn-primary btn-sm">{% trans "Register Rule" %}</a>
<a href="{% url 'rule-new' 'service' service.id %}" class="btn btn-primary btn-sm">{% translate "Register Rule" %}</a>
</div>
{% if service.rule_set.count or request.site.rule_set.count %}
<div class="panel panel-default">
Expand All @@ -79,7 +55,7 @@ <h1>Service: {{ service.name }}</h1>
</table>
<div class="panel-footer">
<a class="btn btn-default btn-xs" role="button" data-toggle="collapse" href=".service-site-rules-{{service.id}}" aria-expanded="false" aria-controls="collapseExample">
{% trans 'Show Site Rules' %}
{% translate 'Show Site Rules' %}
</a>
</div>
</div>
Expand All @@ -88,7 +64,7 @@ <h1>Service: {{ service.name }}</h1>

<div role="tabpanel" class="tab-pane" id="notifier">
<div class="text-right mb-4">
<a href="{% url 'service-notifier' service.id %}" class="btn btn-primary btn-sm">{% trans "Register Notifier" %}</a>
<a href="{% url 'service-notifier' service.id %}" class="btn btn-primary btn-sm">{% translate "Register Notifier" %}</a>
</div>
{% if service.notifiers.count %}
<div class="panel panel-default">
Expand Down
2 changes: 1 addition & 1 deletion promgen/templates/promgen/service_detail_projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% regroup project_list|dictsort:"shard_id" by shard as project_shard_list %}

<div class="text-right mb-4">
<a href="{% url 'project-new' service.id %}" class="btn btn-primary btn-sm">{% trans "Register Project" %}</a>
<a href="{% url 'project-new' service.id %}" class="btn btn-primary btn-sm">{% translate "Register Project" %}</a>
</div>

{% for shard, shard_projects in project_shard_list %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<tr>
<td colspan="4" class="warning">
<span class="glyphicon glyphicon-alert" aria-hidden="true"></span>
{% trans "No notifications configured for this project. Please configure some" %}
{% translate "No notifications configured for this project. Please configure some" %}
</td>
</tr>
{% endif %}
Expand Down

0 comments on commit 29772b5

Please sign in to comment.