Module: QaServer::MonitorStatus::PerformanceGraphBehavior
Overview
rubocop:disable Metrics/ModuleLength
Constant Summary
PerformanceHistoryDataKeys::ALL_ACTIONS, PerformanceHistoryDataKeys::ALL_AUTH, PerformanceHistoryDataKeys::AVG_ACTN, PerformanceHistoryDataKeys::AVG_FULL, PerformanceHistoryDataKeys::AVG_GRPH, PerformanceHistoryDataKeys::AVG_LOAD, PerformanceHistoryDataKeys::AVG_NORM, PerformanceHistoryDataKeys::AVG_RETR, PerformanceHistoryDataKeys::BY_DAY, PerformanceHistoryDataKeys::BY_HOUR, PerformanceHistoryDataKeys::BY_MONTH, PerformanceHistoryDataKeys::FETCH, PerformanceHistoryDataKeys::FOR_DATATABLE, PerformanceHistoryDataKeys::FOR_DAY, PerformanceHistoryDataKeys::FOR_MONTH, PerformanceHistoryDataKeys::FOR_YEAR, PerformanceHistoryDataKeys::HIGH_ACTN, PerformanceHistoryDataKeys::HIGH_FULL, PerformanceHistoryDataKeys::HIGH_GRPH, PerformanceHistoryDataKeys::HIGH_LOAD, PerformanceHistoryDataKeys::HIGH_NORM, PerformanceHistoryDataKeys::HIGH_RETR, PerformanceHistoryDataKeys::LOW_ACTN, PerformanceHistoryDataKeys::LOW_FULL, PerformanceHistoryDataKeys::LOW_GRPH, PerformanceHistoryDataKeys::LOW_LOAD, PerformanceHistoryDataKeys::LOW_NORM, PerformanceHistoryDataKeys::LOW_RETR, PerformanceHistoryDataKeys::SEARCH, PerformanceHistoryDataKeys::STATS
Instance Method Summary
collapse
Instance Method Details
72
73
74
75
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 72
def performance_all_actions_graph?(graph_info)
return true if performance_graph_action(graph_info) == :all_actions
false
end
|
52
53
54
55
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 52
def performance_data_section_class(graph_info)
return 'performance-data-section-visible' if default_graph?(graph_info)
'performance-data-section-hidden'
end
|
57
58
59
60
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 57
def performance_day_graph?(graph_info)
return true if performance_graph_time_period(graph_info) == :day
false
end
|
28
29
30
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 28
def performance_default_graph_id
"performance-for-day-#{ALL_AUTH}"
end
|
82
83
84
85
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 82
def performance_fetch_graph?(graph_info)
return true if performance_graph_action(graph_info) == :fetch
false
end
|
16
17
18
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 16
def performance_graph(graph_info)
graph_info[:graph]
end
|
36
37
38
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 36
def performance_graph_action(graph_info)
graph_info[:action]
end
|
20
21
22
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 20
def performance_graph_authority(graph_info)
graph_info[:authority_name]
end
|
48
49
50
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 48
def performance_graph_data_section_base_id(graph_info)
graph_info[:base_id]
end
|
44
45
46
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 44
def performance_graph_data_section_id(graph_info)
"#{graph_info[:base_id]}-#{performance_graph_action(graph_info)}-during-#{performance_graph_time_period(graph_info)}"
end
|
40
41
42
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 40
def performance_graph_id(graph_info)
"#{graph_info[:base_id]}-#{performance_graph_action(graph_info)}-during-#{performance_graph_time_period(graph_info)}-chart"
end
|
24
25
26
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 24
def performance_graph_label(graph_info)
graph_info[:label]
end
|
32
33
34
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 32
def performance_graph_time_period(graph_info)
graph_info[:time_period]
end
|
8
9
10
11
12
13
14
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 8
def performance_graphs
auth_list = QaServer::AuthorityListerService.authorities_list
graphs = []
performance_graphs_for_authority(graphs, ALL_AUTH)
auth_list.each { |auth_name| performance_graphs_for_authority(graphs, auth_name) }
graphs
end
|
62
63
64
65
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 62
def performance_month_graph?(graph_info)
return true if performance_graph_time_period(graph_info) == :month
false
end
|
77
78
79
80
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 77
def performance_search_graph?(graph_info)
return true if performance_graph_action(graph_info) == :search
false
end
|
67
68
69
70
|
# File 'app/presenters/concerns/qa_server/monitor_status/performance_graph_behavior.rb', line 67
def performance_year_graph?(graph_info)
return true if performance_graph_time_period(graph_info) == :year
false
end
|