diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-19 01:45:44 +0000 |
commit | 85dc423f7090da0a52c73eb66faf22ddb20efff9 (patch) | |
tree | 9160f299afd8c80c038f08e1545be119f5e3f1e1 /app/views/projects/feature_flags | |
parent | 15c2c8c66dbe422588e5411eee7e68f1fa440bb8 (diff) | |
download | gitlab-ce-85dc423f7090da0a52c73eb66faf22ddb20efff9.tar.gz |
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
Diffstat (limited to 'app/views/projects/feature_flags')
-rw-r--r-- | app/views/projects/feature_flags/_errors.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/feature_flags/edit.html.haml | 16 | ||||
-rw-r--r-- | app/views/projects/feature_flags/index.html.haml | 15 | ||||
-rw-r--r-- | app/views/projects/feature_flags/new.html.haml | 14 |
4 files changed, 49 insertions, 0 deletions
diff --git a/app/views/projects/feature_flags/_errors.html.haml b/app/views/projects/feature_flags/_errors.html.haml new file mode 100644 index 00000000000..a32245640be --- /dev/null +++ b/app/views/projects/feature_flags/_errors.html.haml @@ -0,0 +1,4 @@ +#error_explanation + .alert.alert-danger + - @feature_flag.errors.full_messages.each do |message| + %p= message diff --git a/app/views/projects/feature_flags/edit.html.haml b/app/views/projects/feature_flags/edit.html.haml new file mode 100644 index 00000000000..4de41ca4080 --- /dev/null +++ b/app/views/projects/feature_flags/edit.html.haml @@ -0,0 +1,16 @@ +- @gfm_form = Feature.enabled?(:feature_flags_issue_links, @project, default_enabled: true) + +- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- breadcrumb_title @feature_flag.name +- page_title s_('FeatureFlags|Edit Feature Flag') + +#js-edit-feature-flag{ data: { endpoint: project_feature_flag_path(@project, @feature_flag), + project_id: @project.id, + feature_flags_path: project_feature_flags_path(@project), + environments_endpoint: search_project_environments_path(@project, format: :json), + user_callouts_path: user_callouts_path, + user_callout_id: UserCalloutsHelper::FEATURE_FLAGS_NEW_VERISION, + show_user_callout: show_feature_flags_new_version?.to_s, + strategy_type_docs_page_path: help_page_path('operations/feature_flags', anchor: 'feature-flag-strategies'), + environments_scope_docs_path: help_page_path('ci/environments', anchor: 'scoping-environments-with-specs'), + feature_flag_issues_endpoint: feature_flag_issues_links_endpoint(@project, @feature_flag, current_user) } } diff --git a/app/views/projects/feature_flags/index.html.haml b/app/views/projects/feature_flags/index.html.haml new file mode 100644 index 00000000000..f425de91d12 --- /dev/null +++ b/app/views/projects/feature_flags/index.html.haml @@ -0,0 +1,15 @@ +- page_title s_('FeatureFlags|Feature Flags') + +#feature-flags-vue{ data: { endpoint: project_feature_flags_path(@project, format: :json), + "project-id" => @project.id, + "project-name" => @project.name, + "error-state-svg-path" => image_path('illustrations/feature_flag.svg'), + "feature-flags-help-page-path" => help_page_path("operations/feature_flags"), + "feature-flags-client-libraries-help-page-path" => help_page_path("operations/feature_flags", anchor: "choose-a-client-library"), + "feature-flags-client-example-help-page-path" => help_page_path("operations/feature_flags", anchor: "golang-application-example"), + "unleash-api-url" => (unleash_api_url(@project) if can?(current_user, :admin_feature_flag, @project)), + "unleash-api-instance-id" => (unleash_api_instance_id(@project) if can?(current_user, :admin_feature_flag, @project)), + "can-user-admin-feature-flag" => can?(current_user, :admin_feature_flag, @project), + "new-feature-flag-path" => can?(current_user, :create_feature_flag, @project) ? new_project_feature_flag_path(@project): nil, + "rotate-instance-id-path" => can?(current_user, :admin_feature_flags_client, @project) ? reset_token_project_feature_flags_client_path(@project, format: :json) : nil, + "new-user-list-path" => can?(current_user, :admin_feature_flags_user_lists, @project) ? new_project_feature_flags_user_list_path(@project) : nil } } diff --git a/app/views/projects/feature_flags/new.html.haml b/app/views/projects/feature_flags/new.html.haml new file mode 100644 index 00000000000..a7388361da5 --- /dev/null +++ b/app/views/projects/feature_flags/new.html.haml @@ -0,0 +1,14 @@ +- @breadcrumb_link = new_project_feature_flag_path(@project) +- add_to_breadcrumbs s_('FeatureFlags|Feature Flags'), project_feature_flags_path(@project) +- breadcrumb_title s_('FeatureFlags|New') +- page_title s_('FeatureFlags|New Feature Flag') + +#js-new-feature-flag{ data: { endpoint: project_feature_flags_path(@project, format: :json), + feature_flags_path: project_feature_flags_path(@project), + environments_endpoint: search_project_environments_path(@project, format: :json), + user_callouts_path: user_callouts_path, + user_callout_id: UserCalloutsHelper::FEATURE_FLAGS_NEW_VERISION, + show_user_callout: show_feature_flags_new_version?.to_s, + strategy_type_docs_page_path: help_page_path('operations/feature_flags', anchor: 'feature-flag-strategies'), + environments_scope_docs_path: help_page_path('ci/environments', anchor: 'scoping-environments-with-specs'), + project_id: @project.id } } |