Fixes #23962 - Fix Style/ExpandPathArguments cop
Fixes #23142,#23503 - telemetry improvements
Fixes #19781 - Fix Layout/LeadingCommentSpace cop
Fixes #23223 - Don't allow Dynflow to initialize in db:drop rake
Fixes #23098 - Allow searching on all audited models by type (#5395)
This automatically adds all the audited models in an after_initilizeblock so that models defined in plugins are also included. All thesearch related definitions for audit have been extracted to a seperate...
Refs #22285 - Prepare tests for strong params enforcement
- Fix broken hosts api tests- Fix role cloning tests- Fix ssh key controller api test- Fix http proxies controller test- Fix lookup key override api controller test- Fix puppetclass controller api test...
Refs #22285 - add common parameters to strong_params whitelist
Despite the name, this list only prevents errors from being raised fromthese parameters which are still filtered.
Fixes #19793 - Fix Layout/SpaceInsideReferenceBrackets cop
Fixes #22888 - remove code around dynflow db_pool_size
Remove the code in favor of the Dynfow, where we can handle all thelogic at one place.
Fixes #22493 - structured logging support
Refs #18675 - Optionally load prometheus exporter
In case the bundler group telemetry is not installed, we should handlethat.
This moves the middleware loading to better match the other middleware.
Fixes #21097 - Update to Rails 5 configuration options
Fixes #21084 - Always Use Rails 5.0, Drop Rails 4.2
Fixes #18292 - Make notifications from an RSS feed (#4240)
This adds a task to connect to an RSS feed, by default the one from ourcommunity blog. The idea is to make this run every night with 'cron' onevery Foreman installation to keep people updated about changes, and...
Fixes #21295 - load the routes before we load the controllers
After upgrade from Rails 4.1 to Rails 4.2 there was significantdrop on rails startup in production. I have tracked it down toseveral changes in Rails, but it might also be affected by thefact the we use the url_helpers on more places than older Foreman...
Fixes #20201 - Global HTTP proxy for outgoing requests
This introduce two new settings to proxy outgoing HTTPrequests and one to except certain hosts from it.
The extensions for Excon::Connection and Net::HTTPallow setting a proxy on their requests.
Fixes #20908 - postpone initialization of Dynflow runtime
In #18618, the initialization code was moved from foreman-tasks toforeman. There was however one thing done differently, where theinitialization of dynflow world was moved directly to the time`Rails.application.dynflow` was called. This is not right, as there are...
fixes #10982 - configure RestClient log to 'proxy' logger
Request/response information is sent to the proxy logger, showing theURLs called, headers, request body etc.
The X-Request-ID header is now also set in the proxy requests to arandom ID stored in the session, to prevent the user's real session ID...
Fixes #18618 - Use Dynflow as an ActiveJob backend
This commit initializes the Dynflow world in a very similar manner toforeman-tasks (if a Dynflow world is available from foreman-tasks, weuse that one).
fixes #18500 - replace quiet_assets with sprockets-rails flag
The app.assets environment is no longer always configured, and insteadis only configured when the regular Rails environment is loaded. Loadingonly the 'assets' group initializers isn't sufficient....
fixes #19050 - add Ruby on Rails 5.0 support
Adds configurable support for running on Ruby on Rails 5.0 or 4.2,defaulting now to 5.0 on Ruby 2.3 or higher. Ruby versions with partialor no support remain using 4.2 by default. Other points:
1. SETTINGS[:rails] is loaded pre-Rails boot, then post-boot the...
Fixes #19728 - set admin user in rake console
fixes #19317, #10927 - move registries to autoload_once path
Partially reverts 70ce8fe to reinstate autoload_once_paths as thepreferred way to load registry-type objects with class variablescontaining data set up during app initialisation (e.g. pluginregistrations, menu items.)...
Refs #13772 - ensure ApplicationRecord is loaded soon enough
In `lib/core_extensions.rb` we define as `per_page` method, that getscalled by `will_paginate` at load time of the models. The issue iswe are using `Setting` model there, that inherits from the...
fixes #18445 - always define eager_load_paths, use require_dep
Allows `eager_load!` to be called or enabled in any environment withoutloading files under lib/ twice. Switches many `require` calls to Rails'`require_dependency` to always use its dependency loader, so when eager...
fixes #18681 - moves polymorphic subject into notification object
also adds host build, destroyed and missing owner UI notifications
Refs #15779 - make background processing unavailable for now (#4217)
The original PR got vetted in the packaging phase and includingforeman-task as dependency of Foreman was refused. We need to rethinkour approach for getting the foreman-tasks functionality available...
Refs #15779 - move the foreman-tasks to own bundle group
This makes it easier to achieve a minimal setup, that might be needed forthings like plugins building etc.
Fixes #17343 - set deep munge config off
deep_munge was introduced as a solution to keepRails secure by default which results in'empty array becomes nil in params'.Thats why, set deep_munge config off in application.rb.Also, added changes which will cast param argument to string...
Fixes #16643 - Display origin for facts
This commit sets the interfaces for the fact importers to start settinga Fact origin, and display it in the UI
Fixes #9016 - improved fact loading performance
This change improves fact loading performance by order of magnitude onSQLite mostly thanks to explicit transaction. An extra optimization wasdone for the most important "update" method call which is mostly used...
fixes #16567 - use constants to register Rack middleware
Fixes #12634 - New HW Model flag pxe_loader
Implementation of
https://github.com/theforeman/rfcs/blob/master/text/0001-PXE-Booting-UEFI.md
In short, new host/hostgroup flag PXE loader is added to specify TFTPDHCP filename and Foreman now orchestrates all PXE-capable templates...
fixes #15863 - add short session or request ID to logs
New middleware stores the session and request IDs (either fromX-Request-ID or a UUID generated by Rails) in the logger's threadstorage. The truncated session ID is now logged by default to minimise...
fixes #14913 - configure Hirb/Wirb via irbrc
Wirb 2.x can't be started before the IRB session itself, so use an irbrcfile per its docs to activate it and Hirb when starting a console.
Refs #3809 - Turning on some rubocop cops
fixes #14912 - setup console gems under bundler_ext
fixes #14820 - override Rails log level with Foreman::Logging config
The log_level is expected to be explicitly configured in the Railsconfig in the production environment.
fixes #13244 - update Rails to 4.2.6
- Add responders gem to support class-level respond_to usage - http://edgeguides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to- Replace foreigner with native Rails 4.2 FK support - uses a patch from Rails 5 to support Foreigner's...
Fixes #14588 - introduce plugin API for extending template helpers
fixes #14415 - check CR availability with Fog, not SETTINGS
Simplifies the code for checking compute resource availability, whichcan easily be determined with the registered Fog providers instead ofbeing stored in SETTINGS in app initialisation. Plugins should always be...
fixes #14434 - refactor tokens into concern from observer
rails-observers is still required via audited, but this removes theusage in Foreman itself and unifies token-related code.
fixes #14368 - update fog to 1.38.0
fixes #14338 - move session store configuration earlier
When a plugin has an initializer relying on :build_middleware_stack, themiddleware stack is constructed with the default session store (cookies)as the store hasn't been configured by config/initializers/ yet. Moving...
Fixes #9470 - Adds an option to send puppet error emails for all host to a user
Adds an option to the puppet error state notification - Subscribe to all hosts, when error occurs from any authorize host, the user will get an email
fixes #13804 - set enforce_available_locales in app config
Rails 4.1.9 in rails/rails@4399a23 sets I18n.enforce_available_localesto the value in the Rails app config, which now defaults to true,overwriting the false value set in the initialiser. Set it in the app...
Revert "Fixes #13424 - Add Patternfly Donut Chart React component"
This reverts commit f4b2a11615d14ba1407aecd55523cd44d1010e14.
Fixes #13424 - Add Patternfly Donut Chart React component
Our donut charts do not look like they should in Patternfly.https://www.patternfly.org/patterns/donut-chart/ uses c3, so we can dothat too.Eventually I want to remove flot_pies too, but I have to yet figure out...
Fixes #13171: Prevent frozen array error when plugins have assets
When the application is configured to serve static assets, thepublic/asset paths of the plugins need to be added to the middlewarestack. However, this needs to occur prior to the middleware stack...
fixes #12612 - Update fog to 1.37.0
- Update fog to 1.37.0- Add fog-vsphere- Change detection if vmware provider is available
Fixes #7230, #12021 - Upgrade to Rails 4.1.5
This commits upgrades Rails to Rails 4.1.5. See a description of thechanges included here, and go to the pull request in GitHub to see moredetailed explanations:
Fixes #12311 - Fix issue with failed initialization of rack openid middleware.
This fix is for rails4 but is backwards compatible with rails3
When placed in a rails initializer the rack middleware fails toload, throwing a can't modify frozen array error. Moving the...
Fixes #11816 - Remove whitelist_attributes as it's deprecated
config.active_record.whitelist_attributes = false is already the defaultso it's not necessary. Also Rails 4 deprecates it so we can remove it.
Fixes #10782 - global host status
Plugins can add their own substatuses. These are automatically...
fixes #10832 - separating lookup keys into puppet and variable
Fixes #11413 - disable SQL logging by default
Fixes #11056: Configure base SETTINGS for test environment.
This change introduces the idea of having a base configuration forSETTINGS within the test environment. This is captured in thesettings.yaml.test file. To be able to detect the Rails environment...
fixes #10787 - load fog extensions based on available CRs
Previously fog_extensions loaded inside one large rescue LoadError, soif fog-libvirt wasn't installed, it would fail part way through. Nowcheck which providers are loaded, and only extend those. Moved loading...
Fixes #10736 - Add permission specific logger
fixes #10711 - move LDAP logging to a separate logger
Fixes #10487: Add custom logging support
This change moves away from the Rails logger to the 'logging' gemto support more configurability of logging. Further, this allows forthe creation of custom loggers that plugins can then create duringregistration (with `logger`) or through settings....
fixes #10510 - move secure flag to existing session configuration
On a source installation with SSL, the session store is properly configurednow and no longer continually resets user sessions.
fixes #10275 - Add secure cookie when in ssl (CVE-2015-3155)
fixes #10261 - update fog to 1.30.0
Refs #3809 - Remove cops for empty lines
Fixes #8641 - Update fog to 1.27
Refs #3809 - Remove useless assignments
Fixes #8424 - Controller concerns are loaded twice
config/application.rb, we are adding the controller concerns twicefolder to autoload_paths
Fixes #8009 - Make sure the final version of helpers is in the controller
Refs #3809 - Fix a few rubocop TODOs
fixes #2972 - load jsonp on bundler_ext installations
Fixes #4976 - ensure the process is really running inside a rake task
Fixes #4515 - Add support for dynamic bindings
Fixes #3988 - use require instead of autoload_once_paths
fixes #812 - new permissions model, user group role and nest support, role filters for better granularity
fixes #3821 Plugin menus are lost after page refresh in development
fixes #3587, #2855 - print an error on invalid json vs 500 error
fixes #3138 - move CR library loading into initializers, only show available providers
Fixes #2821 - Autoload paths, PowerManager children must be in namespace in order to autoload
fixes #2411 - add autoload_paths in application.rb in preparation for file location changes
fixes #426 expose BMC information in foreman UI
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>
This patch also adds an abstracted power management class for both VMand BM
fixes #2428 - a workaround for an issue with SETTINGS[:libvirt] not being properly initialized in rpm environments
fixes #2407 - Add STI to settings model
Also adds some tests for rendering new/missing STI models, andrefactors the old default_settings loader into the new sub-models.
upgrade foreman to rails 3.2.13
This commit updates from rails 3.0.x to 3.2.x, main changes include:
Users who uses foreman in production, make sure that you now compileyour assets, e.g...
fixes #2239 API v2 CRUD for locations and organizations and added nested loc/org
bundler_ext initial support
This adds support for bundler_ext. The idea behind this is we want to avoidBundler in katello foreman builds, therefore in our RPMs we are gonna renameGemfile to Gemfile.in.
If Gemfile.in is found, bundler is not used and loading of dependencies is...
refs #1991 - Cache not cleared prevent location / org feature to show up
1. ensures settings cache is removed when app startswe can't remove all cache, with Rails.cache.clear as that might lead to issueswith people using memcache with multiple foreman instances (e.g. we can clear...
fixes #1961 Adding JSONP support
When using cross-domain requests, it is impossible to read the responsedata, and process it.Using JSONP allows a client, from a specific domain (for example/domain1), to query data in another doamin (/domain2), and analyze it,...
split api routes to separate routes file
[UI] fixes drop downs not showing up correctly when viewing a page with errors
dont fail if console bundler group is not installed
add more frendily error messages upon console failure
Allow to run rails console even if the support gems are not installed
adds ec2 provisioning support fixes #1223
- added progress bar for instance creation- minor fixes for certname based deployments- added ssh provisioning support to orchestartion, which utilize finish scripts by default- added images support (part of the vm compute tab)...
cleanups to rails 3 boot process
debian platform puppet is still considered a as a gem
ensure that bundler loads after our custom gem requirements
removed puppet from Gem file requirement
this commit also tries to simplify the way we use bundler, in future commits,we should add more logic of which gems to load based on configration file.
Gemfile cleanups + adding some nicer console output
WIP rails3 migration