qa_server 7.1.3 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46a262b09fc1821b179ab2e770eac2b66d35309a
4
- data.tar.gz: 63bbcbad456433456ac629314a26a7256d6e6f8f
3
+ metadata.gz: 6126532673f0c180df4ffdad52f48e676a86f123
4
+ data.tar.gz: 41ffe57ca6dcae519aaba5860378ea018dd5f988
5
5
  SHA512:
6
- metadata.gz: ec68c4fc0737e5be3518d84cfb486e1083e727c7caa4954a4dd54499dbdd11bfb1273e125425bf1b234f39256e5db5e0c6ac81c7d55feb8c4838e3814f5cea1e
7
- data.tar.gz: 7d065c38a41dc6e54d9f116328e76c62a18d918429fb13442f80e932eb3804ad3af5e7868dfbddab40f85e8ffef159ee7a5a7d53b5c8fb964e8f54a89f8cc52e
6
+ metadata.gz: 300bc7ce6d46fdd89c69a496753470c4de90687a272ad649a86559dd55f26af7a134e6cf9a8502eb4e210aa8268f6c27cc031d3d25a1e7227b1f559afbd4a8fe
7
+ data.tar.gz: a3110736087b71f9efa473ad65eb644b3e9cc6b4c305c091e74ed278447f9ab8aca12a7c0e7247b1f2213792fc922ddb9fceb2ad2d948fa86673525188ccc404
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 7.2.0 (2020-02-22)
2
+
3
+ * move graphs from assets to public directory
4
+
1
5
  ### 7.1.3 (2020-02-22)
2
6
 
3
7
  * fix performance datatable never displays
@@ -7,7 +7,6 @@ module QaServer
7
7
 
8
8
  class << self
9
9
  include QaServer::CacheKeys
10
- include QaServer::MonitorStatus::GruffGraph
11
10
 
12
11
  HISTORICAL_GRAPH_FILENAME = 'historical_side_stacked_bar.png'
13
12
 
@@ -3,7 +3,6 @@
3
3
  module QaServer::MonitorStatus
4
4
  module PerformanceGraphBehavior # rubocop:disable Metrics/ModuleLength
5
5
  include QaServer::PerformanceHistoryDataKeys
6
- include QaServer::MonitorStatus::GruffGraph
7
6
 
8
7
  def performance_graphs
9
8
  auth_list = QaServer::AuthorityListerService.authorities_list
@@ -2,8 +2,6 @@
2
2
  # This presenter class provides historical testing data needed by the view that monitors status of authorities.
3
3
  module QaServer::MonitorStatus
4
4
  class HistoryPresenter
5
- include QaServer::MonitorStatus::GruffGraph
6
-
7
5
  # @param parent [QaServer::MonitorStatusPresenter] parent presenter
8
6
  # @param historical_summary_data [Array<Hash>] summary of past failuring runs per authority to drive chart
9
7
  def initialize(parent:, historical_summary_data:)
@@ -2,7 +2,6 @@
2
2
  # This presenter class provides performance data needed by the view that monitors status of authorities.
3
3
  module QaServer::MonitorStatus
4
4
  class PerformancePresenter
5
- include QaServer::MonitorStatus::GruffGraph
6
5
  include QaServer::MonitorStatus::PerformanceDatatableBehavior
7
6
  include QaServer::MonitorStatus::PerformanceGraphBehavior
8
7
  include QaServer::PerformanceHistoryDataKeys
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+ require 'fileutils'
3
+ require 'gruff'
4
+
5
+ # This module include provides graph methods for generating graphs with Gruff
6
+ module QaServer
7
+ module GruffGraph
8
+ private
9
+
10
+ # common path for displaying and writing
11
+ def graph_relative_path
12
+ File.join('qa_server', 'charts')
13
+ end
14
+
15
+ # used for displaying in a view with <image> tag
16
+ def graph_image_path
17
+ File.join('/', graph_relative_path)
18
+ end
19
+
20
+ # used for writing out the file
21
+ def graph_full_path(graph_filename)
22
+ path = Rails.root.join('public', graph_relative_path)
23
+ # path = Rails.root.join('app', 'assets', 'images', graph_relative_path)
24
+ FileUtils.mkdir_p path
25
+ File.join(path, graph_filename)
26
+ end
27
+ end
28
+ end
@@ -3,7 +3,7 @@
3
3
  module QaServer
