qa_server 7.4.0 → 7.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop_fixme.yml +6 -0
  3. data/.travis.yml +4 -5
  4. data/CHANGELOG.md +20 -0
  5. data/Rakefile +1 -1
  6. data/app/assets/stylesheets/qa_server/_check-status.scss +36 -0
  7. data/app/cache_processors/qa_server/cache_expiry_service.rb +8 -8
  8. data/app/cache_processors/qa_server/job_id_cache.rb +4 -4
  9. data/app/cache_processors/qa_server/performance_cache.rb +34 -34
  10. data/app/cache_processors/qa_server/performance_day_graph_cache.rb +7 -7
  11. data/app/cache_processors/qa_server/performance_month_graph_cache.rb +7 -7
  12. data/app/cache_processors/qa_server/performance_year_graph_cache.rb +7 -7
  13. data/app/cache_processors/qa_server/scenario_history_cache.rb +7 -7
  14. data/app/cache_processors/qa_server/scenario_history_graph_cache.rb +7 -7
  15. data/app/cache_processors/qa_server/scenario_run_cache.rb +7 -7
  16. data/app/cache_processors/qa_server/scenario_run_failures_cache.rb +7 -7
  17. data/app/cache_processors/qa_server/scenario_run_summary_cache.rb +7 -7
  18. data/app/controllers/concerns/qa_server/authority_validation_behavior.rb +49 -44
  19. data/app/controllers/qa_server/check_status_controller.rb +92 -22
  20. data/app/controllers/qa_server/fetch_controller.rb +36 -36
  21. data/app/controllers/qa_server/monitor_status_controller.rb +105 -105
  22. data/app/jobs/qa_server/history_graph_job.rb +10 -10
  23. data/app/jobs/qa_server/monitor_tests_job.rb +17 -17
  24. data/app/jobs/qa_server/performance_day_graph_job.rb +21 -21
  25. data/app/jobs/qa_server/performance_month_graph_job.rb +21 -21
  26. data/app/jobs/qa_server/performance_per_byte_job.rb +56 -56
  27. data/app/jobs/qa_server/performance_year_graph_job.rb +21 -21
  28. data/app/loggers/qa_server/scenario_logger.rb +74 -4
  29. data/app/models/qa_server/authority_scenario.rb +4 -4
  30. data/app/models/qa_server/authority_status.rb +2 -2
  31. data/app/models/qa_server/authority_status_failure.rb +1 -1
  32. data/app/models/qa_server/performance_history.rb +2 -2
  33. data/app/models/qa_server/scenario_run_history.rb +52 -52
  34. data/app/models/qa_server/scenario_run_registry.rb +2 -2
  35. data/app/models/qa_server/scenarios.rb +26 -26
  36. data/app/models/qa_server/search_scenario.rb +18 -13
  37. data/app/models/qa_server/term_scenario.rb +29 -29
  38. data/app/prepends/prepended_linked_data/find_term.rb +40 -40
  39. data/app/prepends/prepended_linked_data/search_query.rb +36 -36
  40. data/app/prepends/prepended_rdf/rdf_graph.rb +7 -7
  41. data/app/presenters/concerns/qa_server/monitor_status/performance_datatable_behavior.rb +32 -32
  42. data/app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb +64 -64
  43. data/app/presenters/qa_server/check_status_presenter.rb +63 -7
  44. data/app/services/concerns/qa_server/gruff_graph.rb +16 -16
  45. data/app/services/qa_server/authority_loader_service.rb +14 -14
  46. data/app/services/qa_server/authority_validator_service.rb +1 -0
  47. data/app/services/qa_server/database_migrator.rb +14 -14
  48. data/app/services/qa_server/history_graphing_service.rb +30 -30
  49. data/app/services/qa_server/performance_calculator_service.rb +80 -80
  50. data/app/services/qa_server/performance_datatable_service.rb +35 -35
  51. data/app/services/qa_server/performance_graph_data_service.rb +27 -27
  52. data/app/services/qa_server/performance_graphing_service.rb +55 -55
  53. data/app/services/qa_server/performance_per_byte_calculator_service.rb +38 -38
  54. data/app/services/qa_server/performance_per_byte_data_service.rb +7 -7
  55. data/app/services/qa_server/scenarios_loader_service.rb +1 -1
  56. data/app/services/qa_server/time_period_service.rb +21 -21
  57. data/app/validators/qa_server/scenario_validator.rb +99 -87
  58. data/app/validators/qa_server/search_scenario_validator.rb +67 -61
  59. data/app/validators/qa_server/term_scenario_validator.rb +20 -15
  60. data/app/views/qa_server/check_status/index.html.erb +120 -24
  61. data/config/locales/qa_server.en.yml +1 -0
  62. data/lib/generators/qa_server/assets_generator.rb +4 -4
  63. data/lib/generators/qa_server/templates/config/authorities/linked_data/cerl_ld4l_cache.json +2 -2
  64. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_aat_ld4l_cache.json +62 -1
  65. data/lib/generators/qa_server/templates/config/authorities/linked_data/getty_tgn_ld4l_cache.json +28 -4
  66. data/lib/generators/qa_server/templates/config/authorities/linked_data/isni_ld4l_cache.json +90 -0
  67. data/lib/generators/qa_server/templates/config/authorities/linked_data/ligatus_ld4l_cache.json +133 -0
  68. data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_rwo2_ld4l_cache.json +248 -0
  69. data/lib/generators/qa_server/templates/config/authorities/linked_data/locnames_rwo3_ld4l_cache.json +248 -0
  70. data/lib/generators/qa_server/templates/config/authorities/linked_data/locvocabs_ld4l_cache.json +117 -0
  71. data/lib/generators/qa_server/templates/config/authorities/linked_data/mesh_nlm_ld4l_cache.json +135 -3
  72. data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_direct.json +1 -0
  73. data/lib/generators/qa_server/templates/config/authorities/linked_data/oclcfast_ld4l_cache.json +1 -4
  74. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_direct_validation.yml +31 -0
  75. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/agrovoc_ld4l_cache_validation.yml +31 -0
  76. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/cerl_ld4l_cache_validation.yml +23 -11
  77. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/dbpedia_ld4l_cache_validation.yml +33 -0
  78. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/geonames_direct_validation.yml +35 -0
  79. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/geonames_ld4l_cache_validation.yml +58 -5
  80. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/getty_aat_ld4l_cache_validation.yml +256 -0
  81. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/getty_tgn_ld4l_cache_validation.yml +35 -1
  82. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/getty_ulan_ld4l_cache_validation.yml +37 -0
  83. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/isni_ld4l_cache_validation.yml +10 -0
  84. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/ligatus_ld4l_cache_validation.yml +36 -0
  85. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locdemographics_ld4l_cache_validation.yml +73 -44
  86. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locgenres_ld4l_cache_validation.yml +31 -0
  87. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locnames_ld4l_cache_validation.yml +71 -0
  88. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locnames_rwo_ld4l_cache_validation.yml +70 -2
  89. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locperformance_ld4l_cache_validation.yml +6 -0
  90. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locsubjects_ld4l_cache_validation.yml +32 -0
  91. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/locvocabs_ld4l_cache_validation.yml +184 -0
  92. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/mesh_nlm_ld4l_cache_validation.yml +51 -1
  93. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/nalt_ld4l_cache_validation.yml +37 -0
  94. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclc_fast_validation.yml +71 -5
  95. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclcfast_direct_validation.yml +66 -1
  96. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/oclcfast_ld4l_cache_validation.yml +57 -0
  97. data/lib/generators/qa_server/templates/config/authorities/linked_data/scenarios/rda_registry_ld4l_cache_validation.yml +310 -0
  98. data/lib/qa_server/configuration.rb +28 -24
  99. data/lib/qa_server/version.rb +1 -1
  100. data/qa_server.gemspec +1 -1
  101. data/spec/feature/accuracy_spec.rb +32 -0
  102. data/spec/spec_helper.rb +4 -0
  103. metadata +18 -9
