flipper-ui 0.26.0.rc2 → 0.26.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26fdd20163d7685661dc097fa0c26fd3f5f4d79656cef5a16e9ae23f14e2f007
|
4
|
+
data.tar.gz: adb26eb7bbc5920c1acd667293a9aaf636341718ddfd9ab579e1851ab582a023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 436b20f854c2506009b730a385eef183c3eabb173f6440581b82cd86f76c5054a0cde665db2d3451a840eab8ae3a8070cb4c02f8937d40a724e5afb3a7913cb8
|
7
|
+
data.tar.gz: 04301543cbcb8aa32053ba1c5bdd581d44b3881b3ee93660d0ab519fc1936422fc6c860de04f2cd4c2774cfebf8097a787a72176c38a68625af05f24bcf3fd3f
|
@@ -5,7 +5,7 @@ $(function () {
|
|
5
5
|
});
|
6
6
|
|
7
7
|
$("#enable_feature__button").on("click", function (e) {
|
8
|
-
const featureName = $(
|
8
|
+
const featureName = $(e.target).data("confirmation-text");
|
9
9
|
const promptMessage = prompt(
|
10
10
|
`Are you sure you want to fully enable this feature for everyone? Please enter the name of the feature to confirm it: ${featureName}`
|
11
11
|
);
|
@@ -16,7 +16,7 @@ $(function () {
|
|
16
16
|
});
|
17
17
|
|
18
18
|
$("#delete_feature__button").on("click", function (e) {
|
19
|
-
const featureName = $(
|
19
|
+
const featureName = $(e.target).data("confirmation-text");
|
20
20
|
const promptMessage = prompt(
|
21
21
|
`Are you sure you want to remove this feature from the list of features and disable it for everyone? Please enter the name of the feature to confirm it: ${featureName}`
|
22
22
|
);
|
@@ -243,6 +243,9 @@
|
|
243
243
|
<div class="col">
|
244
244
|
<button type="submit" name="action" value="Enable" <% if Flipper::UI.configuration.confirm_fully_enable %>id="enable_feature__button"<% end %> class="btn btn-outline-success btn-block" <% if Flipper::UI.configuration.read_only %>disabled<% end %>>
|
245
245
|
<span class="d-block" data-toggle="tooltip"
|
246
|
+
<% if Flipper::UI.configuration.confirm_fully_enable %>
|
247
|
+
data-confirmation-text="<%= feature_name %>"
|
248
|
+
<% end %>
|
246
249
|
<% if Flipper::UI.configuration.read_only %>
|
247
250
|
title="Fully enable is not allowed in read only mode."
|
248
251
|
<% else %>
|
@@ -289,7 +292,7 @@
|
|
289
292
|
<%== csrf_input_tag %>
|
290
293
|
<input type="hidden" id="feature_name" name="_feature" value="<%= feature_name %>">
|
291
294
|
<input type="hidden" name="_method" value="DELETE">
|
292
|
-
<button type="submit" name="action" value="Delete" id="delete_feature__button" class="btn btn-outline-danger" data-toggle="tooltip" title="Remove feature from list of features and disable it." data-placement="right">Delete</button>
|
295
|
+
<button type="submit" name="action" value="Delete" id="delete_feature__button" data-confirmation-text="<%= feature_name %>" class="btn btn-outline-danger" data-toggle="tooltip" title="Remove feature from list of features and disable it." data-placement="right">Delete</button>
|
293
296
|
</form>
|
294
297
|
</div>
|
295
298
|
</div>
|
data/lib/flipper/version.rb
CHANGED
@@ -110,6 +110,17 @@ RSpec.describe Flipper::UI::Configuration do
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
+
describe "#confirm_fully_enable" do
|
114
|
+
it "has default value" do
|
115
|
+
expect(configuration.confirm_fully_enable).to eq(false)
|
116
|
+
end
|
117
|
+
|
118
|
+
it "can be updated" do
|
119
|
+
configuration.confirm_fully_enable = true
|
120
|
+
expect(configuration.confirm_fully_enable).to eq(true)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
113
124
|
describe "#show_feature_description_in_list" do
|
114
125
|
it "has default value" do
|
115
126
|
expect(configuration.show_feature_description_in_list).to eq(false)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.26.
|
4
|
+
version: 0.26.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -56,14 +56,14 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: 0.26.
|
59
|
+
version: 0.26.2
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
64
|
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 0.26.
|
66
|
+
version: 0.26.2
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: erubi
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,7 +123,6 @@ files:
|
|
123
123
|
- lib/flipper/ui/actions/home.rb
|
124
124
|
- lib/flipper/ui/actions/percentage_of_actors_gate.rb
|
125
125
|
- lib/flipper/ui/actions/percentage_of_time_gate.rb
|
126
|
-
- lib/flipper/ui/assets/javascripts/application.coffee
|
127
126
|
- lib/flipper/ui/configuration.rb
|
128
127
|
- lib/flipper/ui/configuration/option.rb
|
129
128
|
- lib/flipper/ui/decorators/feature.rb
|
@@ -164,7 +163,7 @@ homepage: https://github.com/jnunemaker/flipper
|
|
164
163
|
licenses:
|
165
164
|
- MIT
|
166
165
|
metadata:
|
167
|
-
changelog_uri: https://github.com/jnunemaker/flipper/blob/
|
166
|
+
changelog_uri: https://github.com/jnunemaker/flipper/blob/main/Changelog.md
|
168
167
|
post_install_message:
|
169
168
|
rdoc_options: []
|
170
169
|
require_paths:
|
@@ -176,9 +175,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
175
|
version: '0'
|
177
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
177
|
requirements:
|
179
|
-
- - "
|
178
|
+
- - ">="
|
180
179
|
- !ruby/object:Gem::Version
|
181
|
-
version:
|
180
|
+
version: '0'
|
182
181
|
requirements: []
|
183
182
|
rubygems_version: 3.3.7
|
184
183
|
signing_key:
|