Added styling for failed snapshots in sidebar [SCI-6636] (#3990)

* Added styling for failed snapshots in sidebar [SCI-6636]

* Simplify markup for failed icon [SCI-6636]
This commit is contained in:
artoscinote 2022-04-05 15:45:49 +02:00 committed by GitHub
parent a85b78291d
commit 73757c4820
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 2 deletions

View file

@ -345,6 +345,10 @@
grid-area: sidebar;
overflow: hidden;
.list-group-item-heading {
font-weight: normal;
}
.sidebar-collapse-button {
color: $color-volcano;
text-decoration: none;
@ -423,6 +427,35 @@
}
}
&.failed {
background-color: $brand-danger-light;
&:hover {
background-color: $brand-danger-light;
.fa-trash {
opacity: 1;
}
}
.delete-snapshot-button {
display: block;
}
.fa-trash {
opacity: .5;
}
.list-group-item-heading::before {
@include font-awesome;
content: $font-fas-exclamation-triangle;
color: $brand-danger;
display: inline-block;
vertical-align: text-top;
}
}
&.repository-snapshot-item:hover,
&.live-version-item:hover {
background-color: $color-alto;

View file

@ -14,12 +14,12 @@
<%= t('my_modules.repository.snapshots.full_view.created_by', full_name: repository_snapshot.created_by.full_name) %>
</p>
<% else %>
<a class="version-button select-snapshot-button <%= 'disabled' if repository_snapshot.status == 'provisioning' %>"
<a class="version-button select-snapshot-button <%= 'disabled' if repository_snapshot.provisioning? %> <%= 'failed' if repository_snapshot.failed? %>"
href="#"
data-status="<%= repository_snapshot.status %>"
data-table-url="<%= full_view_table_my_module_repository_snapshot_path(@my_module, repository_snapshot) %>">
<h4 class="list-group-item-heading">
<%= l(repository_snapshot.created_at, format: :full) %>
<%= repository_snapshot.failed? ? t("repositories.snapshot_failed") : l(repository_snapshot.created_at, format: :full) %>
</h4>
<p class="list-group-item-text">
<%= t('my_modules.repository.snapshots.full_view.created_by', full_name: repository_snapshot.created_by.full_name) %>

View file

@ -1325,6 +1325,7 @@ en:
repositories:
repository: "Inventory: %{name}"
snapshot_failed: "Snapshot failed"
icon_title:
i_shared: "Shared inventory (owned by your Team)"
shared_edit: "Shared inventory (owned by %{team_name}). You can edit."