Commit a57bfd60 authored by Rémy Coutable's avatar Rémy Coutable

Merge remote-tracking branch 'ce/master' into rc/ce-to-ee-wednesday

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parents 921735b1 35b31ba8
...@@ -20,7 +20,10 @@ $(() => { ...@@ -20,7 +20,10 @@ $(() => {
gl.commits.PipelinesTableBundle.$destroy(true); gl.commits.PipelinesTableBundle.$destroy(true);
} }
gl.commits.pipelines.PipelinesTableBundle = new gl.commits.pipelines.PipelinesTableView({ const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view');
el: document.querySelector('#commit-pipeline-table-view'), gl.commits.pipelines.PipelinesTableBundle = new gl.commits.pipelines.PipelinesTableView();
});
if (pipelineTableViewEl && pipelineTableViewEl.dataset.disableInitialization === undefined) {
gl.commits.pipelines.PipelinesTableBundle.$mount(pipelineTableViewEl);
}
}); });
...@@ -56,15 +56,14 @@ require('./pipelines_store'); ...@@ -56,15 +56,14 @@ require('./pipelines_store');
}, },
/** /**
* When the component is created the service to fetch the data will be * When the component is about to be mounted, tell the service to fetch the data
* initialized with the correct endpoint.
* *
* A request to fetch the pipelines will be made. * A request to fetch the pipelines will be made.
* In case of a successfull response we will store the data in the provided * In case of a successfull response we will store the data in the provided
* store, in case of a failed response we need to warn the user. * store, in case of a failed response we need to warn the user.
* *
*/ */
created() { beforeMount() {
const pipelinesService = new gl.commits.pipelines.PipelinesService(this.endpoint); const pipelinesService = new gl.commits.pipelines.PipelinesService(this.endpoint);
this.isLoading = true; this.isLoading = true;
......
...@@ -61,6 +61,7 @@ require('./flash'); ...@@ -61,6 +61,7 @@ require('./flash');
constructor({ action, setUrl, stubLocation } = {}) { constructor({ action, setUrl, stubLocation } = {}) {
this.diffsLoaded = false; this.diffsLoaded = false;
this.pipelinesLoaded = false;
this.commitsLoaded = false; this.commitsLoaded = false;
this.fixedLayoutPref = null; this.fixedLayoutPref = null;
...@@ -128,6 +129,13 @@ require('./flash'); ...@@ -128,6 +129,13 @@ require('./flash');
$.scrollTo('.merge-request-details .merge-request-tabs', { $.scrollTo('.merge-request-details .merge-request-tabs', {
offset: 0, offset: 0,
}); });
} else if (action === 'pipelines') {
if (this.pipelinesLoaded) {
return;
}
const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view');
gl.commits.pipelines.PipelinesTableBundle.$mount(pipelineTableViewEl);
this.pipelinesLoaded = true;
} else { } else {
this.expandView(); this.expandView();
this.resetViewContainer(); this.resetViewContainer();
......
...@@ -35,12 +35,8 @@ ...@@ -35,12 +35,8 @@
margin-bottom: 10px; margin-bottom: 10px;
} }
.project-path { .project-path .form-control {
padding-right: 0; border-radius: $border-radius-base;
.form-control {
border-radius: $border-radius-base;
}
} }
.input-group > div { .input-group > div {
......
...@@ -75,10 +75,10 @@ module MergeRequestsHelper ...@@ -75,10 +75,10 @@ module MergeRequestsHelper
new_namespace_project_merge_request_path( new_namespace_project_merge_request_path(
@project.namespace, @project, @project.namespace, @project,
merge_request: { merge_request: {
source_project_id: @merge_request.source_project_id, source_project_id: merge_request.source_project_id,
target_project_id: @merge_request.target_project_id, target_project_id: merge_request.target_project_id,
source_branch: @merge_request.source_branch, source_branch: merge_request.source_branch,
target_branch: @merge_request.target_branch, target_branch: merge_request.target_branch,
}, },
change_branches: true change_branches: true
) )
......
#commit-pipeline-table-view{ data: { endpoint: endpoint } } - disable_initialization = local_assigns.fetch(:disable_initialization, false)
#commit-pipeline-table-view{ data: { disable_initialization: disable_initialization,
endpoint: endpoint,
} }
.pipeline-svgs{ data: { "commit_icon_svg" => custom_icon("icon_commit"), .pipeline-svgs{ data: { "commit_icon_svg" => custom_icon("icon_commit"),
"icon_status_canceled" => custom_icon("icon_status_canceled"), "icon_status_canceled" => custom_icon("icon_status_canceled"),
"icon_status_running" => custom_icon("icon_status_running"), "icon_status_running" => custom_icon("icon_status_running"),
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.col-lg-9 .col-lg-9
.project-edit-errors .project-edit-errors
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f|
%fieldset.append-bottom-0 %fieldset
.row .row
.form-group.col-md-9 .form-group.col-md-9
= f.label :name, class: 'label-light', for: 'project_name_edit' do = f.label :name, class: 'label-light', for: 'project_name_edit' do
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
= f.text_field :tag_list, value: @project.tag_list.to_s, maxlength: 2000, class: "form-control" = f.text_field :tag_list, value: @project.tag_list.to_s, maxlength: 2000, class: "form-control"
%p.help-block Separate tags with commas. %p.help-block Separate tags with commas.
%hr %hr
%fieldset.append-bottom-0 %fieldset
%h5.prepend-top-0 %h5.prepend-top-0
Sharing &amp; Permissions Sharing &amp; Permissions
.form_group.prepend-top-20.sharing-and-permissions .form_group.prepend-top-20.sharing-and-permissions
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
-# This tab is always loaded via AJAX -# This tab is always loaded via AJAX
#pipelines.pipelines.tab-pane #pipelines.pipelines.tab-pane
- if @pipelines.any? - if @pipelines.any?
= render 'projects/commit/pipelines_list', endpoint: pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request) = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
#diffs.diffs.tab-pane #diffs.diffs.tab-pane
-# This tab is always loaded via AJAX -# This tab is always loaded via AJAX
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
Create or Import your project from popular Git services Create or Import your project from popular Git services
.col-lg-9 .col-lg-9
= form_for @project, html: { class: 'new_project' } do |f| = form_for @project, html: { class: 'new_project' } do |f|
%fieldset.append-bottom-0 .row
.form-group.col-xs-12.col-sm-6 .form-group.col-xs-12.col-sm-6
= f.label :namespace_id, class: 'label-light' do = f.label :namespace_id, class: 'label-light' do
%span %span
......
---
title: Fix stray pipelines API request when showing MR
merge_request:
author:
---
title: Disable invalid service templates
merge_request:
author:
class DisableInvalidServiceTemplates < ActiveRecord::Migration
DOWNTIME = false
unless defined?(Service)
class Service < ActiveRecord::Base
self.inheritance_column = nil
end
end
def up
Service.where(template: true, active: true).each do |template|
template.update(active: false) unless template.valid?
end
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170210075922) do ActiveRecord::Schema.define(version: 20170211073944) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
......
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