1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/ PageHeader
= pageheader 'synchro-ilico',
t('.title'),
'Lorem ipsum dolor sit amet',
t('last_update', time: l(@line_referential.updated_at, format: :short)),
link_to(t('actions.sync'), sync_line_referential_path(@line_referential), method: :post, class: 'btn btn-default') do
/ Below is secundary actions & opt. contents
.row.mb-md
.col-lg-12.text-right
= link_to line_referential_companies_path(@line_referential), class: 'btn btn-primary' do
= Referential.human_attribute_name(:companies)
em.small = " (#{@line_referential.companies.size})"
= link_to line_referential_networks_path(@line_referential), class: 'btn btn-primary' do
= Referential.human_attribute_name(:networks)
em.small = " (#{@line_referential.networks.size})"
= link_to line_referential_lines_path(@line_referential), class: 'btn btn-primary' do
= Referential.human_attribute_name(:lines)
em.small = " (#{@line_referential.lines.size})"
/ PageContent
.page_content
.container-fluid
.row
.col-lg-12
- unless @line_referential.line_referential_syncs.empty?
table.table
thead
tr
th = t('.synchronized')
th = t('.status')
th = t('.message')
tbody
- @line_referential.line_referential_syncs.each_with_index do |sync, i|
/ Display only 10 msgs
- if i < 10
- unless sync.line_referential_sync_messages.empty?
- sync.line_referential_sync_messages.last.tap do |log|
- if log.criticity = log.criticity
tr
td style='width: 150px'
= l(log.created_at, format: :short_with_time)
td.text-center
.fa.fa-circle class="text-#{criticity_class(log.criticity)}"
td
- data = log.message_attributes.symbolize_keys!
- data[:processing_time] = distance_of_time_in_words(data[:processing_time].to_i)
= t("line_referential_sync.message.#{log.message_key}", log.message_attributes.symbolize_keys!).html_safe
|