-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature flags GUI #513
Feature flags GUI #513
Conversation
app/components/admin/feature_flags/feature_flag_toggle_component.html.erb
Outdated
Show resolved
Hide resolved
app/models/tenant.rb
Outdated
def list_features | ||
AVAILABLE_FEATURE_FLAGS.map do |feature| | ||
{ name: feature.to_s, | ||
enabled: feature_enabled?(feature), | ||
features_including: (feature_flags + [feature.to_s]).join(","), |
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.
Toto je interna vec view - cize tam by som to takto rozdeloval, plus teda hladas partition
metodu.
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.
@luciajanikova vies tu napisat flags ktore nema byt vidiet - resp. len v ?labs
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.
Viditelne flagy: :audit_log
, :archive
, :api
, :fs_sync
Schovane flagy: :message_draft_import
, :fs_api
podla mna takto @jsuchal
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.
@richardlences vies takto nastavit?
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.
Ano nastavil som to tak
@richardlences hod sem nejaky screenshot nech vidime ako to vyzera |
@luciajanikova tuto imho potrebujeme si povedat, ze ci toto dovolime zapnut hocikomu alebo niektore dame do "beta" rezimu a nebudu viditelne bezne. By som povedal, ze aby sme to vedeli zapinat nejako lahko, tak ked dame parameter |
|
||
def update | ||
authorize([:admin, :feature_flag]) | ||
@tenant.feature_flags = feature_flags_params[:enabled] == "true" ? @tenant.feature_flags.union([params[:id]]) : @tenant.feature_flags - [params[:id]] |
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.
Tento zapis neviem uplne precitat na prvu lebo nepouzivas uplne bezne metody. Ak chceme len pridat feature flag ak je enabled tak by som mozno zvazil takyto zapis.
@tenant.feature_flags = feature_flags_params[:enabled] == "true" ? @tenant.feature_flags.union([params[:id]]) : @tenant.feature_flags - [params[:id]] | |
if feature_flags_params[:enabled] == "true" | |
@tenant.feature_flags << params[:id] | |
else | |
@tenant.feature_flags.delete(params[:id]) | |
end |
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.
Este trosku poladme a uz sme skoro tam
No nejako som to opravil ale teda zatial su vsetky aj v available |
@@ -0,0 +1,19 @@ | |||
--- |
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.
Tento súbor tu asi nemá byť
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.
Aha ano uz som to odstranil
@richardlences dobojovane! diky! |
Super |
No description provided.