@@ -6,87 +6,93 @@ module QaServer
6
6
  class SearchScenarioValidator < ScenarioValidator
7
7
  SEARCH_ACTION = 'search'
8
8
 
9
+ # CONCRETE Implementation: Return value of request_data
10
+ attr_reader :request_data
11
+ private :request_data
12
+
9
13
  # @param scenario [SearchScenario] the scenario to run
10
14
  # @param status_log [ScenarioLogger] logger for recording test results
11
15
  # @param validation_type [Symbol] the type of scenarios to run (e.g. VALIDATE_CONNECTION, VALIDATE_ACCURACY, ALL_VALIDATIONS)
12
16
  def initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE)
13
17
  super
18
+ @request_data = scenario.query
14
19
  end
15
20
 
16
- private
21
+ private
17
22
 
18
- def action
19
- SEARCH_ACTION
20
- end
23
+ def action
24
+ SEARCH_ACTION
25
+ end
21
26
 
22
- # Run the connection test and log results
23
- def run_connection_scenario
24
- test_connection(min_expected_size: scenario.min_result_size, scenario_type_name: 'search') do
25
- replacements = scenario.replacements.dup
26
- authority.search(scenario.query,
27
- subauth: scenario.subauthority_name,
28
- replacements: replacements)
29
- end
27
+ # CONCRETE Implementation: Run the connection test and log results
28
+ def run_connection_scenario
29
+ test_connection(min_expected_size: scenario.min_result_size, scenario_type_name: 'search') do
30
+ replacements = scenario.replacements.dup
31
+ authority.search(scenario.query,
32
+ subauth: scenario.subauthority_name,
33
+ replacements: replacements)
30
34
  end
35
+ end
31
36
 
32
- # Run the accuracy test and log results
33
- def run_accuracy_scenario
34
- test_accuracy(subject_uri: scenario.subject_uri, expected_by_position: scenario.expected_by_position) do
35
- authority.search(scenario.query,
36
- subauth: scenario.subauthority_name,
37
- replacements: scenario.replacements)
38
- end
37
+ # CONCRETE Implementation: Run the accuracy test and log results
38
+ def run_accuracy_scenario
39
+ test_accuracy(subject_uri: scenario.subject_uri, expected_by_position: scenario.expected_by_position, pending: scenario.pending?) do
40
+ replacements = scenario.replacements.dup
41
+ authority.search(scenario.query,
42
+ subauth: scenario.subauthority_name,
43
+ replacements: replacements)
39
44
  end
45
+ end
40
46
 
41
- # Runs the accuracy test and log results
42
- def test_accuracy(subject_uri:, expected_by_position:)
43
- dt_start = QaServer::TimeService.current_time
44
- results = yield if block_given?
45
- dt_end = QaServer::TimeService.current_time
46
- if results.blank?
47
- log(status: UNKNOWN, errmsg: "Search position scenario failed; cause: no results found", expected: expected_by_position, target: subject_uri, request_run_time: (dt_end - dt_start))
48
- return
49
- end
50
-
51
- check_position(results, subject_uri, expected_by_position, total_run_time: (dt_end - dt_start)) # TODO: need to get run times from results
52
- rescue Exception => e
53
- dt_end = QaServer::TimeService.current_time
54
- log(status: FAIL, errmsg: "Exception executing search position scenario; cause: #{e.message}",
55
- expected: expected_by_position, target: subject_uri, request_run_time: (dt_end - dt_start))
47
+ # Runs the accuracy test and log results
48
+ def test_accuracy(subject_uri:, expected_by_position:, pending: false)
49
+ dt_start = QaServer::TimeService.current_time
50
+ results = yield if block_given?
51
+ dt_end = QaServer::TimeService.current_time
52
+ if results.blank?
53
+ log(status: UNKNOWN, errmsg: "Search position scenario failed; cause: no results found", expected: expected_by_position,
54
+ target: subject_uri, request_run_time: (dt_end - dt_start), pending: pending)
55
+ return
56
56
  end
57
57
 
58
- def accuracy_scenario?
59
- return false if scenario.expected_by_position.blank? || scenario.subject_uri.blank?
60
- true
61
- end
58
+ check_position(results, subject_uri, expected_by_position, total_run_time: (dt_end - dt_start), pending: pending) # TODO: need to get run times from results
59
+ rescue Exception => e
60
+ dt_end = QaServer::TimeService.current_time
61
+ log(status: FAIL, errmsg: "Exception executing search position scenario; cause: #{e.message}",
62
+ expected: expected_by_position, target: subject_uri, request_run_time: (dt_end - dt_start), pending: pending)
63
+ end
62
64
 
63
- def connection_scenario?
64
- # There are only two types of tests, so if this isn't an accuracy scenario, it must be a connection scenario.
65
- !accuracy_scenario?
66
- end
65
+ def accuracy_scenario?
66
+ return false if scenario.expected_by_position.blank? || scenario.subject_uri.blank?
67
+ true
68
+ end
67
69
 
