Add snapshot error message below task status [SCI-6614] (#4009)

This commit is contained in:
artoscinote 2022-04-12 13:28:26 +02:00 committed by GitHub
parent 433d69c10a
commit 2d811cdc4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View file

@ -517,6 +517,16 @@
@include font-small; @include font-small;
font-weight: bold; font-weight: bold;
} }
.status-transition-error {
@include font-small;
color: $brand-danger;
margin-top: .5em;
.fas {
margin-right: .5em;
}
}
} }
} }

View file

@ -59,3 +59,17 @@
</li> </li>
</ul> </ul>
</div> </div>
<% if my_module.last_transition_error %>
<div class="status-transition-error">
<i class="fas fa-exclamation-triangle"></i>
<% case my_module.last_transition_error["type"] %>
<% when "repository_snapshot" %>
<%= t(
"my_modules.status_error.repository_snapshot",
repository: Repository.find(my_module.last_transition_error["repository_id"]).name
) %>
<% else %>
<%= t("my_modules.status_error.general") %>
<% end %>
</div>
<% end %>

View file

@ -1058,6 +1058,9 @@ en:
title_html: The inventory <b>%{inventory_name}</b> is no longer shared with your team. title_html: The inventory <b>%{inventory_name}</b> is no longer shared with your team.
body_html: This inventory has been unshared with your team by the inventorys owner. To view the item/s that are assigned to your task/s contact the <b>%{team_name}</b> team administrator <b>%{admin_name}</b> (<b>%{admin_email}</b>). body_html: This inventory has been unshared with your team by the inventorys owner. To view the item/s that are assigned to your task/s contact the <b>%{team_name}</b> team administrator <b>%{admin_name}</b> (<b>%{admin_email}</b>).
open_mobile_app: "Open mobile app" open_mobile_app: "Open mobile app"
status_error:
general: "Status transition failed"
repository_snapshot: "Snapshot failed in %{repository}"
experiments: experiments:
id: "ID" id: "ID"
experiment_id: "Experiment ID" experiment_id: "Experiment ID"