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.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/docs/ui/README.md +21 -3
  3. data/docs/ui/images/configured-ui.png +0 -0
  4. data/docs/ui/images/environment-banner.png +0 -0
  5. data/docs/ui/images/feature.png +0 -0
  6. data/docs/ui/images/features.png +0 -0
  7. data/lib/flipper/ui/assets/javascripts/application.coffee +3 -0
  8. data/lib/flipper/ui/assets/stylesheets/.DS_Store +0 -0
  9. data/lib/flipper/ui/assets/stylesheets/application.scss +9 -48
  10. data/lib/flipper/ui/assets/stylesheets/bootstrap/_alert.scss +51 -0
  11. data/lib/flipper/ui/assets/stylesheets/bootstrap/_badge.scss +47 -0
  12. data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumb.scss +38 -0
  13. data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-group.scss +166 -0
  14. data/lib/flipper/ui/assets/stylesheets/bootstrap/_buttons.scss +78 -95
  15. data/lib/flipper/ui/assets/stylesheets/bootstrap/_card.scss +270 -0
  16. data/lib/flipper/ui/assets/stylesheets/bootstrap/_carousel.scss +122 -200
  17. data/lib/flipper/ui/assets/stylesheets/bootstrap/_close.scss +12 -14
  18. data/lib/flipper/ui/assets/stylesheets/bootstrap/_code.scss +15 -28
  19. data/lib/flipper/ui/assets/stylesheets/bootstrap/_custom-forms.scss +297 -0
  20. data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdown.scss +131 -0
  21. data/lib/flipper/ui/assets/stylesheets/bootstrap/_forms.scss +210 -455
  22. data/lib/flipper/ui/assets/stylesheets/bootstrap/_functions.scss +86 -0
  23. data/lib/flipper/ui/assets/stylesheets/bootstrap/_grid.scss +29 -61
  24. data/lib/flipper/ui/assets/stylesheets/bootstrap/_images.scss +42 -0
  25. data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-group.scss +159 -0
  26. data/lib/flipper/ui/assets/stylesheets/bootstrap/_jumbotron.scss +8 -42
  27. data/lib/flipper/ui/assets/stylesheets/bootstrap/_list-group.scss +64 -73
  28. data/lib/flipper/ui/assets/stylesheets/bootstrap/_media.scss +3 -56
  29. data/lib/flipper/ui/assets/stylesheets/bootstrap/_mixins.scss +21 -18
  30. data/lib/flipper/ui/assets/stylesheets/bootstrap/_modal.scss +168 -0
  31. data/lib/flipper/ui/assets/stylesheets/bootstrap/_nav.scss +118 -0
  32. data/lib/flipper/ui/assets/stylesheets/bootstrap/_navbar.scss +203 -554
  33. data/lib/flipper/ui/assets/stylesheets/bootstrap/_pagination.scss +58 -69
  34. data/lib/flipper/ui/assets/stylesheets/bootstrap/_popover.scss +183 -0
  35. data/lib/flipper/ui/assets/stylesheets/bootstrap/_print.scss +71 -54
  36. data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress.scss +33 -0
  37. data/lib/flipper/ui/assets/stylesheets/bootstrap/_reboot.scss +482 -0
  38. data/lib/flipper/ui/assets/stylesheets/bootstrap/_root.scss +19 -0
  39. data/lib/flipper/ui/assets/stylesheets/bootstrap/_tables.scss +109 -163
  40. data/lib/flipper/ui/assets/stylesheets/bootstrap/_tooltip.scss +97 -84
  41. data/lib/flipper/ui/assets/stylesheets/bootstrap/_transitions.scss +36 -0
  42. data/lib/flipper/ui/assets/stylesheets/bootstrap/_type.scss +66 -239
  43. data/lib/flipper/ui/assets/stylesheets/bootstrap/_utilities.scss +14 -55
  44. data/lib/flipper/ui/assets/stylesheets/bootstrap/_variables.scss +726 -698
  45. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-grid.scss +32 -0
  46. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap-reboot.scss +12 -0
  47. data/lib/flipper/ui/assets/stylesheets/bootstrap/bootstrap.scss +42 -0
  48. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alert.scss +13 -0
  49. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_background-variant.scss +14 -4
  50. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_badge.scss +12 -0
  51. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_border-radius.scss +25 -8
  52. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  53. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +123 -0
  54. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_buttons.scss +89 -32
  55. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_caret.scss +65 -0
  56. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_clearfix.scss +3 -18
  57. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_float.scss +11 -0
  58. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_forms.scss +115 -66
  59. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_gradients.scss +14 -27
  60. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +52 -66
  61. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_grid.scss +37 -107
  62. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hover.scss +39 -0
  63. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_image.scss +18 -15
  64. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_list-group.scss +10 -20
  65. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
  66. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
  67. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +10 -0
  68. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_pagination.scss +10 -11
  69. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-text.scss +17 -0
  70. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  71. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +35 -0
  72. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_size.scss +1 -5
  73. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_table-row.scss +16 -14
  74. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
  75. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_text-hide.scss +9 -0
  76. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/{_text-overflow.scss → _text-truncate.scss} +2 -2
  77. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
  78. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_visibility.scss +7 -0
  79. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
  80. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
  81. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_borders.scss +59 -0
  82. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  83. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_display.scss +38 -0
  84. data/lib/flipper/ui/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +26 -9
  85. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_flex.scss +46 -0
  86. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_float.scss +9 -0
  87. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_position.scss +36 -0
  88. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  89. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_sizing.scss +12 -0
  90. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_spacing.scss +51 -0
  91. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_text.scss +52 -0
  92. data/lib/flipper/ui/assets/stylesheets/bootstrap/utilities/_visibility.scss +11 -0
  93. data/lib/flipper/ui/configuration.rb +24 -0
  94. data/lib/flipper/ui/decorators/feature.rb +3 -3
  95. data/lib/flipper/ui/public/css/application.css +6237 -2339
  96. data/lib/flipper/ui/public/js/application.js +3 -2
  97. data/lib/flipper/ui/views/add_actor.erb +7 -9
  98. data/lib/flipper/ui/views/add_feature.erb +8 -10
  99. data/lib/flipper/ui/views/add_group.erb +7 -9
  100. data/lib/flipper/ui/views/feature.erb +181 -141
  101. data/lib/flipper/ui/views/feature_creation_disabled.erb +1 -1
  102. data/lib/flipper/ui/views/feature_removal_disabled.erb +1 -1
  103. data/lib/flipper/ui/views/features.erb +12 -15
  104. data/lib/flipper/ui/views/layout.erb +25 -15
  105. data/lib/flipper/version.rb +1 -1
  106. data/spec/flipper/ui/actions/actors_gate_spec.rb +2 -1
  107. data/spec/flipper/ui/actions/add_feature_spec.rb +2 -1
  108. data/spec/flipper/ui/actions/groups_gate_spec.rb +2 -1
  109. data/spec/flipper/ui/configuration_spec.rb +27 -0
  110. data/spec/flipper/ui_spec.rb +24 -0
  111. metadata +58 -64
  112. data/lib/flipper/ui/assets/stylesheets/_bootstrap-compass.scss +0 -9
  113. data/lib/flipper/ui/assets/stylesheets/_bootstrap-mincer.scss +0 -19
  114. data/lib/flipper/ui/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
  115. data/lib/flipper/ui/assets/stylesheets/_bootstrap.scss +0 -50
  116. data/lib/flipper/ui/assets/stylesheets/bootstrap/_alerts.scss +0 -73
  117. data/lib/flipper/ui/assets/stylesheets/bootstrap/_badges.scss +0 -68
  118. data/lib/flipper/ui/assets/stylesheets/bootstrap/_breadcrumbs.scss +0 -26
  119. data/lib/flipper/ui/assets/stylesheets/bootstrap/_button-groups.scss +0 -243
  120. data/lib/flipper/ui/assets/stylesheets/bootstrap/_component-animations.scss +0 -37
  121. data/lib/flipper/ui/assets/stylesheets/bootstrap/_dropdowns.scss +0 -214
  122. data/lib/flipper/ui/assets/stylesheets/bootstrap/_glyphicons.scss +0 -305
  123. data/lib/flipper/ui/assets/stylesheets/bootstrap/_input-groups.scss +0 -166
  124. data/lib/flipper/ui/assets/stylesheets/bootstrap/_labels.scss +0 -66
  125. data/lib/flipper/ui/assets/stylesheets/bootstrap/_modals.scss +0 -150
  126. data/lib/flipper/ui/assets/stylesheets/bootstrap/_navs.scss +0 -242
  127. data/lib/flipper/ui/assets/stylesheets/bootstrap/_normalize.scss +0 -427
  128. data/lib/flipper/ui/assets/stylesheets/bootstrap/_pager.scss +0 -54
  129. data/lib/flipper/ui/assets/stylesheets/bootstrap/_panels.scss +0 -265
  130. data/lib/flipper/ui/assets/stylesheets/bootstrap/_popovers.scss +0 -135
  131. data/lib/flipper/ui/assets/stylesheets/bootstrap/_progress-bars.scss +0 -87
  132. data/lib/flipper/ui/assets/stylesheets/bootstrap/_responsive-utilities.scss +0 -177
  133. data/lib/flipper/ui/assets/stylesheets/bootstrap/_scaffolding.scss +0 -162
  134. data/lib/flipper/ui/assets/stylesheets/bootstrap/_theme.scss +0 -273
  135. data/lib/flipper/ui/assets/stylesheets/bootstrap/_thumbnails.scss +0 -38
  136. data/lib/flipper/ui/assets/stylesheets/bootstrap/_wells.scss +0 -29
  137. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -14
  138. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  139. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
  140. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
  141. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
  142. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -8
  143. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -24
  144. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +0 -10
  145. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  146. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -21
  147. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  148. data/lib/flipper/ui/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
  149. data/lib/flipper/ui/public/css/primer.css +0 -1
  150. data/lib/flipper/ui/public/css/primer/primer.css +0 -1933
  151. data/lib/flipper/ui/public/css/scss/primer.css +0 -1933
  152. data/lib/flipper/ui/public/js/bootstrap-sprockets.js +0 -12
  153. data/lib/flipper/ui/public/js/bootstrap.js +0 -2317
  154. data/lib/flipper/ui/public/js/bootstrap.min.js +0 -7
  155. data/lib/flipper/ui/public/js/bootstrap/affix.js +0 -162
  156. data/lib/flipper/ui/public/js/bootstrap/alert.js +0 -94
  157. data/lib/flipper/ui/public/js/bootstrap/button.js +0 -116
  158. data/lib/flipper/ui/public/js/bootstrap/carousel.js +0 -237
  159. data/lib/flipper/ui/public/js/bootstrap/collapse.js +0 -211
  160. data/lib/flipper/ui/public/js/bootstrap/dropdown.js +0 -161
  161. data/lib/flipper/ui/public/js/bootstrap/modal.js +0 -339
  162. data/lib/flipper/ui/public/js/bootstrap/popover.js +0 -108
  163. data/lib/flipper/ui/public/js/bootstrap/scrollspy.js +0 -172
  164. data/lib/flipper/ui/public/js/bootstrap/tab.js +0 -153
  165. data/lib/flipper/ui/public/js/bootstrap/tooltip.js +0 -476
  166. data/lib/flipper/ui/public/js/bootstrap/transition.js +0 -59
