Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make event and ack feeds more vertically compact #1156

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions src/argus/htmx/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -4328,6 +4328,10 @@ details.collapse summary::-webkit-details-marker {
flex-grow: 1;
}

.grow-0 {
flex-grow: 0;
}

.basis-1\/4 {
flex-basis: 25%;
}
Expand Down Expand Up @@ -4414,20 +4418,6 @@ details.collapse summary::-webkit-details-marker {
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.divide-y > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 0;
border-top-width: calc(2px * calc(1 - var(--tw-divide-y-reverse)));
border-bottom-width: calc(2px * var(--tw-divide-y-reverse));
}

.divide-solid > :not([hidden]) ~ :not([hidden]) {
border-style: solid;
}

.divide-none > :not([hidden]) ~ :not([hidden]) {
border-style: none;
}

.overflow-x-auto {
overflow-x: auto;
}
Expand Down Expand Up @@ -4576,6 +4566,10 @@ details.collapse summary::-webkit-details-marker {
padding-bottom: 0.25rem;
}

.pl-8 {
padding-left: 2rem;
}

.pt-0\.5 {
padding-top: 0.125rem;
}
Expand Down
16 changes: 9 additions & 7 deletions src/argus/htmx/templates/htmx/incident/incident_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,36 +83,38 @@ <h3 class="font-bold">Ticket</h3>
</section>
</section>
<section id="acknowledgements" class="basis-1/4 max-w-[30%] card">
<h2 class="card-title">Acknowledgements</h2>
<div class="divide-y divide-solid">
<h2 class="card-title pl-8">Acknowledgements</h2>
<div class="card-body gap-4 grow-0">
{% for ack in incident.acks %}
<div class="card-body flex-none">
<div class="px-2">
<p>{{ ack.event.description }}</p>
<p>
{{ ack.event.actor }}
{{ ack.event.timestamp|date:preferences.argus_htmx.datetime_format }}
</p>
{% if ack.expiration %}<p>Expires: {{ ack.expiration|date:preferences.argus_htmx.datetime_format }}</p>{% endif %}
</div>
{% if not forloop.last %}<hr />{% endif %}
{% endfor %}
<div class="card-actions divide-none">
<div class="card-actions grow-0">
{% include "htmx/incident/_incident_acknowledge_modal.html" with action="ack" dialog_id="create-acknowledgment-dialog" button_title="Create acknowledgment" header="Submit acknowledgment" explanation="Write a message describing why this incident was acknowledged" cancel_text="Cancel" submit_text="Submit" %}
</div>
</div>
</section>
<section id="events" class="basis-1/4 max-w-[30%] card">
<h2 class="card-title">Related events</h2>
<div class="divide-y divide-solid">
<h2 class="card-title pl-8">Related events</h2>
<div class="gap-4 card-body flex-none">
{% for event in incident.events.all %}
{% if not event.ack %}
<div class="card-body flex-none">
<div class="px-2">
<p>{{ event.get_type_display }}</p>
<p>{{ event.description }}</p>
<p>
{{ event.actor }}
{{ event.timestamp|date:preferences.argus_htmx.datetime_format }}
</p>
</div>
{% if not forloop.last %}<hr />{% endif %}
{% endif %}
{% endfor %}
</div>
Expand Down
Loading