Skip to content

Commit

Permalink
When tagging in explorer store session after getView as well
Browse files Browse the repository at this point in the history
getView changes current @edit object, but we need to preserve it same as is in session, so restore @edit from session so tagging in explorer does not throw any error
  • Loading branch information
karelhala committed Jan 5, 2017
1 parent c7f2fd2 commit 6dfe568
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/controllers/report_data_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,9 @@
ReportDataController.prototype.movePagination = function() {
setTimeout(function() {
var pagination = document.getElementsByClassName('miq-pagination');
if (pagination && pagination.length > 0) {
document.querySelector('#paging_div .col-md-12').appendChild(pagination[0])
var pagind_div = document.querySelector('#paging_div .col-md-12');
if (pagination && pagination.length > 0 && pagind_div) {
pagind_div.appendChild(pagination[0])
}
});
}
Expand Down
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def report_data
current_view, settings = get_view(model_view, options)
settings[:sort_dir] = @sortdir unless settings.nil?
settings[:sort_col] = @sortcol unless settings.nil?
@edit = session[:edit]
render :json => {
:settings => settings,
:data => view_to_hash(current_view),
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/before_install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -e

git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 spec/manageiq
git clone https://github.com/karelhala/manageiq.git --branch report_data --depth 1 spec/manageiq

cd spec/manageiq
source tools/ci/setup_vmdb_configs.sh
Expand Down

0 comments on commit 6dfe568

Please sign in to comment.