68
- def check_position(results, subject_uri, expected_by_position, total_run_time)
69
- actual_position = subject_position(results, subject_uri, total_run_time)
70
- return if actual_position.blank?
70
+ def connection_scenario?
71
+ # There are only two types of tests, so if this isn't an accuracy scenario, it must be a connection scenario.
72
+ !accuracy_scenario?
73
+ end
71
74
 
72
- actual_position += 1
73
- if actual_position <= expected_by_position
74
- log(status: PASS, expected: expected_by_position, actual: actual_position, target: subject_uri,
75
- normalization_run_time: total_run_time) # TODO: need to get run times from results
76
- else
77
- log(status: UNKNOWN, errmsg: 'Subject URI not found by the expected position.',
78
- expected: expected_by_position, actual: actual_position, target: subject_uri,
79
- normalization_run_time: total_run_time) # TODO: need to get run times from results
80
- end
75
+ def check_position(results, subject_uri, expected_by_position, total_run_time:, pending:)
76
+ actual_position = subject_position(results, subject_uri, total_run_time, pending)
77
+ return if actual_position.blank?
78
+
79
+ if actual_position <= expected_by_position
80
+ log(status: PASS, expected: expected_by_position, actual: actual_position, target: subject_uri,
81
+ normalization_run_time: total_run_time, pending: pending) # TODO: need to get run times from results
82
+ else
83
+ log(status: UNKNOWN, errmsg: 'Subject URI not found by the expected position.',
84
+ expected: expected_by_position, actual: actual_position, target: subject_uri,
85
+ normalization_run_time: total_run_time, pending: pending) # TODO: need to get run times from results
81
86
  end
87
+ end
82
88
 
83
- def subject_position(results, subject_uri, total_run_time)
84
- 0.upto(results.size - 1) do |position|
85
- return position if results[position][:uri] == subject_uri
86
- end
87
- log(status: UNKNOWN, errmsg: "Search position scenario failed; cause: subject uri (#{subject_uri}) not found in results",
88
- expected: scenario.expected_by_position, target: subject_uri, normalization_run_time: total_run_time) # TODO: need to get run times from results
89
- nil
89
+ def subject_position(results, subject_uri, total_run_time, pending)
90
+ 0.upto(results.size - 1) do |position|
91
+ return position + 1 if results[position][:uri] == subject_uri
90
92
  end
93
+ log(status: UNKNOWN, errmsg: "Search position scenario failed; cause: subject uri (#{subject_uri}) not found in results",
94
+ expected: scenario.expected_by_position, target: subject_uri, normalization_run_time: total_run_time, pending: pending) # TODO: need to get run times from results
95
+ nil
96
+ end
91
97
  end
92
98
  end
@@ -4,14 +4,21 @@ module QaServer
4
4
  class TermScenarioValidator < ScenarioValidator
5
5
  TERM_ACTION = 'term'
6
6
 
7
+ # CONCRETE Implementation: Return value of request_data
8
+ attr_reader :request_data
9
+ private :request_data
10
+
7
11
  # @param scenario [TermScenario] the scenario to run
8
12
  # @param status_log [ScenarioLogger] logger for recording test results
9
13
  # @param validation_type [Symbol] the type of scenarios to run (e.g. VALIDATE_CONNECTION, VALIDATE_ACCURACY, ALL_VALIDATIONS)
10
14
  def initialize(scenario:, status_log:, validation_type: DEFAULT_VALIDATION_TYPE)
11
15
  super
16
+ @request_data = scenario.identifier
12
17
  end
13
18
 
14
- # Run a term scenario and log results.
19
+ private
20
+
21
+ # CONCRETE Implementation: Run a term scenario and log results.
15
22
  def run_connection_scenario
16
23
  test_connection(min_expected_size: scenario.min_result_size, scenario_type_name: 'term') do
