flipper-ui 0.12.2 → 0.13.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/ui/README.md +21 -3
- data/docs/ui/images/configured-ui.png +0 -0
- data/docs/ui/images/environment-banner.png +0 -0
- data/docs/ui/images/feature.png +0 -0
- data/docs/ui/images/features.png +0 -0
- data/lib/flipper/ui/assets/javascripts/application.coffee +3 -0
- data/lib/flipper/ui/assets/stylesheets/.DS_Store +0 -0
- data/lib/flipper/ui/assets/stylesheets/application.scss +9 -48
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_alert.scss +51 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_badge.scss +47 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumb.scss +38 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-group.scss +166 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_buttons.scss +78 -95
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_card.scss +270 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_carousel.scss +122 -200
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_close.scss +12 -14
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_code.scss +15 -28
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_custom-forms.scss +297 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdown.scss +131 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_forms.scss +210 -455
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_functions.scss +86 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_grid.scss +29 -61
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_images.scss +42 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-group.scss +159 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_jumbotron.scss +8 -42
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_list-group.scss +64 -73
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_media.scss +3 -56
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_mixins.scss +21 -18
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_modal.scss +168 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_nav.scss +118 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_navbar.scss +203 -554
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_pagination.scss +58 -69
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_popover.scss +183 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_print.scss +71 -54
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress.scss +33 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_reboot.scss +482 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_root.scss +19 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_tables.scss +109 -163
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_tooltip.scss +97 -84
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_transitions.scss +36 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_type.scss +66 -239
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_utilities.scss +14 -55
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_variables.scss +726 -698
- data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-grid.scss +32 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-reboot.scss +12 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap.scss +42 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alert.scss +13 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_background-variant.scss +14 -4
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_badge.scss +12 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_border-radius.scss +25 -8
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +123 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_buttons.scss +89 -32
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_caret.scss +65 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_clearfix.scss +3 -18
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_float.scss +11 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_forms.scss +115 -66
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_gradients.scss +14 -27
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +52 -66
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid.scss +37 -107
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hover.scss +39 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_image.scss +18 -15
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -20
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +10 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_pagination.scss +10 -11
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-text.scss +17 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +35 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_size.scss +1 -5
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_table-row.scss +16 -14
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-hide.scss +9 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/{_text-overflow.scss → _text-truncate.scss} +2 -2
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_visibility.scss +7 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_borders.scss +59 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_display.scss +38 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +26 -9
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_flex.scss +46 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_float.scss +9 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_position.scss +36 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_sizing.scss +12 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_spacing.scss +51 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_text.scss +52 -0
- data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_visibility.scss +11 -0
- data/lib/flipper/ui/configuration.rb +24 -0
- data/lib/flipper/ui/decorators/feature.rb +3 -3
- data/lib/flipper/ui/public/css/application.css +6237 -2339
- data/lib/flipper/ui/public/js/application.js +3 -2
- data/lib/flipper/ui/views/add_actor.erb +7 -9
- data/lib/flipper/ui/views/add_feature.erb +8 -10
- data/lib/flipper/ui/views/add_group.erb +7 -9
- data/lib/flipper/ui/views/feature.erb +181 -141
- data/lib/flipper/ui/views/feature_creation_disabled.erb +1 -1
- data/lib/flipper/ui/views/feature_removal_disabled.erb +1 -1
- data/lib/flipper/ui/views/features.erb +12 -15
- data/lib/flipper/ui/views/layout.erb +25 -15
- data/lib/flipper/version.rb +1 -1
- data/spec/flipper/ui/actions/actors_gate_spec.rb +2 -1
- data/spec/flipper/ui/actions/add_feature_spec.rb +2 -1
- data/spec/flipper/ui/actions/groups_gate_spec.rb +2 -1
- data/spec/flipper/ui/configuration_spec.rb +27 -0
- data/spec/flipper/ui_spec.rb +24 -0
- metadata +58 -64
- data/lib/flipper/ui/assets/stylesheets/_bootstrap-compass.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/_bootstrap-mincer.scss +0 -19
- data/lib/flipper/ui/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/_bootstrap.scss +0 -50
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_alerts.scss +0 -73
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_badges.scss +0 -68
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -26
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-groups.scss +0 -243
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_component-animations.scss +0 -37
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdowns.scss +0 -214
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_glyphicons.scss +0 -305
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-groups.scss +0 -166
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_labels.scss +0 -66
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_modals.scss +0 -150
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_navs.scss +0 -242
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_normalize.scss +0 -427
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_pager.scss +0 -54
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_panels.scss +0 -265
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_popovers.scss +0 -135
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress-bars.scss +0 -87
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -177
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_scaffolding.scss +0 -162
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_theme.scss +0 -273
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_thumbnails.scss +0 -38
- data/lib/flipper/ui/assets/stylesheets/bootstrap/_wells.scss +0 -29
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -14
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -8
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -24
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +0 -10
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -21
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
- data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- data/lib/flipper/ui/public/css/primer.css +0 -1
- data/lib/flipper/ui/public/css/primer/primer.css +0 -1933
- data/lib/flipper/ui/public/css/scss/primer.css +0 -1933
- data/lib/flipper/ui/public/js/bootstrap-sprockets.js +0 -12
- data/lib/flipper/ui/public/js/bootstrap.js +0 -2317
- data/lib/flipper/ui/public/js/bootstrap.min.js +0 -7
- data/lib/flipper/ui/public/js/bootstrap/affix.js +0 -162
- data/lib/flipper/ui/public/js/bootstrap/alert.js +0 -94
- data/lib/flipper/ui/public/js/bootstrap/button.js +0 -116
- data/lib/flipper/ui/public/js/bootstrap/carousel.js +0 -237
- data/lib/flipper/ui/public/js/bootstrap/collapse.js +0 -211
- data/lib/flipper/ui/public/js/bootstrap/dropdown.js +0 -161
- data/lib/flipper/ui/public/js/bootstrap/modal.js +0 -339
- data/lib/flipper/ui/public/js/bootstrap/popover.js +0 -108
- data/lib/flipper/ui/public/js/bootstrap/scrollspy.js +0 -172
- data/lib/flipper/ui/public/js/bootstrap/tab.js +0 -153
- data/lib/flipper/ui/public/js/bootstrap/tooltip.js +0 -476
- data/lib/flipper/ui/public/js/bootstrap/transition.js +0 -59
@@ -1,22 +1,20 @@
|
|
1
1
|
<% if params.key?("error") %>
|
2
|
-
<div class="
|
2
|
+
<div class="alert alert-danger">
|
3
3
|
<%= params["error"] %>
|
4
4
|
</div>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<div class="
|
8
|
-
<
|
9
|
-
|
10
|
-
</div>
|
11
|
-
<div class="panel-body">
|
7
|
+
<div class="card">
|
8
|
+
<h4 class="card-header">Enable Actor for <%= @feature.key %></h4>
|
9
|
+
<div class="card-body">
|
12
10
|
<p>
|
13
11
|
Turn on this feature for an individual actor.
|
14
12
|
</p>
|
15
|
-
<form action="<%= script_name %>/features/<%= @feature.key %>/actors" method="post">
|
13
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/actors" method="post" class="form-inline">
|
16
14
|
<%== csrf_input_tag %>
|
17
15
|
<input type="hidden" name="operation" value="enable">
|
18
|
-
<input type="text" name="value" placeholder="ie: User:6">
|
19
|
-
<input type="submit" value="Add Actor" class="btn">
|
16
|
+
<input type="text" name="value" placeholder="ie: User:6" class="form-control mr-2">
|
17
|
+
<input type="submit" value="Add Actor" class="btn btn-light">
|
20
18
|
</form>
|
21
19
|
</div>
|
22
20
|
</div>
|
@@ -1,20 +1,18 @@
|
|
1
1
|
<% if params.key?("error") %>
|
2
|
-
<div class="
|
2
|
+
<div class="alert alert-danger">
|
3
3
|
<%= params["error"] %>
|
4
4
|
</div>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<div class="
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
<div class="panel-body">
|
12
|
-
<form action="<%= script_name %>/features" method="post">
|
7
|
+
<div class="card">
|
8
|
+
<h4 class="card-header">Add Feature</h4>
|
9
|
+
<div class="card-body">
|
10
|
+
<form action="<%= script_name %>/features" method="post" class="form-inline mb-2">
|
13
11
|
<%== csrf_input_tag %>
|
14
|
-
<input type="text" name="value" size="30" placeholder="ie: search, new_pricing, etc." autofocus>
|
15
|
-
<input type="submit" value="Add Feature" class="btn">
|
12
|
+
<input type="text" name="value" size="30" placeholder="ie: search, new_pricing, etc." autofocus class="form-control mr-2 mb-2 mb-md-0">
|
13
|
+
<input type="submit" value="Add Feature" class="btn btn-light">
|
16
14
|
</form>
|
17
|
-
<p class="
|
15
|
+
<p class="text-muted">
|
18
16
|
Recommended naming conventions: lower case, <a href="https://en.wikipedia.org/wiki/Snake_case">snake case</a>, underscores over dashes.
|
19
17
|
<strong>Good</strong>: foo_bar, foo.
|
20
18
|
<strong>Bad</strong>: FooBar, Foo Bar, foo bar, foo-bar.
|
@@ -1,30 +1,28 @@
|
|
1
1
|
<% if params.key?("error") %>
|
2
|
-
<div class="
|
2
|
+
<div class="alert alert-danger">
|
3
3
|
<%= params["error"] %>
|
4
4
|
</div>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<div class="
|
8
|
-
<
|
9
|
-
|
10
|
-
</div>
|
11
|
-
<div class="panel-body">
|
7
|
+
<div class="card">
|
8
|
+
<h4 class="card-header">Enable Group for <%= @feature.key %></h4>
|
9
|
+
<div class="card-body">
|
12
10
|
<% if @feature.disabled_groups.empty? %>
|
13
11
|
<p>All groups are enabled for this feature which means there is nothing to add.</p>
|
14
12
|
<% else %>
|
15
13
|
<p>
|
16
14
|
Turn on this feature for an entire group of actors.
|
17
15
|
</p>
|
18
|
-
<form action="<%= script_name %>/features/<%= @feature.key %>/groups" method="post">
|
16
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/groups" method="post" class="form-inline">
|
19
17
|
<%== csrf_input_tag %>
|
20
18
|
<input type="hidden" name="operation" value="enable">
|
21
|
-
<select name="value">
|
19
|
+
<select name="value" class="form-control mr-2">
|
22
20
|
<option value="">Select a group...</option>
|
23
21
|
<% @feature.disabled_groups.each do |group| %>
|
24
22
|
<option value="<%= group.name %>"><%= group.name %></option>
|
25
23
|
<% end %>
|
26
24
|
</select>
|
27
|
-
<input type="submit" value="Add Group" class="btn">
|
25
|
+
<input type="submit" value="Add Group" class="btn btn-light">
|
28
26
|
</form>
|
29
27
|
<% end %>
|
30
28
|
</div>
|
@@ -1,139 +1,169 @@
|
|
1
1
|
<% if params.key?("error") %>
|
2
|
-
<div class="
|
2
|
+
<div class="alert alert-danger">
|
3
3
|
<%= params["error"] %>
|
4
4
|
</div>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<div
|
8
|
-
<div class="
|
9
|
-
<
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<form action="<%= script_name %>/features/<%= @feature.key %>/boolean" method="post">
|
24
|
-
<%== csrf_input_tag %>
|
25
|
-
|
26
|
-
<% unless @feature.on? %>
|
27
|
-
<button type="submit" name="action" value="Enable" class="btn btn-danger tooltipped tooltipped-n" aria-label="Enable for everyone">Enable</button>
|
28
|
-
<% end %>
|
29
|
-
|
30
|
-
<button type="submit" name="action" value="Disable" class="btn tooltipped tooltipped-n" <% if @feature.off? %>disabled aria-label="Already disabled for everyone"<% else %>aria-label="Disable for everyone by clearing all percentages, groups and actors."<% end %>>Disable</button>
|
31
|
-
</form>
|
32
|
-
</div>
|
33
|
-
</div>
|
7
|
+
<div>
|
8
|
+
<div class="row">
|
9
|
+
<div class="col">
|
10
|
+
<div class="card">
|
11
|
+
<h4 class="card-header">
|
12
|
+
<span class="octicon octicon-squirrel <%= @feature.color_class %>"></span>
|
13
|
+
<%= @feature.key %>
|
14
|
+
</h4>
|
15
|
+
<div class="card-body">
|
16
|
+
<p>
|
17
|
+
<% if @feature.on? %>
|
18
|
+
The feature is enabled for <strong>everyone</strong>. Disable this feature with one click.
|
19
|
+
<% else %>
|
20
|
+
Enable or disable this feature for <strong>everyone</strong> with one click.
|
21
|
+
<% end %>
|
22
|
+
</p>
|
34
23
|
|
35
|
-
<
|
36
|
-
<div class="columns">
|
37
|
-
<div class="column one-half">
|
38
|
-
<div class="panel panel-default">
|
39
|
-
<div class="panel-heading">
|
40
|
-
<h3 class="panel-title"><%= Flipper::UI.configuration.percentage_of_actors.title %></h3>
|
41
|
-
</div>
|
42
|
-
<div class="panel-body">
|
43
|
-
<form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_actors" method="post">
|
24
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/boolean" method="post">
|
44
25
|
<%== csrf_input_tag %>
|
45
|
-
<div class="btn-group">
|
46
|
-
<% @percentages.each do |number| %>
|
47
|
-
<input type="submit" name="value" value="<%= number %>%" class="btn" <% if number == @feature.percentage_of_actors_value %>disabled<% end %>>
|
48
|
-
<% end %>
|
49
|
-
</div>
|
50
|
-
</form>
|
51
26
|
|
52
|
-
|
27
|
+
<% unless @feature.on? %>
|
28
|
+
<button type="submit" name="action" value="Enable" class="btn btn-danger" data-toggle="tooltip" title="Enable for everyone">Enable</button>
|
29
|
+
<% end %>
|
53
30
|
|
54
|
-
|
55
|
-
<%== csrf_input_tag %>
|
56
|
-
<input type="text" name="value" <% if @feature.percentage_of_actors_value > 0 %>value="<%= @feature.percentage_of_actors_value %>"<% end %> placeholder="custom (ie: 26, 32, etc.)" class="input-mini">
|
57
|
-
<input type="submit" name="action" value="Enable" class="btn btn-sm">
|
31
|
+
<button type="submit" name="action" value="Disable" class="btn btn-light" data-toggle="tooltip" <% if @feature.off? %>disabled title="Already disabled for everyone"<% else %>title="Disable for everyone by clearing all percentages, groups and actors."<% end %>>Disable</button>
|
58
32
|
</form>
|
59
|
-
<p class="help"><small><%= Flipper::UI.configuration.percentage_of_actors.description %></small></p>
|
60
33
|
</div>
|
61
34
|
</div>
|
62
35
|
</div>
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
36
|
+
</div>
|
37
|
+
<div class="row">
|
38
|
+
<div class="col-md mb-4 mb-md-0">
|
39
|
+
<div class="card">
|
40
|
+
<h4 class="card-header"><%= Flipper::UI.configuration.percentage_of_actors.title %></h4>
|
41
|
+
<div class="card-body">
|
42
|
+
<div class="row">
|
43
|
+
<div class="col">
|
44
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_actors" method="post">
|
45
|
+
<%== csrf_input_tag %>
|
46
|
+
<div class="btn-group">
|
47
|
+
<% @percentages.each do |number| %>
|
48
|
+
<input type="submit" name="value" value="<%= number %>%" class="btn btn-light btn-sm" <% if number == @feature.percentage_of_actors_value %>disabled<% end %>>
|
49
|
+
<% end %>
|
50
|
+
</div>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
<div class="row">
|
55
|
+
<div class="col">
|
56
|
+
<h5>- or -</h5>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
<div class="row">
|
60
|
+
<div class="col">
|
61
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_actors" method="post" class="form-inline">
|
62
|
+
<%== csrf_input_tag %>
|
63
|
+
<input type="text" name="value" <% if @feature.percentage_of_actors_value > 0 %>value="<%= @feature.percentage_of_actors_value %>"<% end %> placeholder="custom (ie: 26, 32, etc.)" class="form-control form-control-sm mr-sm-2 mb-2 mb-md-0">
|
64
|
+
<input type="submit" name="action" value="Enable" class="btn btn-light btn-sm">
|
65
|
+
</form>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
<div class="row">
|
69
|
+
<div class="col">
|
70
|
+
<p class="text-muted"><small><%= Flipper::UI.configuration.percentage_of_actors.description %></small></p>
|
71
|
+
</div>
|
72
|
+
</div>
|
67
73
|
</div>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
<div class="col-md">
|
77
|
+
<div class="card">
|
78
|
+
<h4 class="card-header"><%= Flipper::UI.configuration.percentage_of_time.title %></h4>
|
79
|
+
<div class="card-body">
|
80
|
+
<div class="row">
|
81
|
+
<div class="col">
|
82
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_time" method="post">
|
83
|
+
<%== csrf_input_tag %>
|
84
|
+
<div class="btn-group">
|
85
|
+
<% @percentages.each do |number| %>
|
86
|
+
<input type="submit" name="value" value="<%= number %>%" class="btn btn-light btn-sm" <% if number == @feature.percentage_of_time_value %>disabled<% end %>>
|
87
|
+
<% end %>
|
88
|
+
</div>
|
89
|
+
</form>
|
75
90
|
</div>
|
76
|
-
</
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
<
|
84
|
-
|
85
|
-
|
86
|
-
|
91
|
+
</div>
|
92
|
+
<div class="row">
|
93
|
+
<div class="col">
|
94
|
+
<h5>- or -</h5>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
<div class="row">
|
98
|
+
<div class="col">
|
99
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_time" method="post" class="form-inline">
|
100
|
+
<%== csrf_input_tag %>
|
101
|
+
<input type="text" name="value" <% if @feature.percentage_of_time_value > 0 %>value="<%= @feature.percentage_of_time_value %>"<% end %> placeholder="custom (ie: 26, 32, etc.)" class="form-control form-control-sm mr-sm-2 mb-2 mb-md-0">
|
102
|
+
<input type="submit" name="action" value="Enable" class="btn btn-light btn-sm">
|
103
|
+
</form>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
<div class="row">
|
107
|
+
<div class="col">
|
108
|
+
<p class="text-muted"><small><%= Flipper::UI.configuration.percentage_of_time.description %></small></p>
|
109
|
+
</div>
|
110
|
+
</div>
|
87
111
|
</div>
|
88
112
|
</div>
|
89
113
|
</div>
|
90
114
|
</div>
|
91
|
-
</div>
|
92
115
|
|
93
|
-
<div class="
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<
|
106
|
-
|
107
|
-
<
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
116
|
+
<div class="row">
|
117
|
+
<div class="col-md mb-4 mb-md-0">
|
118
|
+
<div class="card">
|
119
|
+
<div class="card-header">
|
120
|
+
<div class="d-flex w-100 justify-content-between align-items-center">
|
121
|
+
<div>
|
122
|
+
<h4><%= Flipper::UI.configuration.groups.title %></h4>
|
123
|
+
</div>
|
124
|
+
<div>
|
125
|
+
<% if @feature.disabled_groups.empty? %>
|
126
|
+
All groups enabled.
|
127
|
+
<% else %>
|
128
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/groups" method="post" class="form-inline">
|
129
|
+
<%== csrf_input_tag %>
|
130
|
+
<input type="hidden" name="operation" value="enable">
|
131
|
+
<select name="value" class="form-control form-control-sm mr-sm-2 mb-2 mb-md-0">
|
132
|
+
<option value="">Select a group...</option>
|
133
|
+
<% @feature.disabled_groups.each do |group| %>
|
134
|
+
<option value="<%= group.name %>"><%= group.name %></option>
|
135
|
+
<% end %>
|
136
|
+
</select>
|
137
|
+
<input type="submit" value="Add Group" class="btn btn-light btn-sm">
|
138
|
+
</form>
|
139
|
+
<% end %>
|
140
|
+
</div>
|
141
|
+
</div>
|
114
142
|
</div>
|
115
143
|
<% if @feature.groups_value.empty? %>
|
116
|
-
<div class="
|
117
|
-
<
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
144
|
+
<div class="card-body bg-light">
|
145
|
+
<div class="text-center">
|
146
|
+
<span class="mega-octicon octicon-organization text-muted"></span>
|
147
|
+
<span class="mega-octicon octicon-squirrel text-muted"></span>
|
148
|
+
<span class="mega-octicon octicon-zap text-muted"></span>
|
149
|
+
<h4>No Enabled Groups</h4>
|
150
|
+
<p><%= Flipper::UI.configuration.groups.description %></p>
|
151
|
+
</div>
|
122
152
|
</div>
|
123
153
|
<% else %>
|
124
|
-
<ul class="list-group">
|
154
|
+
<ul class="list-group list-group-flush">
|
125
155
|
<% @feature.groups_value.each do |item| %>
|
126
156
|
<li class="list-group-item">
|
127
|
-
<div class="flex-
|
128
|
-
<div
|
157
|
+
<div class="d-flex w-100 justify-content-between align-items-center">
|
158
|
+
<div>
|
129
159
|
<%= item %>
|
130
160
|
</div>
|
131
|
-
<div
|
161
|
+
<div>
|
132
162
|
<form action="<%= script_name %>/features/<%= @feature.key %>/groups" method="post">
|
133
163
|
<%== csrf_input_tag %>
|
134
164
|
<input type="hidden" name="operation" value="disable">
|
135
165
|
<input type="hidden" name="value" value="<%= item %>">
|
136
|
-
<button type="submit" value="Disable" class="
|
166
|
+
<button type="submit" value="Disable" class="btn btn-link btn-sm text-danger" data-toggle="tooltip" title="Disable <%= item %>" data-placement="left">
|
137
167
|
<span class="octicon octicon-trashcan"></span>
|
138
168
|
</button>
|
139
169
|
</form>
|
@@ -145,39 +175,47 @@
|
|
145
175
|
<% end %>
|
146
176
|
</div>
|
147
177
|
</div>
|
148
|
-
<div class="
|
149
|
-
<div class="
|
150
|
-
<div class="
|
151
|
-
<
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<
|
156
|
-
|
157
|
-
|
178
|
+
<div class="col-md">
|
179
|
+
<div class="card">
|
180
|
+
<div class="card-header">
|
181
|
+
<div class="d-flex w-100 justify-content-between align-items-center">
|
182
|
+
<div>
|
183
|
+
<h4><%= Flipper::UI.configuration.actors.title %></h4>
|
184
|
+
</div>
|
185
|
+
<div>
|
186
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>/actors" method="post" class="form-inline">
|
187
|
+
<%== csrf_input_tag %>
|
188
|
+
<input type="hidden" name="operation" value="enable">
|
189
|
+
<input type="text" name="value" placeholder="ie: User:6" class="form-control form-control-sm mr-sm-2 mb-2 mb-md-0">
|
190
|
+
<input type="submit" value="Add Actor" class="btn btn-light btn-sm">
|
191
|
+
</form>
|
192
|
+
</div>
|
193
|
+
</div>
|
158
194
|
</div>
|
159
195
|
<% if @feature.actors_value.empty? %>
|
160
|
-
<div class="
|
161
|
-
<
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
196
|
+
<div class="card-body bg-light">
|
197
|
+
<div class="text-center">
|
198
|
+
<span class="mega-octicon octicon-person text-muted"></span>
|
199
|
+
<span class="mega-octicon octicon-squirrel text-muted"></span>
|
200
|
+
<span class="mega-octicon octicon-zap text-muted"></span>
|
201
|
+
<h4>No Enabled Actors</h4>
|
202
|
+
<p><%= Flipper::UI.configuration.actors.description %></p>
|
203
|
+
</div>
|
166
204
|
</div>
|
167
205
|
<% else %>
|
168
|
-
<ul class="list-group">
|
206
|
+
<ul class="list-group list-group-flush">
|
169
207
|
<% @feature.actors_value.each do |item| %>
|
170
208
|
<li class="list-group-item">
|
171
|
-
<div class="flex-
|
172
|
-
<div
|
209
|
+
<div class="d-flex w-100 justify-content-between align-items-center">
|
210
|
+
<div>
|
173
211
|
<%= item %>
|
174
212
|
</div>
|
175
|
-
<div
|
213
|
+
<div>
|
176
214
|
<form action="<%= script_name %>/features/<%= @feature.key %>/actors" method="post">
|
177
215
|
<%== csrf_input_tag %>
|
178
216
|
<input type="hidden" name="operation" value="disable">
|
179
217
|
<input type="hidden" name="value" value="<%= item %>">
|
180
|
-
<button type="submit" value="Disable" class="
|
218
|
+
<button type="submit" value="Disable" class="btn btn-link btn-sm text-danger" data-toggle="tooltip" title="Disable <%= item %>" data-placement="left">
|
181
219
|
<span class="octicon octicon-trashcan"></span>
|
182
220
|
</button>
|
183
221
|
</form>
|
@@ -190,23 +228,25 @@
|
|
190
228
|
</div>
|
191
229
|
</div>
|
192
230
|
</div>
|
193
|
-
</div>
|
194
231
|
|
195
|
-
<% if Flipper::UI.feature_removal_enabled %>
|
196
|
-
<div class="
|
197
|
-
<div class="
|
198
|
-
<
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
232
|
+
<% if Flipper::UI.feature_removal_enabled %>
|
233
|
+
<div class="row">
|
234
|
+
<div class="col">
|
235
|
+
<div class="card border-danger">
|
236
|
+
<h4 class="card-header bg-danger text-white"><%= Flipper::UI.configuration.delete.title %></h4>
|
237
|
+
<div class="card-body">
|
238
|
+
<p>
|
239
|
+
<%= Flipper::UI.configuration.delete.description %>
|
240
|
+
</p>
|
204
241
|
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
242
|
+
<form action="<%= script_name %>/features/<%= @feature.key %>" method="post" onsubmit="return confirm('Are you sure you want to remove <%= @feature.key %> from the list of features and disable it for everyone?')">
|
243
|
+
<%== csrf_input_tag %>
|
244
|
+
<input type="hidden" name="_method" value="DELETE">
|
245
|
+
<button type="submit" name="action" value="Delete" class="btn btn-danger" data-toggle="tooltip" title="Remove feature from list of features and disable it." data-placement="right">Delete</button>
|
246
|
+
</form>
|
247
|
+
</div>
|
248
|
+
</div>
|
210
249
|
</div>
|
211
250
|
</div>
|
212
|
-
<% end %>
|
251
|
+
<% end %>
|
252
|
+
</div>
|