Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Display Vm option, when clicking on chart #3122

Merged
merged 2 commits into from
Dec 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions app/controllers/application_controller/performance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,11 @@ def perf_menu_click

report = @sb[:chart_reports].kind_of?(Array) ? @sb[:chart_reports][chart_click_data.chart_index] : @sb[:chart_reports]
data_row = report.table.data[chart_click_data.data_index]

ts = data_row["timestamp"].in_time_zone(@perf_options[:tz]) # Grab the timestamp from the row in selected tz

request_displayed, unavailability_reason = case chart_click_data.cmd
when "Display"
if chart_click_data.model == "Current" && chart_click_data.type == "Top"
display_current_top(chart_click_data, data_row)
display_current_top(data_row)
elsif chart_click_data.type == "bytag"
display_by_tag(chart_click_data, data_row, report, ts, bc_model)
else
Expand Down Expand Up @@ -529,7 +527,7 @@ def date_time_running_msg(typ, timestamp)
# Send error message if record is found and authorized, else return the record
def perf_menu_record_valid(model, id)
record = find_record_with_rbac(model.constantize, id)
if record.present?
if record.blank?
add_flash(_("Can't access selected record"))
end
unless @flash_array.blank?
Expand Down