From 089ac50f92f4b7c035b961645b58d33e541b0db9 Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Wed, 14 Sep 2016 02:38:02 +0100 Subject: Changed mr widget build status to pipeline status with pipeline id, with a link to the pipeline View details now links to pipelines tab Added changelog entry --- CHANGELOG | 1 + app/assets/stylesheets/pages/merge_requests.scss | 3 ++- app/views/projects/merge_requests/widget/_heading.html.haml | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 248ec6faae3..898d03ba38a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -47,6 +47,7 @@ v 8.12.0 (unreleased) - Reduce contributions calendar data payload (ClemMakesApps) - Show all pipelines for merge requests even from discarded commits !6414 - Replace contributions calendar timezone payload with dates (ClemMakesApps) + - Changed MR widget build status to pipeline status !6335 - Add `web_url` field to issue, merge request, and snippet API objects (Ben Boeckel) - Enable pipeline events by default !6278 - Move parsing of sidekiq ps into helper !6245 (pascalbetz) diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 926247e5e87..3514ee2f35e 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -70,7 +70,8 @@ &.ci-success { color: $gl-success; - a.environment { + a.environment, + a.pipeline { color: inherit; } } diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml index 44e645a7e81..b5f5e11d4c3 100644 --- a/app/views/projects/merge_requests/widget/_heading.html.haml +++ b/app/views/projects/merge_requests/widget/_heading.html.haml @@ -4,14 +4,15 @@ .ci_widget{ class: "ci-#{status}", style: ("display:none" unless @pipeline.status == status) } = ci_icon_for_status(status) %span - CI build + Pipeline + = link_to "##{@pipeline.id}", namespace_project_pipeline_path(@pipeline.project.namespace, @pipeline.project, @pipeline.id), class: 'pipeline' = ci_label_for_status(status) for - commit = @merge_request.diff_head_commit = succeed "." do = link_to @pipeline.short_sha, namespace_project_commit_path(@merge_request.source_project.namespace, @merge_request.source_project, @pipeline.sha), class: "monospace" %span.ci-coverage - = link_to "View details", builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "js-show-tab", data: {action: 'builds'} + = link_to "View details", pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "js-show-tab", data: {action: 'pipelines'} - elsif @merge_request.has_ci? - # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX -- cgit v1.2.1 From 1bde1985c22c947a28d4da8d237f5ea8b894c2e0 Mon Sep 17 00:00:00 2001 From: Luke Howell Date: Sat, 10 Sep 2016 14:14:24 -0500 Subject: Fix tooltip for Copy to clipboard button. Fix "Copy to clipboard" tooltip to say "Copied!" when clipboard button is clicked. Closes #22022 --- CHANGELOG | 1 + app/assets/javascripts/copy_to_clipboard.js | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b4368c2cf9e..e4f39c27f40 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -22,6 +22,7 @@ v 8.13.0 (unreleased) - Fix broken repository 500 errors in project list v 8.12.4 (unreleased) + - Fix "Copy to clipboard" tooltip to say "Copied!" when clipboard button is clicked. (lukehowell) v 8.12.3 - Update Gitlab Shell to support low IO priority for storage moves diff --git a/app/assets/javascripts/copy_to_clipboard.js b/app/assets/javascripts/copy_to_clipboard.js index 3e20db7e308..e23bda2fa4e 100644 --- a/app/assets/javascripts/copy_to_clipboard.js +++ b/app/assets/javascripts/copy_to_clipboard.js @@ -26,15 +26,15 @@ }; showTooltip = function(target, title) { - return $(target).tooltip({ - container: 'body', - html: 'true', - placement: 'auto bottom', - title: title, - trigger: 'manual' - }).tooltip('show').one('mouseleave', function() { - return $(this).tooltip('hide'); - }); + var $target = $(target); + var originalTitle = $target.data('original-title'); + + $target + .attr('title', 'Copied!') + .tooltip('fixTitle') + .tooltip('show') + .attr('title', originalTitle) + .tooltip('fixTitle'); }; $(function() { -- cgit v1.2.1 From 2a7f82f8e4b0a89653cd21a3a1c34b51f3b4c141 Mon Sep 17 00:00:00 2001 From: the-undefined Date: Sun, 2 Oct 2016 14:42:36 +0100 Subject: Add Container Registry on/off status to admin area Display the on/off icon under the "Features" section of the admin area for the Container Registry. Closes !22805 --- CHANGELOG | 1 + app/views/admin/dashboard/index.html.haml | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 58f1e4a59c2..0be70f669c0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,7 @@ v 8.13.0 (unreleased) - Fix broken repository 500 errors in project list - Close todos when accepting merge requests via the API !6486 (tonygambone) - Changed Slack service user referencing from full name to username (Sebastian Poxhofer) + - Add Container Registry on/off status to Admin Area !6638 (the-undefined) v 8.12.4 (unreleased) diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index e6687f43816..90798c47d97 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -63,6 +63,11 @@ Reply by email %span.light.pull-right = boolean_to_icon Gitlab::IncomingEmail.enabled? + %p + Container Registry + %span.light.pull-right + = boolean_to_icon Gitlab.config.registry.enabled + .col-md-4 %h4 Components -- cgit v1.2.1 From d96a89f3b7221696c8964fbf777846b1c41ec239 Mon Sep 17 00:00:00 2001 From: Jacob Schatz Date: Mon, 3 Oct 2016 20:40:22 -0400 Subject: Remove SCSS rules for short hex chars. --- .csscomb.json | 2 +- .scss-lint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.csscomb.json b/.csscomb.json index 741cc1488b5..aa6a17f7517 100644 --- a/.csscomb.json +++ b/.csscomb.json @@ -6,7 +6,7 @@ "always-semicolon": true, "color-case": "lower", "block-indent": " ", - "color-shorthand": true, + "color-shorthand": false, "element-case": "lower", "space-before-colon": "", "space-after-colon": " ", diff --git a/.scss-lint.yml b/.scss-lint.yml index 66f9975d4ce..71df6be6a15 100644 --- a/.scss-lint.yml +++ b/.scss-lint.yml @@ -79,7 +79,7 @@ linters: # HEX colors should use three-character values where possible. HexLength: - enabled: true + enabled: false # HEX color values should use lower-case colors to differentiate between # letters and numbers, e.g. `#E3E3E3` vs. `#e3e3e3`. -- cgit v1.2.1 From d6e42e0ca1ab9962b7d43517c6f6beab5f1ade1c Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Tue, 13 Sep 2016 20:55:26 +0200 Subject: GrapeDSL for Namespace endpoint --- lib/api/namespaces.rb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/api/namespaces.rb b/lib/api/namespaces.rb index 50d3729449e..fe981d7b9fa 100644 --- a/lib/api/namespaces.rb +++ b/lib/api/namespaces.rb @@ -4,20 +4,18 @@ module API before { authenticate! } resource :namespaces do - # Get a namespaces list - # - # Example Request: - # GET /namespaces + desc 'Get a namespaces list' do + success Entities::Namespace + end + params do + optional :search, type: String, desc: "Search query for namespaces" + end get do - @namespaces = if current_user.admin - Namespace.all - else - current_user.namespaces - end - @namespaces = @namespaces.search(params[:search]) if params[:search].present? - @namespaces = paginate @namespaces + namespaces = current_user.admin ? Namespace.all : current_user.namespaces + + namespaces = namespaces.search(params[:search]) if params[:search].present? - present @namespaces, with: Entities::Namespace + present paginate(namespaces), with: Entities::Namespace end end end -- cgit v1.2.1 From 912d7f7b68d5c75d801299a8c9363a257030e142 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 4 Oct 2016 10:01:32 +0200 Subject: Fix issues importing services via Import/Export --- CHANGELOG | 1 + app/models/service.rb | 1 + spec/models/service_spec.rb | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 806196d811d..309197c52be 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -45,6 +45,7 @@ v 8.13.0 (unreleased) - Changed Slack service user referencing from full name to username (Sebastian Poxhofer) v 8.12.4 (unreleased) + - Fix issues importing services via Import/Export - Fix "Copy to clipboard" tooltip to say "Copied!" when clipboard button is clicked. (lukehowell) v 8.12.3 diff --git a/app/models/service.rb b/app/models/service.rb index 80de7175565..66c804f2b06 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -136,6 +136,7 @@ class Service < ActiveRecord::Base end def #{arg}=(value) + self.properties ||= {} updated_properties['#{arg}'] = #{arg} unless #{arg}_changed? self.properties['#{arg}'] = value end diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb index 05056a4bb47..ed1bc9271ae 100644 --- a/spec/models/service_spec.rb +++ b/spec/models/service_spec.rb @@ -203,6 +203,23 @@ describe Service, models: true do end end + describe 'initialize service with no properties' do + let(:service) do + GitlabIssueTrackerService.create( + project: create(:project), + title: 'random title' + ) + end + + it 'does not raise error' do + expect { service }.not_to raise_error + end + + it 'creates the properties' do + expect(service.properties).to eq({ "title" => "random title" }) + end + end + describe "callbacks" do let(:project) { create(:project) } let!(:service) do -- cgit v1.2.1