4
4
  class HistoryGraphingService
5
5
  class << self
6
- include QaServer::MonitorStatus::GruffGraph
6
+ include QaServer::GruffGraph
7
7
 
8
8
  HISTORICAL_GRAPH_FILENAME = 'historical_side_stacked_bar.png'
9
9
 
@@ -12,7 +12,7 @@ module QaServer
12
12
 
13
13
  # Path to use with <image> tags
14
14
  def history_graph_image_path
15
- historical_graph_relative_path
15
+ File.join(graph_image_path, HISTORICAL_GRAPH_FILENAME)
16
16
  end
17
17
 
18
18
  # @return [Boolean] true if image for graph exists; otherwise, false
@@ -51,10 +51,6 @@ module QaServer
51
51
  graph_full_path(HISTORICAL_GRAPH_FILENAME)
52
52
  end
53
53
 
54
- def historical_graph_relative_path
55
- File.join(graph_relative_path, HISTORICAL_GRAPH_FILENAME)
56
- end
57
-
58
54
  def rework_historical_data_for_gruff(data)
59
55
  labels = {}
60
56
  pass_data = []
@@ -4,7 +4,7 @@ module QaServer
4
4
  class PerformanceGraphingService
5
5
  class << self
6
6
  include QaServer::PerformanceHistoryDataKeys
7
- include QaServer::MonitorStatus::GruffGraph
7
+ include QaServer::GruffGraph
8
8
 
9
9
  class_attribute :authority_list_class
10
10
  self.authority_list_class = QaServer::AuthorityListerService
@@ -14,7 +14,7 @@ module QaServer
14
14
  # @param time_period [Symbol] time period for the graph (i.e. :day, :month, :year)
15
15
  # @return [String] Path to use with <image> tags
16
16
  def performance_graph_image_path(authority_name: ALL_AUTH, action:, time_period:)
17
- File.join(graph_relative_path, graph_filename(authority_name, action, time_period))
17
+ File.join(graph_image_path, graph_filename(authority_name, action, time_period))
18
18
  end
19
19
  alias performance_graph_file performance_graph_image_path
20
20
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module QaServer
3
- VERSION = '7.1.3'
3
+ VERSION = '7.2.0'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qa_server
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.3
4
+ version: 7.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - E. Lynette Rayle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-22 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -373,7 +373,6 @@ files:
373
373
  - app/prepends/prepended_linked_data/find_term.rb
374
374
  - app/prepends/prepended_linked_data/search_query.rb
375
375
  - app/prepends/prepended_rdf/rdf_graph.rb
376
- - app/presenters/concerns/qa_server/monitor_status/gruff_graph.rb
377
376
  - app/presenters/concerns/qa_server/monitor_status/performance_datatable_behavior.rb
378
377
  - app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb
379
378
  - app/presenters/qa_server/authority_list_presenter.rb
@@ -384,6 +383,7 @@ files:
384
383
  - app/presenters/qa_server/monitor_status/performance_presenter.rb
385
384
  - app/presenters/qa_server/monitor_status_presenter.rb
386
385
  - app/presenters/qa_server/navmenu_presenter.rb
386
+ - app/services/concerns/qa_server/gruff_graph.rb
387
387
  - app/services/qa_server/authority_lister_service.rb
388
388
  - app/services/qa_server/authority_loader_service.rb
389
389
  - app/services/qa_server/authority_validator_service.rb
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'fileutils'
3
- require 'gruff'
4
-
5
- # This module include provides graph methods used by all monitor status presenters working with graphs
6
- module QaServer::MonitorStatus
7
- module GruffGraph
8
- private
9
-
10
- def graph_relative_path
11
- File.join('qa_server', 'charts')
12
- end
13
-
14
- def graph_full_path(graph_filename)
15
- path = Rails.root.join('app', 'assets', 'images', graph_relative_path)
16
- FileUtils.mkdir_p path
17
- File.join(path, graph_filename)
18
- end
19
- end
20
- end