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
feat: installation config in super admin console #1641
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please pull the existing database and see something breaks, I couldn't view the page because of the screenshot attached.
It's fixed now @pranavrajs . Thanks for reviewing. |
We should have a filter for the installation configs that are exposed in the UI. So we can hide the configs that shouldn't be tampered with. |
@sojan-official I agree with that. Can we take that up in the next set of changes? Or do you think it is better to do it in this PR itself? |
@pranavrajs @sojan-official I have incorporated the above-mentioned changes. Let me know if any changes need to be done on top of this. |
@sony-mathew I cannot create a new installation config. https://www.loom.com/share/a8ebc9f990d14dc6a0eda720aa3daa80 |
@pranavrajs Fixed the issue. |
* Added the ability for super admins to view, edit and update installation config values. Also they can add new isntallation config values. The impact of editing and adding depends on which all installation config values are being used in the code. * Known limitation now: Ability to edit hash values (for eg: feature flags) are disabled. This requires more work and will be taken up in a secondary set of changes. * Minor UX improvement. Clicking on the Sidekiq option in the super admin siebar will now open the sidekiq dashboard in a new tab rather than in the same tab that you were using super admin.
* Added the locked attribute to instalaltion config table. Added necessary migrations. Added changes in config loader. * Added the changes on the installation config yml * Locked the account feature defaults in code
* Added a new scope in installation config model * Added scope in adminstrate controller for installation_config
* Fixed the error in new installation config create
* Added specs for installation config super admin controller
9733566
to
f637a05
Compare
I think this broke the bootstrap using docker. I get this error when running migrations. undefined local variable or method `locked' for #<InstallationConfig:0x00007fdaf1615368>
Did you mean? lock!
/gems/ruby/2.7.0/gems/activemodel-6.0.3.4/lib/active_model/attribute_methods.rb:432:in `method_missing'
/app/app/models/installation_config.rb:39:in `set_lock'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:200:in `block (2 levels) in halting'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:605:in `block (2 levels) in default_terminator'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:604:in `catch'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:604:in `block in default_terminator'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:201:in `block in halting'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:513:in `each'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:513:in `invoke_before'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:134:in `run_callbacks'
/gems/ruby/2.7.0/gems/activesupport-6.0.3.4/lib/active_support/callbacks.rb:825:in `_run_validation_callbacks'
/gems/ruby/2.7.0/gems/activemodel-6.0.3.4/lib/active_model/validations/callbacks.rb:117:in `run_validations!'
/gems/ruby/2.7.0/gems/activemodel-6.0.3.4/lib/active_model/validations.rb:337:in `valid?'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:68:in `valid?'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:84:in `perform_validations'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/validations.rb:47:in `save'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:314:in `block in save'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:212:in `transaction'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/transactions.rb:314:in `save'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/suppressor.rb:44:in `save'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/persistence.rb:38:in `create'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:100:in `block in create'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:407:in `block in scoping'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:784:in `_scoping'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:407:in `scoping'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:100:in `create'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/relation.rb:169:in `find_or_create_by'
/gems/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/querying.rb:21:in `find_or_create_by'
/app/lib/config_loader.rb:62:in `save_as_new_config' |
* feat: installation config in super admin console * Added the ability for super admins to view, edit and update installation config values. Also they can add new isntallation config values. The impact of editing and adding depends on which all installation config values are being used in the code. * Known limitation now: Ability to edit hash values (for eg: feature flags) are disabled. This requires more work and will be taken up in a secondary set of changes. * Minor UX improvement. Clicking on the Sidekiq option in the super admin siebar will now open the sidekiq dashboard in a new tab rather than in the same tab that you were using super admin. * fix: method name fix in custom adminsitrate field * feat: added locked attribute to global config * Added the locked attribute to instalaltion config table. Added necessary migrations. Added changes in config loader. * Added the changes on the installation config yml * Locked the account feature defaults in code * feat: show only editable configs in admin console * Added a new scope in installation config model * Added scope in adminstrate controller for installation_config * fix: new installation config create error * Fixed the error in new installation config create * fix: specs coverage * Added specs for installation config super admin controller * chore: update git ignore with encrypted config ext
* feat: installation config in super admin console * Added the ability for super admins to view, edit and update installation config values. Also they can add new isntallation config values. The impact of editing and adding depends on which all installation config values are being used in the code. * Known limitation now: Ability to edit hash values (for eg: feature flags) are disabled. This requires more work and will be taken up in a secondary set of changes. * Minor UX improvement. Clicking on the Sidekiq option in the super admin siebar will now open the sidekiq dashboard in a new tab rather than in the same tab that you were using super admin. * fix: method name fix in custom adminsitrate field * feat: added locked attribute to global config * Added the locked attribute to instalaltion config table. Added necessary migrations. Added changes in config loader. * Added the changes on the installation config yml * Locked the account feature defaults in code * feat: show only editable configs in admin console * Added a new scope in installation config model * Added scope in adminstrate controller for installation_config * fix: new installation config create error * Fixed the error in new installation config create * fix: specs coverage * Added specs for installation config super admin controller * chore: update git ignore with encrypted config ext
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Tested in a local development environment.
Checklist: