diff options
| -rw-r--r-- | app/controllers/compliance_check_results_controller.rb | 6 | ||||
| -rw-r--r-- | app/controllers/compliance_checks_controller.rb | 3 | ||||
| -rw-r--r-- | app/helpers/compliance_checks_helper.rb | 13 | ||||
| -rw-r--r-- | app/models/compliance_check.rb | 52 | ||||
| -rw-r--r-- | app/models/compliance_check_report.rb | 5 | ||||
| -rw-r--r-- | app/models/compliance_check_task.rb | 18 | ||||
| -rw-r--r-- | app/models/rule_parameter_set.rb | 2 | ||||
| -rw-r--r-- | app/views/compliance_check_results/index.html.erb | 22 | ||||
| -rw-r--r-- | app/views/compliance_checks/_compliance_check.html.erb | 5 | ||||
| -rw-r--r-- | app/views/compliance_checks/detailed_errors_index.csv.erb | 2 | ||||
| -rw-r--r-- | app/views/compliance_checks/show.html.erb | 7 | ||||
| -rw-r--r-- | app/views/compliance_checks/show.js.coffee | 12 | ||||
| -rw-r--r-- | app/views/compliance_checks/summary_errors_index.csv.erb | 2 | ||||
| -rw-r--r-- | app/views/rule_parameter_sets/show.html.erb | 45 | ||||
| -rw-r--r-- | config/locales/compliance_checks.yml | 10 | 
15 files changed, 82 insertions, 122 deletions
diff --git a/app/controllers/compliance_check_results_controller.rb b/app/controllers/compliance_check_results_controller.rb index b1f31844a..3195e4c82 100644 --- a/app/controllers/compliance_check_results_controller.rb +++ b/app/controllers/compliance_check_results_controller.rb @@ -22,12 +22,12 @@ class ComplianceCheckResultsController < ChouetteController      @compliance_check ||= compliance_check_service.find( params[:compliance_check_id] )    end -  def compliance_check_result -    @compliance_check_result ||= compliance_check.compliance_check_result +  def compliance_check_validation_report +    @compliance_check_validation_report ||= compliance_check.compliance_check_validation_report    end    def collection -    @compliance_check_results ||= compliance_check_result.all(params[:status], params[:severity]) #.paginate(:page => params[:page]) +    @compliance_check_validation_reports ||= compliance_check_validation_report.all(params[:status], params[:severity]) #.paginate(:page => params[:page])    end    def rule_parameter_set diff --git a/app/controllers/compliance_checks_controller.rb b/app/controllers/compliance_checks_controller.rb index 268c1f354..3ce961d72 100644 --- a/app/controllers/compliance_checks_controller.rb +++ b/app/controllers/compliance_checks_controller.rb @@ -29,7 +29,8 @@ class ComplianceChecksController < ChouetteController    end    def rule_parameter_set -    @rule_parameter_set = compliance_check.rule_parameter_set_archived +    #@rule_parameter_set = compliance_check.rule_parameter_set_archived +    @rule_parameter_set = resource.rule_parameter_set      build_breadcrumb :edit      render "rule_parameter_sets/show"    end diff --git a/app/helpers/compliance_checks_helper.rb b/app/helpers/compliance_checks_helper.rb index 6b2feba89..d3172fc31 100644 --- a/app/helpers/compliance_checks_helper.rb +++ b/app/helpers/compliance_checks_helper.rb @@ -14,8 +14,8 @@ module ComplianceChecksHelper    end    def compliance_icon( compliance_check) -    return nil unless compliance_check.compliance_check_result -    compliance_check.compliance_check_result.tap do |cct| +    return nil unless compliance_check.compliance_check_validation_report +    compliance_check.compliance_check_validation_report.tap do |cct|        if cct.failed? || cct.any_error_severity_failure?          return 'icons/link_page_alert.png'        else @@ -24,13 +24,4 @@ module ComplianceChecksHelper      end    end -  def compliance_check_progress_bar_tag(compliance_check) -    div_class = "" -    content_tag :div, :class => "progress" do -      content_tag :div, :class => div_class, role: "progressbar", :'aria-valuenow' => "#{compliance_check.percentage_progress}", :'aria-valuemin' => "0", :'aria-valuemax' => "100", :style => "width: #{compliance_check.percentage_progress}%;" do -        "#{compliance_check.percentage_progress}% " + I18n.t("compliance_checks.statuses.#{compliance_check.status}") -      end -    end -  end -  end diff --git a/app/models/compliance_check.rb b/app/models/compliance_check.rb index cc201037f..a2b2a7f52 100644 --- a/app/models/compliance_check.rb +++ b/app/models/compliance_check.rb @@ -16,8 +16,18 @@ class ComplianceCheck        end          end    end + +  def report +    report_path = links["action_report"] +    if report_path       +      response = Ievkit.get(report_path) +      ComplianceCheckReport.new(response) +    else +      raise Ievkit::IevError("Impossible to access report path link for compliance check") +    end +  end -  def compliance_check_result +  def compliance_check_validation_report      report_path = links["validation_report"]      if report_path              response = Ievkit.get(report_path) @@ -55,23 +65,7 @@ class ComplianceCheck    end    def status -    # pending processing completed failed -    # CREATED, SCHEDULED, STARTED, TERMINATED, CANCELED, ABORTED, DELETED -    if datas.status == "CREATED" -      "pending" -    elsif datas.status == "SCHEDULED" -      "pending" -    elsif datas.status == "STARTED" -      "processing" -    elsif datas.status == "TERMINATED" -      "completed" -    elsif datas.status == "CANCELED" -      "failed" -    elsif datas.status == "ABORTED" -      "failed" -    elsif datas.status == "DELETED" -      "failed" -    end +    datas.status.downcase    end    def format @@ -94,30 +88,12 @@ class ComplianceCheck      datas.action_parameters.user_name    end -  def created_at? -    datas.created? -  end -      def created_at -    Time.at(datas.created.to_i / 1000) if created_at? -  end - -  def updated_at? -    datas.updated? +    Time.at(datas.created.to_i / 1000) if datas.created    end    def updated_at -    Time.at(datas.updated.to_i / 1000) if updated_at? -  end - -  def percentage_progress -    if %w{created}.include? status -      0 -    elsif %w{ terminated canceled aborted }.include? status -      100 -    else -      20 -    end +    Time.at(datas.updated.to_i / 1000) if datas.updated    end  end diff --git a/app/models/compliance_check_report.rb b/app/models/compliance_check_report.rb new file mode 100644 index 000000000..2c2da6452 --- /dev/null +++ b/app/models/compliance_check_report.rb @@ -0,0 +1,5 @@ +class ComplianceCheckReport   +  include ReportConcern +   +end + diff --git a/app/models/compliance_check_task.rb b/app/models/compliance_check_task.rb index 7a344066f..5d9ce6ca2 100644 --- a/app/models/compliance_check_task.rb +++ b/app/models/compliance_check_task.rb @@ -97,24 +97,6 @@ class ComplianceCheckTask      datas.type    end -  # def filename -  #   datas.links.select{ |link| link["rel"] == "data"}.first.href.gsub( /\/.*\//, "" ) -  # end - -  # def filename_extension -  #   File.extname(filename) if filename -  # end - -  def percentage_progress -    if %w{created}.include? status -      0 -    elsif %w{ terminated canceled aborted }.include? status -      100 -    else -      20 -    end -  end -    def referential_id      Referential.where(:slug => referential_name).id    end diff --git a/app/models/rule_parameter_set.rb b/app/models/rule_parameter_set.rb index 1901383c5..cd5a5d976 100644 --- a/app/models/rule_parameter_set.rb +++ b/app/models/rule_parameter_set.rb @@ -321,7 +321,7 @@ class RuleParameterSet < ActiveRecord::Base    end    def allowed(mode) -    return true unless self.check_allowed_transport_modes +    return true unless self.check_allowed_transport_modes == "1"      # puts "#{mode} = "+self.send("allowed_transport_mode_#{mode}").to_s      return self.send("allowed_transport_mode_#{mode}") == "1"    end diff --git a/app/views/compliance_check_results/index.html.erb b/app/views/compliance_check_results/index.html.erb index 2221fa0a4..5978d06fd 100644 --- a/app/views/compliance_check_results/index.html.erb +++ b/app/views/compliance_check_results/index.html.erb @@ -5,34 +5,34 @@        <th><%= ComplianceCheckResult.human_attribute_name(:status) %></th>        <th><%= ComplianceCheckResult.human_attribute_name(:severity) %></th>        <th><%= ComplianceCheckResult.human_attribute_name(:rule_code) %></th> -      <% if @compliance_check_results && @compliance_check_results.first.result == "NOK" %> +      <% if @compliance_check_validation_reports && @compliance_check_validation_reports.first.result == "NOK" %>          <th><%= ComplianceCheckResult.human_attribute_name(:detail) %></th>        <% end %>      </tr>    </thead>    <tbody> -    <% @compliance_check_results.each_with_index do |compliance_check_result, index| %> +    <% @compliance_check_validation_reports.each_with_index do |compliance_check_validation_report, index| %>      <tr>        <td><%= index + 1 %></td> -      <td><%= status_icon( compliance_check_result.result, compliance_check_result.severity ) %> </td> -      <td><%= t("compliance_check_result.severities." + compliance_check_result.severity.downcase + "_txt") %></td> +      <td><%= status_icon( compliance_check_validation_report.result, compliance_check_validation_report.severity ) %> </td> +      <td><%= t("compliance_check_result.severities." + compliance_check_validation_report.severity.downcase + "_txt") %></td>        <td> -	<% data_content = t ( "activemodel.attributes.compliance_check_result." + compliance_check_result.test_id ) %> +	<% data_content = t ( "activemodel.attributes.compliance_check_result." + compliance_check_validation_report.test_id ) %>  	<% data_title = t ( "activemodel.attributes.compliance_check_result.title" ) %>          <button data-content='<%= data_content %>' data-title='<%= data_title %>' rel="popover" data-toggle="popover" class="notice btn btn-info btn-xs" ><i class="fa fa-info"></i></button> -        <%= link_to compliance_check_result.test_id, test_definition(compliance_check_result.test_id), :title => ComplianceCheckResult.human_attribute_name(compliance_check_result.test_id), :target => "compliance_check" %></td> -      <% if @compliance_check_results && @compliance_check_results.first.result == "NOK" %> +        <%= link_to compliance_check_validation_report.test_id, test_definition(compliance_check_validation_report.test_id), :title => ComplianceCheckResult.human_attribute_name(compliance_check_validation_report.test_id), :target => "compliance_check" %></td> +      <% if @compliance_check_validation_reports && @compliance_check_validation_reports.first.result == "NOK" %>        <td class="td_error"> -        <% if compliance_check_result.errors.present? %> +        <% if compliance_check_validation_report.errors.present? %>          <span class="title_error"> -          <i class="fa fa-plus-square"></i><%= compliance_check_result.error_count.to_s + " " + ComplianceCheckResult.human_attribute_name(:violation_count) %> +          <i class="fa fa-plus-square"></i><%= compliance_check_validation_report.error_count.to_s + " " + ComplianceCheckResult.human_attribute_name(:violation_count) %>          </span>          <div class="details_error"> -          <% compliance_check_result.errors.first(10).each do |error| %> +          <% compliance_check_validation_report.errors.first(10).each do |error| %>              <p class="detail_error">  	      <% if error["source"].present? %>                  <% if error["source"].objectid.present? %> -	          <% data_content_1 = t("activemodel.attributes.compliance_check_result." + compliance_check_result.test_id) + ". " + +	          <% data_content_1 = t("activemodel.attributes.compliance_check_result." + compliance_check_validation_report.test_id) + ". " +  		     t("compliance_check_result.details.detail_" + error[:error_id], object_labels_hash(error) ) %>  	          <% data_title_1 = t("activemodel.attributes.compliance_check_result.detail") %>                    |- <button data-content='<%= data_content_1 %>' data-title='<%= data_title_1 %>' data-toggle="popover" class="notice btn btn-info btn-xs"><i class="fa fa-info"></i></button> diff --git a/app/views/compliance_checks/_compliance_check.html.erb b/app/views/compliance_checks/_compliance_check.html.erb index 976b7a17b..7892e59a2 100644 --- a/app/views/compliance_checks/_compliance_check.html.erb +++ b/app/views/compliance_checks/_compliance_check.html.erb @@ -16,15 +16,12 @@      </div>                              </div>    <div class="panel-body"> -     <!-- % if compliance_check.import.present? % --> -      <p><!-- %= link_to( image_tag('icons/link_page.png') + t("compliance_checks.import"), referential_import_path(@referential, compliance_check.import)) % --></p> -      <!-- % end % -->        <% if compliance_check.rule_parameter_set %>        <p><%= link_to( image_tag('icons/link_page.png') + t("compliance_checks.actions.rule_parameter_set"), rule_parameter_set_referential_compliance_check_path(@referential, compliance_check.id)) %></p>        <% end %>    </div>    <div class="panel-footer"> -    <%= compliance_check_progress_bar_tag(compliance_check) %>     +    <%= progress_bar_tag(compliance_check) %>      <div class="history">        <%= l compliance_check.created_at, :format => "%d/%m/%Y %H:%M" %> | <%= compliance_check.user_name %>      </div> diff --git a/app/views/compliance_checks/detailed_errors_index.csv.erb b/app/views/compliance_checks/detailed_errors_index.csv.erb index 8e029b634..24d4c8877 100644 --- a/app/views/compliance_checks/detailed_errors_index.csv.erb +++ b/app/views/compliance_checks/detailed_errors_index.csv.erb @@ -1,2 +1,2 @@  <%= I18n.t("activemodel.attributes.compliance_check_result.severity") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.rule_code") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.object") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.resource") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.title") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.detail") %> -<% @compliance_check.compliance_check_result.results.each do |r| %><% if r.errors.present? %><% r.errors.first(10).each do |error| %><% case  r.severity %><% when "WARNING" %><%= I18n.t "compliance_check_result.severities.warning_txt" %><% when "ERROR" %><%= I18n.t "compliance_check_result.severities.error_txt" %><% end %>;<%= r.test_id %>;<% if error["source"].present? %><%= error["source"]["objectid"] if error["source"]["objectid"].present? %>;<% if error["source"]["object_path"].present? %><%= object_url(@referential_id, error) %><% elsif error["source"]["file"].present? %><%= File.basename(error["source"]["file"]["filename"]) +" - " %><%= I18n.t "compliance_check_results.index.column" %>:<%= error["source"]["file"]["column_number"] %>,<%= I18n.t "compliance_check_results.index.line" %>:<%= error["source"]["file"]["line_number"] %><% end %>;<% else %>;;<% end %><%= I18n.t("activemodel.attributes.compliance_check_result."+r.test_id) %>;<%= I18n.t("compliance_check_result.details.detail_" + error["error_id"], object_labels_hash(error) )%><%= "\n" %><% end %><% end %><% end %>
\ No newline at end of file +<% @compliance_check.compliance_check_validation_report.results.each do |r| %><% if r.errors.present? %><% r.errors.first(10).each do |error| %><% case  r.severity %><% when "WARNING" %><%= I18n.t "compliance_check_result.severities.warning_txt" %><% when "ERROR" %><%= I18n.t "compliance_check_result.severities.error_txt" %><% end %>;<%= r.test_id %>;<% if error["source"].present? %><%= error["source"]["objectid"] if error["source"]["objectid"].present? %>;<% if error["source"]["object_path"].present? %><%= object_url(@referential_id, error) %><% elsif error["source"]["file"].present? %><%= File.basename(error["source"]["file"]["filename"]) +" - " %><%= I18n.t "compliance_check_results.index.column" %>:<%= error["source"]["file"]["column_number"] %>,<%= I18n.t "compliance_check_results.index.line" %>:<%= error["source"]["file"]["line_number"] %><% end %>;<% else %>;;<% end %><%= I18n.t("activemodel.attributes.compliance_check_result."+r.test_id) %>;<%= I18n.t("compliance_check_result.details.detail_" + error["error_id"], object_labels_hash(error) )%><%= "\n" %><% end %><% end %><% end %>
\ No newline at end of file diff --git a/app/views/compliance_checks/show.html.erb b/app/views/compliance_checks/show.html.erb index 12d40cd49..eb0a6df22 100644 --- a/app/views/compliance_checks/show.html.erb +++ b/app/views/compliance_checks/show.html.erb @@ -1,11 +1,8 @@ -<%= title_tag "#{@compliance_check.name} <span class='status status_#{@compliance_check.status}'>#{ t('compliance_checks.show.'+@compliance_check.status) }</span>" %> +<%= title_tag "#{@compliance_check.name} <span class='status status_#{@compliance_check.status}'>#{ t('compliance_checks.statuses.'+@compliance_check.status) }</span>" %>  <% @title = "#{@compliance_check.name}" %>  <div class="compliance_check_show">     <div class="links"> -     <!-- % if @compliance_check.import % --> -       <!-- %= link_to image_tag('icons/link_page.png') + t("compliance_checks.import"), referential_import_path(@referential, @compliance_check.import)  % --> -     <!-- % end % -->       <% if @compliance_check.rule_parameter_set %>         <%= link_to image_tag('icons/link_page.png') + t("compliance_checks.rule_parameter_set"), rule_parameter_set_referential_compliance_check_path(@referential, @compliance_check.id) %>       <% end %> @@ -18,7 +15,7 @@         </ul>       </div>       </div> -  <% if @compliance_check.status == 'completed'%> +  <% if @compliance_check.status == 'terminated'%>     <div class="resume">       <div class="col1">         <div class="caption"><%= t "error", :scope => "compliance_check_result.severities" %></div> diff --git a/app/views/compliance_checks/show.js.coffee b/app/views/compliance_checks/show.js.coffee index fecf7ef8f..ec638c4d7 100644 --- a/app/views/compliance_checks/show.js.coffee +++ b/app/views/compliance_checks/show.js.coffee @@ -16,9 +16,9 @@ jQuery ->    Morris.Donut({      element: 'error',      data: [ -      {label: "<%= t 'nok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_result.nok_error.count %>}, -      {label: "<%= t 'na', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_result.na_error.count %>}, -      {label: "<%= t 'ok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_result.ok_error.count %>} +      {label: "<%= t 'nok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_validation_report.nok_error.count %>}, +      {label: "<%= t 'na', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_validation_report.na_error.count %>}, +      {label: "<%= t 'ok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_validation_report.ok_error.count %>}      ]      colors: [ "#e22b1b", "#898e7f", "#8fc861" ]    }).on('click', update = (i, row) -> @@ -31,9 +31,9 @@ jQuery ->    Morris.Donut({      element: 'warning',      data: [ -      {label: "<%= t 'nok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_result.nok_warning.count %>}, -      {label: "<%= t 'na', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_result.na_warning.count %>}, -      {label: "<%= t 'ok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_result.ok_warning.count %>} +      {label: "<%= t 'nok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_validation_report.nok_warning.count %>}, +      {label: "<%= t 'na', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_validation_report.na_warning.count %>}, +      {label: "<%= t 'ok', :scope => 'compliance_check_result.statuses' %>", value: <%= @compliance_check.compliance_check_validation_report.ok_warning.count %>}      ]      colors: [ "#ffbd2b", "#898e7f", "#8fc861" ]    }).on('click', update = (i, row) -> diff --git a/app/views/compliance_checks/summary_errors_index.csv.erb b/app/views/compliance_checks/summary_errors_index.csv.erb index a9581bc76..8d7a31948 100644 --- a/app/views/compliance_checks/summary_errors_index.csv.erb +++ b/app/views/compliance_checks/summary_errors_index.csv.erb @@ -1,3 +1,3 @@  <%= I18n.t("activemodel.attributes.compliance_check_result.severity") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.status") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.rule_code") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.title") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.url") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.violation_count_txt") %>;<%= I18n.t("activemodel.attributes.compliance_check_result.objects") %> -<% @compliance_check.compliance_check_result.results.each do |r| %><% case  r.severity %><% when "WARNING" %><%= I18n.t "compliance_check_result.severities.warning_txt" %><% when "ERROR" %><%= I18n.t "compliance_check_result.severities.error_txt" %><% end %>;<%= r.result %>;<%= r.test_id %>;<%= I18n.t("activemodel.attributes.compliance_check_result."+r.test_id) %>;<%= Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.test_id + ".html" %>;<%= r.error_count %><% if r.error_count > 0 %><% if r.errors.present? %>;<% r.errors.first(10).each do |error| %><% if error["source"] %><%= error["source"]["objectid"] + " " %><% else %><%= " " %><% end %><% end %><% end %><% end %> +<% @compliance_check.compliance_check_validation_report.results.each do |r| %><% case  r.severity %><% when "WARNING" %><%= I18n.t "compliance_check_result.severities.warning_txt" %><% when "ERROR" %><%= I18n.t "compliance_check_result.severities.error_txt" %><% end %>;<%= r.result %>;<%= r.test_id %>;<%= I18n.t("activemodel.attributes.compliance_check_result."+r.test_id) %>;<%= Rails.application.config.validation_spec + I18n.locale.to_s + "/" + r.test_id + ".html" %>;<%= r.error_count %><% if r.error_count > 0 %><% if r.errors.present? %>;<% r.errors.first(10).each do |error| %><% if error["source"] %><%= error["source"]["objectid"] + " " %><% else %><%= " " %><% end %><% end %><% end %><% end %>  <% end %>
\ No newline at end of file diff --git a/app/views/rule_parameter_sets/show.html.erb b/app/views/rule_parameter_sets/show.html.erb index c00f92a40..335e0ae33 100644 --- a/app/views/rule_parameter_sets/show.html.erb +++ b/app/views/rule_parameter_sets/show.html.erb @@ -95,32 +95,33 @@      </p> -    <div class="rule_parameter_by_mode"> +<div class="rule_parameter_by_mode">      <label><%= t(".rule_parameter_by_mode") %> -    	<%= t(".modes_allowed") if @rule_parameter_set.check_allowed_transport_modes %> +    	<%= t(".modes_allowed") if @rule_parameter_set.check_allowed_transport_modes == "1" %>      </label>      <table class="table table-striped table-condensed"> -    	<tr> -    		<th><%= t("transport_modes.name") %></th> -			<% RuleParameterSet.mode_attribute_prefixes.each do |prefix| %> -			    <% unless prefix == "allowed_transport" %> -            		<th><%= RuleParameterSet.human_attribute_name(prefix) %></th> -                <% end %> -			<% end %> -        </tr> -    	<% Chouette::Line.transport_modes.map(&:to_s).each do |mode| %> -	    	<% if @rule_parameter_set.allowed(mode) %> -      	<tr> -  			<td><%= t("transport_modes.label.#{mode}") %></td> -  			<% RuleParameterSet.mode_attribute_prefixes.each do |prefix| %> - -    			<% unless prefix == "allowed_transport" %> -    		<td><%= @rule_parameter_set.send  "#{prefix}_mode_#{mode}" %></td> -    			<% end %> -  			<% end %> -      	</tr> -    		<% end %> +      <tr> +    	<th><%= t("transport_modes.name") %></th> +	  <% RuleParameterSet.mode_attribute_prefixes.each do |prefix| %> +	    <% unless prefix == "allowed_transport" %> +              <th><%= RuleParameterSet.human_attribute_name(prefix) %></th> +            <% end %> +	  <% end %> +      </tr> +       +      <% Chouette::Line.transport_modes.map(&:to_s).each do |mode| %> +      <% if @rule_parameter_set.allowed(mode) %> +      <tr> +  	<td><%= t("transport_modes.label.#{mode}") %></td> +  	<% RuleParameterSet.mode_attribute_prefixes.each do |prefix| %> +	 +    	<% unless prefix == "allowed_transport" %> +    	<td><%= @rule_parameter_set.send  "#{prefix}_mode_#{mode}" %></td>      	<% end %> +  	<% end %> +      	</tr> +      <% end %> +      <% end %>      </table>      </div>      <div class="rule_parameter_by_object"> diff --git a/config/locales/compliance_checks.yml b/config/locales/compliance_checks.yml index 1255b55a1..f538bd42b 100644 --- a/config/locales/compliance_checks.yml +++ b/config/locales/compliance_checks.yml @@ -25,6 +25,11 @@ en:        processing: "Processing"        completed: "Completed"        failed: "Failed" +      started: "Started"       +      scheduled: "Processing ..." +      terminated: "Completed" +      canceled: "Canceled" +      aborted: "Failed"    file_validation_log_messages:      messages:        undefined: "%{key} undefined" @@ -88,6 +93,11 @@ fr:        processing: "En cours ..."        completed: "Achevé"        failed: "Echoué" +      started: "En file d'attente..." +      scheduled: "En cours..." +      terminated: "Achevé" +      canceled: "Annulé" +      aborted: "Echoué"      uncheck_count:        zero: "aucun inapplicable"        one: "un inapplicable"  | 