@@ -1,5 +1,6 @@
1
1
  (function() {
2
-
3
-
2
+ $(function() {
3
+ return $('[data-toggle="tooltip"]').tooltip();
4
+ });
4
5
 
5
6
  }).call(this);
@@ -1,22 +1,20 @@
1
1
  <% if params.key?("error") %>
2
- <div class="flash flash-error">
2
+ <div class="alert alert-danger">
3
3
  <%= params["error"] %>
4
4
  </div>
5
5
  <% end %>
6
6
 
7
- <div class="panel panel-default">
8
- <div class="panel-heading">
9
- <h3 class="panel-title">Enable Actor for <%= @feature.key %></h3>
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="flash flash-error">
2
+ <div class="alert alert-danger">
3
3
  <%= params["error"] %>
4
4
  </div>
5
5
  <% end %>
6
6
 
7
- <div class="panel panel-default">
8
- <div class="panel-heading">
9
- <h3 class="panel-title">Add Feature</h3>
10
- </div>
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="help">
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="flash flash-error">
2
+ <div class="alert alert-danger">
3
3
  <%= params["error"] %>
4
4
  </div>
5
5
  <% end %>
6
6
 
7
- <div class="panel panel-default">
8
- <div class="panel-heading">
9
- <h3 class="panel-title">Enable Group for <%= @feature.key %></h3>
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="flash flash-error">
2
+ <div class="alert alert-danger">
3
3
  <%= params["error"] %>
