Commit 1fbeaa06 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'master' into update_api_messages

Conflicts:
	CHANGELOG
parents fd100e38 de6256ee
...@@ -5,21 +5,23 @@ v 7.7.0 ...@@ -5,21 +5,23 @@ v 7.7.0
- -
- -
- Mention notification level - Mention notification level
- - Markdown preview in wiki (Yuriy Glukhov)
- - Raise group avatar filesize limit to 200kb
- OAuth applications feature - OAuth applications feature
- - Show user SSH keys in admin area
- - Developer can push to protected branches option
- Set project path instead of project name in create form - Set project path instead of project name in create form
- -
- -
- New side navigation
- Updates to the messages returned by API (sponsored by O'Reilly Media) - Updates to the messages returned by API (sponsored by O'Reilly Media)
- New UI layout with side navigation
-
- -
- -
- Add alert message in case of outdated browser (IE < 10) - Add alert message in case of outdated browser (IE < 10)
- -
- Added API support for sorting projects - Added API support for sorting projects
- Update gitlab_git to version 7.0.0.rc13
v 7.6.0 v 7.6.0
- Fork repository to groups - Fork repository to groups
...@@ -45,8 +47,15 @@ v 7.6.0 ...@@ -45,8 +47,15 @@ v 7.6.0
- Possibility to create Milestones or Labels when Issues are disabled - Possibility to create Milestones or Labels when Issues are disabled
- Fix bug with showing gpg signature in tag - Fix bug with showing gpg signature in tag
v 7.5.3
- Bump gitlab_git to 7.0.0.rc12 (includes Rugged 0.21.2)
v 7.5.2 v 7.5.2
- Don't log Sidekiq arguments by default - Don't log Sidekiq arguments by default
- Fix restore of wiki repositories from backups
v 7.5.1
- Add missing timestamps to 'members' table
v 7.5.0 v 7.5.0
- API: Add support for Hipchat (Kevin Houdebert) - API: Add support for Hipchat (Kevin Houdebert)
......
...@@ -37,7 +37,7 @@ gem "browser" ...@@ -37,7 +37,7 @@ gem "browser"
# Extracting information from a git repository # Extracting information from a git repository
# Provide access to Gitlab::Git library # Provide access to Gitlab::Git library
gem "gitlab_git", '7.0.0.rc12' gem "gitlab_git", '7.0.0.rc13'
# Ruby/Rack Git Smart-HTTP Server Handler # Ruby/Rack Git Smart-HTTP Server Handler
gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack' gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
...@@ -95,7 +95,7 @@ gem "github-markup" ...@@ -95,7 +95,7 @@ gem "github-markup"
gem 'redcarpet', '~> 3.1.2' gem 'redcarpet', '~> 3.1.2'
gem 'RedCloth' gem 'RedCloth'
gem 'rdoc', '~>3.6' gem 'rdoc', '~>3.6'
gem 'org-ruby', '= 0.9.9' gem 'org-ruby', '= 0.9.12'
gem 'creole', '~>0.3.6' gem 'creole', '~>0.3.6'
gem 'wikicloth', '=0.8.1' gem 'wikicloth', '=0.8.1'
gem 'asciidoctor', '= 0.1.4' gem 'asciidoctor', '= 0.1.4'
......
...@@ -124,7 +124,7 @@ GEM ...@@ -124,7 +124,7 @@ GEM
equalizer (0.0.8) equalizer (0.0.8)
erubis (2.7.0) erubis (2.7.0)
escape_utils (0.2.4) escape_utils (0.2.4)
eventmachine (1.0.3) eventmachine (1.0.4)
excon (0.32.1) excon (0.32.1)
execjs (2.0.2) execjs (2.0.2)
expression_parser (0.9.0) expression_parser (0.9.0)
...@@ -183,7 +183,7 @@ GEM ...@@ -183,7 +183,7 @@ GEM
mime-types (~> 1.19) mime-types (~> 1.19)
gitlab_emoji (0.0.1.1) gitlab_emoji (0.0.1.1)
emoji (~> 1.0.1) emoji (~> 1.0.1)
gitlab_git (7.0.0.rc12) gitlab_git (7.0.0.rc13)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.6) charlock_holmes (~> 0.6)
gitlab-linguist (~> 3.0) gitlab-linguist (~> 3.0)
...@@ -280,7 +280,7 @@ GEM ...@@ -280,7 +280,7 @@ GEM
kaminari (0.15.1) kaminari (0.15.1)
actionpack (>= 3.0.0) actionpack (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
kgio (2.8.1) kgio (2.9.2)
launchy (2.4.2) launchy (2.4.2)
addressable (~> 2.3) addressable (~> 2.3)
letter_opener (1.1.2) letter_opener (1.1.2)
...@@ -343,7 +343,7 @@ GEM ...@@ -343,7 +343,7 @@ GEM
omniauth-twitter (1.0.1) omniauth-twitter (1.0.1)
multi_json (~> 1.3) multi_json (~> 1.3)
omniauth-oauth (~> 1.0) omniauth-oauth (~> 1.0)
org-ruby (0.9.9) org-ruby (0.9.12)
rubypants (~> 0.2) rubypants (~> 0.2)
orm_adapter (0.5.0) orm_adapter (0.5.0)
pg (0.15.1) pg (0.15.1)
...@@ -409,7 +409,7 @@ GEM ...@@ -409,7 +409,7 @@ GEM
activesupport (= 4.1.1) activesupport (= 4.1.1)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
raindrops (0.12.0) raindrops (0.13.0)
rake (10.3.2) rake (10.3.2)
raphael-rails (2.1.2) raphael-rails (2.1.2)
rb-fsevent (0.9.3) rb-fsevent (0.9.3)
...@@ -643,7 +643,7 @@ DEPENDENCIES ...@@ -643,7 +643,7 @@ DEPENDENCIES
gitlab-grack (~> 2.0.0.pre) gitlab-grack (~> 2.0.0.pre)
gitlab-linguist (~> 3.0.0) gitlab-linguist (~> 3.0.0)
gitlab_emoji (~> 0.0.1.1) gitlab_emoji (~> 0.0.1.1)
gitlab_git (= 7.0.0.rc12) gitlab_git (= 7.0.0.rc13)
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (= 1.2.0) gitlab_omniauth-ldap (= 1.2.0)
gollum-lib (~> 3.0.0) gollum-lib (~> 3.0.0)
...@@ -677,7 +677,7 @@ DEPENDENCIES ...@@ -677,7 +677,7 @@ DEPENDENCIES
omniauth-kerberos omniauth-kerberos
omniauth-shibboleth omniauth-shibboleth
omniauth-twitter omniauth-twitter
org-ruby (= 0.9.9) org-ruby (= 0.9.12)
pg pg
poltergeist (~> 1.5.1) poltergeist (~> 1.5.1)
pry pry
......
...@@ -292,11 +292,17 @@ table { ...@@ -292,11 +292,17 @@ table {
.dashboard-intro-icon { .dashboard-intro-icon {
float: left; float: left;
text-align: center;
font-size: 32px; font-size: 32px;
color: #AAA; color: #AAA;
padding: 5px 0; width: 60px;
width: 50px; }
min-height: 100px;
.dashboard-intro-text {
display: inline-block;
margin-left: -60px;
padding-left: 60px;
width: 100%;
} }
.broadcast-message { .broadcast-message {
......
...@@ -31,7 +31,12 @@ fieldset legend { ...@@ -31,7 +31,12 @@ fieldset legend {
margin-bottom: 18px; margin-bottom: 18px;
background-color: whitesmoke; background-color: whitesmoke;
border-top: 1px solid #e5e5e5; border-top: 1px solid #e5e5e5;
padding-left: 17%; }
@media (min-width: $screen-sm-min) {
.form-actions {
padding-left: 17%;
}
} }
label { label {
...@@ -88,7 +93,8 @@ label { ...@@ -88,7 +93,8 @@ label {
@include box-shadow(none); @include box-shadow(none);
} }
.issuable-description { .issuable-description,
.wiki-content {
margin-top: 35px; margin-top: 35px;
} }
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
.edit_note, .edit_note,
.issuable-description, .issuable-description,
.milestone-description, .milestone-description,
.wiki-content,
.merge-request-form { .merge-request-form {
.nav-tabs { .nav-tabs {
margin-bottom: 0; margin-bottom: 0;
......
...@@ -145,8 +145,12 @@ ...@@ -145,8 +145,12 @@
* Last push widget * Last push widget
*/ */
.event-last-push { .event-last-push {
overflow: auto;
.event-last-push-text { .event-last-push-text {
@include str-truncated(75%); @include str-truncated(100%);
float:left;
margin-right: -150px;
padding-right: 150px;
line-height: 24px; line-height: 24px;
} }
} }
......
...@@ -11,10 +11,27 @@ ...@@ -11,10 +11,27 @@
} }
} }
.accept-group { .accept-merge-holder {
label { margin-top: 5px;
margin: 5px;
.accept-action {
display: inline-block;
.accept_merge_request {
padding: 10px 20px;
}
}
.accept-control {
display: inline-block;
margin-left: 20px; margin-left: 20px;
padding: 10px 0;
line-height: 20px;
font-weight: bold;
.checkbox {
margin: 0;
}
} }
} }
} }
...@@ -170,7 +187,3 @@ ...@@ -170,7 +187,3 @@
.merge-request-show-labels .label { .merge-request-show-labels .label {
padding: 6px 10px; padding: 6px 10px;
} }
.mr-commits .commit {
padding: 10px 15px;
}
...@@ -11,7 +11,7 @@ class Projects::MilestonesController < Projects::ApplicationController ...@@ -11,7 +11,7 @@ class Projects::MilestonesController < Projects::ApplicationController
respond_to :html respond_to :html
def index def index
@milestones = case params[:f] @milestones = case params[:state]
when 'all'; @project.milestones.order("state, due_date DESC") when 'all'; @project.milestones.order("state, due_date DESC")
when 'closed'; @project.milestones.closed.order("due_date DESC") when 'closed'; @project.milestones.closed.order("due_date DESC")
else @project.milestones.active.order("due_date ASC") else @project.milestones.active.order("due_date ASC")
......
...@@ -4,6 +4,8 @@ module DashboardHelper ...@@ -4,6 +4,8 @@ module DashboardHelper
sort: params[:sort], sort: params[:sort],
scope: params[:scope], scope: params[:scope],
group: params[:group], group: params[:group],
tag: params[:tag],
visibility_level: params[:visibility_level],
} }
options = exist_opts.merge(options) options = exist_opts.merge(options)
......
...@@ -33,18 +33,6 @@ module GroupsHelper ...@@ -33,18 +33,6 @@ module GroupsHelper
title title
end end
def group_filter_path(entity, options={})
exist_opts = {
status: params[:status]
}
options = exist_opts.merge(options)
path = request.path
path << "?#{options.to_param}"
path
end
def group_settings_page? def group_settings_page?
if current_controller?('groups') if current_controller?('groups')
current_action?('edit') || current_action?('projects') current_action?('edit') || current_action?('projects')
......
module MilestonesHelper
def milestones_filter_path(opts = {})
if @project
project_milestones_path(@project, opts)
elsif @group
group_milestones_path(@group, opts)
end
end
end
...@@ -174,7 +174,7 @@ class Event < ActiveRecord::Base ...@@ -174,7 +174,7 @@ class Event < ActiveRecord::Base
def valid_push? def valid_push?
data[:ref] && ref_name.present? data[:ref] && ref_name.present?
rescue => ex rescue
false false
end end
......
...@@ -21,7 +21,7 @@ class Group < Namespace ...@@ -21,7 +21,7 @@ class Group < Namespace
has_many :users, through: :group_members has_many :users, through: :group_members
validate :avatar_type, if: ->(user) { user.avatar_changed? } validate :avatar_type, if: ->(user) { user.avatar_changed? }
validates :avatar, file_size: { maximum: 100.kilobytes.to_i } validates :avatar, file_size: { maximum: 200.kilobytes.to_i }
mount_uploader :avatar, AttachmentUploader mount_uploader :avatar, AttachmentUploader
......
...@@ -189,7 +189,9 @@ class MergeRequest < ActiveRecord::Base ...@@ -189,7 +189,9 @@ class MergeRequest < ActiveRecord::Base
end end
def automerge!(current_user, commit_message = nil) def automerge!(current_user, commit_message = nil)
MergeRequests::AutoMergeService.new.execute(self, current_user, commit_message) MergeRequests::AutoMergeService.
new(target_project, current_user).
execute(self, commit_message)
end end
def open? def open?
......
...@@ -35,7 +35,7 @@ class HipchatService < Service ...@@ -35,7 +35,7 @@ class HipchatService < Service
{ type: 'text', name: 'token', placeholder: '' }, { type: 'text', name: 'token', placeholder: '' },
{ type: 'text', name: 'room', placeholder: '' }, { type: 'text', name: 'room', placeholder: '' },
{ type: 'text', name: 'server', { type: 'text', name: 'server',
placeholder: 'Leave blank for default. https://chat.hipchat.com' } placeholder: 'Leave blank for default. https://hipchat.example.com' }
] ]
end end
...@@ -47,7 +47,7 @@ class HipchatService < Service ...@@ -47,7 +47,7 @@ class HipchatService < Service
def gate def gate
options = { api_version: 'v2' } options = { api_version: 'v2' }
options[:server_url] = server unless server.nil? options[:server_url] = server unless server.blank?
@gate ||= HipChat::Client.new(token, options) @gate ||= HipChat::Client.new(token, options)
end end
......
...@@ -5,15 +5,16 @@ module MergeRequests ...@@ -5,15 +5,16 @@ module MergeRequests
# mark merge request as merged and execute all hooks and notifications # mark merge request as merged and execute all hooks and notifications
# Called when you do merge via GitLab UI # Called when you do merge via GitLab UI
class AutoMergeService < BaseMergeService class AutoMergeService < BaseMergeService
def execute(merge_request, current_user, commit_message) def execute(merge_request, commit_message)
merge_request.lock_mr merge_request.lock_mr
if Gitlab::Satellite::MergeAction.new(current_user, merge_request).merge!(commit_message) if Gitlab::Satellite::MergeAction.new(current_user, merge_request).merge!(commit_message)
merge_request.merge merge_request.merge
notification.merge_mr(merge_request, current_user) notification_service.merge_mr(merge_request, current_user)
create_merge_event(merge_request, current_user) create_merge_event(merge_request, current_user)
execute_project_hooks(merge_request) create_note(merge_request)
execute_hooks(merge_request)
true true
else else
......
module MergeRequests module MergeRequests
class BaseMergeService class BaseMergeService < MergeRequests::BaseService
private private
def notification
NotificationService.new
end
def create_merge_event(merge_request, current_user) def create_merge_event(merge_request, current_user)
EventCreateService.new.merge_mr(merge_request, current_user) EventCreateService.new.merge_mr(merge_request, current_user)
end end
def execute_project_hooks(merge_request)
if merge_request.project
hook_data = merge_request.to_hook_data(current_user)
merge_request.project.execute_hooks(hook_data, :merge_request_hooks)
end
end
end end
end end
...@@ -13,7 +13,7 @@ module MergeRequests ...@@ -13,7 +13,7 @@ module MergeRequests
merge_request.target_branch ||= merge_request.target_project.default_branch merge_request.target_branch ||= merge_request.target_project.default_branch
unless merge_request.target_branch && merge_request.source_branch unless merge_request.target_branch && merge_request.source_branch
return build_failed(merge_request, "You must select source and target branches") return build_failed(merge_request, nil)
end end
# Generate suggested MR title based on source branch name # Generate suggested MR title based on source branch name
...@@ -59,7 +59,7 @@ module MergeRequests ...@@ -59,7 +59,7 @@ module MergeRequests
end end
def build_failed(merge_request, message) def build_failed(merge_request, message)
merge_request.errors.add(:base, message) merge_request.errors.add(:base, message) unless message.nil?
merge_request.compare_commits = [] merge_request.compare_commits = []
merge_request.can_be_created = false merge_request.can_be_created = false
merge_request merge_request
......
...@@ -6,12 +6,13 @@ module MergeRequests ...@@ -6,12 +6,13 @@ module MergeRequests
# Called when you do merge via command line and push code # Called when you do merge via command line and push code
# to target branch # to target branch
class MergeService < BaseMergeService class MergeService < BaseMergeService
def execute(merge_request, current_user, commit_message) def execute(merge_request, commit_message)
merge_request.merge merge_request.merge
notification.merge_mr(merge_request, current_user) notification_service.merge_mr(merge_request, current_user)
create_merge_event(merge_request, current_user) create_merge_event(merge_request, current_user)
execute_project_hooks(merge_request) create_note(merge_request)
execute_hooks(merge_request)
true true
rescue rescue
......
...@@ -32,7 +32,9 @@ module MergeRequests ...@@ -32,7 +32,9 @@ module MergeRequests
merge_requests.uniq.select(&:source_project).each do |merge_request| merge_requests.uniq.select(&:source_project).each do |merge_request|
MergeRequests::MergeService.new.execute(merge_request, @current_user, nil) MergeRequests::MergeService.
new(merge_request.target_project, @current_user).
execute(merge_request, nil)
end end
end end
......
%fieldset .dash-projects-filters.append-bottom-20
%ul.nav.nav-pills.nav-stacked .pull-left.append-right-20
= nav_tab :scope, nil do %ul.nav.nav-pills.nav-compact
= link_to projects_dashboard_filter_path(scope: nil) do = nav_tab :scope, nil do
All = link_to projects_dashboard_filter_path(scope: nil) do
%span.pull-right All
= current_user.authorized_projects.count = nav_tab :scope, 'personal' do
= nav_tab :scope, 'personal' do = link_to projects_dashboard_filter_path(scope: 'personal') do
= link_to projects_dashboard_filter_path(scope: 'personal') do Personal
Personal = nav_tab :scope, 'joined' do
%span.pull-right = link_to projects_dashboard_filter_path(scope: 'joined') do
= current_user.personal_projects.count Joined
= nav_tab :scope, 'joined' do = nav_tab :scope, 'owned' do
= link_to projects_dashboard_filter_path(scope: 'joined') do = link_to projects_dashboard_filter_path(scope: 'owned') do
Joined Owned
%span.pull-right
= current_user.authorized_projects.joined(current_user).count
= nav_tab :scope, 'owned' do
= link_to projects_dashboard_filter_path(scope: 'owned') do
Owned
%span.pull-right
= current_user.owned_projects.count
%fieldset .dropdown.inline.append-right-10
%legend Visibility %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%ul.nav.nav-pills.nav-stacked.nav-small.visibility-filter %i.fa.fa-globe
- Gitlab::VisibilityLevel.values.each do |level| %span.light Visibility:
%li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' } - if params[:visibility_level].present?
= link_to projects_dashboard_filter_path(visibility_level: level) do = visibility_level_label(params[:visibility_level].to_i)
= visibility_level_icon(level) - else
= visibility_level_label(level) Any
%b.caret
%ul.dropdown-menu
%li
= link_to projects_dashboard_filter_path(visibility_level: nil) do
Any
- Gitlab::VisibilityLevel.values.each do |level|
%li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
= link_to projects_dashboard_filter_path(visibility_level: level) do
= visibility_level_icon(level)
= visibility_level_label(level)
- if @groups.present? - if @groups.present?
%fieldset .dropdown.inline.append-right-10
%legend Groups %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%ul.nav.nav-pills.nav-stacked.nav-small %i.fa.fa-group
- @groups.each do |group| %span.light Group:
%li{ class: (group.name == params[:group]) ? 'active' : 'light' } - if params[:group].present?
= link_to projects_dashboard_filter_path(group: group.name) do = Group.find_by(name: params[:group]).name
%i.fa.fa-folder-o - else
= group.name Any
%small.pull-right %b.caret
= group.projects.count %ul.dropdown-menu
%li
= link_to projects_dashboard_filter_path(group: nil) do
Any
- @groups.each do |group|
%li{ class: (group.name == params[:group]) ? 'active' : 'light' }
= link_to projects_dashboard_filter_path(group: group.name) do
= group.name
%small.pull-right
= group.projects.count
- if @tags.present? - if @tags.present?
%fieldset .dropdown.inline.append-right-10
%legend Tags %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%ul.nav.nav-pills.nav-stacked.nav-small %i.fa.fa-tags
- @tags.each do |tag| %span.light Tags:
%li{ class: (tag.name == params[:tag]) ? 'active' : 'light' } - if params[:tag].present?
= link_to projects_dashboard_filter_path(scope: params[:scope], tag: tag.name) do = params[:tag]
%i.fa.fa-tag - else
= tag.name Any
%b.caret
%ul.dropdown-menu
%li
= link_to projects_dashboard_filter_path(tag: nil) do
Any
- @tags.each do |tag|
%li{ class: (tag.name == params[:tag]) ? 'active' : 'light' }
= link_to projects_dashboard_filter_path(tag: tag.name) do
%i.fa.fa-tag
= tag.name
.pull-right
.dropdown.inline
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%span.light sort:
- if @sort.present?
= @sort.humanize
- else
Name
%b.caret
%ul.dropdown-menu
%li
= link_to projects_dashboard_filter_path(sort: nil) do
Name
= link_to projects_dashboard_filter_path(sort: 'newest') do
= sort_title_recently_created
= link_to projects_dashboard_filter_path(sort: 'oldest') do
= sort_title_oldest_created
= link_to projects_dashboard_filter_path(sort: 'recently_updated') do
= sort_title_recently_updated
= link_to projects_dashboard_filter_path(sort: 'last_updated') do
= sort_title_oldest_updated
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%div %div
.dashboard-intro-icon .dashboard-intro-icon
%i.fa.fa-bookmark-o %i.fa.fa-bookmark-o
%div .dashboard-intro-text
%p.slead %p.slead
You don't have access to any projects right now. You don't have access to any projects right now.
%br %br
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
%div %div
.dashboard-intro-icon .dashboard-intro-icon
%i.fa.fa-users %i.fa.fa-users
%div .dashboard-intro-text
%p.slead %p.slead
You can create a group for several dependent projects. You can create a group for several dependent projects.
%br %br
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
%div %div
.dashboard-intro-icon .dashboard-intro-icon
%i.fa.fa-globe %i.fa.fa-globe
%div .dashboard-intro-text
%p.slead %p.slead
There are There are
%strong= @publicish_project_count %strong= @publicish_project_count
......
xml.instruct! xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlnsmedia" => "http://search.yahoo.com/mrss/" do xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "#{current_user.name} issues" xml.title "#{current_user.name} issues"
xml.link href: issues_dashboard_url(:atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml" xml.link href: issues_dashboard_url(:atom, private_token: current_user.private_token), rel: "self", type: "application/atom+xml"
xml.link href: issues_dashboard_url(private_token: current_user.private_token), rel: "alternate", type: "text/html" xml.link href: issues_dashboard_url(private_token: current_user.private_token), rel: "alternate", type: "text/html"
......
%h3.page-title %h3.page-title
My Projects My Projects
.pull-right
.dropdown.inline
%a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
%span.light sort:
- if @sort.present?
= @sort.humanize
- else
Name
%b.caret
%ul.dropdown-menu
%li
= link_to projects_dashboard_filter_path(sort: nil) do
Name
= link_to projects_dashboard_filter_path(sort: 'newest') do
= sort_title_recently_created
= link_to projects_dashboard_filter_path(sort: 'oldest') do
= sort_title_oldest_created
= link_to projects_dashboard_filter_path(sort: 'recently_updated') do
= sort_title_recently_updated
= link_to projects_dashboard_filter_path(sort: 'last_updated') do
= sort_title_oldest_updated
%p.light %p.light
All projects you have access to are listed here. Public projects are not included here unless you are a member All projects you have access to are listed here. Public projects are not included here unless you are a member
%hr %hr
.row .side-filters
.col-md-3.hidden-sm.hidden-xs.side-filters = render "projects_filter"
= render "projects_filter" .dash-projects
.col-md-9 %ul.bordered-list.my-projects.top-list
%ul.bordered-list.my-projects.top-list - @projects.each do |project|
- @projects.each do |project| %li.my-project-row
%li.my-project-row %h4.project-title
%h4.project-title .project-access-icon
.project-access-icon = visibility_level_icon(project.visibility_level)
= visibility_level_icon(project.visibility_level) = link_to project_path(project), class: dom_class(project) do
= link_to project_path(project), class: dom_class(project) do = project.name_with_namespace
= project.name_with_namespace
- if project.forked_from_project - if project.forked_from_project
&nbsp; &nbsp;
%small %small
%i.fa.fa-code-fork %i.fa.fa-code-fork
Forked from: Forked from:
= link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project) = link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
- if current_user.can_leave_project?(project) - if current_user.can_leave_project?(project)
.pull-right
= link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
%i.fa.fa-sign-out
Leave
.project-info
.pull-right .pull-right
- if project.archived? = link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
%span.label %i.fa.fa-sign-out
%i.fa.fa-archive Leave
Archived
- project.tags.each do |tag| .project-info
%span.label.label-info .pull-right
%i.fa.fa-tag - if project.archived?
= tag.name %span.label
- if project.description.present? %i.fa.fa-archive
%p= truncate project.description, length: 100 Archived
.last-activity - project.tags.each do |tag|
%span.light Last activity: %span.label.label-info
%span.date= project_last_activity(project) %i.fa.fa-tag
= tag.name
- if project.description.present?
%p= truncate project.description, length: 100
.last-activity
%span.light Last activity:
%span.date= project_last_activity(project)
- if @projects.blank? - if @projects.blank?
%li %li
.nothing-here-block There are no projects here. .nothing-here-block There are no projects here.
.bottom .bottom
= paginate @projects, theme: "gitlab" = paginate @projects, theme: "gitlab"
xml.instruct! xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlnsmedia" => "http://search.yahoo.com/mrss/" do xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}" xml.title "Dashboard feed#{" - #{current_user.name}" if current_user.name.present?}"
xml.link href: dashboard_url(:atom), rel: "self", type: "application/atom+xml" xml.link href: dashboard_url(:atom), rel: "self", type: "application/atom+xml"
xml.link href: dashboard_url, rel: "alternate", type: "text/html" xml.link href: dashboard_url, rel: "alternate", type: "text/html"
......
= form_tag group_filter_path(entity), method: 'get' do
%fieldset
%ul.nav.nav-pills.nav-stacked
%li{class: ("active" if (params[:status] == 'active' || !params[:status]))}
= link_to group_filter_path(entity, status: 'active') do
Active
%li{class: ("active" if params[:status] == 'closed')}
= link_to group_filter_path(entity, status: 'closed') do
Closed
%li{class: ("active" if params[:status] == 'all')}
= link_to group_filter_path(entity, status: 'all') do
All
...@@ -9,42 +9,38 @@ ...@@ -9,42 +9,38 @@
%hr %hr
.row = render 'shared/milestones_filter'
.fixed.sidebar-expand-button.hidden-lg.hidden-md .milestones
%i.fa.fa-list.fa-2x .panel.panel-default
.col-md-3.responsive-side %ul.well-list
= render 'groups/filter', entity: 'milestone' - if @group_milestones.blank?
.col-md-9 %li
.panel.panel-default .nothing-here-block No milestones to show
%ul.well-list - else
- if @group_milestones.blank? - @group_milestones.each do |milestone|
%li %li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone.milestones.first) }
.nothing-here-block No milestones to show .pull-right
- else - if can?(current_user, :manage_group, @group)
- @group_milestones.each do |milestone| - if milestone.closed?
%li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone.milestones.first) } = link_to 'Reopen Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped btn-reopen"
.pull-right - else
- if can?(current_user, :manage_group, @group) = link_to 'Close Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-close"
- if milestone.closed? %h4
= link_to 'Reopen Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :activate }), method: :put, class: "btn btn-small btn-grouped btn-reopen" = link_to_gfm truncate(milestone.title, length: 100), group_milestone_path(@group, milestone.safe_title, title: milestone.title)
- else %div
= link_to 'Close Milestone', group_milestone_path(@group, milestone.safe_title, title: milestone.title, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-close"
%h4
= link_to_gfm truncate(milestone.title, length: 100), group_milestone_path(@group, milestone.safe_title, title: milestone.title)
%div %div
%div = link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do
= link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do = pluralize milestone.issue_count, 'Issue'
= pluralize milestone.issue_count, 'Issue' &nbsp;
&nbsp; = link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do
= link_to group_milestone_path(@group, milestone.safe_title, title: milestone.title) do = pluralize milestone.merge_requests_count, 'Merge Request'
= pluralize milestone.merge_requests_count, 'Merge Request' &nbsp;
&nbsp; %span.light #{milestone.percent_complete}% complete
%span.light #{milestone.percent_complete}% complete .progress.progress-info
.progress.progress-info .progress-bar{style: "width: #{milestone.percent_complete}%;"}
.progress-bar{style: "width: #{milestone.percent_complete}%;"} %div
%div %br
%br - milestone.projects.each do |project|
- milestone.projects.each do |project| %span.label.label-default
%span.label.label-default = project.name
= project.name = paginate @group_milestones, theme: "gitlab"
= paginate @group_milestones, theme: "gitlab"
xml.instruct! xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlnsmedia" => "http://search.yahoo.com/mrss/" do xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "Group feed - #{@group.name}" xml.title "Group feed - #{@group.name}"
xml.link href: group_path(@group, :atom), rel: "self", type: "application/atom+xml" xml.link href: group_path(@group, :atom), rel: "self", type: "application/atom+xml"
xml.link href: group_path(@group), rel: "alternate", type: "text/html" xml.link href: group_path(@group), rel: "alternate", type: "text/html"
......
...@@ -52,10 +52,11 @@ ...@@ -52,10 +52,11 @@
- else - else
%span.light No open milestones available. %span.light No open milestones available.
&nbsp; &nbsp;
= link_to 'Create new milestone', new_project_milestone_path(issuable.project), target: :blank - if can? current_user, :admin_milestone, issuable.project
= link_to 'Create new milestone', new_project_milestone_path(issuable.project), target: :blank
.form-group .form-group
= f.label :label_ids, class: 'control-label' do = f.label :label_ids, class: 'control-label' do
%i.icon-tag %i.fa.fa-tag
Labels Labels
.col-sm-10 .col-sm-10
- if issuable.project.labels.any? - if issuable.project.labels.any?
...@@ -64,9 +65,15 @@ ...@@ -64,9 +65,15 @@
- else - else
%span.light No labels yet. %span.light No labels yet.
&nbsp; &nbsp;
= link_to 'Create new label', new_project_label_path(issuable.project), target: :blank - if can? current_user, :admin_label, issuable.project
= link_to 'Create new label', new_project_label_path(issuable.project), target: :blank
.form-actions .form-actions
- if !issuable.project.empty_repo? && contribution_guide_url(issuable.project) && !issuable.persisted?
%p
Please review the
%strong #{link_to 'guidelines for contribution', contribution_guide_url(issuable.project)}
to this repository.
- if issuable.new_record? - if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create' = f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
- else - else
......
...@@ -7,5 +7,5 @@ ...@@ -7,5 +7,5 @@
%p= pluralize(commits.count, 'commit') %p= pluralize(commits.count, 'commit')
.col-md-10 .col-md-10
%ul.bordered-list %ul.bordered-list
= render commits, project: @project = render commits, project: project
%hr.lists-separator %hr.lists-separator
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= commits_breadcrumbs = commits_breadcrumbs
%div{id: dom_id(@project)} %div{id: dom_id(@project)}
#commits-list= render "commits" #commits-list= render "commits", project: @project
.clear .clear
= spinner = spinner
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.diff-file{id: "diff-#{i}", data: {blob_diff_path: blob_diff_path }} .diff-file{id: "diff-#{i}", data: {blob_diff_path: blob_diff_path }}
.diff-header{id: "file-path-#{hexdigest(diff_file.new_path || diff_file.old_path)}"} .diff-header{id: "file-path-#{hexdigest(diff_file.new_path || diff_file.old_path)}"}
- if diff_file.deleted_file - if diff_file.deleted_file
%span= diff_file.old_path %span="#{diff_file.old_path} deleted"
.diff-btn-group .diff-btn-group
- if @commit.parent_ids.present? - if @commit.parent_ids.present?
......
%div.issue-form-holder %div.issue-form-holder
%h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}" %h3.page-title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.iid}"
%hr %hr
- if @repository.exists? && !@repository.empty? && @repository.contribution_guide && !@issue.persisted?
- contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name))
.row
.col-sm-10.col-sm-offset-2
.alert.alert-info
= "Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe
= form_for [@project, @issue], html: { class: 'form-horizontal issue-form gfm-form' } do |f| = form_for [@project, @issue], html: { class: 'form-horizontal issue-form gfm-form' } do |f|
= render 'projects/issuable_form', f: f, issuable: @issue = render 'projects/issuable_form', f: f, issuable: @issue
......
...@@ -9,74 +9,103 @@ ...@@ -9,74 +9,103 @@
%span.pull-right %span.pull-right
= link_to 'Change branches', new_project_merge_request_path(@project) = link_to 'Change branches', new_project_merge_request_path(@project)
= form_for [@project, @merge_request], html: { class: "merge-request-form gfm-form" } do |f| = form_for [@project, @merge_request], html: { class: "merge-request-form form-horizontal gfm-form" } do |f|
.panel.panel-default .merge-request-form-info
.form-group
.panel-body = f.label :title, class: 'control-label' do
.form-group %strong Title *
.light .col-sm-10
= f.label :title do = f.text_field :title, maxlength: 255, autofocus: true, class: 'form-control pad js-gfm-input', required: true
Title * .form-group.issuable-description
= f.text_field :title, class: "form-control input-lg js-gfm-input", maxlength: 255, rows: 5, required: true = f.label :description, 'Description', class: 'control-label'
.form-group .col-sm-10
.light
= f.label :description, "Description"
= render layout: 'projects/md_preview' do = render layout: 'projects/md_preview' do
= render 'projects/zen', f: f, attr: :description, = render 'projects/zen', f: f, attr: :description, classes: 'description form-control'
classes: 'description form-control'
.clearfix.hint .col-sm-12-hint
.pull-left Description is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}. .pull-left
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. Parsed with
#{link_to 'Gitlab Flavored Markdown', help_page_path('markdown', 'markdown'), target: '_blank'}.
.pull-right
Attach images (JPG, PNG, GIF) by dragging &amp; dropping
or #{link_to 'selecting them', '#', class: 'markdown-selector'}.
.clearfix
.error-alert .error-alert
.form-group %hr
.issue-assignee .form-group
= f.label :assignee_id do .issue-assignee
%i.fa.fa-user = f.label :assignee_id, class: 'control-label' do
Assign to %i.fa.fa-user
%div Assign to
= project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id, project_id: @merge_request.target_project_id) .col-sm-10
&nbsp; = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id, project_id: @merge_request.target_project_id)
= link_to 'Assign to me', '#', class: 'btn assign-to-me-link' &nbsp;
.form-group = link_to 'Assign to me', '#', class: 'btn assign-to-me-link'
.issue-milestone .form-group
= f.label :milestone_id do .issue-milestone
%i.fa.fa-clock-o = f.label :milestone_id, class: 'control-label' do
Milestone %i.fa.fa-clock-o
%div= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'}) Milestone
.form-group .col-sm-10
= f.label :label_ids do - if milestone_options(@merge_request).present?
%i.fa.fa-tag = f.select(:milestone_id, milestone_options(@merge_request), {include_blank: 'Select milestone'}, {class: 'select2'})
Labels - else
%div %span.light No open milestones available.
= f.collection_select :label_ids, @merge_request.target_project.labels.all, :id, :name, { selected: @merge_request.label_ids }, multiple: true, class: 'select2' &nbsp;
- if can? current_user, :admin_milestone, @merge_request.target_project
= link_to 'Create new milestone', new_project_milestone_path(@merge_request.target_project), target: :blank
.form-group
= f.label :label_ids, class: 'control-label' do
%i.fa.fa-tag
Labels
.col-sm-10
- if @merge_request.target_project.labels.any?
= f.collection_select :label_ids, @merge_request.target_project.labels.all, :id, :name, {selected: @merge_request.label_ids}, multiple: true, class: 'select2'
- else
%span.light No labels yet.
&nbsp;
- if can? current_user, :admin_label, @merge_request.target_project
= link_to 'Create new label', new_project_label_path(@merge_request.target_project), target: :blank
.panel-footer .form-actions
- if contribution_guide_url(@target_project) - if contribution_guide_url(@target_project)
%p %p
Please review the Please review the
%strong #{link_to "guidelines for contribution", contribution_guide_url(@target_project)} %strong #{link_to 'guidelines for contribution', contribution_guide_url(@target_project)}
to this repository. to this repository.
= f.hidden_field :source_project_id = f.hidden_field :source_project_id
= f.hidden_field :source_branch
= f.hidden_field :target_project_id = f.hidden_field :target_project_id
= f.hidden_field :target_branch = f.hidden_field :target_branch
= f.hidden_field :source_branch = f.submit 'Submit merge request', class: 'btn btn-create'
= f.submit 'Submit merge request', class: "btn btn-create"
.mr-compare .mr-compare.merge-request
= render "projects/commits/commit_list" %ul.nav.nav-tabs.merge-request-tabs
%li.commits-tab{data: {action: 'commits'}}
%h4 Changes = link_to url_for(params) do
- if @diffs.present? %i.fa.fa-history
= render "projects/diffs/diffs", diffs: @diffs, project: @project Commits
- elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE %span.badge= @commits.size
.bs-callout.bs-callout-danger %li.diffs-tab{data: {action: 'diffs'}}
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits. = link_to url_for(params) do
%p To preserve performance the line changes are not shown. %i.fa.fa-list-alt
- else Changes
.bs-callout.bs-callout-danger %span.badge= @diffs.size
%h4 This comparison includes huge diff.
%p To preserve performance the line changes are not shown.
.commits.tab-content
= render "projects/commits/commits", project: @project
.diffs.tab-content
- if @diffs.present?
= render "projects/diffs/diffs", diffs: @diffs, project: @project
- elsif @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
.bs-callout.bs-callout-danger
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
%p To preserve performance the line changes are not shown.
- else
.bs-callout.bs-callout-danger
%h4 This comparison includes a huge diff.
%p To preserve performance the line changes are not shown.
:javascript :javascript
$('.assign-to-me-link').on('click', function(e){ $('.assign-to-me-link').on('click', function(e){
...@@ -85,3 +114,9 @@ ...@@ -85,3 +114,9 @@
}); });
window.project_image_path_upload = "#{upload_image_project_path @project}"; window.project_image_path_upload = "#{upload_image_project_path @project}";
:javascript
var merge_request
merge_request = new MergeRequest({
action: 'commits'
});
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
%span.badge= @merge_request.mr_and_commit_notes.count %span.badge= @merge_request.mr_and_commit_notes.count
%li.commits-tab{data: {action: 'commits'}} %li.commits-tab{data: {action: 'commits'}}
= link_to project_merge_request_path(@project, @merge_request), title: 'Commits' do = link_to project_merge_request_path(@project, @merge_request), title: 'Commits' do
%i.fa.fa-database %i.fa.fa-history
Commits Commits
%span.badge= @commits.size %span.badge= @commits.size
%li.diffs-tab{data: {action: 'diffs'}} %li.diffs-tab{data: {action: 'diffs'}}
......
- if @commits.present? = render "projects/commits/commits", project: @merge_request.source_project
.panel.panel-default
.panel-heading
%i.fa.fa-list
Commits (#{@commits.count})
.commits.mr-commits
- if @commits.count > 8
%ul.first-commits.well-list
- @commits.first(8).each do |commit|
= render "projects/commits/commit", commit: commit, project: @merge_request.source_project
%li.bottom
8 of #{@commits.count} commits displayed.
%strong
%a.show-all-commits Click here to show all
- if @commits.size > MergeRequestDiff::COMMITS_SAFE_SIZE
%ul.all-commits.hide.well-list
- @commits.first(MergeRequestDiff::COMMITS_SAFE_SIZE).each do |commit|
= render "projects/commits/inline_commit", commit: commit, project: @merge_request.source_project
%li
other #{@commits.size - MergeRequestDiff::COMMITS_SAFE_SIZE} commits hidden to prevent performance issues.
- else
%ul.all-commits.hide.well-list
- @commits.each do |commit|
= render "projects/commits/inline_commit", commit: commit, project: @merge_request.source_project
- else
%ul.well-list
- @commits.each do |commit|
= render "projects/commits/commit", commit: commit, project: @merge_request.source_project
...@@ -13,25 +13,22 @@ ...@@ -13,25 +13,22 @@
.automerge_widget.can_be_merged.hide .automerge_widget.can_be_merged.hide
.clearfix .clearfix
= form_for [:automerge, @project, @merge_request], remote: true, method: :post do |f| = form_for [:automerge, @project, @merge_request], remote: true, method: :post do |f|
%h4 .accept-merge-holder.clearfix.js-toggle-container
You can accept this request automatically. .accept-action
.accept-merge-holder.clearfix = f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request"
.accept-group - if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork?
.pull-left .accept-control
= f.submit "Accept Merge Request", class: "btn btn-create accept_merge_request" = label_tag :should_remove_source_branch, class: "checkbox" do
- if can_remove_branch?(@merge_request.source_project, @merge_request.source_branch) && !@merge_request.for_fork? = check_box_tag :should_remove_source_branch
.remove_branch_holder.pull-left Remove source-branch
= label_tag :should_remove_source_branch, class: "checkbox" do .accept-control
= check_box_tag :should_remove_source_branch = link_to "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" do
Remove source-branch %i.fa.fa-edit
.js-toggle-container Modify commit message
%label .js-toggle-content.hide.prepend-top-20
%i.fa.fa-edit = render 'shared/commit_message_container', params: params,
= link_to "modify merge commit message", "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message" text: @merge_request.merge_commit_message,
.js-toggle-content.hide rows: 14, hint: true
= render 'shared/commit_message_container', params: params,
text: @merge_request.merge_commit_message,
rows: 14, hint: true
%hr %hr
.light .light
......
...@@ -7,27 +7,15 @@ ...@@ -7,27 +7,15 @@
%i.fa.fa-plus %i.fa.fa-plus
New Milestone New Milestone
.row = render 'shared/milestones_filter'
.fixed.sidebar-expand-button.hidden-lg.hidden-md.hidden-xs
%i.fa.fa-list.fa-2x
.col-md-3.responsive-side
%ul.nav.nav-pills.nav-stacked
%li{class: ("active" if (params[:f] == "active" || !params[:f]))}
= link_to project_milestones_path(@project, f: "active") do
Active
%li{class: ("active" if params[:f] == "closed")}
= link_to project_milestones_path(@project, f: "closed") do
Closed
%li{class: ("active" if params[:f] == "all")}
= link_to project_milestones_path(@project, f: "all") do
All
.col-md-9
.panel.panel-default
%ul.well-list
= render @milestones
- if @milestones.blank? .milestones
%li .panel.panel-default
.nothing-here-block No milestones to show %ul.well-list
= render @milestones
= paginate @milestones, theme: "gitlab" - if @milestones.blank?
%li
.nothing-here-block No milestones to show
= paginate @milestones, theme: "gitlab"
...@@ -19,13 +19,15 @@ ...@@ -19,13 +19,15 @@
%code [Link Title](page-slug) %code [Link Title](page-slug)
\. \.
.form-group .form-group.wiki-content
= f.label :content, class: 'control-label' = f.label :content, class: 'control-label'
.col-sm-10 .col-sm-10
= render 'projects/zen', f: f, attr: :content, classes: 'description form-control' = render layout: 'projects/md_preview' do
.col-sm-12.hint = render 'projects/zen', f: f, attr: :content, classes: 'description form-control'
.pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'} .col-sm-12.hint
.pull-right Attach images (JPG, PNG, GIF) by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}
.pull-right Attach images (JPG, PNG, GIF) by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }.
.clearfix .clearfix
.error-alert .error-alert
.form-group .form-group
......
.fixed.sidebar-expand-button.hidden-lg.hidden-md
%i.fa.fa-list.fa-2x
.responsive-side.milestones-filters.append-bottom-10
%ul.nav.nav-pills.nav-compact
%li{class: ("active" if params[:state].blank? || params[:state] == 'opened')}
= link_to milestones_filter_path(state: 'opened') do
%i.fa.fa-exclamation-circle
Open
%li{class: ("active" if params[:state] == 'closed')}
= link_to milestones_filter_path(state: 'closed') do
%i.fa.fa-check-circle
Closed
%li{class: ("active" if params[:state] == 'all')}
= link_to milestones_filter_path(state: 'all') do
%i.fa.fa-compass
All
xml.instruct! xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlnsmedia" => "http://search.yahoo.com/mrss/" do xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/" do
xml.title "Activity feed for #{@user.name}" xml.title "Activity feed for #{@user.name}"
xml.link href: user_url(@user, :atom), rel: "self", type: "application/atom+xml" xml.link href: user_url(@user, :atom), rel: "self", type: "application/atom+xml"
xml.link href: user_url(@user), rel: "alternate", type: "text/html" xml.link href: user_url(@user), rel: "alternate", type: "text/html"
......
# GitLab operations # GitLab operations
- [Sidekiq MemoryKiller](sidekiq_memory_killer.md) - [Sidekiq MemoryKiller](sidekiq_memory_killer.md)
- [Cleaning up Redis sessions](cleaning_up_redis_sessions.md)
# Cleaning up stale Redis sessions
Since version 6.2, GitLab stores web user sessions as key-value pairs in Redis.
Prior to GitLab 7.3, user sessions did not automatically expire from Redis. If
you have been running a large GitLab server (thousands of users) since before
GitLab 7.3 we recommend cleaning up stale sessions to compact the Redis
database after you upgrade to GitLab 7.3. You can also perform a cleanup while
still running GitLab 7.2 or older, but in that case new stale sessions will
start building up again after you clean up.
In GitLab versions prior to 7.3.0, the session keys in Redis are 16-byte
hexadecimal values such as '976aa289e2189b17d7ef525a6702ace9'. Starting with
GitLab 7.3.0, the keys are
prefixed with 'session:gitlab:', so they would look like
'session:gitlab:976aa289e2189b17d7ef525a6702ace9'. Below we describe how to
remove the keys in the old format.
First we define a shell function with the proper Redis connection details.
```
rcli() {
# This example works for Omnibus installations of GitLab 7.3 or newer. For an
# installation from source you will have to change the socket path and the
# path to redis-cli.
sudo /opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket "$@"
}
# test the new shell function; the response should be PONG
rcli ping
```
Now we do a search to see if there are any session keys in the old format for
us to clean up.
```
# returns the number of old-format session keys in Redis
rcli keys '*' | grep '^[a-f0-9]\{32\}$' | wc -l
```
If the number is larger than zero, you can proceed to expire the keys from
Redis. If the number is zero there is nothing to clean up.
```
# Tell Redis to expire each matched key after 600 seconds.
rcli keys '*' | grep '^[a-f0-9]\{32\}$' | awk '{ print "expire", $0, 600 }' | rcli
# This will print '(integer) 1' for each key that gets expired.
```
Over the next 15 minutes (10 minutes expiry time plus 5 minutes Redis
background save interval) your Redis database will be compacted. If you are
still using GitLab 7.2, users who are not clicking around in GitLab during the
10 minute expiry window will be signed out of GitLab.
...@@ -49,4 +49,4 @@ If a user is a GitLab administrator they receive all permissions. ...@@ -49,4 +49,4 @@ If a user is a GitLab administrator they receive all permissions.
| Manage group members | | | | | ✓ | | Manage group members | | | | | ✓ |
| Remove group | | | | | ✓ | | Remove group | | | | | ✓ |
Any user can remove himself from a group, unless he is the last Owner of the group. Any user can remove themselves from a group, unless they are the last Owner of the group.
...@@ -50,6 +50,16 @@ Feature: Project Source Browse Files ...@@ -50,6 +50,16 @@ Feature: Project Source Browse Files
And I click button "Edit" And I click button "Edit"
Then I can edit code Then I can edit code
Scenario: If the file is binary the edit link is hidden
Given I visit a binary file in the repo
Then I cannot see the edit button
Scenario: If I don't have edit permission the edit link is disabled
Given public project "Community"
And I visit project "Community" source page
And I click on ".gitignore" file in repo
Then The edit button is disabled
@javascript @javascript
Scenario: I can edit and commit file Scenario: I can edit and commit file
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
......
...@@ -113,7 +113,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -113,7 +113,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_link 'Commits' click_link 'Commits'
end end
within '.mr-commits' do within '.commits' do
click_link Commit.truncate_sha(sample_commit.id) click_link Commit.truncate_sha(sample_commit.id)
end end
end end
...@@ -156,7 +156,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps ...@@ -156,7 +156,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end end
step 'merge request is mergeable' do step 'merge request is mergeable' do
page.should have_content 'You can accept this request automatically' page.should have_button 'Accept Merge Request'
end end
step 'I modify merge commit message' do step 'I modify merge commit message' do
......
...@@ -48,6 +48,14 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -48,6 +48,14 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_link 'Edit' click_link 'Edit'
end end
step 'I cannot see the edit button' do
page.should_not have_link 'edit'
end
step 'The edit button is disabled' do
page.should have_css '.disabled', text: 'Edit'
end
step 'I can edit code' do step 'I can edit code' do
set_new_content set_new_content
evaluate_script('editor.getValue()').should == new_gitignore_content evaluate_script('editor.getValue()').should == new_gitignore_content
......
...@@ -183,6 +183,11 @@ module SharedPaths ...@@ -183,6 +183,11 @@ module SharedPaths
visit project_tree_path(@project, root_ref) visit project_tree_path(@project, root_ref)
end end
step 'I visit a binary file in the repo' do
visit project_blob_path(@project, File.join(
root_ref, 'files/images/logo-black.png'))
end
step "I visit my project's commits page" do step "I visit my project's commits page" do
visit project_commits_path(@project, root_ref, {limit: 5}) visit project_commits_path(@project, root_ref, {limit: 5})
end end
...@@ -385,6 +390,11 @@ module SharedPaths ...@@ -385,6 +390,11 @@ module SharedPaths
visit project_path(project) visit project_path(project)
end end
step 'I visit project "Community" source page' do
project = Project.find_by(name: 'Community')
visit project_tree_path(project, root_ref)
end
step 'I visit project "Internal" page' do step 'I visit project "Internal" page' do
project = Project.find_by(name: "Internal") project = Project.find_by(name: "Internal")
visit project_path(project) visit project_path(project)
......
...@@ -24,11 +24,12 @@ describe "User Feed", feature: true do ...@@ -24,11 +24,12 @@ describe "User Feed", feature: true do
end end
it "should have issue opened event" do it "should have issue opened event" do
body.should have_content("#{user.name} opened issue ##{issue.iid}") expect(body).to have_content("#{safe_name} opened issue ##{issue.iid}")
end end
it "should have issue comment event" do it "should have issue comment event" do
body.should have_content("#{user.name} commented on issue ##{issue.iid}") expect(body).
to have_content("#{safe_name} commented on issue ##{issue.iid}")
end end
end end
end end
...@@ -40,4 +41,8 @@ describe "User Feed", feature: true do ...@@ -40,4 +41,8 @@ describe "User Feed", feature: true do
def note_event(note, user) def note_event(note, user)
EventCreateService.new.leave_note(note, user) EventCreateService.new.leave_note(note, user)
end end
def safe_name
html_escape(user.name)
end
end end
...@@ -47,10 +47,10 @@ describe MergeRequests::RefreshService do ...@@ -47,10 +47,10 @@ describe MergeRequests::RefreshService do
reload_mrs reload_mrs
end end
it { @merge_request.notes.should be_empty } it { @merge_request.notes.last.note.should include('changed to merged') }
it { @merge_request.should be_merged } it { @merge_request.should be_merged }
it { @fork_merge_request.should be_merged } it { @fork_merge_request.should be_merged }
it { @fork_merge_request.notes.should be_empty } it { @fork_merge_request.notes.last.note.should include('changed to merged') }
end end
context 'push to fork repo source branch' do context 'push to fork repo source branch' do
...@@ -61,7 +61,7 @@ describe MergeRequests::RefreshService do ...@@ -61,7 +61,7 @@ describe MergeRequests::RefreshService do
it { @merge_request.notes.should be_empty } it { @merge_request.notes.should be_empty }
it { @merge_request.should be_open } it { @merge_request.should be_open }
it { @fork_merge_request.notes.should_not be_empty } it { @fork_merge_request.notes.last.note.should include('new commit') }
it { @fork_merge_request.should be_open } it { @fork_merge_request.should be_open }
end end
...@@ -84,7 +84,7 @@ describe MergeRequests::RefreshService do ...@@ -84,7 +84,7 @@ describe MergeRequests::RefreshService do
reload_mrs reload_mrs
end end
it { @merge_request.notes.should be_empty } it { @merge_request.notes.last.note.should include('changed to merged') }
it { @merge_request.should be_merged } it { @merge_request.should be_merged }
it { @fork_merge_request.should be_open } it { @fork_merge_request.should be_open }
it { @fork_merge_request.notes.should be_empty } it { @fork_merge_request.notes.should be_empty }
......
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