17
24
  authority.find(scenario.identifier,
@@ -19,25 +26,23 @@ module QaServer
19
26
  end
20
27
  end
21
28
 
22
- # Run a term scenario and log results.
29
+ # CONCRETE Implementation: Run a term scenario and log results.
23
30
  def run_accuracy_scenario
24
31
  # no accuracy scenarios defined for terms at this time
25
32
  end
26
33
 
27
- private
28
-
29
- def action
30
- TERM_ACTION
31
- end
34
+ def action
35
+ TERM_ACTION
36
+ end
32
37
 
33
- def accuracy_scenario?
34
- # At this time, all scenarios are connection scenarios for terms.
35
- false
36
- end
38
+ def accuracy_scenario?
39
+ # At this time, all scenarios are connection scenarios for terms.
40
+ false
41
+ end
37
42
 
38
- def connection_scenario?
39
- # At this time, all scenarios are connection scenarios for terms.
40
- true
41
- end
43
+ def connection_scenario?
44
+ # At this time, all scenarios are connection scenarios for terms.
45
+ true
46
+ end
42
47
  end
43
48
  end
@@ -1,10 +1,35 @@
1
1
  <script>
2
+ function hide_data() {
3
+ connection_status_section = document.getElementById('connection-status-section');
4
+ if (connection_status_section != null) {
5
+ connection_status_section.style.display = 'none';
6
+ }
7
+ accuracy_status_section = document.getElementById('accuracy-status-section');
8
+ if (accuracy_status_section != null) {
9
+ accuracy_status_section.style.display = 'none';
10
+ }
11
+ comparison_status_section = document.getElementById('comparison-status-section');
12
+ if (comparison_status_section != null) {
13
+ comparison_status_section.style.display = 'none';
14
+ }
15
+ }
16
+
2
17
  function validate_authority(form) {
3
- form.submit();
18
+ show_loading_message();
19
+ hide_data();
20
+ }
21
+
22
+ function show_loading_message() {
4
23
  document.getElementById('status-loading-message').style.display = 'block';
5
- document.getElementById('connection-status-section').style.display = 'none';
6
- document.getElementById('accuracy-status-section').style.display = 'none';
7
- document.getElementById('example-url-warning').style.display = 'none';
24
+ }
25
+ function hide_loading_message() {
26
+ document.getElementById('status-loading-message').style.display = 'none';
27
+ }
28
+ function show_comparison_selector() {
29
+ document.getElementById('comparison-authority-selector').style.display = 'block';
30
+ }
31
+ function hide_comparison_selector() {
32
+ document.getElementById('comparison-authority-selector').style.display = 'none';
8
33
  }
9
34
  </script>
10
35
 
@@ -12,24 +37,43 @@
12
37
 
13
38
  <h2><%= t('qa_server.check_status.title') %></h2>
14
39
 
40
+ <% selected_authority = @presenter.selected_authority %>
41
+ <% selected_comparison = @presenter.selected_comparison %>
15
42
  <%= form_tag({ action: 'index' }, { method: :get }) do %>
16
- <select name="authority" id="authority" class="string multi-value optional form-control form-control multi-text-field" value="" aria-labelledby="authority" onchange="validate_authority(this.form)">
17
- <option value=""><%= t('qa_server.check_status.select_authority') %></option>
18
- <option disabled>──────────</option>
19
- <option value="<%= @presenter.value_all_collections %>"><%= t('qa_server.check_status.show_all') %></option>
20
- <option disabled>──────────</option>
21
- <% @authorities_list.each do |auth_name| %>
22
- <option value="<%= auth_name %>"><%= auth_name.upcase %></option>
23
- <% end %>
24
- </select>
25
- <div class="validation-types">
26
- <%= radio_button_tag(@presenter.value_check_param, @presenter.value_check_connections, :selected) %>
27
- <%= label_tag(@presenter.label_check_connections, t('qa_server.check_status.connections'), class: 'horizontal-list') %>
28
- <%= radio_button_tag(@presenter.value_check_param, @presenter.value_check_accuracy) %>
29
- <%= label_tag(@presenter.label_check_accuracy, t('qa_server.check_status.accuracy'), class: 'horizontal-list') %>
30
- <%= radio_button_tag(@presenter.value_check_param, @presenter.value_all_checks) %>
31
- <%= label_tag(@presenter.label_all_checks, t('qa_server.check_status.all_checks'), class: 'horizontal-list') %>
32
- </div>
43
+ <div id="authority-selector">
44
+ <select name="authority" id="authority" class="string optional form-control form-control" value="" aria-labelledby="authority" onchange="hide_data()">
45
+ <option value=""><%= t('qa_server.check_status.select_authority') %></option>
46
+ <option disabled>──────────</option>
47
+ <option value="<%= @presenter.value_all_collections %>"><%= t('qa_server.check_status.show_all') %></option>
48
+ <option disabled>──────────</option>
49
+ <% @authorities_list.each do |auth_name| %>
50
+ <option value="<%= auth_name %>"<%= " selected" if auth_name == selected_authority %>><%= auth_name.upcase %></option>
51
+ <% end %>
52
+ </select>
53
+ </div>
54
+
55
+ <div id="comparison-authority-selector" style="<%= "display\: block" if @presenter.comparison_status_data? %>">
56
+ Compare with:
57
+ <select name="compare_with" id="compare-with" class="string optional form-control form-control" value="" aria-labelledby="authority" onchange="hide_data()">
58
+ <option value=""><%= t('qa_server.check_status.select_authority') %></option>
59
+ <option disabled>──────────</option>
60
+ <% @authorities_list.each do |auth_name| %>
61
+ <option value="<%= auth_name %>"<%= " selected" if auth_name == selected_comparison %>><%= auth_name.upcase %></option>
62
+ <% end %>
63
+ </select>
64
+ </div>
65
+
66
+ <div class="validation-types">
67
+ <%= radio_button_tag(@presenter.value_check_param, @presenter.value_check_connections, @presenter.connection_tests_checked, onClick: "hide_comparison_selector()") %>
68
+ <%= label_tag(@presenter.label_check_connections, t('qa_server.check_status.connections'), class: 'horizontal-list') %>
69
+ <%= radio_button_tag(@presenter.value_check_param, @presenter.value_check_accuracy, @presenter.accuracy_tests_checked, onClick: "hide_comparison_selector()") %>
70
+ <%= label_tag(@presenter.label_check_accuracy, t('qa_server.check_status.accuracy'), class: 'horizontal-list') %>
71
+ <%= radio_button_tag(@presenter.value_check_param, @presenter.value_check_comparison, @presenter.comparison_tests_checked, onClick: "show_comparison_selector()") %>
72
+ <%= label_tag(@presenter.label_check_comparison, t('qa_server.check_status.comparison'), class: 'horizontal-list') %>
73
+ <%= radio_button_tag(@presenter.value_check_param, @presenter.value_all_checks, false, onClick: "hide_comparison_selector()") %>
74
+ <%= label_tag(@presenter.label_all_checks, t('qa_server.check_status.all_checks'), class: 'horizontal-list') %>
75
+ </div>
76
+ <button type="submit" class="btn btn-primary" id="check-status-go" onclick="validate_authority(this.form)">GO</button>
33
77
  <% end %>
34
78
 
35
79
 
@@ -56,7 +100,7 @@
56
100
  </tr>
57
101
  <% end %>
58
102
  <tr>
59
- <td class="<%= @presenter.status_style_class(status) %>"><%= @presenter.status_label(status) %></td>
103
+ <td class="<%= @presenter.status_style_class(status[:status]) %>"><%= @presenter.status_label(status[:status]) %></td>
60
104
  <td><%= status[:subauthority_name] %></td>
61
105
  <td><%= status[:service] %></td>
62
106
  <td><%= status[:action] %></td>
@@ -75,6 +119,7 @@
75
119
  <tr>
76
120
  <th><%= t('qa_server.check_status.status_table.expected_by_position') %></th>
77
121
  <th><%= t('qa_server.check_status.status_table.actual_position') %></th>
122
+ <th><%= t('qa_server.check_status.status_table.request_data') %></th>
78
123
  <th><%= t('qa_server.check_status.status_table.subject_uri') %></th>
79
124
  <th><%= t('qa_server.check_status.status_table.authority') %></th>
80
125
  <th><%= t('qa_server.check_status.status_table.subauthority') %></th>
@@ -83,10 +128,18 @@
83
128
  <th><%= t('qa_server.check_status.status_table.url') %></th>
84
129
  <th><%= t('qa_server.check_status.status_table.errmsg') %></th>
85
130
  </tr>
131
+ <% current_authority = nil %>
86
132
  <% @presenter.accuracy_status_data.each do |status| %>
133
+ <% unless status[:authority_name] == current_authority %>
134
+ <% current_authority = status[:authority_name] %>
135
+ <tr>
136
+ <td class="table_subheading" colspan="10"><%= current_authority %></td>
137
+ </tr>
138
+ <% end %>
87
139
  <tr>
88
- <td class="position <%= @presenter.status_style_class(status) %>"><%= status[:expected] %></td>
89
- <td class="position <%= @presenter.status_style_class(status) %>"><%= status[:actual] %></td>
140
+ <td class="position <%= @presenter.status_style_class(status[:status]) %>"><%= status[:expected] %></td>
141
+ <td class="position <%= @presenter.status_style_class(status[:status]) %>"><%= status[:actual] %></td>
142
+ <td><%= status[:request_data] %></td>
90
143
  <td><a href="<%= status[:target] %>"><%= status[:target] %></a></td>
91
144
  <td><%= status[:authority_name] %></td>
92
145
  <td><%= status[:subauthority_name] %></td>
@@ -100,4 +153,47 @@
100
153
  </div>
101
154
  <% end %>
102
155
 
156
+ <% if @presenter.comparison_status_data? %>
157
+ <div id="comparison-status-section" class="status-section">
158
+ <h3><%= t('qa_server.check_status.comparison_checks') %></h3>
159
+ <% auth_before = @presenter.comparison_status_data.first[:authority_name][0]%>
160
+ <% auth_after = @presenter.comparison_status_data.first[:authority_name][1]%>
161
+ <table class="status">
162
+ <tr>
163
+ <th class="comparison-header comparison-before bold-left-border" colspan=2><%= auth_before %><br><%= t('qa_server.check_status.status_table.before') %></th>
164
+ <th class="comparison-header comparison-after" colspan=2><%= auth_after %><br><%= t('qa_server.check_status.status_table.after') %></th>
165
+ <th class="comparison-header" colspan=7></th>
166
+ </tr>
167
+ <tr>
168
+ <th class="bold-left-border"><%= t('qa_server.check_status.status_table.expected_by_position') %></th>
169
+ <th><%= t('qa_server.check_status.status_table.actual_position') %></th>
170
+ <th class="bold-left-border"><%= t('qa_server.check_status.status_table.expected_by_position') %></th>
171
+ <th><%= t('qa_server.check_status.status_table.actual_position') %></th>
172
+ <th class="bold-left-border"><%= t('qa_server.check_status.status_table.request_data') %></th>
173
+ <th><%= t('qa_server.check_status.status_table.subject_uri') %></th>
174
+ <th><%= t('qa_server.check_status.status_table.subauthority') %></th>
175
+ <th><%= t('qa_server.check_status.status_table.service') %></th>
176
+ <th><%= t('qa_server.check_status.status_table.action') %></th>
177
+ <th><%= t('qa_server.check_status.status_table.url') %></th>
178
+ <th><%= t('qa_server.check_status.status_table.errmsg') %></th>
179
+ </tr>
180
+ <% @presenter.comparison_status_data.each do |status| %>
181
+ <tr>
182
+ <td class="position bold-left-border <%= @presenter.status_style_class(status[:status][0]) %>"><%= status[:expected][0] %></td>
183
+ <td class="position <%= @presenter.status_style_class(status[:status][0]) %>"><%= status[:actual][0] %></td>
184
+ <td class="position bold-left-border <%= @presenter.status_style_class(status[:status][1]) %>"><%= status[:expected][1] %></td>
185
+ <td class="position <%= @presenter.status_style_class(status[:status][1]) %>"><%= status[:actual][1] %></td>
186
+ <td class="bold-left-border"><%= status[:request_data] %></td>
187
+ <td><a href="<%= status[:target] %>"><%= status[:target] %></a></td>
188
+ <td><%= status[:subauthority_name] %></td>
189
+ <td><%= status[:service] %></td>
190
+ <td><%= status[:action] %></td>
191
+ <td><a href="<%= status[:url][0] %>"><%= status[:url][0] %></a>, <a href="<%= status[:url][1] %>"><%= status[:url][1] %></a></td>
192
+ <td><%= status[:err_message] %></td>
193
+ </tr>
194
+ <% end %>
195
+ </table>
196
+ </div>
197
+ <% end %>
198
+
103
199
  </div>
@@ -32,6 +32,7 @@ en:
32
32
  authority: Authority
33
33
  errmsg: Errors
34
34
  expected_by_position: Expected by Position
35
+ request_data: Query
35
36
  service: Service
36
37
  status: Status
37
38
  subauthority: Subauthority
@@ -28,9 +28,9 @@ class QaServer::AssetsGenerator < Rails::Generators::Base
28
28
  end
29
29
  end
30
30
 
31
- private
31
+ private
32
32
 
33
- def qa_server_javascript_installed?
34
- IO.read("app/assets/javascripts/application.js").include?('qa_server')
35
- end
33
+ def qa_server_javascript_installed?
34
+ IO.read("app/assets/javascripts/application.js").include?('qa_server')
35
+ end
36
36
  end
@@ -4,8 +4,8 @@
4
4
  "prefixes": {
5
5
  "rdaGr2": "http://rdvocab.info/ElementsGr2/",
6
6
  "rdaGr3": "http://rdvocab.info/ElementsGr3/",
7
- "ct": "http://www.cerl.org/namespaces/thesaurus",
8
- "rdaRelGr2": "http://metadataregistry.org/uri/schema/RDARelationshipsGR2",
7
+ "ct": "http://www.cerl.org/namespaces/thesaurus/",
8
+ "rdaRelGr2": "http://metadataregistry.org/uri/schema/RDARelationshipsGR2/",
9
9
  "vivo": "http://vivoweb.org/ontology/core#"
10
10
  },
11
11
  "term": {
@@ -2,6 +2,7 @@
2
2
  "QA_CONFIG_VERSION": "2.2",
3
3
  "service_uri": "http://ld4l.org/ld4l_services/cache",
4
4
  "prefixes": {
5
+ "getty": "http://vocab.getty.edu/ontology#",
5
6
  "vivo": "http://vivoweb.org/ontology/core#"
6
7
  },
7
8
  "term": {
@@ -89,6 +90,67 @@
89
90
  "label_ldpath": "skos:prefLabel ::xsd:string",
90
91
  "sort_ldpath": "vivo:rank ::xsd:string"
91
92
  },
93
+ "context": {
94
+ "groups": {
95
+ "hierarchies": {
96
+ "group_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.hierarchies",
97
+ "group_label_default": "Hierarchies"
98
+ }
99
+ },
100
+ "properties": [
101
+ {
102
+ "property_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.preferred_label",
103
+ "property_label_default": "Preferred label",
104
+ "ldpath": "skos:prefLabel :: xsd:string",
105
+ "selectable": true,
106
+ "drillable": false
107
+ },
108
+ {
109
+ "property_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.alt_label",
110
+ "property_label_default": "Alternative Label",
111
+ "ldpath": "skos:altLabel :: xsd:string",
112
+ "selectable": false,
113
+ "drillable": false
114
+ },
115
+ {
116
+ "group_id": "hierarchies",
117
+ "property_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.broader",
118
+ "property_label_default": "Broader",
119
+ "ldpath": "skos:broader :: xsd:string",
120
+ "selectable": true,
121
+ "drillable": true,
122
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
123
+ "expansion_id_ldpath": "dc:identifier ::xsd:string"
124
+ },
125
+ {
126
+ "group_id": "hierarchies",
127
+ "property_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.narrower",
128
+ "property_label_default": "Narrower",
129
+ "ldpath": "skos:narrower :: xsd:string",
130
+ "selectable": true,
131
+ "drillable": true,
132
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
133
+ "expansion_id_ldpath": "dc:identifier ::xsd:string"
134
+ },
135
+ {
136
+ "property_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.scope_note",
137
+ "property_label_default": "Scope note",
138
+ "ldpath": "skos:scopeNote :: xsd:string",
139
+ "selectable": false,
140
+ "drillable": false
141
+ },
142
+ {
143
+ "group_id": "hierarchies",
144
+ "property_label_i18n": "qa.linked_data.authority.getty_aat_ld4l_cache.hierarchy",
145
+ "property_label_default": "Hierarchy",
146
+ "ldpath": "gvp:broaderPreferredExtended :: xsd:string",
147
+ "selectable": true,
148
+ "drillable": true,
149
+ "expansion_label_ldpath": "skos:prefLabel ::xsd:string",
150
+ "expansion_id_ldpath": "dc:identifier ::xsd:string"
151
+ }
152
+ ]
153
+ },
92
154
  "subauthorities": {
93
155
  "Activities": "&facet=300264090",
94
156
  "Activities__Disciplines": "&facet=300054134",
@@ -123,4 +185,3 @@
123
185
  }
124
186
  }
125
187
  }
126
-