4
4
  </div>
5
5
  <% end %>
6
6
 
7
- <div class="panel panel-default">
8
- <div class="panel-heading">
9
- <h3 class="panel-title">
10
- <span class="octicon octicon-squirrel <%= @feature.color_class %>"></span>
11
- <%= @feature.key %>
12
- </h3>
13
- </div>
14
- <div class="panel-body">
15
- <p>
16
- <% if @feature.on? %>
17
- The feature is enabled for <strong>everyone</strong>. Disable this feature with one click.
18
- <% else %>
19
- Enable or disable this feature for <strong>everyone</strong> with one click.
20
- <% end %>
21
- </p>
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
- <div class="container">
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
- <h4>- or -</h4>
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
- <form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_actors" method="post">
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
- <div class="column one-half">
64
- <div class="panel panel-default">
65
- <div class="panel-heading">
66
- <h3 class="panel-title"><%= Flipper::UI.configuration.percentage_of_time.title %></h3>
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
- <div class="panel-body">
69
- <form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_time" method="post">
70
- <%== csrf_input_tag %>
71
- <div class="btn-group">
72
- <% @percentages.each do |number| %>
73
- <input type="submit" name="value" value="<%= number %>%" class="btn" <% if number == @feature.percentage_of_time_value %>disabled<% end %>>
74
- <% end %>
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
- </form>
77
-
78
- <h4>- or -</h4>
79
-
80
- <form action="<%= script_name %>/features/<%= @feature.key %>/percentage_of_time" method="post">
81
- <%== csrf_input_tag %>
82
- <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="input-mini">
83
- <input type="submit" name="action" value="Enable" class="btn btn-sm">
84
- </form>
85
-
86
- <p class="help"><small><%= Flipper::UI.configuration.actors.description %></small></p>
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="container">
94
- <div class="columns">
95
- <div class="column one-half">
96
- <div class="panel panel-default">
97
- <div class="panel-heading">
98
- <% if @feature.disabled_groups.empty? %>
99
- <p class="right">All groups enabled.</p>
100
- <% else %>
101
- <form action="<%= script_name %>/features/<%= @feature.key %>/groups" method="post" class="right">
102
- <%== csrf_input_tag %>
103
- <input type="hidden" name="operation" value="enable">
104
- <select name="value">
105
- <option value="">Select a group...</option>
106
- <% @feature.disabled_groups.each do |group| %>
107
- <option value="<%= group.name %>"><%= group.name %></option>
108
- <% end %>
109
- </select>
110
- <input type="submit" value="Add Group" class="btn btn-sm">
111
- </form>
112
- <% end %>
113
- <h3 class="panel-title"><%= Flipper::UI.configuration.groups.title %></h3>
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="blankslate">
117
- <span class="mega-octicon octicon-organization"></span>
118
- <span class="mega-octicon octicon-squirrel"></span>
119
- <span class="mega-octicon octicon-zap"></span>
120
- <h3>No Enabled Groups</h3>
121
- <p><%= Flipper::UI.configuration.groups.description %></p>
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-table">
128
- <div class="flex-table-item flex-table-item-primary">
157
+ <div class="d-flex w-100 justify-content-between align-items-center">
158
+ <div>
129
159
  <%= item %>
