From b02d50dac808fc1eaa4d68eb3c4946e8254516cf Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 12 Nov 2018 11:28:18 +0000 Subject: [PATCH 1/2] manager: improve code to hide production features --- app/views/fields/features_field/_show.html.haml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/fields/features_field/_show.html.haml b/app/views/fields/features_field/_show.html.haml index 27e2741ca..ae3d79b23 100644 --- a/app/views/fields/features_field/_show.html.haml +++ b/app/views/fields/features_field/_show.html.haml @@ -6,9 +6,9 @@ end %table#features - - Flipflop.feature_set.features.each do |feature| - - if !feature.group || feature.group.key != :production - %tr - %td= feature.title - %td - = check_box_tag "enable-feature", "enable", field.data[feature.name], data: { url: url, key: feature.key } + - admin_features = Flipflop.feature_set.features.reject{ |f| f.group.try(:key) == :production } + - admin_features.each do |feature| + %tr + %td= feature.title + %td + = check_box_tag "enable-feature", "enable", field.data[feature.name], data: { url: url, key: feature.key } From f7c586f3e40b262bc9563bdd963290796f931e4c Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 13 Nov 2018 16:34:56 +0100 Subject: [PATCH 2/2] features: add maintenance features to the 'production' group --- config/features.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/features.rb b/config/features.rb index 6ec364588..7d935f358 100644 --- a/config/features.rb +++ b/config/features.rb @@ -27,8 +27,7 @@ Flipflop.configure do default: ENV['FOG_ENABLED'] == 'enabled' feature :weekly_overview, default: ENV['APP_NAME'] == 'tps' + feature :pre_maintenance_mode + feature :maintenance_mode end - - feature :pre_maintenance_mode - feature :maintenance_mode end