forked from ManageIQ/manageiq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ManageIQ#21117 from gtanzillo/fix-multi-tags-charg…
…eback Fixes bug where filtering by tag was returning all metric rollups regardless of assigned tags
- Loading branch information
Showing
7 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Add to config/application.rb: | ||
# | ||
# config.middleware.use 'BeforeSessionMiddleware' | ||
# | ||
class BeforeSessionMiddleware | ||
def initialize(app) | ||
@app = app | ||
end | ||
|
||
def call(env) | ||
session_id = cookies(env)['_vmdb_session'] | ||
Rails.logger.info("Session ID: #{session_id.inspect}") | ||
|
||
@app.call(env) | ||
end | ||
|
||
private | ||
|
||
def cookies(env) | ||
env["HTTP_COOKIE"].split(/\s*;\s*/).map do |keyval| | ||
keyval.split('=') | ||
end.to_h | ||
rescue StandardError | ||
{} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters