Commit 342bcc72 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents e2761f05 6357ff11
...@@ -106,9 +106,9 @@ export default { ...@@ -106,9 +106,9 @@ export default {
<tabs :tabs="tabs" scope="environments" @onChangeTab="onChangeTab" /> <tabs :tabs="tabs" scope="environments" @onChangeTab="onChangeTab" />
<div v-if="canCreateEnvironment && !isLoading" class="nav-controls"> <div v-if="canCreateEnvironment && !isLoading" class="nav-controls">
<a :href="newEnvironmentPath" class="btn btn-success"> <a :href="newEnvironmentPath" class="btn btn-success">{{
{{ s__('Environments|New environment') }} s__('Environments|New environment')
</a> }}</a>
</div> </div>
</div> </div>
......
...@@ -103,9 +103,9 @@ export default { ...@@ -103,9 +103,9 @@ export default {
<div :key="`sub-div-${i}`"> <div :key="`sub-div-${i}`">
<div class="text-center prepend-top-10"> <div class="text-center prepend-top-10">
<a :href="folderUrl(model)" class="btn btn-default"> <a :href="folderUrl(model)" class="btn btn-default">{{
{{ s__('Environments|Show all') }} s__('Environments|Show all')
</a> }}</a>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -15,11 +15,11 @@ export default () => ...@@ -15,11 +15,11 @@ export default () =>
const environmentsData = document.querySelector(this.$options.el).dataset; const environmentsData = document.querySelector(this.$options.el).dataset;
return { return {
endpoint: environmentsData.endpoint, endpoint: environmentsData.environmentsDataEndpoint,
folderName: environmentsData.folderName, folderName: environmentsData.environmentsDataFolderName,
cssContainerClass: environmentsData.cssClass, cssContainerClass: environmentsData.cssClass,
canCreateDeployment: parseBoolean(environmentsData.canCreateDeployment), canCreateDeployment: parseBoolean(environmentsData.environmentsDataCanCreateDeployment),
canReadEnvironment: parseBoolean(environmentsData.canReadEnvironment), canReadEnvironment: parseBoolean(environmentsData.environmentsDataCanReadEnvironment),
}; };
}, },
render(createElement) { render(createElement) {
......
...@@ -9,6 +9,15 @@ module EnvironmentsHelper ...@@ -9,6 +9,15 @@ module EnvironmentsHelper
} }
end end
def environments_folder_list_view_data
{
"endpoint" => folder_project_environments_path(@project, @folder, format: :json),
"folder-name" => @folder,
"can-create-deployment" => can?(current_user, :create_deployment, @project).to_s,
"can-read-environment" => can?(current_user, :read_environment, @project).to_s
}
end
def metrics_data(project, environment) def metrics_data(project, environment)
{ {
"settings-path" => edit_project_service_path(project, 'prometheus'), "settings-path" => edit_project_service_path(project, 'prometheus'),
......
- @no_container = true - @no_container = true
- page_title _("Environments") - page_title _("Environments")
#environments-folder-list-view{ data: { endpoint: folder_project_environments_path(@project, @folder, format: :json), #environments-folder-list-view{ data: { environments_data: environments_folder_list_view_data,
"folder-name" => @folder,
"can-create-deployment" => can?(current_user, :create_deployment, @project).to_s,
"can-read-environment" => can?(current_user, :read_environment, @project).to_s,
"css-class" => container_class } } "css-class" => container_class } }
...@@ -27,6 +27,9 @@ Gitlab::Seeder.quiet do ...@@ -27,6 +27,9 @@ Gitlab::Seeder.quiet do
Sidekiq::Worker.skipping_transaction_check do Sidekiq::Worker.skipping_transaction_check do
MergeRequests::CreateService.new(project, developer, params).execute MergeRequests::CreateService.new(project, developer, params).execute
rescue Repository::AmbiguousRefError
# Ignore pipelines creation errors for now, we can doing that after
# https://gitlab.com/gitlab-org/gitlab-ce/issues/55966. will be resolved.
end end
print '.' print '.'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment