diff options
author | Andriy Dyadyura <adyadyura@Andriys-MBP.lan> | 2015-12-24 11:52:42 +0100 |
---|---|---|
committer | Andriy Dyadyura <adyadyura@Andriys-MBP.lan> | 2015-12-24 11:52:42 +0100 |
commit | cf57f6c1bdd3bde6cfa6881e0c0347956c2416b9 (patch) | |
tree | 79bf589c1ca8f0a2df7b26cd265e55936319700e | |
parent | 2d62a719d0574ab7d0aef04c5cd9d0853e514d23 (diff) | |
parent | 75c3a2f89b52c7981326693b73b0ad8055a551e8 (diff) | |
download | gitlab-ce-cf57f6c1bdd3bde6cfa6881e0c0347956c2416b9.tar.gz |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into new-list-margin
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | Gemfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 4 | ||||
-rw-r--r-- | app/assets/javascripts/projects_list.js.coffee | 10 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/common.scss | 7 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/mobile.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/projects.scss | 43 | ||||
-rw-r--r-- | app/views/dashboard/_projects_head.html.haml | 27 | ||||
-rw-r--r-- | app/views/dashboard/projects/_projects.html.haml | 8 | ||||
-rw-r--r-- | app/views/search/results/_issue.html.haml | 2 | ||||
-rw-r--r-- | db/migrate/20151203162134_add_build_events_to_services.rb | 2 | ||||
-rw-r--r-- | db/migrate/20151209144329_migrate_ci_web_hooks.rb | 3 | ||||
-rw-r--r-- | db/migrate/20151210125928_add_ci_to_project.rb | 2 | ||||
-rw-r--r-- | db/migrate/20151210125929_add_project_id_to_ci.rb | 2 | ||||
-rw-r--r-- | db/migrate/20151210125930_migrate_ci_to_project.rb | 4 | ||||
-rw-r--r-- | db/migrate/20151210125931_add_index_to_ci_tables.rb | 2 | ||||
-rw-r--r-- | db/migrate/20151210125932_drop_null_for_ci_tables.rb | 2 | ||||
-rwxr-xr-x | lib/support/init.d/gitlab | 10 | ||||
-rwxr-xr-x | lib/support/init.d/gitlab.default.example | 4 |
19 files changed, 93 insertions, 44 deletions
diff --git a/CHANGELOG b/CHANGELOG index 8099951b095..0f9ae1e3b52 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.4.0 (unreleased) + - Fix Error 500 when doing a search in dashboard before visiting any project (Stan Hu) - Implement new UI for group page - Add project permissions to all project API endpoints (Stan Hu) @@ -172,7 +172,7 @@ gem 'd3_rails', '~> 3.5.5' gem "cal-heatmap-rails", "~> 0.0.1" # underscore-rails -gem "underscore-rails", "~> 1.4.4" +gem "underscore-rails", "~> 1.8.0" # Sanitize user input gem "sanitize", '~> 2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 7477b42f2d8..4f4b10c0fb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -769,7 +769,7 @@ GEM uglifier (2.7.2) execjs (>= 0.3.0) json (>= 1.8.0) - underscore-rails (1.4.4) + underscore-rails (1.8.3) unf (0.1.4) unf_ext unf_ext (0.0.7.1) @@ -965,7 +965,7 @@ DEPENDENCIES tinder (~> 1.10.0) turbolinks (~> 2.5.0) uglifier (~> 2.7.2) - underscore-rails (~> 1.4.4) + underscore-rails (~> 1.8.0) unf (~> 0.1.4) unicorn (~> 4.8.2) unicorn-worker-killer (~> 0.4.2) diff --git a/app/assets/javascripts/projects_list.js.coffee b/app/assets/javascripts/projects_list.js.coffee index db5faf71faf..f2887af190b 100644 --- a/app/assets/javascripts/projects_list.js.coffee +++ b/app/assets/javascripts/projects_list.js.coffee @@ -8,17 +8,17 @@ class @ProjectsList $(".projects-list-filter").keyup -> terms = $(this).val() - uiBox = $(this).closest('.projects-list-holder') + uiBox = $('div.projects-list-holder') if terms == "" || terms == undefined - uiBox.find(".projects-list li").show() + uiBox.find("ul.projects-list li").show() else - uiBox.find(".projects-list li").each (index) -> - name = $(this).find(".filter-title").text() + uiBox.find("ul.projects-list li").each (index) -> + name = $(this).find("span.filter-title").text() if name.toLowerCase().search(terms.toLowerCase()) == -1 $(this).hide() else $(this).show() - uiBox.find(".projects-list li.bottom").hide() + uiBox.find("ul.projects-list li.bottom").hide() diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index 7562ef6d24b..11730000f85 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -374,7 +374,7 @@ table { } } -.center-top-menu { +.center-top-menu, .left-top-menu { @include nav-menu; text-align: center; margin-top: 5px; @@ -408,6 +408,11 @@ table { } } +.left-top-menu { + text-align: left; + border-bottom: 1px solid #EEE; +} + .center-middle-menu { @include nav-menu; padding: 0; diff --git a/app/assets/stylesheets/framework/mobile.scss b/app/assets/stylesheets/framework/mobile.scss index 6f44c323732..c00709fb6bb 100644 --- a/app/assets/stylesheets/framework/mobile.scss +++ b/app/assets/stylesheets/framework/mobile.scss @@ -81,7 +81,7 @@ display: none; } - .center-top-menu { + .center-top-menu, .left-top-menu { li a { font-size: 14px; padding: 19px 10px; diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 2ded32dba12..99006b9f5d1 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -335,6 +335,36 @@ ul.nav.nav-projects-tabs { } } +.top-area { + border-bottom: 1px solid #EEE; + + ul.left-top-menu { + display: inline-block; + width: 50%; + margin-bottom: 0px; + border-bottom: none; + } + + .projects-search-form { + width: 50%; + display: inline-block; + float: right; + padding-top: 7px; + text-align: right; + + .btn-green { + margin-top: -2px; + margin-left: 10px; + } + } + + @media (max-width: $screen-xs-max) { + .projects-search-form { + padding-top: 15px; + } + } +} + .fork-namespaces { .fork-thumbnail { text-align: center; @@ -412,11 +442,18 @@ pre.light-well { .projects-search-form { margin: -$gl-padding; - background-color: #f8fafc; padding: $gl-padding; margin-bottom: 0px; - border-top: 1px solid #e7e9ed; - border-bottom: 1px solid #e7e9ed; + + input { + display: inline-block; + width: calc(100% - 151px); + } + + .btn { + display: inline-block; + width: 135px; + } } .git-empty { diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index 2e77afb7525..f4a3e3162bf 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -1,13 +1,20 @@ = content_for :flash_message do = render 'shared/project_limit' +.top-area + %ul.left-top-menu + = nav_link(page: [dashboard_projects_path, root_path]) do + = link_to dashboard_projects_path, title: 'Home', class: 'shortcuts-activity', data: {placement: 'right'} do + Your Projects + = nav_link(page: starred_dashboard_projects_path) do + = link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do + Starred Projects + = nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path], html_options: { class: 'hidden-xs' }) do + = link_to explore_root_path, title: 'Explore', data: {placement: 'right'} do + Explore Projects -%ul.center-top-menu - = nav_link(page: [dashboard_projects_path, root_path]) do - = link_to dashboard_projects_path, title: 'Home', class: 'shortcuts-activity', data: {placement: 'right'} do - Your Projects - = nav_link(page: starred_dashboard_projects_path) do - = link_to starred_dashboard_projects_path, title: 'Starred Projects', data: {placement: 'right'} do - Starred Projects - = nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path], html_options: { class: 'hidden-xs' }) do - = link_to explore_root_path, title: 'Explore', data: {placement: 'right'} do - Explore Projects + .projects-search-form + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name...', class: 'projects-list-filter form-control hidden-xs', spellcheck: false + - if current_user.can_create_project? + = link_to new_project_path, class: 'btn btn-green' do + %i.fa.fa-plus + New Project diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml index 81a5909e2d2..cea9ffcc748 100644 --- a/app/views/dashboard/projects/_projects.html.haml +++ b/app/views/dashboard/projects/_projects.html.haml @@ -1,11 +1,3 @@ .projects-list-holder - .projects-search-form - .input-group - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false - - if current_user.can_create_project? - %span.input-group-btn - = link_to new_project_path, class: 'btn btn-green' do - %i.fa.fa-plus - New Project = render 'shared/projects/list', projects: @projects, ci: true diff --git a/app/views/search/results/_issue.html.haml b/app/views/search/results/_issue.html.haml index ce8ddff9556..45d700781f3 100644 --- a/app/views/search/results/_issue.html.haml +++ b/app/views/search/results/_issue.html.haml @@ -6,7 +6,7 @@ - if issue.description.present? .description.term = preserve do - = search_md_sanitize(markdown(issue.description)) + = search_md_sanitize(markdown(issue.description, { project: issue.project })) %span.light #{issue.project.name_with_namespace} - if issue.closed? diff --git a/db/migrate/20151203162134_add_build_events_to_services.rb b/db/migrate/20151203162134_add_build_events_to_services.rb index a84be7db3f1..c5542cb864d 100644 --- a/db/migrate/20151203162134_add_build_events_to_services.rb +++ b/db/migrate/20151203162134_add_build_events_to_services.rb @@ -1,5 +1,5 @@ class AddBuildEventsToServices < ActiveRecord::Migration - def up + def change add_column :services, :build_events, :boolean, default: false, null: false add_column :web_hooks, :build_events, :boolean, default: false, null: false end diff --git a/db/migrate/20151209144329_migrate_ci_web_hooks.rb b/db/migrate/20151209144329_migrate_ci_web_hooks.rb index 825ba1973ff..d7e196e6763 100644 --- a/db/migrate/20151209144329_migrate_ci_web_hooks.rb +++ b/db/migrate/20151209144329_migrate_ci_web_hooks.rb @@ -10,4 +10,7 @@ class MigrateCiWebHooks < ActiveRecord::Migration 'JOIN projects ON ci_projects.gitlab_id = projects.id' ) end + + def down + end end diff --git a/db/migrate/20151210125928_add_ci_to_project.rb b/db/migrate/20151210125928_add_ci_to_project.rb index 8a65abab636..8c167f64a2b 100644 --- a/db/migrate/20151210125928_add_ci_to_project.rb +++ b/db/migrate/20151210125928_add_ci_to_project.rb @@ -1,5 +1,5 @@ class AddCiToProject < ActiveRecord::Migration - def up + def change add_column :projects, :ci_id, :integer add_column :projects, :builds_enabled, :boolean, default: true, null: false add_column :projects, :shared_runners_enabled, :boolean, default: true, null: false diff --git a/db/migrate/20151210125929_add_project_id_to_ci.rb b/db/migrate/20151210125929_add_project_id_to_ci.rb index 5d1cf543576..84273591fa2 100644 --- a/db/migrate/20151210125929_add_project_id_to_ci.rb +++ b/db/migrate/20151210125929_add_project_id_to_ci.rb @@ -1,5 +1,5 @@ class AddProjectIdToCi < ActiveRecord::Migration - def up + def change add_column :ci_builds, :gl_project_id, :integer add_column :ci_runner_projects, :gl_project_id, :integer add_column :ci_triggers, :gl_project_id, :integer diff --git a/db/migrate/20151210125930_migrate_ci_to_project.rb b/db/migrate/20151210125930_migrate_ci_to_project.rb index 75278997862..c32c7feb193 100644 --- a/db/migrate/20151210125930_migrate_ci_to_project.rb +++ b/db/migrate/20151210125930_migrate_ci_to_project.rb @@ -14,6 +14,10 @@ class MigrateCiToProject < ActiveRecord::Migration migrate_ci_service end + def down + # We can't reverse the data + end + def migrate_project_id_for_table(table) subquery = "SELECT gitlab_id FROM ci_projects WHERE ci_projects.id = #{table}.project_id" execute("UPDATE #{table} SET gl_project_id=(#{subquery}) WHERE gl_project_id IS NULL") diff --git a/db/migrate/20151210125931_add_index_to_ci_tables.rb b/db/migrate/20151210125931_add_index_to_ci_tables.rb index 9fedb5d612c..5e129c9303d 100644 --- a/db/migrate/20151210125931_add_index_to_ci_tables.rb +++ b/db/migrate/20151210125931_add_index_to_ci_tables.rb @@ -1,5 +1,5 @@ class AddIndexToCiTables < ActiveRecord::Migration - def up + def change add_index :ci_builds, :gl_project_id add_index :ci_runner_projects, :gl_project_id add_index :ci_triggers, :gl_project_id diff --git a/db/migrate/20151210125932_drop_null_for_ci_tables.rb b/db/migrate/20151210125932_drop_null_for_ci_tables.rb index 0b007430b0c..c520c2ed56f 100644 --- a/db/migrate/20151210125932_drop_null_for_ci_tables.rb +++ b/db/migrate/20151210125932_drop_null_for_ci_tables.rb @@ -1,5 +1,5 @@ class DropNullForCiTables < ActiveRecord::Migration - def up + def change remove_index :ci_variables, :project_id remove_index :ci_runner_projects, :project_id change_column_null :ci_triggers, :project_id, true diff --git a/lib/support/init.d/gitlab b/lib/support/init.d/gitlab index aa2da92c138..c5f07c8b508 100755 --- a/lib/support/init.d/gitlab +++ b/lib/support/init.d/gitlab @@ -92,7 +92,7 @@ check_pids(){ ## Called when we have started the two processes and are waiting for their pid files. wait_for_pids(){ - # We are sleeping a bit here mostly because sidekiq is slow at writing it's pid + # We are sleeping a bit here mostly because sidekiq is slow at writing its pid i=0; while [ ! -f $web_server_pid_path ] || [ ! -f $sidekiq_pid_path ] || [ ! -f $gitlab_workhorse_pid_path ] || { [ "$mail_room_enabled" = true ] && [ ! -f $mail_room_pid_path ]; }; do sleep 0.1; @@ -108,7 +108,7 @@ wait_for_pids(){ } # We use the pids in so many parts of the script it makes sense to always check them. -# Only after start() is run should the pids change. Sidekiq sets it's own pid. +# Only after start() is run should the pids change. Sidekiq sets its own pid. check_pids @@ -290,7 +290,7 @@ stop_gitlab() { sleep 1 # Cleaning up unused pids rm "$web_server_pid_path" 2>/dev/null - # rm "$sidekiq_pid_path" 2>/dev/null # Sidekiq seems to be cleaning up it's own pid. + # rm "$sidekiq_pid_path" 2>/dev/null # Sidekiq seems to be cleaning up its own pid. rm -f "$gitlab_workhorse_pid_path" if [ "$mail_room_enabled" = true ]; then rm "$mail_room_pid_path" 2>/dev/null @@ -299,7 +299,7 @@ stop_gitlab() { print_status } -## Prints the status of GitLab and it's components. +## Prints the status of GitLab and its components. print_status() { check_status if [ "$web_status" != "0" ] && [ "$sidekiq_status" != "0" ] && [ "$gitlab_workhorse_status" != "0" ] && { [ "$mail_room_enabled" != true ] || [ "$mail_room_status" != "0" ]; }; then @@ -333,7 +333,7 @@ print_status() { fi } -## Tells unicorn to reload it's config and Sidekiq to restart +## Tells unicorn to reload its config and Sidekiq to restart reload_gitlab(){ exit_if_not_running if [ "$wpid" = "0" ];then diff --git a/lib/support/init.d/gitlab.default.example b/lib/support/init.d/gitlab.default.example index 7fc495db545..1937ca582b0 100755 --- a/lib/support/init.d/gitlab.default.example +++ b/lib/support/init.d/gitlab.default.example @@ -9,11 +9,11 @@ RAILS_ENV="production" # The default is "git". app_user="git" -# app_root defines the folder in which gitlab and it's components are installed. +# app_root defines the folder in which gitlab and its components are installed. # The default is "/home/$app_user/gitlab" app_root="/home/$app_user/gitlab" -# pid_path defines a folder in which the gitlab and it's components place their pids. +# pid_path defines a folder in which the gitlab and its components place their pids. # This variable is also used below to define the relevant pids for the gitlab components. # The default is "$app_root/tmp/pids" pid_path="$app_root/tmp/pids" |