_oops_state.html.haml revision dda6f544eb58d850394073e34ae6127498869a77
%p#oops
- if req = resource.versions.current.try(:request)
%div.state{ class: req.state, 'data-uri' => ontology_ontology_version_oops_request_path(resource, resource.versions.current), 'data-button' => "show results", 'data-reload_uri' => url_for(resource) }
%span.oops OOPS State: #{status(req)}
- if req.state == 'failed'
(#{req.last_error})
- elsif req.state == 'done'
(#{req.responses.count} Responses)
= link_to 'Show global issues', '#', class: 'pitfalls' unless req.responses.count == 0
%div.pitfalls{:style => "display:none"}
%dl.oops-responses
- req.responses.global.each do |response|
%dt{ title: response.element_type }
%i{ class: oops_icon(response.element_type) }
%dd
%strong
= response.name
%p= response.description
- else
= link_to 'Test with OOPS!', ontology_ontology_version_oops_request_path(resource, resource.versions.current), method: 'post', class: 'btn oops' unless resource.versions.current.nil?