130
160
  </div>
131
- <div class="flex-table-item">
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="button-inv danger tooltipped tooltipped-w" aria-label="Disable <%= item %>">
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="column one-half">
149
- <div class="panel panel-default">
150
- <div class="panel-heading">
151
- <form action="<%= script_name %>/features/<%= @feature.key %>/actors" method="post" class="right">
152
- <%== csrf_input_tag %>
153
- <input type="hidden" name="operation" value="enable">
154
- <input type="text" name="value" placeholder="ie: User:6" class="input-mini">
155
- <input type="submit" value="Add Actor" class="btn btn-sm">
156
- </form>
157
- <h3 class="panel-title"><%= Flipper::UI.configuration.actors.title %></h3>
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="blankslate">
161
- <span class="mega-octicon octicon-person"></span>
162
- <span class="mega-octicon octicon-squirrel"></span>
163
- <span class="mega-octicon octicon-zap"></span>
164
- <h3>No Enabled Actors</h3>
165
- <p><%= Flipper::UI.configuration.actors.description %></p>
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-table">
172
- <div class="flex-table-item flex-table-item-primary">
209
+ <div class="d-flex w-100 justify-content-between align-items-center">
210
+ <div>
173
211
  <%= item %>
174
212
  </div>
175
- <div class="flex-table-item">
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="button-inv danger tooltipped tooltipped-w" aria-label="Disable <%= item %>">
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="panel panel-danger">
197
- <div class="panel-heading">
198
- <h3 class="panel-title"><%= Flipper::UI.configuration.delete.title %></h3>
199
- </div>
200
- <div class="panel-body">
201
- <p>
202
- <%= Flipper::UI.configuration.delete.description %>
203
- </p>
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
- <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?')">
206
- <%== csrf_input_tag %>
207
- <input type="hidden" name="_method" value="DELETE">
208
- <button type="submit" name="action" value="Delete" class="btn btn-danger tooltipped tooltipped-ne" aria-label="Remove feature from list of features and disable it.">Delete</button>
209
- </form>
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>