Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8cf49158
Commit
8cf49158
authored
Sep 18, 2018
by
Winnie Hellmann
Committed by
Kamil Trzciński
Oct 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use modal for feature flag configuration information
parent
1160a4e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
27 deletions
+64
-27
app/views/projects/feature_flags/_configure_feature_flags_modal.html.haml
...ts/feature_flags/_configure_feature_flags_modal.html.haml
+56
-0
app/views/projects/feature_flags/_use.html.haml
app/views/projects/feature_flags/_use.html.haml
+0
-23
app/views/projects/feature_flags/index.html.haml
app/views/projects/feature_flags/index.html.haml
+8
-4
No files found.
app/views/projects/feature_flags/_configure_feature_flags_modal.html.haml
0 → 100644
View file @
8cf49158
#configure-feature-flags-modal
.modal
{
tabindex:
-
1
,
role:
'dialog'
}
.modal-dialog
{
role:
'document'
}
.modal-content
.modal-header
%h5
.modal-title
=
s_
(
'FeatureFlags|Configure feature flags'
)
%button
.close
{
type:
'button'
,
data:
{
dismiss:
'modal'
},
aria:
{
label:
_
(
'Close'
)
}
}
%span
{
"aria-hidden"
:
true
}
×
.modal-body
%p
=
s_
(
'FeatureFlags|Install a compatible client library and specify the API URL, application name, and instance ID during the configuration setup.'
)
=
link_to
s_
(
'FeatureFlags|More information'
),
'#'
.form-group
=
label_tag
:api_url
,
s_
(
'FeatureFlags|API URL'
),
class:
'label-light'
.input-group
-
unleash_api_url
=
"
#{
root_url
(
only_path:
false
)
}
api/v4/unleash"
=
text_field_tag
:api_url
,
unleash_api_url
,
readonly:
true
,
class:
"form-control js-select-on-focus"
%span
.input-group-append
=
clipboard_button
(
target:
'#api_url'
,
title:
_
(
"Copy URL to clipboard"
),
placement:
"left"
,
container:
'#configure-feature-flags-modal'
,
class:
"input-group-text btn btn-default"
)
.form-group
=
label_tag
:application_name
,
s_
(
'FeatureFlags|Application name'
),
class:
'label-light'
.input-group
=
text_field_tag
:application_name
,
@project
.
id
,
readonly:
true
,
class:
"form-control js-select-on-focus"
%span
.input-group-append
=
clipboard_button
(
target:
'#application_name'
,
title:
_
(
"Copy name to clipboard"
),
placement:
"left"
,
container:
'#configure-feature-flags-modal'
,
class:
"input-group-text btn btn-default"
)
.form-group
=
label_tag
:instance_id
,
s_
(
'FeatureFlags|Instance ID'
),
class:
'label-light'
.input-group
=
text_field_tag
:instance_id
,
@unleash_instanceid
,
readonly:
true
,
class:
"form-control js-select-on-focus"
%span
.input-group-append
=
clipboard_button
(
target:
'#instance_id'
,
title:
_
(
"Copy ID to clipboard"
),
placement:
"left"
,
container:
'#configure-feature-flags-modal'
,
class:
"input-group-text btn btn-default"
)
app/views/projects/feature_flags/_use.html.haml
deleted
100644 → 0
View file @
1160a4e3
.card.bg-info
.card-header
Configure feature flags
.card-body
%p
Learn how to enable feature flags for your application.
%ol
%li
=
_
(
"Install a compatible with client library"
)
=
(
_
(
"(checkout the %{link} for information on how to install it)."
)
%
{
link:
"here"
}).
html_safe
%li
=
_
(
"Specify the following URL during for the library configuration setup:"
)
%code
#coordinator_address
=
"
#{
root_url
(
only_path:
false
)
}
api/v4/unleash"
%li
=
_
(
"Use the following application name:"
)
%code
#registration_token
=
@project
.
id
%li
=
_
(
"Use the following application name:"
)
%code
#registration_token
=
@unleash_instanceid
%li
=
_
(
"You can also see all features online:"
)
%code
#registration_token
=
"
#{
root_url
(
only_path:
false
)
}
api/v4/unleash/features?appname=
#{
@project
.
id
}
&instanceid=
#{
@unleash_instanceid
}
"
\ No newline at end of file
app/views/projects/feature_flags/index.html.haml
View file @
8cf49158
...
...
@@ -3,14 +3,18 @@
%h3
.page-title.with-button
Feature Flags
-
if
can?
(
current_user
,
:create_feature_flags
,
@project
)
=
link_to
new_project_feature_flag_path
(
@project
),
class:
'btn btn-new float-right'
,
title:
'New Feature Flag'
do
New Feature Flag
.pull-right
%button
.btn.btn-default
{
type:
'button'
,
data:
{
toggle:
'modal'
,
target:
'#configure-feature-flags-modal'
}
}
=
s_
(
'FeatureFlags|Configure'
)
-
if
can?
(
current_user
,
:create_feature_flags
,
@project
)
=
link_to
new_project_feature_flag_path
(
@project
),
class:
'btn btn-new'
do
=
s_
(
'FeatureFlags|New Feature Flag'
)
%p
.light
With GitLab Feature Flags
%hr
.clearfix
=
render
'
use
'
=
render
'
configure_feature_flags_modal
'
=
render
'list'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment