From 3655e433dd697998578b03dc57191a412f505f5a Mon Sep 17 00:00:00 2001 From: Rowan Wookey Date: Mon, 24 Aug 2015 23:06:48 +0100 Subject: [PATCH 01/36] Fixed #1952 docker ssh connection times can be slow when UseDNS is enabled --- CHANGELOG | 1 + docker/Dockerfile | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5940d586d8..7816430a20 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -12,6 +12,7 @@ v 8.0.0 (unreleased) - Search for comments should be case insensetive - Create cross-reference for closing references on commits pushed to non-default branches (Maël Valais) - Ability to search milestones + - Disabled DNS lookups for SSH in docker image (Rowan Wookey) v 7.14.1 (unreleased) - Only include base URL in OmniAuth full_host parameter (Stan Hu) diff --git a/docker/Dockerfile b/docker/Dockerfile index 05521af696..304bb97409 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -25,6 +25,9 @@ RUN mkdir -p /opt/gitlab/sv/sshd/supervise \ && ln -s /opt/gitlab/sv/sshd /opt/gitlab/service \ && mkdir -p /var/run/sshd +# Disabling use DNS in ssh since it tends to slow connecting +RUN echo "UseDNS no" >> /etc/ssh/sshd_config + # Prepare default configuration RUN ( \ echo "" && \ From 8820785c8fe267789a5c6edf7f4fcb196c48b4a8 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 6 Sep 2015 09:42:39 -0700 Subject: [PATCH 02/36] Fix emoji URLs in Markdown when relative_url_root is used Also adds the ability to run rspecs with relative_url_defined on the enviornment. For example: RELATIVE_URL_ROOT=/gitlab rspec Closes #1728 --- CHANGELOG | 1 + lib/gitlab/markdown.rb | 2 +- spec/spec_helper.rb | 1 + spec/support/matchers/markdown_matchers.rb | 3 +++ spec/support/relative_url.rb | 8 ++++++++ 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 spec/support/relative_url.rb diff --git a/CHANGELOG b/CHANGELOG index 8154d4333d..329ce74a5d 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.0.0 (unreleased) + - Fix emoji URLs in Markdown when relative_url_root is used (Stan Hu) - Omit filename in Content-Disposition header in raw file download to avoid RFC 6266 encoding issues (Stan HU) - Prevent anchors from being hidden by header (Stan Hu) - Fix bug where only the first 15 Bitbucket issues would be imported (Stan Hu) diff --git a/lib/gitlab/markdown.rb b/lib/gitlab/markdown.rb index 097caf67a6..ae5f254469 100644 --- a/lib/gitlab/markdown.rb +++ b/lib/gitlab/markdown.rb @@ -77,7 +77,7 @@ module Gitlab pipeline: options[:pipeline], # EmojiFilter - asset_root: Gitlab.config.gitlab.url, + asset_root: Gitlab.config.gitlab.base_url, asset_host: Gitlab::Application.config.asset_host, # TableOfContentsFilter diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d0f1873ee2..0780c4f320 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -28,6 +28,7 @@ RSpec.configure do |config| config.include LoginHelpers, type: :feature config.include LoginHelpers, type: :request config.include StubConfiguration + config.include RelativeUrl, type: feature config.include TestEnv config.infer_spec_type_from_file_location! diff --git a/spec/support/matchers/markdown_matchers.rb b/spec/support/matchers/markdown_matchers.rb index 9df226c3af..7500d0fdf8 100644 --- a/spec/support/matchers/markdown_matchers.rb +++ b/spec/support/matchers/markdown_matchers.rb @@ -27,6 +27,9 @@ module MarkdownMatchers match do |actual| expect(actual).to have_selector('img.emoji', count: 10) + + image = actual.at_css('img.emoji') + expect(image['src'].to_s).to start_with(Gitlab.config.gitlab.url + '/assets') end end diff --git a/spec/support/relative_url.rb b/spec/support/relative_url.rb new file mode 100644 index 0000000000..72e3ccce75 --- /dev/null +++ b/spec/support/relative_url.rb @@ -0,0 +1,8 @@ +# Fix route helpers in tests (e.g. root_path, ...) +module RelativeUrl + extend ActiveSupport::Concern + + included do + default_url_options[:script_name] = Rails.application.config.relative_url_root + end +end From d3730b071365dd3dbfa0b8ec4433e1f18a93c969 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 9 Sep 2015 14:54:34 +0100 Subject: [PATCH 03/36] Fix highlighting of deleted lines in diffs. --- CHANGELOG | 1 + config/initializers/rouge_diff_lexer.rb | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 config/initializers/rouge_diff_lexer.rb diff --git a/CHANGELOG b/CHANGELOG index 247eb1e364..ddb31fc430 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -40,6 +40,7 @@ v 8.0.0 (unreleased) - Add ability to get user information by ID of an SSH key via the API - Fix bug which IE cannot show image at markdown when the image is raw file of gitlab - Add support for Crowd + - Fix highlighting of deleted lines in diffs. v 7.14.1 - Improve abuse reports management from admin area diff --git a/config/initializers/rouge_diff_lexer.rb b/config/initializers/rouge_diff_lexer.rb new file mode 100644 index 0000000000..fdb2d7b748 --- /dev/null +++ b/config/initializers/rouge_diff_lexer.rb @@ -0,0 +1,24 @@ +# Here until https://github.com/jneen/rouge/pull/297 is merged into Rouge and the gem is updated in GitLab. +module Rouge + module Lexers + class Diff + def self.analyze_text(text) + return 1 if text.start_with?('Index: ') + return 1 if text.start_with?('diff ') + return 0.9 if text.start_with?('--- ') + end + + state :root do + rule(/^ .*\n/, Text) + rule(/^---\n/, Text) + rule(/^\+.*\n/, Generic::Inserted) + rule(/^-+.*\n/, Generic::Deleted) + rule(/^!.*\n/, Generic::Strong) + rule(/^@.*\n/, Generic::Subheading) + rule(/^([Ii]ndex|diff).*\n/, Generic::Heading) + rule(/^=.*\n/, Generic::Heading) + rule(/.*\n/, Text) + end + end + end +end From 0d66d4d342c72d141578d746aad766a6234fc872 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Wed, 9 Sep 2015 15:19:58 +0100 Subject: [PATCH 04/36] Fix reading session_expire_delay when application settings are not yet created and migrations are not yet done --- config/initializers/session_store.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 6d274cd95a..88651394d1 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -2,7 +2,12 @@ require 'gitlab/current_settings' include Gitlab::CurrentSettings -Settings.gitlab['session_expire_delay'] = current_application_settings.session_expire_delay + +# allow it to fail: it may to do so when create_from_defaults is executed before migrations are actually done +begin + Settings.gitlab['session_expire_delay'] = current_application_settings.session_expire_delay +rescue +end Gitlab::Application.config.session_store( :redis_store, # Using the cookie_store would enable session replay attacks. From fa40759768518d3457cc95204d6496db999aa7ca Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 9 Sep 2015 22:36:13 +0200 Subject: [PATCH 05/36] Separate profile settings link from the rest on sidebar Signed-off-by: Dmitriy Zaporozhets --- app/views/layouts/nav/_dashboard.html.haml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index 0cf1c3d5d2..7d3764a76a 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -37,14 +37,15 @@ = icon('clipboard fw') %span Snippets - - if current_user - = nav_link(controller: :profile) do - = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do - = icon('user fw') - %span - Profile Settings = nav_link(controller: :help) do = link_to help_path, title: 'Help', data: {placement: 'right'} do = icon('question-circle fw') %span Help + - if current_user + %li.separate-item + = nav_link(controller: :profile) do + = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do + = icon('user fw') + %span + Profile Settings From 1e3ce07714efcc5ac18bb2f167c5b4956e114839 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 9 Sep 2015 23:05:47 +0200 Subject: [PATCH 06/36] Use page title for header title too Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/generic/blocks.scss | 4 ++++ app/views/layouts/nav/_profile.html.haml | 2 +- app/views/layouts/profile.html.haml | 3 ++- app/views/profiles/accounts/show.html.haml | 9 +++------ app/views/profiles/applications.html.haml | 9 ++++----- app/views/profiles/audit_log.html.haml | 9 ++++++--- app/views/profiles/emails/index.html.haml | 10 ++++------ app/views/profiles/keys/index.html.haml | 13 +++++++------ app/views/profiles/notifications/show.html.haml | 10 +++++----- app/views/profiles/passwords/edit.html.haml | 10 +++++----- app/views/profiles/passwords/new.html.haml | 2 +- app/views/profiles/preferences/show.html.haml | 8 ++++---- app/views/profiles/show.html.haml | 9 ++------- 13 files changed, 48 insertions(+), 50 deletions(-) diff --git a/app/assets/stylesheets/generic/blocks.scss b/app/assets/stylesheets/generic/blocks.scss index 27a4c4db8c..48d9f890f6 100644 --- a/app/assets/stylesheets/generic/blocks.scss +++ b/app/assets/stylesheets/generic/blocks.scss @@ -27,6 +27,10 @@ border-bottom: 1px solid #e7e9ed; color: $gl-gray; + &.top-block { + border-top: none; + } + &.middle-block { margin-top: 0; margin-bottom: 0; diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml index 33fd5fcef6..abdb754465 100644 --- a/app/views/layouts/nav/_profile.html.haml +++ b/app/views/layouts/nav/_profile.html.haml @@ -11,7 +11,7 @@ = link_to profile_path, title: 'Profile', data: {placement: 'right'} do = icon('user fw') %span - Profile + Profile Settings = nav_link(controller: [:accounts, :two_factor_auths]) do = link_to profile_account_path, title: 'Account', data: {placement: 'right'} do = icon('gear fw') diff --git a/app/views/layouts/profile.html.haml b/app/views/layouts/profile.html.haml index 77d2ccbf76..b80ce0dfc7 100644 --- a/app/views/layouts/profile.html.haml +++ b/app/views/layouts/profile.html.haml @@ -1,5 +1,6 @@ - page_title "Profile Settings" -- header_title "Profile Settings", profile_path +- unless @header_title + - header_title "Profile Settings", profile_path - sidebar "profile" = render template: "layouts/application" diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 767fe2e0e9..2d2a9ac800 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -1,9 +1,6 @@ - page_title "Account" -%h3.page-title - = page_title -%p.light - Change your username and basic account settings. -%hr +- header_title page_title, profile_account_path + - if current_user.ldap_user? .alert.alert-info Some options are unavailable for LDAP accounts @@ -69,7 +66,7 @@ - button_based_providers.each do |provider| .btn-group = link_to provider_image_tag(provider), user_omniauth_authorize_path(provider), method: :post, class: "btn btn-lg #{'active' if auth_active?(provider)}", "data-no-turbolink" => "true" - + - if auth_active?(provider) = link_to unlink_profile_account_path(provider: provider), method: :delete, class: 'btn btn-lg' do = icon('close') diff --git a/app/views/profiles/applications.html.haml b/app/views/profiles/applications.html.haml index 3a3e6e1b1c..2342936a5d 100644 --- a/app/views/profiles/applications.html.haml +++ b/app/views/profiles/applications.html.haml @@ -1,13 +1,12 @@ - page_title "Applications" -%h3.page-title - = page_title -%p.light +- header_title page_title, applications_profile_path + +.gray-content-block.top-block - if user_oauth_applications? - Manage applications that can use GitLab as an OAuth provider, + Manage applications that can use GitLab as an OAuth provider, and applications that you've authorized to use your account. - else Manage applications that you've authorized to use your account. -%hr - if user_oauth_applications? .oauth-applications diff --git a/app/views/profiles/audit_log.html.haml b/app/views/profiles/audit_log.html.haml index 698d603742..8fdba45b19 100644 --- a/app/views/profiles/audit_log.html.haml +++ b/app/views/profiles/audit_log.html.haml @@ -1,5 +1,8 @@ - page_title "Audit Log" -%h3.page-title Audit Log -%p.light History of authentications +- header_title page_title, audit_log_profile_path -= render 'event_table', events: @events \ No newline at end of file +.gray-content-block.top-block + History of authentications + +.prepend-top-default += render 'event_table', events: @events diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index 66812872c4..1d140347a5 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -1,12 +1,10 @@ - page_title "Emails" -%h3.page-title - = page_title -%p.light +- header_title page_title, profile_emails_path + +.gray-content-block.top-block Control emails linked to your account -%hr - -%ul +%ul.prepend-top-default %li Your %b Primary Email diff --git a/app/views/profiles/keys/index.html.haml b/app/views/profiles/keys/index.html.haml index 06655f7ba3..14adba1c79 100644 --- a/app/views/profiles/keys/index.html.haml +++ b/app/views/profiles/keys/index.html.haml @@ -1,11 +1,12 @@ - page_title "SSH Keys" -%h3.page-title - = page_title +- header_title page_title, profile_keys_path + +.gray-content-block.top-block .pull-right = link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new" -%p.light - Before you can add an SSH key you need to - = link_to "generate it.", help_page_path("ssh", "README") -%hr + .oneline + Before you can add an SSH key you need to + = link_to "generate it.", help_page_path("ssh", "README") +.prepend-top-default = render 'key_table' diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index db7fa2eabe..ea4e5f3e18 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -1,10 +1,10 @@ - page_title "Notifications" -%h3.page-title - = page_title -%p.light - These are your global notification settings. -%hr +- header_title page_title, profile_notifications_path +.gray-content-block.top-block + These are your global notification settings. + +.prepend-top-default = form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications form-horizontal global-notifications-form' } do |f| -if @user.errors.any? %div.alert.alert-danger diff --git a/app/views/profiles/passwords/edit.html.haml b/app/views/profiles/passwords/edit.html.haml index 399ae98adf..fab7c45c9b 100644 --- a/app/views/profiles/passwords/edit.html.haml +++ b/app/views/profiles/passwords/edit.html.haml @@ -1,13 +1,13 @@ - page_title "Password" -%h3.page-title - = page_title -%p.light +- header_title page_title, edit_profile_password_path + +.gray-content-block.top-block - if @user.password_automatically_set? Set your password. - else Change your password or recover your current one. -%hr -.update-password + +.update-password.prepend-top-default = form_for @user, url: profile_password_path, method: :put, html: { class: 'form-horizontal' } do |f| %div %p.slead diff --git a/app/views/profiles/passwords/new.html.haml b/app/views/profiles/passwords/new.html.haml index 9c6204963e..d165f758c8 100644 --- a/app/views/profiles/passwords/new.html.haml +++ b/app/views/profiles/passwords/new.html.haml @@ -12,7 +12,7 @@ %ul - @user.errors.full_messages.each do |msg| %li= msg - + - unless @user.password_automatically_set? .form-group = f.label :current_password, class: 'control-label' diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index aa0361a0a1..f8cbdb7932 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -1,11 +1,11 @@ - page_title 'Preferences' -%h3.page-title - = page_title -%p.light +- header_title page_title, profile_preferences_path + +.gray-content-block.top-block These settings allow you to customize the appearance and behavior of the site. They are saved with your account and will persist to any device you use to access the site. -%hr +.prepend-top-default = form_for @user, url: profile_preferences_path, remote: true, method: :put, html: {class: 'js-preferences-form form-horizontal'} do |f| .panel.panel-default.application-theme diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index c519e52e59..47412e2ef0 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -1,14 +1,9 @@ -- page_title "Profile" -%h3.page-title - = page_title -%p.light +.gray-content-block.top-block This information will appear on your profile. - if current_user.ldap_user? Some options are unavailable for LDAP accounts -%hr - - +.prepend-top-default = form_for @user, url: profile_path, method: :put, html: { multipart: true, class: "edit_user form-horizontal" }, authenticity_token: true do |f| -if @user.errors.any? %div.alert.alert-danger From 10b6a9248159830f45012a1d551e82d86aeb75d0 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 9 Sep 2015 23:29:19 +0200 Subject: [PATCH 07/36] Style panels and add blank container Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/base/gl_bootstrap.scss | 14 +++++++++++- app/assets/stylesheets/base/gl_variables.scss | 11 +++++----- app/assets/stylesheets/generic/buttons.scss | 2 +- app/assets/stylesheets/generic/sidebar.scss | 6 +++++ app/helpers/page_layout_helper.rb | 22 +++++++++++++++++++ app/views/layouts/_page.html.haml | 2 +- app/views/profiles/preferences/show.html.haml | 4 ++-- app/views/projects/edit.html.haml | 7 +++--- 8 files changed, 55 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/base/gl_bootstrap.scss b/app/assets/stylesheets/base/gl_bootstrap.scss index ae72c5b8d9..94508b902c 100644 --- a/app/assets/stylesheets/base/gl_bootstrap.scss +++ b/app/assets/stylesheets/base/gl_bootstrap.scss @@ -157,8 +157,10 @@ * */ .panel { + box-shadow: none; .panel-heading { - font-weight: bold; + font-size: 17px; + line-height: 38px; .panel-head-actions { position: relative; @@ -182,6 +184,10 @@ .pagination { margin: 0; } + + .btn { + min-width: 124px; + } } &.panel-small { @@ -209,6 +215,12 @@ } } +.alert-help { + background-color: $background-color; + border: 1px solid $border-color; + color: $gl-gray; +} + // Typography ================================================================= .text-primary, diff --git a/app/assets/stylesheets/base/gl_variables.scss b/app/assets/stylesheets/base/gl_variables.scss index d18b48eaca..bfef5f78f8 100644 --- a/app/assets/stylesheets/base/gl_variables.scss +++ b/app/assets/stylesheets/base/gl_variables.scss @@ -114,11 +114,12 @@ $alert-border-radius: 0; // //## -$panel-border-radius: 0; -$panel-default-text: $text-color; -$panel-default-border: #E7E9ED; -$panel-default-heading-bg: #F8FAFC; - +$panel-border-radius: 2px; +$panel-default-text: $text-color; +$panel-default-border: $border-color; +$panel-default-heading-bg: $background-color; +$panel-footer-bg: $background-color; +$panel-inner-border: $border-color; //== Wells // diff --git a/app/assets/stylesheets/generic/buttons.scss b/app/assets/stylesheets/generic/buttons.scss index e823750909..46ef595ddf 100644 --- a/app/assets/stylesheets/generic/buttons.scss +++ b/app/assets/stylesheets/generic/buttons.scss @@ -10,7 +10,7 @@ } &.btn-save { - @extend .btn-primary; + @extend .btn-success; } &.btn-remove { diff --git a/app/assets/stylesheets/generic/sidebar.scss b/app/assets/stylesheets/generic/sidebar.scss index 22720c2e1d..f501bd579e 100644 --- a/app/assets/stylesheets/generic/sidebar.scss +++ b/app/assets/stylesheets/generic/sidebar.scss @@ -28,6 +28,12 @@ padding: $gl-padding; border: 1px solid #e7e9ed; min-height: 90vh; + + &.container-blank { + background: none; + padding: 0; + border: none; + } } } diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb index 8473d6d75d..bfbaf11c25 100644 --- a/app/helpers/page_layout_helper.rb +++ b/app/helpers/page_layout_helper.rb @@ -31,4 +31,26 @@ module PageLayoutHelper @fluid_layout end end + + def blank_container(enabled = false) + if @blank_container.nil? + @blank_container = enabled + else + @blank_container + end + end + + def container_class + css_class = "container-fluid" + + if fluid_layout + css_class += " container-limited" + end + + if blank_container + css_class += " container-blank" + end + + css_class + end end diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index c1746676ae..707905ee92 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -19,7 +19,7 @@ = current_user.username .content-wrapper = render "layouts/flash" - %div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" } + %div{ class: container_class } .content .clearfix = yield diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index f8cbdb7932..60289bfe7c 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -1,11 +1,11 @@ - page_title 'Preferences' - header_title page_title, profile_preferences_path +- @blank_container = true -.gray-content-block.top-block +.alert.alert-help These settings allow you to customize the appearance and behavior of the site. They are saved with your account and will persist to any device you use to access the site. -.prepend-top-default = form_for @user, url: profile_preferences_path, remote: true, method: :put, html: {class: 'js-preferences-form form-horizontal'} do |f| .panel.panel-default.application-theme diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index e8e65d87f4..90dce73999 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -1,10 +1,11 @@ +- @blank_container = true + .project-edit-container .project-edit-errors .project-edit-content - %div - %h3.page-title + .panel.panel-default + .panel-heading Project settings - %hr .panel-body = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit_project form-horizontal fieldset-form" }, authenticity_token: true do |f| From 12ad9b4ba0341ac7b5012dd52b1d6cd6e68f778a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 9 Sep 2015 23:38:27 +0200 Subject: [PATCH 08/36] Enable blank container for group settings page Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/base/gl_bootstrap.scss | 10 +++++++--- app/views/groups/edit.html.haml | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/base/gl_bootstrap.scss b/app/assets/stylesheets/base/gl_bootstrap.scss index 94508b902c..eb8d23d645 100644 --- a/app/assets/stylesheets/base/gl_bootstrap.scss +++ b/app/assets/stylesheets/base/gl_bootstrap.scss @@ -156,12 +156,16 @@ * Add some extra stuff to panels * */ + +.container-blank .panel .panel-heading { + font-size: 17px; + line-height: 38px; +} + .panel { box-shadow: none; - .panel-heading { - font-size: 17px; - line-height: 38px; + .panel-heading { .panel-head-actions { position: relative; top: -5px; diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 2ff4b7e23e..ac7d9ba0f4 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -1,3 +1,4 @@ +- @blank_container = true .panel.panel-default .panel-heading %strong= @group.name From 960a1880ab09f8c12d6f7a7c22296c876ddad1ac Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 9 Sep 2015 23:49:34 +0200 Subject: [PATCH 09/36] Fix last element of sidebar being hidden for small screens Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/generic/sidebar.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/generic/sidebar.scss b/app/assets/stylesheets/generic/sidebar.scss index f501bd579e..41ffd35857 100644 --- a/app/assets/stylesheets/generic/sidebar.scss +++ b/app/assets/stylesheets/generic/sidebar.scss @@ -39,7 +39,7 @@ .nav-sidebar { margin-top: 14 + $header-height; - margin-bottom: 50px; + margin-bottom: 100px; transition-duration: .3s; list-style: none; overflow: hidden; From def939a5628fb3df24b39dbe7b39636968c294ed Mon Sep 17 00:00:00 2001 From: Darby Date: Wed, 9 Sep 2015 15:04:38 -0700 Subject: [PATCH 10/36] Turned off autocomplete for new issue titles --- app/views/shared/issuable/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 09327d645f..1aa1e3c6c9 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -9,7 +9,7 @@ = f.label :title, class: 'control-label' do %strong= 'Title *' .col-sm-10 - = f.text_field :title, maxlength: 255, autofocus: true, + = f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off', class: 'form-control pad js-gfm-input', required: true - if issuable.is_a?(MergeRequest) From a0359fbd77c0a4fcbac30c15544b1a3432bfe8bf Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 00:34:09 +0200 Subject: [PATCH 11/36] Improve accounts page UI Signed-off-by: Dmitriy Zaporozhets --- app/views/profiles/accounts/show.html.haml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 2d2a9ac800..cd7b1b0fe0 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -1,5 +1,6 @@ - page_title "Account" - header_title page_title, profile_account_path +- @blank_container = true - if current_user.ldap_user? .alert.alert-info From 19cba632d846c9fcf736133eb62db1b8905c5009 Mon Sep 17 00:00:00 2001 From: Duke Date: Wed, 9 Sep 2015 21:20:51 -0300 Subject: [PATCH 12/36] fix 7.14 stable branch name --- doc/update/6.x-or-7.x-to-7.14.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/update/6.x-or-7.x-to-7.14.md b/doc/update/6.x-or-7.x-to-7.14.md index 5bc1f84270..b34fb12da6 100644 --- a/doc/update/6.x-or-7.x-to-7.14.md +++ b/doc/update/6.x-or-7.x-to-7.14.md @@ -162,7 +162,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab TIP: to see what changed in `gitlab.yml.example` in this release use next command: ``` -git diff 6-0-stable:config/gitlab.yml.example 7.14-stable:config/gitlab.yml.example +git diff 6-0-stable:config/gitlab.yml.example 7-14-stable:config/gitlab.yml.example ``` * Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/7-14-stable/config/gitlab.yml.example but with your settings. From 253bc0ca15a9b2f459aef94a33de926984747f35 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Sep 2015 00:19:53 -0700 Subject: [PATCH 13/36] Fix test --- features/steps/admin/users.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb index 2e17d5c4c2..4bc290b6bd 100644 --- a/features/steps/admin/users.rb +++ b/features/steps/admin/users.rb @@ -4,11 +4,13 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps include SharedAdmin before do - allow(Devise).to receive(:omniauth_providers).and_return([:twitter, :twitter_updated]) + allow(Gitlab::OAuth::Provider).to receive(:providers).and_return([:twitter, :twitter_updated]) + allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_return(root_path) end after do - allow(Devise).to receive(:omniauth_providers).and_call_original + allow(Gitlab::OAuth::Provider).to receive(:providers).and_call_original + allow_any_instance_of(ApplicationHelper).to receive(:user_omniauth_authorize_path).and_call_original end step 'I should see all users' do From af3b6f6362d34077d100385b71f9fe2a0ce8a446 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 09:51:37 +0200 Subject: [PATCH 14/36] Fix fixed layout Signed-off-by: Dmitriy Zaporozhets --- app/helpers/page_layout_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/page_layout_helper.rb b/app/helpers/page_layout_helper.rb index bfbaf11c25..df37be51ce 100644 --- a/app/helpers/page_layout_helper.rb +++ b/app/helpers/page_layout_helper.rb @@ -43,7 +43,7 @@ module PageLayoutHelper def container_class css_class = "container-fluid" - if fluid_layout + unless fluid_layout css_class += " container-limited" end From 86ef2eb7281346df5b473f3cf3196a1f76caf002 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 12:35:37 +0200 Subject: [PATCH 15/36] Conver forked from button to text Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/pages/projects.scss | 1 - app/views/projects/_home_panel.html.haml | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 361fd63bc7..d3c8459570 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -48,7 +48,6 @@ p { color: #7f8fa4; - display: inline; } } diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index b93036e78e..dbecd1e719 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -7,6 +7,13 @@ - if @project.description.present? = markdown(@project.description, pipeline: :description) + - if forked_from_project = @project.forked_from_project + %p + Forked from + = link_to project_path(forked_from_project) do + = forked_from_project.namespace.try(:name) + + .project-repo-buttons = render 'projects/buttons/star' @@ -14,12 +21,6 @@ - unless empty_repo = render 'projects/buttons/fork' - - if forked_from_project = @project.forked_from_project - = link_to project_path(forked_from_project), class: 'btn' do - = icon("code-fork fw") - Forked from - = forked_from_project.namespace.try(:name) - - if can? current_user, :download_code, @project = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn', rel: 'nofollow' do = icon('download fw') From 6933da1ee0eb42146978be751e4feaa889e4790a Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 12:38:07 +0200 Subject: [PATCH 16/36] Refactor md variables Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/base/mixins.scss | 4 ++-- app/assets/stylesheets/base/variables.scss | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/base/mixins.scss b/app/assets/stylesheets/base/mixins.scss index 0f661d6b1b..a2f6c3e21f 100644 --- a/app/assets/stylesheets/base/mixins.scss +++ b/app/assets/stylesheets/base/mixins.scss @@ -55,10 +55,10 @@ } @mixin md-typography { - color: #444; + color: $md-text-color; a { - color: #3084bb; + color: $md-link-color; } img { diff --git a/app/assets/stylesheets/base/variables.scss b/app/assets/stylesheets/base/variables.scss index 21462b3112..2fc7bf1720 100644 --- a/app/assets/stylesheets/base/variables.scss +++ b/app/assets/stylesheets/base/variables.scss @@ -2,6 +2,8 @@ $hover: #FFFAF1; $gl-text-color: #54565b; $gl-header-color: #4c4e54; $gl-link-color: #333c48; +$md-text-color: #444; +$md-link-color: #3084bb; $nprogress-color: #c0392b; $gl-font-size: 15px; $list-font-size: 15px; From df51b029abb92c78c168c9f9e18f5a90c7da32f6 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 13:14:25 +0200 Subject: [PATCH 17/36] Improve project fork page Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/pages/projects.scss | 26 ++++++++-------------- app/views/projects/forks/new.html.haml | 21 ++++++++--------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index d3c8459570..53004fca35 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -203,26 +203,18 @@ ul.nav.nav-projects-tabs { } .fork-namespaces { - .thumbnail { + .fork-thumbnail { + text-align: center; + margin-bottom: $gl-padding; - &.fork-exists-thumbnail { - border-color: #EEE; - - .caption { - color: #999; - } + .caption { + padding: $gl-padding 0; + min-height: 30px; } - &.fork-thumbnail { - border-color: #AAA; - - &:hover { - background-color: $hover; - } - } - - a { - text-decoration: none; + img { + @include border-radius(50%); + max-width: 100px; } } } diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index b7a2ed68e2..cd5f3a5d39 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -10,21 +10,22 @@ - group.each do |namespace| .col-md-2.col-sm-3 - if fork = namespace.find_fork_of(@project) - .thumbnail.fork-exists-thumbnail + .fork-thumbnail = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 200) + = image_tag namespace_icon(namespace, 100) .caption - %h4=namespace.human_name - %p - = namespace.path + %strong + = namespace.human_name + %div.text-primary + Already forked + - else - .thumbnail.fork-thumbnail + .fork-thumbnail = link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 200) + = image_tag namespace_icon(namespace, 100) .caption - %h4=namespace.human_name - %p - = namespace.path + %strong + = namespace.human_name %p.light Fork is a copy of a project repository. From b08c5521f5858d6643d53b5a8e4bc180d2780022 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 13:25:09 +0200 Subject: [PATCH 18/36] Style blob show page Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/generic/files.scss | 5 ++++- app/assets/stylesheets/pages/diff.scss | 6 +++--- app/assets/stylesheets/pages/tree.scss | 7 ++----- app/views/projects/blob/_blob.html.haml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/generic/files.scss b/app/assets/stylesheets/generic/files.scss index f845342c67..952d4ecdbe 100644 --- a/app/assets/stylesheets/generic/files.scss +++ b/app/assets/stylesheets/generic/files.scss @@ -3,7 +3,10 @@ * */ .file-holder { - border: 1px solid $border-color; + margin-left: -$gl-padding; + margin-right: -$gl-padding; + border: none; + border-top: 1px solid #E7E9EE; margin-bottom: 1em; table { diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss index 487b600e31..5e7e59a6af 100644 --- a/app/assets/stylesheets/pages/diff.scss +++ b/app/assets/stylesheets/pages/diff.scss @@ -1,6 +1,6 @@ .diff-file { - margin-left: -16px; - margin-right: -16px; + margin-left: -$gl-padding; + margin-right: -$gl-padding; border: none; border-bottom: 1px solid #E7E9EE; @@ -8,7 +8,7 @@ position: relative; background: $background-color; border-bottom: 1px solid $border-color; - padding: 10px 15px; + padding: 10px 16px; color: #555; z-index: 10; diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index 587d09a04a..d93b43b204 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -132,17 +132,14 @@ list-style: none; margin: 0; padding: 0; - margin-bottom: 10px; + margin-bottom: 5px; .commit { - padding: 10px 15px; + padding: $gl-padding 0; .commit-row-title { - font-size: 13px; - .commit-row-message { font-weight: normal; - color: #555; } } } diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index 65c3ab10e0..b4c7d8b9b7 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -15,7 +15,7 @@ - else = link_to title, '#' -%ul.blob-commit-info.well.hidden-xs +%ul.blob-commit-info.hidden-xs - blob_commit = @repository.last_commit_for_path(@commit.id, blob.path) = render blob_commit, project: @project From 059b8828d38e763d9776e55d5b4962f5fc419ddb Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 10 Sep 2015 13:36:42 +0200 Subject: [PATCH 19/36] Style syntax highlight area for white theme Signed-off-by: Dmitriy Zaporozhets --- app/assets/stylesheets/generic/files.scss | 32 +++++++++++++++++++-- app/assets/stylesheets/highlight/white.scss | 8 ++++-- app/assets/stylesheets/pages/tree.scss | 30 ------------------- 3 files changed, 36 insertions(+), 34 deletions(-) diff --git a/app/assets/stylesheets/generic/files.scss b/app/assets/stylesheets/generic/files.scss index 952d4ecdbe..9dd7774788 100644 --- a/app/assets/stylesheets/generic/files.scss +++ b/app/assets/stylesheets/generic/files.scss @@ -7,6 +7,7 @@ margin-right: -$gl-padding; border: none; border-top: 1px solid #E7E9EE; + border-bottom: 1px solid #E7E9EE; margin-bottom: 1em; table { @@ -52,7 +53,7 @@ } &.wiki { - padding: 25px; + padding: $gl-padding; .highlight { margin-bottom: 9px; @@ -93,7 +94,7 @@ border-right: none; } background: #fff; - padding: 8px; + padding: 10px $gl-padding; } .lines { pre { @@ -103,6 +104,33 @@ border: none; } } + img.avatar { + border: 0 none; + float: none; + margin: 0; + padding: 0; + } + td.blame-commit { + background: #f9f9f9; + min-width: 350px; + + .commit-author-link { + color: #888; + } + } + td.blame-numbers { + pre { + color: #AAA; + white-space: pre; + } + background: #f1f1f1; + border-left: 1px solid #DDD; + } + td.lines { + code { + font-family: $monospace_font; + } + } } &.logs { diff --git a/app/assets/stylesheets/highlight/white.scss b/app/assets/stylesheets/highlight/white.scss index e0edfb80b4..5de589109b 100644 --- a/app/assets/stylesheets/highlight/white.scss +++ b/app/assets/stylesheets/highlight/white.scss @@ -5,15 +5,19 @@ pre.code.highlight.white, background-color: #fff; color: #333; - pre.highlight, .line-numbers, .line-numbers a { + background-color: $background-color !important; + color: $gl-gray !important; + } + + pre.highlight { background-color: #fff !important; color: #333 !important; } pre.code { - border-left: 1px solid #bbb; + border-left: 1px solid $border-color; } // highlight line via anchor diff --git a/app/assets/stylesheets/pages/tree.scss b/app/assets/stylesheets/pages/tree.scss index d93b43b204..71ca37c0cd 100644 --- a/app/assets/stylesheets/pages/tree.scss +++ b/app/assets/stylesheets/pages/tree.scss @@ -78,36 +78,6 @@ } } } - - .blame { - img.avatar { - border: 0 none; - float: none; - margin: 0; - padding: 0; - } - td.blame-commit { - background: #f9f9f9; - min-width: 350px; - - .commit-author-link { - color: #888; - } - } - td.blame-numbers { - pre { - color: #AAA; - white-space: pre; - } - background: #f1f1f1; - border-left: 1px solid #DDD; - } - td.lines { - code { - font-family: $monospace_font; - } - } - } } .tree-ref-holder { From 9d3344adbbfc84ef8abc96366bdfa695293cd6c0 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Sep 2015 08:23:10 -0700 Subject: [PATCH 20/36] Gracefully handle errors in syntax highlighting by leaving the block unformatted Closes #2433 --- CHANGELOG | 1 + .../markdown/syntax_highlight_filter.rb | 6 ++++- .../markdown/syntax_highlight_filter_spec.rb | 22 +++++++++++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb diff --git a/CHANGELOG b/CHANGELOG index 36ee3e69ab..2c135d3475 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.0.0 (unreleased) + - Gracefully handle errors in syntax highlighting by leaving the block unformatted (Stan Hu) - Fix URL construction for merge requests, issues, notes, and commits for relative URL config (Stan Hu) - Fix emoji URLs in Markdown when relative_url_root is used (Stan Hu) - Omit filename in Content-Disposition header in raw file download to avoid RFC 6266 encoding issues (Stan HU) diff --git a/lib/gitlab/markdown/syntax_highlight_filter.rb b/lib/gitlab/markdown/syntax_highlight_filter.rb index 86f4385753..f9527c7286 100644 --- a/lib/gitlab/markdown/syntax_highlight_filter.rb +++ b/lib/gitlab/markdown/syntax_highlight_filter.rb @@ -21,7 +21,11 @@ module Gitlab language = node.attr('class') code = node.text - highlighted = block_code(code, language) + begin + highlighted = block_code(code, language) + rescue + highlighted = "
#{code}
" + end # Replace the parent `pre` element with the entire highlighted block node.parent.replace(highlighted) diff --git a/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb b/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb new file mode 100644 index 0000000000..ecef31853f --- /dev/null +++ b/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +module Gitlab::Markdown + describe SyntaxHighlightFilter do + include FilterSpecHelper + + let(:project) { create(:empty_project) } + let(:reference) { snippet.to_reference } + + it 'highlights valid code blocks' do + result = filter('
def fun end')
+      expect(result.to_html).to eq("
def fun end
\n") + end + + it 'passes through invalid code blocks' do + allow_any_instance_of(SyntaxHighlightFilter).to receive(:block_code).and_raise(StandardError) + + result = filter('
This is a test
') + expect(result.to_html).to eq('
This is a test
') + end + end +end From 9bda4b8d88fc93b8938d8c4d001d6660d112ae1c Mon Sep 17 00:00:00 2001 From: Petheo Bence Date: Thu, 3 Sep 2015 15:38:54 +0200 Subject: [PATCH 21/36] Added service API endpoint to retrieve service parameters --- CHANGELOG | 1 + doc/api/services.md | 160 +++++++++++++++++++++++++++++ lib/api/services.rb | 10 ++ lib/tasks/services.rake | 9 ++ spec/requests/api/services_spec.rb | 10 ++ 5 files changed, 190 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 36ee3e69ab..710f6e6891 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -43,6 +43,7 @@ v 8.0.0 (unreleased) - Add support for Crowd - Global Labels that are available to all projects - Fix highlighting of deleted lines in diffs. + - Added service API endpoint to retrieve service parameters (Petheő Bence) v 7.14.1 - Improve abuse reports management from admin area diff --git a/doc/api/services.md b/doc/api/services.md index bc5049dd30..7d45b2cf46 100644 --- a/doc/api/services.md +++ b/doc/api/services.md @@ -27,6 +27,14 @@ Delete Asana service for a project. DELETE /projects/:id/services/asana ``` +### Get Asana service settings + +Get Asana service settings for a project. + +``` +GET /projects/:id/services/asana +``` + ## Assembla Project Management Software (Source Commits Endpoint) @@ -52,6 +60,14 @@ Delete Assembla service for a project. DELETE /projects/:id/services/assembla ``` +### Get Assembla service settings + +Get Assembla service settings for a project. + +``` +GET /projects/:id/services/assembla +``` + ## Atlassian Bamboo CI A continuous integration and build server @@ -81,6 +97,14 @@ Delete Atlassian Bamboo CI service for a project. DELETE /projects/:id/services/bamboo ``` +### Get Atlassian Bamboo CI service settings + +Get Atlassian Bamboo CI service settings for a project. + +``` +GET /projects/:id/services/bamboo +``` + ## Buildkite Continuous integration and deployments @@ -107,6 +131,14 @@ Delete Buildkite service for a project. DELETE /projects/:id/services/buildkite ``` +### Get Buildkite service settings + +Get Buildkite service settings for a project. + +``` +GET /projects/:id/services/buildkite +``` + ## Campfire Simple web-based real-time group chat @@ -133,6 +165,14 @@ Delete Campfire service for a project. DELETE /projects/:id/services/campfire ``` +### Get Campfire service settings + +Get Campfire service settings for a project. + +``` +GET /projects/:id/services/campfire +``` + ## Custom Issue Tracker Custom issue tracker @@ -161,6 +201,14 @@ Delete Custom Issue Tracker service for a project. DELETE /projects/:id/services/custom-issue-tracker ``` +### Get Custom Issue Tracker service settings + +Get Custom Issue Tracker service settings for a project. + +``` +GET /projects/:id/services/custom-issue-tracker +``` + ## Drone CI Drone is a Continuous Integration platform built on Docker, written in Go @@ -187,6 +235,14 @@ Delete Drone CI service for a project. DELETE /projects/:id/services/drone-ci ``` +### Get Drone CI service settings + +Get Drone CI service settings for a project. + +``` +GET /projects/:id/services/drone-ci +``` + ## Emails on push Email the commits and diff of each push to a list of recipients. @@ -213,6 +269,14 @@ Delete Emails on push service for a project. DELETE /projects/:id/services/emails-on-push ``` +### Get Emails on push service settings + +Get Emails on push service settings for a project. + +``` +GET /projects/:id/services/emails-on-push +``` + ## External Wiki Replaces the link to the internal wiki with a link to an external wiki. @@ -237,6 +301,14 @@ Delete External Wiki service for a project. DELETE /projects/:id/services/external-wiki ``` +### Get External Wiki service settings + +Get External Wiki service settings for a project. + +``` +GET /projects/:id/services/external-wiki +``` + ## Flowdock Flowdock is a collaboration web app for technical teams. @@ -261,6 +333,14 @@ Delete Flowdock service for a project. DELETE /projects/:id/services/flowdock ``` +### Get Flowdock service settings + +Get Flowdock service settings for a project. + +``` +GET /projects/:id/services/flowdock +``` + ## Gemnasium Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities. @@ -286,6 +366,14 @@ Delete Gemnasium service for a project. DELETE /projects/:id/services/gemnasium ``` +### Get Gemnasium service settings + +Get Gemnasium service settings for a project. + +``` +GET /projects/:id/services/gemnasium +``` + ## GitLab CI Continuous integration server from GitLab @@ -312,6 +400,14 @@ Delete GitLab CI service for a project. DELETE /projects/:id/services/gitlab-ci ``` +### Get GitLab CI service settings + +Get GitLab CI service settings for a project. + +``` +GET /projects/:id/services/gitlab-ci +``` + ## HipChat Private group chat and IM @@ -341,6 +437,14 @@ Delete HipChat service for a project. DELETE /projects/:id/services/hipchat ``` +### Get HipChat service settings + +Get HipChat service settings for a project. + +``` +GET /projects/:id/services/hipchat +``` + ## Irker (IRC gateway) Send IRC messages, on update, to a list of recipients through an Irker gateway. @@ -371,6 +475,14 @@ Delete Irker (IRC gateway) service for a project. DELETE /projects/:id/services/irker ``` +### Get Irker (IRC gateway) service settings + +Get Irker (IRC gateway) service settings for a project. + +``` +GET /projects/:id/services/irker +``` + ## JIRA Jira issue tracker @@ -400,6 +512,14 @@ Delete JIRA service for a project. DELETE /projects/:id/services/jira ``` +### Get JIRA service settings + +Get JIRA service settings for a project. + +``` +GET /projects/:id/services/jira +``` + ## PivotalTracker Project Management Software (Source Commits Endpoint) @@ -424,6 +544,14 @@ Delete PivotalTracker service for a project. DELETE /projects/:id/services/pivotaltracker ``` +### Get PivotalTracker service settings + +Get PivotalTracker service settings for a project. + +``` +GET /projects/:id/services/pivotaltracker +``` + ## Pushover Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop. @@ -452,6 +580,14 @@ Delete Pushover service for a project. DELETE /projects/:id/services/pushover ``` +### Get Pushover service settings + +Get Pushover service settings for a project. + +``` +GET /projects/:id/services/pushover +``` + ## Redmine Redmine issue tracker @@ -479,6 +615,14 @@ Delete Redmine service for a project. DELETE /projects/:id/services/redmine ``` +### Get Redmine service settings + +Get Redmine service settings for a project. + +``` +GET /projects/:id/services/redmine +``` + ## Slack A team communication tool for the 21st century @@ -505,6 +649,14 @@ Delete Slack service for a project. DELETE /projects/:id/services/slack ``` +### Get Slack service settings + +Get Slack service settings for a project. + +``` +GET /projects/:id/services/slack +``` + ## JetBrains TeamCity CI A continuous integration and build server @@ -534,3 +686,11 @@ Delete JetBrains TeamCity CI service for a project. DELETE /projects/:id/services/teamcity ``` +### Get JetBrains TeamCity CI service settings + +Get JetBrains TeamCity CI service settings for a project. + +``` +GET /projects/:id/services/teamcity +``` + diff --git a/lib/api/services.rb b/lib/api/services.rb index 73645cedea..d170b3067e 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -49,6 +49,16 @@ module API end end end + + # Get service settings for project + # + # Example Request: + # + # GET /project/:id/services/gitlab-ci + # + get ':id/services/:service_slug' do + present project_service + end end end end diff --git a/lib/tasks/services.rake b/lib/tasks/services.rake index 3f276a5e12..39541c0b9c 100644 --- a/lib/tasks/services.rake +++ b/lib/tasks/services.rake @@ -40,6 +40,15 @@ DELETE /projects/:id/services/<%= service[:dashed_name] %> ``` +### Get <%= service[:title] %> service settings + +Get <%= service[:title] %> service settings for a project. + +``` +GET /projects/:id/services/<%= service[:dashed_name] %> + +``` + <% end %> ERB diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb index c297904614..fb3b235446 100644 --- a/spec/requests/api/services_spec.rb +++ b/spec/requests/api/services_spec.rb @@ -47,5 +47,15 @@ describe API::API, api: true do expect(project.send(service_method).activated?).to be_falsey end end + + describe "GET /projects/:id/services/#{service.dasherize}" do + include_context service + + it "should get #{service} settings" do + get api("/projects/#{project.id}/services/#{dashed_service}", user) + + expect(response.status).to eq(200) + end + end end end From c86865c1cf29cb39d0e2896351c3cf6c1925af6d Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 10 Sep 2015 13:59:27 -0400 Subject: [PATCH 22/36] Add missing 7.14.x CHANGELOG entries --- CHANGELOG | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 402fe61bbc..b41237f867 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,7 +9,6 @@ v 8.0.0 (unreleased) - Prevent anchors from being hidden by header (Stan Hu) - Fix bug where only the first 15 Bitbucket issues would be imported (Stan Hu) - Sort issues by creation date in Bitbucket importer (Stan Hu) - - Upgrade gitlab_git to 7.2.15 to fix `git blame` errors with ISO-encoded files (Stan Hu) - Prevent too many redirects upon login when home page URL is set to external_url (Stan Hu) - Improve dropdown positioning on the project home page (Hannes Rosenögger) - Upgrade browser gem to 1.0.0 to avoid warning in IE11 compatibilty mode (Stan Hu) @@ -37,15 +36,21 @@ v 8.0.0 (unreleased) - Retrieving oauth token with LDAP credentials - Load Application settings from running database unless env var USE_DB=false - Added Drone CI integration (Kirill Zaitsev) - - Refactored service API and added automatically service docs generator (Kirill Zaitsev) + - Refactored service API and added automatically service docs generator (Kirill Zaitsev) - Added web_url key project hook_attrs (Kirill Zaitsev) - Add ability to get user information by ID of an SSH key via the API - - Fix bug which IE cannot show image at markdown when the image is raw file of gitlab + - Fix bug which IE cannot show image at markdown when the image is raw file of gitlab - Add support for Crowd - Global Labels that are available to all projects - Fix highlighting of deleted lines in diffs. - Added service API endpoint to retrieve service parameters (Petheő Bence) +v 7.14.3 + - No changes + +v 7.14.2 + - Upgrade gitlab_git to 7.2.15 to fix `git blame` errors with ISO-encoded files (Stan Hu) + v 7.14.1 - Improve abuse reports management from admin area - Fix "Reload with full diff" URL button in compare branch view (Stan Hu) From 201f50b94f5fcd5fa2987fe1870947c4d3fa7739 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Sep 2015 11:45:46 -0700 Subject: [PATCH 23/36] Fix some CHANGELOG entries --- CHANGELOG | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b41237f867..f03e7c489a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,6 +44,7 @@ v 8.0.0 (unreleased) - Global Labels that are available to all projects - Fix highlighting of deleted lines in diffs. - Added service API endpoint to retrieve service parameters (Petheő Bence) + - Add FogBugz project import (Jared Szechy) v 7.14.3 - No changes @@ -55,12 +56,9 @@ v 7.14.1 - Improve abuse reports management from admin area - Fix "Reload with full diff" URL button in compare branch view (Stan Hu) - Disabled DNS lookups for SSH in docker image (Rowan Wookey) - -v 7.14.1 (unreleased) - Only include base URL in OmniAuth full_host parameter (Stan Hu) - Fix Error 500 in API when accessing a group that has an avatar (Stan Hu) - Ability to enable SSL verification for Webhooks - - Add FogBugz project import (Jared Szechy) v 7.14.0 - Fix bug where non-project members of the target project could set labels on new merge requests. From 3223a2a5ae477d82784998359f895ccddef42e1d Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Sep 2015 11:51:48 -0700 Subject: [PATCH 24/36] Bump rouge to 1.10 to remove warning noise and fix other syntax highlighting bugs Closes #2128 Closes #2433 --- CHANGELOG | 1 + Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b41237f867..8cce3a1543 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.0.0 (unreleased) + - Bump rouge to 1.10 to remove warning noise and fix other syntax highlighting bugs (Stan Hu) - Gracefully handle errors in syntax highlighting by leaving the block unformatted (Stan Hu) - Fix URL construction for merge requests, issues, notes, and commits for relative URL config (Stan Hu) - Fix emoji URLs in Markdown when relative_url_root is used (Stan Hu) diff --git a/Gemfile.lock b/Gemfile.lock index dce7e4964a..647eb17d97 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -291,7 +291,7 @@ GEM github-markup (~> 1.3.1) gollum-grit_adapter (~> 0.1, >= 0.1.1) nokogiri (~> 1.6.4) - rouge (~> 1.9) + rouge (~> 1.10) sanitize (~> 2.1.0) stringex (~> 2.5.1) gon (5.0.1) @@ -544,7 +544,7 @@ GEM netrc (~> 0.7) rinku (1.7.3) rotp (1.6.1) - rouge (1.9.1) + rouge (1.10.0) rqrcode (0.4.2) rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) From 7cbf5e4d18f6ba0bf1afbddcb090fa39837e9529 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Sat, 5 Sep 2015 17:50:47 -0400 Subject: [PATCH 25/36] Prevent result of SyntaxHighlightFilter being sanitized --- lib/gitlab/markdown/sanitization_filter.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/gitlab/markdown/sanitization_filter.rb b/lib/gitlab/markdown/sanitization_filter.rb index 68ed57f625..54faf981b7 100644 --- a/lib/gitlab/markdown/sanitization_filter.rb +++ b/lib/gitlab/markdown/sanitization_filter.rb @@ -67,12 +67,16 @@ module Gitlab def clean_spans lambda do |env| - return unless env[:node_name] == 'span' - return unless env[:node].has_attribute?('class') + node = env[:node] - unless has_ancestor?(env[:node], 'pre') - env[:node].remove_attribute('class') + return unless node.name == 'span' + return unless node.has_attribute?('class') + + unless has_ancestor?(node, 'pre') + node.remove_attribute('class') end + + {node_whitelist: [node]} end end end From 404a01ab148417f6314c94d213769dd72fd0589e Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 10 Sep 2015 15:28:42 -0400 Subject: [PATCH 26/36] Add specs for syntax_highlight JS Also makes it work when given a parent element containing a `.js-syntax-highlight` element so for dynamically-added things like notes or Markdown previews, we can more accurately target just the element we care about. --- .../javascripts/syntax_highlight.coffee | 10 ++++- .../syntax_highlight_spec.js.coffee | 42 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 spec/javascripts/syntax_highlight_spec.js.coffee diff --git a/app/assets/javascripts/syntax_highlight.coffee b/app/assets/javascripts/syntax_highlight.coffee index 71295cd4b0..980f0232d1 100644 --- a/app/assets/javascripts/syntax_highlight.coffee +++ b/app/assets/javascripts/syntax_highlight.coffee @@ -1,3 +1,5 @@ +# Syntax Highlighter +# # Applies a syntax highlighting color scheme CSS class to any element with the # `js-syntax-highlight` class # @@ -6,7 +8,13 @@ #
# $.fn.syntaxHighlight = -> - $(this).addClass(gon.user_color_scheme) + if $(this).hasClass('js-syntax-highlight') + # Given the element itself, apply highlighting + $(this).addClass(gon.user_color_scheme) + else + # Given a parent element, recurse to any of its applicable children + $children = $(this).find('.js-syntax-highlight') + $children.syntaxHighlight() if $children.length $(document).on 'ready page:load', -> $('.js-syntax-highlight').syntaxHighlight() diff --git a/spec/javascripts/syntax_highlight_spec.js.coffee b/spec/javascripts/syntax_highlight_spec.js.coffee new file mode 100644 index 0000000000..6a73b6bf32 --- /dev/null +++ b/spec/javascripts/syntax_highlight_spec.js.coffee @@ -0,0 +1,42 @@ +#= require syntax_highlight + +describe 'Syntax Highlighter', -> + stubUserColorScheme = (value) -> + window.gon ?= {} + window.gon.user_color_scheme = value + + describe 'on a js-syntax-highlight element', -> + beforeEach -> + fixture.set('
') + + it 'applies syntax highlighting', -> + stubUserColorScheme('monokai') + + $('.js-syntax-highlight').syntaxHighlight() + + expect($('.js-syntax-highlight')).toHaveClass('monokai') + + describe 'on a parent element', -> + beforeEach -> + fixture.set """ +
+
+
+
+
+ """ + + it 'applies highlighting to all applicable children', -> + stubUserColorScheme('monokai') + + $('.parent').syntaxHighlight() + + expect($('.parent, .foo')).not.toHaveClass('monokai') + expect($('.monokai').length).toBe(2) + + it 'prevents an infinite loop when no matches exist', -> + fixture.set('
') + + highlight = -> $('div').syntaxHighlight() + + expect(highlight).not.toThrow() From 4e54b82326e0a24c3b5196956f1e957b3f7c02e9 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 10 Sep 2015 15:29:56 -0400 Subject: [PATCH 27/36] Apply syntax highlighting to Markdown previews --- app/assets/javascripts/dropzone_input.js.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/dropzone_input.js.coffee b/app/assets/javascripts/dropzone_input.js.coffee index a0dcaa8c27..6f789e668a 100644 --- a/app/assets/javascripts/dropzone_input.js.coffee +++ b/app/assets/javascripts/dropzone_input.js.coffee @@ -167,6 +167,7 @@ class @DropzoneInput dataType: "json" ).success (data) -> preview.html data.body + preview.syntaxHighlight() renderReferencedUsers data.references.users From 19c0bf2723bb0895159e4e4e0c6f47bc73157449 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 10 Sep 2015 15:30:06 -0400 Subject: [PATCH 28/36] Simplify syntax highlighting of new notes --- app/assets/javascripts/notes.js.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee index b7f2c63c5a..ce638c2641 100644 --- a/app/assets/javascripts/notes.js.coffee +++ b/app/assets/javascripts/notes.js.coffee @@ -122,8 +122,9 @@ class @Notes # or skip if rendered if @isNewNote(note) @note_ids.push(note.id) - $('ul.main-notes-list').append(note.html) - $('.js-syntax-highlight').syntaxHighlight() + $('ul.main-notes-list'). + append(note.html). + syntaxHighlight() @initTaskList() ### From e3c97ede9663fe7905fcb350875c46526cb4f832 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 10 Sep 2015 16:06:24 -0400 Subject: [PATCH 29/36] RU-BO-COOOOOOOOP --- lib/gitlab/markdown/sanitization_filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/markdown/sanitization_filter.rb b/lib/gitlab/markdown/sanitization_filter.rb index 54faf981b7..e368de7d84 100644 --- a/lib/gitlab/markdown/sanitization_filter.rb +++ b/lib/gitlab/markdown/sanitization_filter.rb @@ -76,7 +76,7 @@ module Gitlab node.remove_attribute('class') end - {node_whitelist: [node]} + { node_whitelist: [node] } end end end From e20529cec4f6de0c2c1589da99abb8714ea1c1c1 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Sep 2015 13:38:43 -0700 Subject: [PATCH 30/36] Bump rouge to 1.10.1 --- CHANGELOG | 2 +- Gemfile.lock | 4 ++-- config/initializers/rouge_diff_lexer.rb | 24 ------------------------ 3 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 config/initializers/rouge_diff_lexer.rb diff --git a/CHANGELOG b/CHANGELOG index 8cce3a1543..c325d6b612 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 8.0.0 (unreleased) - - Bump rouge to 1.10 to remove warning noise and fix other syntax highlighting bugs (Stan Hu) + - Bump rouge to 1.10.1 to remove warning noise and fix other syntax highlighting bugs (Stan Hu) - Gracefully handle errors in syntax highlighting by leaving the block unformatted (Stan Hu) - Fix URL construction for merge requests, issues, notes, and commits for relative URL config (Stan Hu) - Fix emoji URLs in Markdown when relative_url_root is used (Stan Hu) diff --git a/Gemfile.lock b/Gemfile.lock index 647eb17d97..f3091857b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -291,7 +291,7 @@ GEM github-markup (~> 1.3.1) gollum-grit_adapter (~> 0.1, >= 0.1.1) nokogiri (~> 1.6.4) - rouge (~> 1.10) + rouge (~> 1.10.1) sanitize (~> 2.1.0) stringex (~> 2.5.1) gon (5.0.1) @@ -544,7 +544,7 @@ GEM netrc (~> 0.7) rinku (1.7.3) rotp (1.6.1) - rouge (1.10.0) + rouge (1.10.1) rqrcode (0.4.2) rqrcode-rails3 (0.1.7) rqrcode (>= 0.4.2) diff --git a/config/initializers/rouge_diff_lexer.rb b/config/initializers/rouge_diff_lexer.rb deleted file mode 100644 index fdb2d7b748..0000000000 --- a/config/initializers/rouge_diff_lexer.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Here until https://github.com/jneen/rouge/pull/297 is merged into Rouge and the gem is updated in GitLab. -module Rouge - module Lexers - class Diff - def self.analyze_text(text) - return 1 if text.start_with?('Index: ') - return 1 if text.start_with?('diff ') - return 0.9 if text.start_with?('--- ') - end - - state :root do - rule(/^ .*\n/, Text) - rule(/^---\n/, Text) - rule(/^\+.*\n/, Generic::Inserted) - rule(/^-+.*\n/, Generic::Deleted) - rule(/^!.*\n/, Generic::Strong) - rule(/^@.*\n/, Generic::Subheading) - rule(/^([Ii]ndex|diff).*\n/, Generic::Heading) - rule(/^=.*\n/, Generic::Heading) - rule(/.*\n/, Text) - end - end - end -end From 267687993a437e0651eb5064c04479e65a43251f Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 10 Sep 2015 14:21:14 -0700 Subject: [PATCH 31/36] Add comments and clean up test for !1274 --- lib/gitlab/markdown/syntax_highlight_filter.rb | 2 ++ spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/gitlab/markdown/syntax_highlight_filter.rb b/lib/gitlab/markdown/syntax_highlight_filter.rb index f9527c7286..8597e02f0d 100644 --- a/lib/gitlab/markdown/syntax_highlight_filter.rb +++ b/lib/gitlab/markdown/syntax_highlight_filter.rb @@ -24,6 +24,8 @@ module Gitlab begin highlighted = block_code(code, language) rescue + # Gracefully handle syntax highlighter bugs/errors to ensure + # users can still access an issue/comment/etc. highlighted = "
#{code}
" end diff --git a/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb b/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb index ecef31853f..6a49067372 100644 --- a/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb +++ b/spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb @@ -4,9 +4,6 @@ module Gitlab::Markdown describe SyntaxHighlightFilter do include FilterSpecHelper - let(:project) { create(:empty_project) } - let(:reference) { snippet.to_reference } - it 'highlights valid code blocks' do result = filter('
def fun end')
       expect(result.to_html).to eq("
def fun end
\n") From ae83051ef9a3fad9dda89eaf537f07e1ba323f88 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 11 Sep 2015 13:43:37 +0200 Subject: [PATCH 32/36] Fix CI admin projects page --- app/views/ci/admin/projects/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/ci/admin/projects/index.html.haml b/app/views/ci/admin/projects/index.html.haml index d6c0243880..dc7b041473 100644 --- a/app/views/ci/admin/projects/index.html.haml +++ b/app/views/ci/admin/projects/index.html.haml @@ -9,7 +9,7 @@ %th - @projects.each do |project| - = render "ci/admin/projects/project", project: @projects + = render "ci/admin/projects/project", project: project = paginate @projects From ec8e2463db5058ae15ac56ed779ff68da24afdee Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 11 Sep 2015 14:38:34 +0200 Subject: [PATCH 33/36] Remove db/ci --- .../migrate/20121004140911_create_projects.rb | 14 -- db/ci/migrate/20121004165038_create_builds.rb | 15 -- .../20121101091638_devise_create_users.rb | 46 ---- .../20121101121639_add_token_to_project.rb | 5 - .../20121106143042_add_ref_functionality.rb | 10 - ...0121108160657_add_gitlab_url_to_project.rb | 5 - .../20121108174237_add_started_at_to_build.rb | 5 - ...21115094430_increate_trace_colunm_limit.rb | 8 - .../20121115132252_add_tmp_file_to_build.rb | 5 - .../20121116144312_add_before_sha_to_build.rb | 5 - ...20121224092350_add_schedule_to_projects.rb | 6 - ...20130114153451_change_schedule_invertal.rb | 25 -- ...130129121754_add_public_flag_to_project.rb | 5 - .../20130531112551_add_data_field_to_build.rb | 5 - ...31122131_remove_path_field_from_project.rb | 8 - .../migrate/20130531125905_create_runners.rb | 10 - .../20130531133603_add_runner_id_to_build.rb | 5 - .../20130603130920_remove_users_table.rb | 5 - ...130603144030_add_more_fields_to_project.rb | 5 - .../20130603144959_create_runner_projects.rb | 10 - ...161449_add_project_gitlab_id_to_project.rb | 5 - ...28142321_add_index_project_id_to_builds.rb | 5 - ...0130705171042_add_description_to_runner.rb | 5 - db/ci/migrate/20130710164015_add_db_index.rb | 7 - .../20130816201200_change_push_data_limit.rb | 5 - .../20130906175737_add_sessions_table.rb | 12 - ...23103430_add_allow_git_fetch_to_project.rb | 5 - ...dd_email_notification_fields_to_project.rb | 7 - .../20140130121538_rename_project_fields.rb | 5 - .../migrate/20140222210357_create_web_hook.rb | 9 - ...506091853_remove_public_key_from_runner.rb | 5 - ...140823225019_create_commits_from_builds.rb | 22 -- ...0140909142245_add_skip_refs_to_projects.rb | 5 - .../20141001125939_add_coverage_parser.rb | 5 - .../20141001132129_add_coverage_to_build.rb | 5 - .../20141028162820_add_sha_index_to_build.rb | 6 - ...20141031114419_migrate_build_to_commits.rb | 21 -- .../20141031141708_add_commit_indicies.rb | 9 - .../20141103135037_add_parallel_to_build.rb | 12 - .../20141103151359_add_commands_to_build.rb | 5 - .../20141103162726_add_job_id_to_build.rb | 5 - db/ci/migrate/20141104130024_migrate_jobs.rb | 12 - .../migrate/20141104153744_add_name_to_job.rb | 5 - ...41127153745_remove_scripts_from_project.rb | 5 - .../20141201153755_remove_invalid_build.rb | 5 - .../migrate/20141204133321_create_service.rb | 15 -- .../20150111062026_add_filter_to_jobs.rb | 6 - ...on_migration.acts_as_taggable_on_engine.rb | 31 --- ...ique_indices.acts_as_taggable_on_engine.rb | 20 -- ...ache_to_tags.acts_as_taggable_on_engine.rb | 15 -- ...ggable_index.acts_as_taggable_on_engine.rb | 10 - .../20150204001035_build_missing_services.rb | 21 -- .../20150226001835_add_job_type_to_job.rb | 6 - ...150306131416_add_contacted_at_to_runner.rb | 5 - .../20150306135341_add_active_to_runner.rb | 5 - ...150310001733_rename_committer_to_pusher.rb | 5 - .../20150320001810_create_event_table.rb | 16 -- ...4001123_add_settings_for_shared_runners.rb | 6 - .../20150324001227_migrate_shared_runners.rb | 11 - .../20150330001111_disable_shared_runners.rb | 8 - .../20150415142013_add_deleted_at_to_jobs.rb | 6 - .../20150417000045_cleanup_the_build_model.rb | 9 - .../20150504010150_migrate_url_to_path.rb | 11 - ...0150504010250_rename_gitlab_url_to_path.rb | 5 - ...0150508011360_add_info_fields_to_runner.rb | 9 - .../20150528011001_add_fields_to_builds.rb | 6 - .../20150528011012_move_job_name_to_build.rb | 10 - .../20150529012113_add_tag_to_commits.rb | 5 - .../20150601043220_add_yaml_to_projects.rb | 9 - .../20150601043231_migrate_jobs_to_yaml.rb | 97 -------- ...0602000240_change_default_build_timeout.rb | 9 - .../20150605002131_create_variables.rb | 11 - .../20150616001155_add_errors_to_commit.rb | 5 - .../20150630091815_add_options_to_build.rb | 5 - ...125244_add_encrypted_value_to_variables.rb | 7 - .../20150703125325_encrypt_variables.rb | 10 - ...50707134456_add_allow_failure_to_builds.rb | 5 - .../20150710113836_add_job_type_to_builds.rb | 5 - ...1_migrate_deploy_to_job_type_for_builds.rb | 6 - .../20150721204649_truncate_sessions.rb | 9 - ...50729145246_create_application_settings.rb | 10 - ...3142346_rename_job_type_to_stage_builds.rb | 9 - ...50806091503_add_committed_at_to_commits.rb | 6 - ...655_update_committed_at_with_created_at.rb | 5 - .../migrate/20150806102222_create_trigger.rb | 12 - .../20150806102457_add_trigger_to_builds.rb | 5 - .../20150806105404_create_trigger_request.rb | 9 - ...62227_add_commit_id_to_trigger_requests.rb | 8 - db/ci/schema.rb | 226 ------------------ db/ci/seeds.rb | 0 90 files changed, 1103 deletions(-) delete mode 100644 db/ci/migrate/20121004140911_create_projects.rb delete mode 100644 db/ci/migrate/20121004165038_create_builds.rb delete mode 100644 db/ci/migrate/20121101091638_devise_create_users.rb delete mode 100644 db/ci/migrate/20121101121639_add_token_to_project.rb delete mode 100644 db/ci/migrate/20121106143042_add_ref_functionality.rb delete mode 100644 db/ci/migrate/20121108160657_add_gitlab_url_to_project.rb delete mode 100644 db/ci/migrate/20121108174237_add_started_at_to_build.rb delete mode 100644 db/ci/migrate/20121115094430_increate_trace_colunm_limit.rb delete mode 100644 db/ci/migrate/20121115132252_add_tmp_file_to_build.rb delete mode 100644 db/ci/migrate/20121116144312_add_before_sha_to_build.rb delete mode 100644 db/ci/migrate/20121224092350_add_schedule_to_projects.rb delete mode 100644 db/ci/migrate/20130114153451_change_schedule_invertal.rb delete mode 100644 db/ci/migrate/20130129121754_add_public_flag_to_project.rb delete mode 100644 db/ci/migrate/20130531112551_add_data_field_to_build.rb delete mode 100644 db/ci/migrate/20130531122131_remove_path_field_from_project.rb delete mode 100644 db/ci/migrate/20130531125905_create_runners.rb delete mode 100644 db/ci/migrate/20130531133603_add_runner_id_to_build.rb delete mode 100644 db/ci/migrate/20130603130920_remove_users_table.rb delete mode 100644 db/ci/migrate/20130603144030_add_more_fields_to_project.rb delete mode 100644 db/ci/migrate/20130603144959_create_runner_projects.rb delete mode 100644 db/ci/migrate/20130603161449_add_project_gitlab_id_to_project.rb delete mode 100644 db/ci/migrate/20130628142321_add_index_project_id_to_builds.rb delete mode 100644 db/ci/migrate/20130705171042_add_description_to_runner.rb delete mode 100644 db/ci/migrate/20130710164015_add_db_index.rb delete mode 100644 db/ci/migrate/20130816201200_change_push_data_limit.rb delete mode 100644 db/ci/migrate/20130906175737_add_sessions_table.rb delete mode 100644 db/ci/migrate/20131023103430_add_allow_git_fetch_to_project.rb delete mode 100644 db/ci/migrate/20131120155545_add_email_notification_fields_to_project.rb delete mode 100644 db/ci/migrate/20140130121538_rename_project_fields.rb delete mode 100644 db/ci/migrate/20140222210357_create_web_hook.rb delete mode 100644 db/ci/migrate/20140506091853_remove_public_key_from_runner.rb delete mode 100644 db/ci/migrate/20140823225019_create_commits_from_builds.rb delete mode 100644 db/ci/migrate/20140909142245_add_skip_refs_to_projects.rb delete mode 100644 db/ci/migrate/20141001125939_add_coverage_parser.rb delete mode 100644 db/ci/migrate/20141001132129_add_coverage_to_build.rb delete mode 100644 db/ci/migrate/20141028162820_add_sha_index_to_build.rb delete mode 100644 db/ci/migrate/20141031114419_migrate_build_to_commits.rb delete mode 100644 db/ci/migrate/20141031141708_add_commit_indicies.rb delete mode 100644 db/ci/migrate/20141103135037_add_parallel_to_build.rb delete mode 100644 db/ci/migrate/20141103151359_add_commands_to_build.rb delete mode 100644 db/ci/migrate/20141103162726_add_job_id_to_build.rb delete mode 100644 db/ci/migrate/20141104130024_migrate_jobs.rb delete mode 100644 db/ci/migrate/20141104153744_add_name_to_job.rb delete mode 100644 db/ci/migrate/20141127153745_remove_scripts_from_project.rb delete mode 100644 db/ci/migrate/20141201153755_remove_invalid_build.rb delete mode 100644 db/ci/migrate/20141204133321_create_service.rb delete mode 100644 db/ci/migrate/20150111062026_add_filter_to_jobs.rb delete mode 100644 db/ci/migrate/20150113001832_acts_as_taggable_on_migration.acts_as_taggable_on_engine.rb delete mode 100644 db/ci/migrate/20150113001833_add_missing_unique_indices.acts_as_taggable_on_engine.rb delete mode 100644 db/ci/migrate/20150113001834_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb delete mode 100644 db/ci/migrate/20150113001835_add_missing_taggable_index.acts_as_taggable_on_engine.rb delete mode 100644 db/ci/migrate/20150204001035_build_missing_services.rb delete mode 100644 db/ci/migrate/20150226001835_add_job_type_to_job.rb delete mode 100644 db/ci/migrate/20150306131416_add_contacted_at_to_runner.rb delete mode 100644 db/ci/migrate/20150306135341_add_active_to_runner.rb delete mode 100644 db/ci/migrate/20150310001733_rename_committer_to_pusher.rb delete mode 100644 db/ci/migrate/20150320001810_create_event_table.rb delete mode 100644 db/ci/migrate/20150324001123_add_settings_for_shared_runners.rb delete mode 100644 db/ci/migrate/20150324001227_migrate_shared_runners.rb delete mode 100644 db/ci/migrate/20150330001111_disable_shared_runners.rb delete mode 100644 db/ci/migrate/20150415142013_add_deleted_at_to_jobs.rb delete mode 100644 db/ci/migrate/20150417000045_cleanup_the_build_model.rb delete mode 100644 db/ci/migrate/20150504010150_migrate_url_to_path.rb delete mode 100644 db/ci/migrate/20150504010250_rename_gitlab_url_to_path.rb delete mode 100644 db/ci/migrate/20150508011360_add_info_fields_to_runner.rb delete mode 100644 db/ci/migrate/20150528011001_add_fields_to_builds.rb delete mode 100644 db/ci/migrate/20150528011012_move_job_name_to_build.rb delete mode 100644 db/ci/migrate/20150529012113_add_tag_to_commits.rb delete mode 100644 db/ci/migrate/20150601043220_add_yaml_to_projects.rb delete mode 100644 db/ci/migrate/20150601043231_migrate_jobs_to_yaml.rb delete mode 100644 db/ci/migrate/20150602000240_change_default_build_timeout.rb delete mode 100644 db/ci/migrate/20150605002131_create_variables.rb delete mode 100644 db/ci/migrate/20150616001155_add_errors_to_commit.rb delete mode 100644 db/ci/migrate/20150630091815_add_options_to_build.rb delete mode 100644 db/ci/migrate/20150703125244_add_encrypted_value_to_variables.rb delete mode 100644 db/ci/migrate/20150703125325_encrypt_variables.rb delete mode 100644 db/ci/migrate/20150707134456_add_allow_failure_to_builds.rb delete mode 100644 db/ci/migrate/20150710113836_add_job_type_to_builds.rb delete mode 100644 db/ci/migrate/20150710113851_migrate_deploy_to_job_type_for_builds.rb delete mode 100644 db/ci/migrate/20150721204649_truncate_sessions.rb delete mode 100644 db/ci/migrate/20150729145246_create_application_settings.rb delete mode 100644 db/ci/migrate/20150803142346_rename_job_type_to_stage_builds.rb delete mode 100644 db/ci/migrate/20150806091503_add_committed_at_to_commits.rb delete mode 100644 db/ci/migrate/20150806091655_update_committed_at_with_created_at.rb delete mode 100644 db/ci/migrate/20150806102222_create_trigger.rb delete mode 100644 db/ci/migrate/20150806102457_add_trigger_to_builds.rb delete mode 100644 db/ci/migrate/20150806105404_create_trigger_request.rb delete mode 100644 db/ci/migrate/20150819162227_add_commit_id_to_trigger_requests.rb delete mode 100644 db/ci/schema.rb delete mode 100644 db/ci/seeds.rb diff --git a/db/ci/migrate/20121004140911_create_projects.rb b/db/ci/migrate/20121004140911_create_projects.rb deleted file mode 100644 index a9fee3aa6c..0000000000 --- a/db/ci/migrate/20121004140911_create_projects.rb +++ /dev/null @@ -1,14 +0,0 @@ -class CreateProjects < ActiveRecord::Migration - def up - create_table :projects do |t| - t.string :name, null: false - t.string :path, null: false - t.integer :timeout, null: false, default: 1800 - t.text :scripts, null: false - t.timestamps - end - end - - def down - end -end diff --git a/db/ci/migrate/20121004165038_create_builds.rb b/db/ci/migrate/20121004165038_create_builds.rb deleted file mode 100644 index 547803489f..0000000000 --- a/db/ci/migrate/20121004165038_create_builds.rb +++ /dev/null @@ -1,15 +0,0 @@ -class CreateBuilds < ActiveRecord::Migration - def up - create_table :builds do |t| - t.integer :project_id - t.string :commit_ref - t.string :status - t.datetime :finished_at - t.text :trace - t.timestamps - end - end - - def down - end -end diff --git a/db/ci/migrate/20121101091638_devise_create_users.rb b/db/ci/migrate/20121101091638_devise_create_users.rb deleted file mode 100644 index 2099d998fa..0000000000 --- a/db/ci/migrate/20121101091638_devise_create_users.rb +++ /dev/null @@ -1,46 +0,0 @@ -class DeviseCreateUsers < ActiveRecord::Migration - def change - create_table(:users) do |t| - ## Database authenticatable - t.string :email, :null => false, :default => "" - t.string :encrypted_password, :null => false, :default => "" - - ## Recoverable - t.string :reset_password_token - t.datetime :reset_password_sent_at - - ## Rememberable - t.datetime :remember_created_at - - ## Trackable - t.integer :sign_in_count, :default => 0 - t.datetime :current_sign_in_at - t.datetime :last_sign_in_at - t.string :current_sign_in_ip - t.string :last_sign_in_ip - - ## Confirmable - # t.string :confirmation_token - # t.datetime :confirmed_at - # t.datetime :confirmation_sent_at - # t.string :unconfirmed_email # Only if using reconfirmable - - ## Lockable - # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts - # t.string :unlock_token # Only if unlock strategy is :email or :both - # t.datetime :locked_at - - ## Token authenticatable - # t.string :authentication_token - - - t.timestamps - end - - add_index :users, :email, :unique => true - add_index :users, :reset_password_token, :unique => true - # add_index :users, :confirmation_token, :unique => true - # add_index :users, :unlock_token, :unique => true - # add_index :users, :authentication_token, :unique => true - end -end diff --git a/db/ci/migrate/20121101121639_add_token_to_project.rb b/db/ci/migrate/20121101121639_add_token_to_project.rb deleted file mode 100644 index bb66677b6b..0000000000 --- a/db/ci/migrate/20121101121639_add_token_to_project.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddTokenToProject < ActiveRecord::Migration - def change - add_column :projects, :token, :string, null: true - end -end diff --git a/db/ci/migrate/20121106143042_add_ref_functionality.rb b/db/ci/migrate/20121106143042_add_ref_functionality.rb deleted file mode 100644 index 0c26571e30..0000000000 --- a/db/ci/migrate/20121106143042_add_ref_functionality.rb +++ /dev/null @@ -1,10 +0,0 @@ -class AddRefFunctionality < ActiveRecord::Migration - def change - rename_column :builds, :commit_ref, :ref - add_column :builds, :sha, :string - add_column :projects, :default_ref, :string - end - - def down - end -end diff --git a/db/ci/migrate/20121108160657_add_gitlab_url_to_project.rb b/db/ci/migrate/20121108160657_add_gitlab_url_to_project.rb deleted file mode 100644 index 8a4e8fd666..0000000000 --- a/db/ci/migrate/20121108160657_add_gitlab_url_to_project.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddGitlabUrlToProject < ActiveRecord::Migration - def change - add_column :projects, :gitlab_url, :string, null: true - end -end diff --git a/db/ci/migrate/20121108174237_add_started_at_to_build.rb b/db/ci/migrate/20121108174237_add_started_at_to_build.rb deleted file mode 100644 index b4d65c7500..0000000000 --- a/db/ci/migrate/20121108174237_add_started_at_to_build.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddStartedAtToBuild < ActiveRecord::Migration - def change - add_column :builds, :started_at, :datetime, null: true - end -end diff --git a/db/ci/migrate/20121115094430_increate_trace_colunm_limit.rb b/db/ci/migrate/20121115094430_increate_trace_colunm_limit.rb deleted file mode 100644 index 5853f440f5..0000000000 --- a/db/ci/migrate/20121115094430_increate_trace_colunm_limit.rb +++ /dev/null @@ -1,8 +0,0 @@ -class IncreateTraceColunmLimit < ActiveRecord::Migration - def up - change_column :builds, :trace, :text, :limit => 1073741823 - end - - def down - end -end diff --git a/db/ci/migrate/20121115132252_add_tmp_file_to_build.rb b/db/ci/migrate/20121115132252_add_tmp_file_to_build.rb deleted file mode 100644 index a9a4e36b5b..0000000000 --- a/db/ci/migrate/20121115132252_add_tmp_file_to_build.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddTmpFileToBuild < ActiveRecord::Migration - def change - add_column :builds, :tmp_file, :string - end -end diff --git a/db/ci/migrate/20121116144312_add_before_sha_to_build.rb b/db/ci/migrate/20121116144312_add_before_sha_to_build.rb deleted file mode 100644 index 7b8cfd93ca..0000000000 --- a/db/ci/migrate/20121116144312_add_before_sha_to_build.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddBeforeShaToBuild < ActiveRecord::Migration - def change - add_column :builds, :before_sha, :string, null: true - end -end diff --git a/db/ci/migrate/20121224092350_add_schedule_to_projects.rb b/db/ci/migrate/20121224092350_add_schedule_to_projects.rb deleted file mode 100644 index fb3155f115..0000000000 --- a/db/ci/migrate/20121224092350_add_schedule_to_projects.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddScheduleToProjects < ActiveRecord::Migration - def change - add_column :projects, :always_build, :boolean, default: false, null: false - add_column :projects, :polling_interval, :string, null: true - end -end diff --git a/db/ci/migrate/20130114153451_change_schedule_invertal.rb b/db/ci/migrate/20130114153451_change_schedule_invertal.rb deleted file mode 100644 index accf3eef47..0000000000 --- a/db/ci/migrate/20130114153451_change_schedule_invertal.rb +++ /dev/null @@ -1,25 +0,0 @@ -class ChangeScheduleInvertal < ActiveRecord::Migration - def up - if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL' - connection.execute(%q{ - ALTER TABLE projects - ALTER COLUMN polling_interval - TYPE integer USING CAST(polling_interval AS integer) - }) - else - change_column :projects, :polling_interval, :integer, null: true - end - end - - def down - if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL' - connection.execute(%q{ - ALTER TABLE projects - ALTER COLUMN polling_interval - TYPE integer USING CAST(polling_interval AS varchar) - }) - else - change_column :projects, :polling_interval, :string, null: true - end - end -end diff --git a/db/ci/migrate/20130129121754_add_public_flag_to_project.rb b/db/ci/migrate/20130129121754_add_public_flag_to_project.rb deleted file mode 100644 index 2bfe52f0df..0000000000 --- a/db/ci/migrate/20130129121754_add_public_flag_to_project.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddPublicFlagToProject < ActiveRecord::Migration - def change - add_column :projects, :public, :boolean, null: false, default: false - end -end diff --git a/db/ci/migrate/20130531112551_add_data_field_to_build.rb b/db/ci/migrate/20130531112551_add_data_field_to_build.rb deleted file mode 100644 index ff897bce44..0000000000 --- a/db/ci/migrate/20130531112551_add_data_field_to_build.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddDataFieldToBuild < ActiveRecord::Migration - def change - add_column :builds, :push_data, :text - end -end diff --git a/db/ci/migrate/20130531122131_remove_path_field_from_project.rb b/db/ci/migrate/20130531122131_remove_path_field_from_project.rb deleted file mode 100644 index 684c16470a..0000000000 --- a/db/ci/migrate/20130531122131_remove_path_field_from_project.rb +++ /dev/null @@ -1,8 +0,0 @@ -class RemovePathFieldFromProject < ActiveRecord::Migration - def up - remove_column :projects, :path - end - - def down - end -end diff --git a/db/ci/migrate/20130531125905_create_runners.rb b/db/ci/migrate/20130531125905_create_runners.rb deleted file mode 100644 index 2619394f51..0000000000 --- a/db/ci/migrate/20130531125905_create_runners.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateRunners < ActiveRecord::Migration - def change - create_table :runners do |t| - t.string :token - t.text :public_key - - t.timestamps - end - end -end diff --git a/db/ci/migrate/20130531133603_add_runner_id_to_build.rb b/db/ci/migrate/20130531133603_add_runner_id_to_build.rb deleted file mode 100644 index bccc097083..0000000000 --- a/db/ci/migrate/20130531133603_add_runner_id_to_build.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddRunnerIdToBuild < ActiveRecord::Migration - def change - add_column :builds, :runner_id, :integer - end -end diff --git a/db/ci/migrate/20130603130920_remove_users_table.rb b/db/ci/migrate/20130603130920_remove_users_table.rb deleted file mode 100644 index 6948ef265e..0000000000 --- a/db/ci/migrate/20130603130920_remove_users_table.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RemoveUsersTable < ActiveRecord::Migration - def up - drop_table :users - end -end diff --git a/db/ci/migrate/20130603144030_add_more_fields_to_project.rb b/db/ci/migrate/20130603144030_add_more_fields_to_project.rb deleted file mode 100644 index 0897682285..0000000000 --- a/db/ci/migrate/20130603144030_add_more_fields_to_project.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddMoreFieldsToProject < ActiveRecord::Migration - def change - add_column :projects, :ssh_url_to_repo, :string - end -end diff --git a/db/ci/migrate/20130603144959_create_runner_projects.rb b/db/ci/migrate/20130603144959_create_runner_projects.rb deleted file mode 100644 index c65c8a51bc..0000000000 --- a/db/ci/migrate/20130603144959_create_runner_projects.rb +++ /dev/null @@ -1,10 +0,0 @@ -class CreateRunnerProjects < ActiveRecord::Migration - def change - create_table :runner_projects do |t| - t.integer :runner_id, null: false - t.integer :project_id, null: false - - t.timestamps - end - end -end diff --git a/db/ci/migrate/20130603161449_add_project_gitlab_id_to_project.rb b/db/ci/migrate/20130603161449_add_project_gitlab_id_to_project.rb deleted file mode 100644 index 3efdbb7af1..0000000000 --- a/db/ci/migrate/20130603161449_add_project_gitlab_id_to_project.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddProjectGitlabIdToProject < ActiveRecord::Migration - def change - add_column :projects, :gitlab_id, :integer - end -end diff --git a/db/ci/migrate/20130628142321_add_index_project_id_to_builds.rb b/db/ci/migrate/20130628142321_add_index_project_id_to_builds.rb deleted file mode 100644 index 5f968b06b5..0000000000 --- a/db/ci/migrate/20130628142321_add_index_project_id_to_builds.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddIndexProjectIdToBuilds < ActiveRecord::Migration - def change - add_index :builds, :project_id - end -end diff --git a/db/ci/migrate/20130705171042_add_description_to_runner.rb b/db/ci/migrate/20130705171042_add_description_to_runner.rb deleted file mode 100644 index 1e04e98d10..0000000000 --- a/db/ci/migrate/20130705171042_add_description_to_runner.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddDescriptionToRunner < ActiveRecord::Migration - def change - add_column :runners, :description, :string - end -end diff --git a/db/ci/migrate/20130710164015_add_db_index.rb b/db/ci/migrate/20130710164015_add_db_index.rb deleted file mode 100644 index 4907fae888..0000000000 --- a/db/ci/migrate/20130710164015_add_db_index.rb +++ /dev/null @@ -1,7 +0,0 @@ -class AddDbIndex < ActiveRecord::Migration - def change - add_index :builds, :runner_id - add_index :runner_projects, :runner_id - add_index :runner_projects, :project_id - end -end diff --git a/db/ci/migrate/20130816201200_change_push_data_limit.rb b/db/ci/migrate/20130816201200_change_push_data_limit.rb deleted file mode 100644 index 29bd45c2cf..0000000000 --- a/db/ci/migrate/20130816201200_change_push_data_limit.rb +++ /dev/null @@ -1,5 +0,0 @@ -class ChangePushDataLimit < ActiveRecord::Migration - def change - change_column :builds, :push_data, :text, :limit => 16777215 - end -end diff --git a/db/ci/migrate/20130906175737_add_sessions_table.rb b/db/ci/migrate/20130906175737_add_sessions_table.rb deleted file mode 100644 index 4c879564a5..0000000000 --- a/db/ci/migrate/20130906175737_add_sessions_table.rb +++ /dev/null @@ -1,12 +0,0 @@ -class AddSessionsTable < ActiveRecord::Migration - def change - create_table :sessions do |t| - t.string :session_id, :null => false - t.text :data - t.timestamps - end - - add_index :sessions, :session_id - add_index :sessions, :updated_at - end -end diff --git a/db/ci/migrate/20131023103430_add_allow_git_fetch_to_project.rb b/db/ci/migrate/20131023103430_add_allow_git_fetch_to_project.rb deleted file mode 100644 index 900ea91372..0000000000 --- a/db/ci/migrate/20131023103430_add_allow_git_fetch_to_project.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddAllowGitFetchToProject < ActiveRecord::Migration - def change - add_column :projects, :allow_git_fetch, :boolean, default: true, null: false - end -end diff --git a/db/ci/migrate/20131120155545_add_email_notification_fields_to_project.rb b/db/ci/migrate/20131120155545_add_email_notification_fields_to_project.rb deleted file mode 100644 index e0f4943d40..0000000000 --- a/db/ci/migrate/20131120155545_add_email_notification_fields_to_project.rb +++ /dev/null @@ -1,7 +0,0 @@ -class AddEmailNotificationFieldsToProject < ActiveRecord::Migration - def change - add_column :projects, :email_recipients, :string, default: '', null: false - add_column :projects, :email_add_committer, :boolean, default: true, null: false - add_column :projects, :email_all_broken_builds, :boolean, default: true, null: false - end -end diff --git a/db/ci/migrate/20140130121538_rename_project_fields.rb b/db/ci/migrate/20140130121538_rename_project_fields.rb deleted file mode 100644 index 3d7d3e8167..0000000000 --- a/db/ci/migrate/20140130121538_rename_project_fields.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RenameProjectFields < ActiveRecord::Migration - def change - rename_column :projects, :email_all_broken_builds, :email_only_broken_builds - end -end diff --git a/db/ci/migrate/20140222210357_create_web_hook.rb b/db/ci/migrate/20140222210357_create_web_hook.rb deleted file mode 100644 index 743ad81690..0000000000 --- a/db/ci/migrate/20140222210357_create_web_hook.rb +++ /dev/null @@ -1,9 +0,0 @@ -class CreateWebHook < ActiveRecord::Migration - def change - create_table :web_hooks do |t| - t.string :url, null: false - t.integer :project_id, null: false - t.timestamps - end - end -end diff --git a/db/ci/migrate/20140506091853_remove_public_key_from_runner.rb b/db/ci/migrate/20140506091853_remove_public_key_from_runner.rb deleted file mode 100644 index 3bf9f036ae..0000000000 --- a/db/ci/migrate/20140506091853_remove_public_key_from_runner.rb +++ /dev/null @@ -1,5 +0,0 @@ -class RemovePublicKeyFromRunner < ActiveRecord::Migration - def change - remove_column :runners, :public_key - end -end diff --git a/db/ci/migrate/20140823225019_create_commits_from_builds.rb b/db/ci/migrate/20140823225019_create_commits_from_builds.rb deleted file mode 100644 index 15f84b1151..0000000000 --- a/db/ci/migrate/20140823225019_create_commits_from_builds.rb +++ /dev/null @@ -1,22 +0,0 @@ -class CreateCommitsFromBuilds < ActiveRecord::Migration - def change - create_table :commits do |t| - t.integer :project_id - t.string :ref, nil: false - t.string :sha, nil: false - t.string :before_sha, nil: false - t.text :push_data, nil: false - - t.timestamps - end - - add_column :builds, :commit_id, :integer - - # Remove commit data from builds - #remove_column :builds, :project_id, :integer - #remove_column :builds, :ref, :string - #remove_column :builds, :sha, :string - #remove_column :builds, :before_sha, :string - #remove_column :builds, :push_data, :text - end -end diff --git a/db/ci/migrate/20140909142245_add_skip_refs_to_projects.rb b/db/ci/migrate/20140909142245_add_skip_refs_to_projects.rb deleted file mode 100644 index 2d7b1a223e..0000000000 --- a/db/ci/migrate/20140909142245_add_skip_refs_to_projects.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddSkipRefsToProjects < ActiveRecord::Migration - def change - add_column :projects, :skip_refs, :string - end -end diff --git a/db/ci/migrate/20141001125939_add_coverage_parser.rb b/db/ci/migrate/20141001125939_add_coverage_parser.rb deleted file mode 100644 index 7ea7d6047a..0000000000 --- a/db/ci/migrate/20141001125939_add_coverage_parser.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddCoverageParser < ActiveRecord::Migration - def change - add_column :projects, :coverage_regex, :string - end -end diff --git a/db/ci/migrate/20141001132129_add_coverage_to_build.rb b/db/ci/migrate/20141001132129_add_coverage_to_build.rb deleted file mode 100644 index 442a3dd28c..0000000000 --- a/db/ci/migrate/20141001132129_add_coverage_to_build.rb +++ /dev/null @@ -1,5 +0,0 @@ -class AddCoverageToBuild < ActiveRecord::Migration - def change - add_column :builds, :coverage, :float - end -end diff --git a/db/ci/migrate/20141028162820_add_sha_index_to_build.rb b/db/ci/migrate/20141028162820_add_sha_index_to_build.rb deleted file mode 100644 index bd2a4de565..0000000000 --- a/db/ci/migrate/20141028162820_add_sha_index_to_build.rb +++ /dev/null @@ -1,6 +0,0 @@ -class AddShaIndexToBuild < ActiveRecord::Migration - def change - add_index :builds, :sha - add_index :builds, [:project_id, :sha] - end -end diff --git a/db/ci/migrate/20141031114419_migrate_build_to_commits.rb b/db/ci/migrate/20141031114419_migrate_build_to_commits.rb deleted file mode 100644 index dc90ec6d15..0000000000 --- a/db/ci/migrate/20141031114419_migrate_build_to_commits.rb +++ /dev/null @@ -1,21 +0,0 @@ -class MigrateBuildToCommits < ActiveRecord::Migration - def change - execute < Date: Fri, 11 Sep 2015 14:43:51 +0200 Subject: [PATCH 34/36] Remove kaminari views moved from CI --- app/views/ci/kaminari/_first_page.html.haml | 2 -- app/views/ci/kaminari/_gap.html.haml | 2 -- app/views/ci/kaminari/_last_page.html.haml | 2 -- app/views/ci/kaminari/_next_page.html.haml | 2 -- app/views/ci/kaminari/_page.html.haml | 2 -- app/views/ci/kaminari/_paginator.html.haml | 11 ----------- app/views/ci/kaminari/_prev_page.html.haml | 2 -- 7 files changed, 23 deletions(-) delete mode 100644 app/views/ci/kaminari/_first_page.html.haml delete mode 100644 app/views/ci/kaminari/_gap.html.haml delete mode 100644 app/views/ci/kaminari/_last_page.html.haml delete mode 100644 app/views/ci/kaminari/_next_page.html.haml delete mode 100644 app/views/ci/kaminari/_page.html.haml delete mode 100644 app/views/ci/kaminari/_paginator.html.haml delete mode 100644 app/views/ci/kaminari/_prev_page.html.haml diff --git a/app/views/ci/kaminari/_first_page.html.haml b/app/views/ci/kaminari/_first_page.html.haml deleted file mode 100644 index a1bbf18690..0000000000 --- a/app/views/ci/kaminari/_first_page.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%li - = link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote diff --git a/app/views/ci/kaminari/_gap.html.haml b/app/views/ci/kaminari/_gap.html.haml deleted file mode 100644 index dfe33aac21..0000000000 --- a/app/views/ci/kaminari/_gap.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%li.disabled - = link_to raw(t 'views.pagination.truncate'), '#' diff --git a/app/views/ci/kaminari/_last_page.html.haml b/app/views/ci/kaminari/_last_page.html.haml deleted file mode 100644 index e70697d04a..0000000000 --- a/app/views/ci/kaminari/_last_page.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%li - = link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} diff --git a/app/views/ci/kaminari/_next_page.html.haml b/app/views/ci/kaminari/_next_page.html.haml deleted file mode 100644 index ea9af4539e..0000000000 --- a/app/views/ci/kaminari/_next_page.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%li - = link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote diff --git a/app/views/ci/kaminari/_page.html.haml b/app/views/ci/kaminari/_page.html.haml deleted file mode 100644 index 9df7ce02f8..0000000000 --- a/app/views/ci/kaminari/_page.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%li{class: "#{'active' if page.current?}"} - = link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} diff --git a/app/views/ci/kaminari/_paginator.html.haml b/app/views/ci/kaminari/_paginator.html.haml deleted file mode 100644 index 07fdb1e08a..0000000000 --- a/app/views/ci/kaminari/_paginator.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -= paginator.render do - %ul.pagination - = first_page_tag unless current_page.first? - = prev_page_tag unless current_page.first? - - each_page do |page| - - if page.left_outer? || page.right_outer? || page.inside_window? - = page_tag page - - elsif !page.was_truncated? - = gap_tag - = next_page_tag unless current_page.last? - = last_page_tag unless current_page.last? diff --git a/app/views/ci/kaminari/_prev_page.html.haml b/app/views/ci/kaminari/_prev_page.html.haml deleted file mode 100644 index dab3b318da..0000000000 --- a/app/views/ci/kaminari/_prev_page.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -%li - = link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote From 2b683807b52d4b7d156da31ed9e1f8aa20c248d9 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 11 Sep 2015 19:25:53 +0200 Subject: [PATCH 35/36] Use GitLab UI when render CI --- .../javascripts/ci/application.js.coffee | 10 - app/assets/stylesheets/application.scss | 6 + app/assets/stylesheets/ci/application.scss | 59 - app/assets/stylesheets/ci/builds.scss | 70 + app/assets/stylesheets/ci/lint.scss | 10 + app/assets/stylesheets/ci/projects.scss | 50 + app/assets/stylesheets/ci/runners.scss | 36 + .../stylesheets/ci/sections/builds.scss | 62 - app/assets/stylesheets/ci/sections/lint.scss | 8 - app/assets/stylesheets/ci/sections/login.scss | 13 - .../stylesheets/ci/sections/navbar.scss | 54 - .../stylesheets/ci/sections/projects.scss | 61 - .../stylesheets/ci/sections/runners.scss | 34 - app/assets/stylesheets/ci/sections/setup.scss | 11 - app/assets/stylesheets/ci/xterm.scss | 1796 +++++++++-------- app/controllers/ci/builds_controller.rb | 1 + app/controllers/ci/commits_controller.rb | 1 + app/views/ci/builds/show.html.haml | 2 +- app/views/ci/commits/show.html.haml | 4 +- app/views/ci/projects/show.html.haml | 5 +- app/views/layouts/ci/_head.html.haml | 11 - app/views/layouts/ci/_nav.html.haml | 32 - app/views/layouts/ci/_nav_admin.html.haml | 11 +- app/views/layouts/ci/_nav_dashboard.html.haml | 24 + app/views/layouts/ci/_nav_project.html.haml | 34 +- app/views/layouts/ci/_page.html.haml | 26 + app/views/layouts/ci/admin.html.haml | 23 +- app/views/layouts/ci/application.html.haml | 19 +- app/views/layouts/ci/empty.html.haml | 14 - app/views/layouts/ci/project.html.haml | 32 +- 30 files changed, 1182 insertions(+), 1337 deletions(-) delete mode 100644 app/assets/stylesheets/ci/application.scss create mode 100644 app/assets/stylesheets/ci/builds.scss create mode 100644 app/assets/stylesheets/ci/lint.scss create mode 100644 app/assets/stylesheets/ci/projects.scss create mode 100644 app/assets/stylesheets/ci/runners.scss delete mode 100644 app/assets/stylesheets/ci/sections/builds.scss delete mode 100644 app/assets/stylesheets/ci/sections/lint.scss delete mode 100644 app/assets/stylesheets/ci/sections/login.scss delete mode 100644 app/assets/stylesheets/ci/sections/navbar.scss delete mode 100644 app/assets/stylesheets/ci/sections/projects.scss delete mode 100644 app/assets/stylesheets/ci/sections/runners.scss delete mode 100644 app/assets/stylesheets/ci/sections/setup.scss delete mode 100644 app/views/layouts/ci/_head.html.haml delete mode 100644 app/views/layouts/ci/_nav.html.haml create mode 100644 app/views/layouts/ci/_nav_dashboard.html.haml create mode 100644 app/views/layouts/ci/_page.html.haml delete mode 100644 app/views/layouts/ci/empty.html.haml diff --git a/app/assets/javascripts/ci/application.js.coffee b/app/assets/javascripts/ci/application.js.coffee index c2f7bfe977..05aa0f366b 100644 --- a/app/assets/javascripts/ci/application.js.coffee +++ b/app/assets/javascripts/ci/application.js.coffee @@ -10,20 +10,10 @@ # WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD # GO AFTER THE REQUIRES BELOW. # -#= require jquery -#= require bootstrap -#= require jquery_ujs -#= require turbolinks -#= require jquery.turbolinks -#= require jquery.endless-scroll #= require pager -#= require nprogress -#= require nprogress-turbolinks #= require jquery_nested_form #= require_tree . # -# - $(document).on 'click', '.edit-runner-link', (event) -> event.preventDefault() diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 46f7feddf8..d9ede63794 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -61,3 +61,9 @@ * Styles for JS behaviors. */ @import "behaviors.scss"; + +/** + * CI specific styles: + */ +@import "ci/**/*"; + diff --git a/app/assets/stylesheets/ci/application.scss b/app/assets/stylesheets/ci/application.scss deleted file mode 100644 index 2f2928f705..0000000000 --- a/app/assets/stylesheets/ci/application.scss +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - */ - -@import "../base/fonts"; -@import "../base/variables"; -@import "../base/mixins"; -@import "../base/layout"; -@import "../base/gl_variables"; -@import "../base/gl_bootstrap"; - -/** - * Customized Twitter bootstrap - */ -@import '../base/gl_variables'; -@import '../base/gl_bootstrap'; - - -/** - * Font icons - * - */ -@import "font-awesome"; - -/** - * Generic css (forms, nav etc): - */ -@import "../generic/**/*"; - -/** - * Page specific styles (issues, projects etc): - */ - -@import "xterm"; -@import "sections/*"; - -/* - * NProgress - */ -$nprogress-color: #9BC; -@import 'nprogress'; -@import 'nprogress-bootstrap'; - -body { - padding-top: 0 !important; - - a { - color: #3084bb; - } -} diff --git a/app/assets/stylesheets/ci/builds.scss b/app/assets/stylesheets/ci/builds.scss new file mode 100644 index 0000000000..a11a935b54 --- /dev/null +++ b/app/assets/stylesheets/ci/builds.scss @@ -0,0 +1,70 @@ +.ci-body { + pre.trace { + background: #111111; + color: #fff; + font-family: $monospace_font; + white-space: pre; + white-space: pre-wrap; /* css-3 */ + white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* Internet Explorer 5.5+ */ + overflow: auto; + overflow-y: hidden; + font-size: 12px; + + .fa-refresh { + font-size: 24px; + margin-left: 20px; + } + } + + .autoscroll-container { + position: fixed; + bottom: 10px; + right: 20px; + z-index: 100; + } + + .scroll-controls { + position: fixed; + bottom: 10px; + left: 250px; + z-index: 100; + + a { + display: block; + margin-bottom: 5px; + } + } + + .page-sidebar-collapsed { + .scroll-controls { + left: 70px; + } + } + + .build-widget { + padding: 10px; + background: $background-color; + margin-bottom: 20px; + border-radius: 4px; + + .title { + margin-top: 0; + color: #666; + line-height: 1.5; + } + .attr-name { + color: #777; + } + } + + .alert-disabled { + background: $background-color; + + a { + color: #3084bb !important; + } + } +} diff --git a/app/assets/stylesheets/ci/lint.scss b/app/assets/stylesheets/ci/lint.scss new file mode 100644 index 0000000000..6d2bd33b28 --- /dev/null +++ b/app/assets/stylesheets/ci/lint.scss @@ -0,0 +1,10 @@ +.ci-body { + .incorrect-syntax{ + font-size: 19px; + color: red; + } + .correct-syntax{ + font-size: 19px; + color: #47a447; + } +} diff --git a/app/assets/stylesheets/ci/projects.scss b/app/assets/stylesheets/ci/projects.scss new file mode 100644 index 0000000000..167df54453 --- /dev/null +++ b/app/assets/stylesheets/ci/projects.scss @@ -0,0 +1,50 @@ +.ci-body { + .project-title { + margin: 0; + color: #444; + font-size: 20px; + line-height: 1.5; + } + + .builds { + @extend .table; + + .build { + &.alert{ + margin-bottom: 6px; + } + } + } + + .projects-table { + td { + vertical-align: middle !important; + } + } + + .commit-info { + font-size: 14px; + + .attr-name { + font-weight: 300; + color: #666; + margin-right: 5px; + } + + pre.commit-message { + font-size: 14px; + background: none; + padding: 0; + margin: 0; + border: none; + margin: 20px 0; + border-bottom: 1px solid #EEE; + padding-bottom: 20px; + border-radius: 0; + } + } + + .loading{ + font-size: 20px; + } +} diff --git a/app/assets/stylesheets/ci/runners.scss b/app/assets/stylesheets/ci/runners.scss new file mode 100644 index 0000000000..2b15ab8312 --- /dev/null +++ b/app/assets/stylesheets/ci/runners.scss @@ -0,0 +1,36 @@ +.ci-body { + .runner-state { + padding: 6px 12px; + margin-right: 10px; + color: #FFF; + + &.runner-state-shared { + background: #32b186; + } + &.runner-state-specific { + background: #3498db; + } + } + + .runner-status-online { + color: green; + } + + .runner-status-offline { + color: gray; + } + + .runner-status-paused { + color: red; + } + + .runner { + .btn { + padding: 1px 6px; + } + + h4 { + font-weight: normal; + } + } +} diff --git a/app/assets/stylesheets/ci/sections/builds.scss b/app/assets/stylesheets/ci/sections/builds.scss deleted file mode 100644 index 600919635d..0000000000 --- a/app/assets/stylesheets/ci/sections/builds.scss +++ /dev/null @@ -1,62 +0,0 @@ -pre.trace { - background: #111111; - color: #fff; - font-family: $monospace_font; - white-space: pre; - white-space: pre-wrap; /* css-3 */ - white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - word-wrap: break-word; /* Internet Explorer 5.5+ */ - overflow: auto; - overflow-y: hidden; - font-size: 12px; - - .fa-refresh { - font-size: 24px; - margin-left: 20px; - } -} - -.autoscroll-container { - position: fixed; - bottom: 10px; - right: 20px; - z-index: 100; -} - -.scroll-controls { - position: fixed; - bottom: 10px; - left: 20px; - z-index: 100; - - a { - display: block; - margin-bottom: 5px; - } -} - -.build-widget { - padding: 10px; - background: #f4f4f4; - margin-bottom: 20px; - border-radius: 4px; - - .title { - margin-top: 0; - color: #666; - line-height: 1.5; - } - .attr-name { - color: #777; - } -} - -.alert-disabled { - background: #EEE; - - a { - color: #3084bb !important; - } -} diff --git a/app/assets/stylesheets/ci/sections/lint.scss b/app/assets/stylesheets/ci/sections/lint.scss deleted file mode 100644 index 7191b5d47a..0000000000 --- a/app/assets/stylesheets/ci/sections/lint.scss +++ /dev/null @@ -1,8 +0,0 @@ -.incorrect-syntax{ - font-size: 19px; - color: red; -} -.correct-syntax{ - font-size: 19px; - color: #47a447; -} \ No newline at end of file diff --git a/app/assets/stylesheets/ci/sections/login.scss b/app/assets/stylesheets/ci/sections/login.scss deleted file mode 100644 index 47e453ec8d..0000000000 --- a/app/assets/stylesheets/ci/sections/login.scss +++ /dev/null @@ -1,13 +0,0 @@ -.login-block { - padding: 15px; - margin: 0 auto; - text-align: center; - - p { - font-size: 15px; - } - - .btn-login { - padding: 18px 32px; - } -} diff --git a/app/assets/stylesheets/ci/sections/navbar.scss b/app/assets/stylesheets/ci/sections/navbar.scss deleted file mode 100644 index 80d93087e6..0000000000 --- a/app/assets/stylesheets/ci/sections/navbar.scss +++ /dev/null @@ -1,54 +0,0 @@ -.navbar-static-top { - margin-bottom: 20px; -} - -.navbar-ci { - background: #224466; - - .navbar-brand { - color: #fff; - - &:hover { - color: #fff; - } - } - .brand, - .nav > li > a { - color: #fff; - - &:hover, &:focus, &:active { - background: none; - } - } - - .profile-holder { - position: relative; - - img { - position: absolute; - top: -8px; - width: 32px; - @include border-radius(32px); - } - - span { - margin-left: 42px; - } - } - - .btn-login { - padding: 7px 22px; - margin-top: 7px; - &:hover, &:active, &:focus { - background: #018865 !important; - } - } -} - -.turbolink-spinner { - position: absolute; - top: 11px; - left: 50%; - color: #FFF; - font-size: 20px; -} diff --git a/app/assets/stylesheets/ci/sections/projects.scss b/app/assets/stylesheets/ci/sections/projects.scss deleted file mode 100644 index 84ee1399bf..0000000000 --- a/app/assets/stylesheets/ci/sections/projects.scss +++ /dev/null @@ -1,61 +0,0 @@ -.project-title { - margin: 0; - color: #444; - font-size: 20px; - line-height: 1.5; -} - -.builds { - @extend .table; - - .build { - &.alert{ - margin-bottom: 6px; - } - } -} - -.projects-table { - td { - vertical-align: middle !important; - } -} - -.commit-info { - font-size: 14px; - - .attr-name { - font-weight: 300; - color: #666; - margin-right: 5px; - } - - pre.commit-message { - font-size: 14px; - background: none; - padding: 0; - margin: 0; - border: none; - margin: 20px 0; - border-bottom: 1px solid #EEE; - padding-bottom: 20px; - border-radius: 0; - } -} - -.search{ - width: 300px; - - .search-input{ - height: 35px; - } - - form{ - margin-top: 0; - margin-bottom: 0; - } -} - -.loading{ - font-size: 20px; -} diff --git a/app/assets/stylesheets/ci/sections/runners.scss b/app/assets/stylesheets/ci/sections/runners.scss deleted file mode 100644 index a9111a7388..0000000000 --- a/app/assets/stylesheets/ci/sections/runners.scss +++ /dev/null @@ -1,34 +0,0 @@ -.runner-state { - padding: 6px 12px; - margin-right: 10px; - color: #FFF; - - &.runner-state-shared { - background: #32b186; - } - &.runner-state-specific { - background: #3498db; - } -} - -.runner-status-online { - color: green; -} - -.runner-status-offline { - color: gray; -} - -.runner-status-paused { - color: red; -} - -.runner { - .btn { - padding: 1px 6px; - } - - h4 { - font-weight: normal; - } -} diff --git a/app/assets/stylesheets/ci/sections/setup.scss b/app/assets/stylesheets/ci/sections/setup.scss deleted file mode 100644 index 242614616d..0000000000 --- a/app/assets/stylesheets/ci/sections/setup.scss +++ /dev/null @@ -1,11 +0,0 @@ -.welcome-block { - margin-top: 50px; - color: #555; - font-size: 16px; - line-height: 1.5; - - h1, h2, h3 { - font-weight: bold; - margin-bottom: 20px; - } -} diff --git a/app/assets/stylesheets/ci/xterm.scss b/app/assets/stylesheets/ci/xterm.scss index 460a6bb202..532dede0b2 100644 --- a/app/assets/stylesheets/ci/xterm.scss +++ b/app/assets/stylesheets/ci/xterm.scss @@ -1,904 +1,906 @@ -// color codes are based on http://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg -// see also: https://gist.github.com/jasonm23/2868981 +.ci-body { + // color codes are based on http://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg + // see also: https://gist.github.com/jasonm23/2868981 -$black: #000000; -$red: #cd0000; -$green: #00cd00; -$yellow: #cdcd00; -$blue: #0000ee; // according to wikipedia, this is the xterm standard -//$blue: #1e90ff; // this is used by all the terminals I tried (when configured with the xterm color profile) -$magenta: #cd00cd; -$cyan: #00cdcd; -$white: #e5e5e5; -$l-black: #7f7f7f; -$l-red: #ff0000; -$l-green: #00ff00; -$l-yellow: #ffff00; -$l-blue: #5c5cff; -$l-magenta: #ff00ff; -$l-cyan: #00ffff; -$l-white: #ffffff; + $black: #000000; + $red: #cd0000; + $green: #00cd00; + $yellow: #cdcd00; + $blue: #0000ee; // according to wikipedia, this is the xterm standard + //$blue: #1e90ff; // this is used by all the terminals I tried (when configured with the xterm color profile) + $magenta: #cd00cd; + $cyan: #00cdcd; + $white: #e5e5e5; + $l-black: #7f7f7f; + $l-red: #ff0000; + $l-green: #00ff00; + $l-yellow: #ffff00; + $l-blue: #5c5cff; + $l-magenta: #ff00ff; + $l-cyan: #00ffff; + $l-white: #ffffff; -.term-bold { - font-weight: bold; -} -.term-italic { - font-style: italic; -} -.term-conceal { - visibility: hidden; -} -.term-underline { - text-decoration: underline; -} -.term-cross { - text-decoration: line-through; -} + .term-bold { + font-weight: bold; + } + .term-italic { + font-style: italic; + } + .term-conceal { + visibility: hidden; + } + .term-underline { + text-decoration: underline; + } + .term-cross { + text-decoration: line-through; + } -.term-fg-black { - color: $black; -} -.term-fg-red { - color: $red; -} -.term-fg-green { - color: $green; -} -.term-fg-yellow { - color: $yellow; -} -.term-fg-blue { - color: $blue; -} -.term-fg-magenta { - color: $magenta; -} -.term-fg-cyan { - color: $cyan; -} -.term-fg-white { - color: $white; -} -.term-fg-l-black { - color: $l-black; -} -.term-fg-l-red { - color: $l-red; -} -.term-fg-l-green { - color: $l-green; -} -.term-fg-l-yellow { - color: $l-yellow; -} -.term-fg-l-blue { - color: $l-blue; -} -.term-fg-l-magenta { - color: $l-magenta; -} -.term-fg-l-cyan { - color: $l-cyan; -} -.term-fg-l-white { - color: $l-white; -} + .term-fg-black { + color: $black; + } + .term-fg-red { + color: $red; + } + .term-fg-green { + color: $green; + } + .term-fg-yellow { + color: $yellow; + } + .term-fg-blue { + color: $blue; + } + .term-fg-magenta { + color: $magenta; + } + .term-fg-cyan { + color: $cyan; + } + .term-fg-white { + color: $white; + } + .term-fg-l-black { + color: $l-black; + } + .term-fg-l-red { + color: $l-red; + } + .term-fg-l-green { + color: $l-green; + } + .term-fg-l-yellow { + color: $l-yellow; + } + .term-fg-l-blue { + color: $l-blue; + } + .term-fg-l-magenta { + color: $l-magenta; + } + .term-fg-l-cyan { + color: $l-cyan; + } + .term-fg-l-white { + color: $l-white; + } -.term-bg-black { - background-color: $black; -} -.term-bg-red { - background-color: $red; -} -.term-bg-green { - background-color: $green; -} -.term-bg-yellow { - background-color: $yellow; -} -.term-bg-blue { - background-color: $blue; -} -.term-bg-magenta { - background-color: $magenta; -} -.term-bg-cyan { - background-color: $cyan; -} -.term-bg-white { - background-color: $white; -} -.term-bg-l-black { - background-color: $l-black; -} -.term-bg-l-red { - background-color: $l-red; -} -.term-bg-l-green { - background-color: $l-green; -} -.term-bg-l-yellow { - background-color: $l-yellow; -} -.term-bg-l-blue { - background-color: $l-blue; -} -.term-bg-l-magenta { - background-color: $l-magenta; -} -.term-bg-l-cyan { - background-color: $l-cyan; -} -.term-bg-l-white { - background-color: $l-white; -} + .term-bg-black { + background-color: $black; + } + .term-bg-red { + background-color: $red; + } + .term-bg-green { + background-color: $green; + } + .term-bg-yellow { + background-color: $yellow; + } + .term-bg-blue { + background-color: $blue; + } + .term-bg-magenta { + background-color: $magenta; + } + .term-bg-cyan { + background-color: $cyan; + } + .term-bg-white { + background-color: $white; + } + .term-bg-l-black { + background-color: $l-black; + } + .term-bg-l-red { + background-color: $l-red; + } + .term-bg-l-green { + background-color: $l-green; + } + .term-bg-l-yellow { + background-color: $l-yellow; + } + .term-bg-l-blue { + background-color: $l-blue; + } + .term-bg-l-magenta { + background-color: $l-magenta; + } + .term-bg-l-cyan { + background-color: $l-cyan; + } + .term-bg-l-white { + background-color: $l-white; + } -.xterm-fg-0 { - color: #000000; -} -.xterm-fg-1 { - color: #800000; -} -.xterm-fg-2 { - color: #008000; -} -.xterm-fg-3 { - color: #808000; -} -.xterm-fg-4 { - color: #000080; -} -.xterm-fg-5 { - color: #800080; -} -.xterm-fg-6 { - color: #008080; -} -.xterm-fg-7 { - color: #c0c0c0; -} -.xterm-fg-8 { - color: #808080; -} -.xterm-fg-9 { - color: #ff0000; -} -.xterm-fg-10 { - color: #00ff00; -} -.xterm-fg-11 { - color: #ffff00; -} -.xterm-fg-12 { - color: #0000ff; -} -.xterm-fg-13 { - color: #ff00ff; -} -.xterm-fg-14 { - color: #00ffff; -} -.xterm-fg-15 { - color: #ffffff; -} -.xterm-fg-16 { - color: #000000; -} -.xterm-fg-17 { - color: #00005f; -} -.xterm-fg-18 { - color: #000087; -} -.xterm-fg-19 { - color: #0000af; -} -.xterm-fg-20 { - color: #0000d7; -} -.xterm-fg-21 { - color: #0000ff; -} -.xterm-fg-22 { - color: #005f00; -} -.xterm-fg-23 { - color: #005f5f; -} -.xterm-fg-24 { - color: #005f87; -} -.xterm-fg-25 { - color: #005faf; -} -.xterm-fg-26 { - color: #005fd7; -} -.xterm-fg-27 { - color: #005fff; -} -.xterm-fg-28 { - color: #008700; -} -.xterm-fg-29 { - color: #00875f; -} -.xterm-fg-30 { - color: #008787; -} -.xterm-fg-31 { - color: #0087af; -} -.xterm-fg-32 { - color: #0087d7; -} -.xterm-fg-33 { - color: #0087ff; -} -.xterm-fg-34 { - color: #00af00; -} -.xterm-fg-35 { - color: #00af5f; -} -.xterm-fg-36 { - color: #00af87; -} -.xterm-fg-37 { - color: #00afaf; -} -.xterm-fg-38 { - color: #00afd7; -} -.xterm-fg-39 { - color: #00afff; -} -.xterm-fg-40 { - color: #00d700; -} -.xterm-fg-41 { - color: #00d75f; -} -.xterm-fg-42 { - color: #00d787; -} -.xterm-fg-43 { - color: #00d7af; -} -.xterm-fg-44 { - color: #00d7d7; -} -.xterm-fg-45 { - color: #00d7ff; -} -.xterm-fg-46 { - color: #00ff00; -} -.xterm-fg-47 { - color: #00ff5f; -} -.xterm-fg-48 { - color: #00ff87; -} -.xterm-fg-49 { - color: #00ffaf; -} -.xterm-fg-50 { - color: #00ffd7; -} -.xterm-fg-51 { - color: #00ffff; -} -.xterm-fg-52 { - color: #5f0000; -} -.xterm-fg-53 { - color: #5f005f; -} -.xterm-fg-54 { - color: #5f0087; -} -.xterm-fg-55 { - color: #5f00af; -} -.xterm-fg-56 { - color: #5f00d7; -} -.xterm-fg-57 { - color: #5f00ff; -} -.xterm-fg-58 { - color: #5f5f00; -} -.xterm-fg-59 { - color: #5f5f5f; -} -.xterm-fg-60 { - color: #5f5f87; -} -.xterm-fg-61 { - color: #5f5faf; -} -.xterm-fg-62 { - color: #5f5fd7; -} -.xterm-fg-63 { - color: #5f5fff; -} -.xterm-fg-64 { - color: #5f8700; -} -.xterm-fg-65 { - color: #5f875f; -} -.xterm-fg-66 { - color: #5f8787; -} -.xterm-fg-67 { - color: #5f87af; -} -.xterm-fg-68 { - color: #5f87d7; -} -.xterm-fg-69 { - color: #5f87ff; -} -.xterm-fg-70 { - color: #5faf00; -} -.xterm-fg-71 { - color: #5faf5f; -} -.xterm-fg-72 { - color: #5faf87; -} -.xterm-fg-73 { - color: #5fafaf; -} -.xterm-fg-74 { - color: #5fafd7; -} -.xterm-fg-75 { - color: #5fafff; -} -.xterm-fg-76 { - color: #5fd700; -} -.xterm-fg-77 { - color: #5fd75f; -} -.xterm-fg-78 { - color: #5fd787; -} -.xterm-fg-79 { - color: #5fd7af; -} -.xterm-fg-80 { - color: #5fd7d7; -} -.xterm-fg-81 { - color: #5fd7ff; -} -.xterm-fg-82 { - color: #5fff00; -} -.xterm-fg-83 { - color: #5fff5f; -} -.xterm-fg-84 { - color: #5fff87; -} -.xterm-fg-85 { - color: #5fffaf; -} -.xterm-fg-86 { - color: #5fffd7; -} -.xterm-fg-87 { - color: #5fffff; -} -.xterm-fg-88 { - color: #870000; -} -.xterm-fg-89 { - color: #87005f; -} -.xterm-fg-90 { - color: #870087; -} -.xterm-fg-91 { - color: #8700af; -} -.xterm-fg-92 { - color: #8700d7; -} -.xterm-fg-93 { - color: #8700ff; -} -.xterm-fg-94 { - color: #875f00; -} -.xterm-fg-95 { - color: #875f5f; -} -.xterm-fg-96 { - color: #875f87; -} -.xterm-fg-97 { - color: #875faf; -} -.xterm-fg-98 { - color: #875fd7; -} -.xterm-fg-99 { - color: #875fff; -} -.xterm-fg-100 { - color: #878700; -} -.xterm-fg-101 { - color: #87875f; -} -.xterm-fg-102 { - color: #878787; -} -.xterm-fg-103 { - color: #8787af; -} -.xterm-fg-104 { - color: #8787d7; -} -.xterm-fg-105 { - color: #8787ff; -} -.xterm-fg-106 { - color: #87af00; -} -.xterm-fg-107 { - color: #87af5f; -} -.xterm-fg-108 { - color: #87af87; -} -.xterm-fg-109 { - color: #87afaf; -} -.xterm-fg-110 { - color: #87afd7; -} -.xterm-fg-111 { - color: #87afff; -} -.xterm-fg-112 { - color: #87d700; -} -.xterm-fg-113 { - color: #87d75f; -} -.xterm-fg-114 { - color: #87d787; -} -.xterm-fg-115 { - color: #87d7af; -} -.xterm-fg-116 { - color: #87d7d7; -} -.xterm-fg-117 { - color: #87d7ff; -} -.xterm-fg-118 { - color: #87ff00; -} -.xterm-fg-119 { - color: #87ff5f; -} -.xterm-fg-120 { - color: #87ff87; -} -.xterm-fg-121 { - color: #87ffaf; -} -.xterm-fg-122 { - color: #87ffd7; -} -.xterm-fg-123 { - color: #87ffff; -} -.xterm-fg-124 { - color: #af0000; -} -.xterm-fg-125 { - color: #af005f; -} -.xterm-fg-126 { - color: #af0087; -} -.xterm-fg-127 { - color: #af00af; -} -.xterm-fg-128 { - color: #af00d7; -} -.xterm-fg-129 { - color: #af00ff; -} -.xterm-fg-130 { - color: #af5f00; -} -.xterm-fg-131 { - color: #af5f5f; -} -.xterm-fg-132 { - color: #af5f87; -} -.xterm-fg-133 { - color: #af5faf; -} -.xterm-fg-134 { - color: #af5fd7; -} -.xterm-fg-135 { - color: #af5fff; -} -.xterm-fg-136 { - color: #af8700; -} -.xterm-fg-137 { - color: #af875f; -} -.xterm-fg-138 { - color: #af8787; -} -.xterm-fg-139 { - color: #af87af; -} -.xterm-fg-140 { - color: #af87d7; -} -.xterm-fg-141 { - color: #af87ff; -} -.xterm-fg-142 { - color: #afaf00; -} -.xterm-fg-143 { - color: #afaf5f; -} -.xterm-fg-144 { - color: #afaf87; -} -.xterm-fg-145 { - color: #afafaf; -} -.xterm-fg-146 { - color: #afafd7; -} -.xterm-fg-147 { - color: #afafff; -} -.xterm-fg-148 { - color: #afd700; -} -.xterm-fg-149 { - color: #afd75f; -} -.xterm-fg-150 { - color: #afd787; -} -.xterm-fg-151 { - color: #afd7af; -} -.xterm-fg-152 { - color: #afd7d7; -} -.xterm-fg-153 { - color: #afd7ff; -} -.xterm-fg-154 { - color: #afff00; -} -.xterm-fg-155 { - color: #afff5f; -} -.xterm-fg-156 { - color: #afff87; -} -.xterm-fg-157 { - color: #afffaf; -} -.xterm-fg-158 { - color: #afffd7; -} -.xterm-fg-159 { - color: #afffff; -} -.xterm-fg-160 { - color: #d70000; -} -.xterm-fg-161 { - color: #d7005f; -} -.xterm-fg-162 { - color: #d70087; -} -.xterm-fg-163 { - color: #d700af; -} -.xterm-fg-164 { - color: #d700d7; -} -.xterm-fg-165 { - color: #d700ff; -} -.xterm-fg-166 { - color: #d75f00; -} -.xterm-fg-167 { - color: #d75f5f; -} -.xterm-fg-168 { - color: #d75f87; -} -.xterm-fg-169 { - color: #d75faf; -} -.xterm-fg-170 { - color: #d75fd7; -} -.xterm-fg-171 { - color: #d75fff; -} -.xterm-fg-172 { - color: #d78700; -} -.xterm-fg-173 { - color: #d7875f; -} -.xterm-fg-174 { - color: #d78787; -} -.xterm-fg-175 { - color: #d787af; -} -.xterm-fg-176 { - color: #d787d7; -} -.xterm-fg-177 { - color: #d787ff; -} -.xterm-fg-178 { - color: #d7af00; -} -.xterm-fg-179 { - color: #d7af5f; -} -.xterm-fg-180 { - color: #d7af87; -} -.xterm-fg-181 { - color: #d7afaf; -} -.xterm-fg-182 { - color: #d7afd7; -} -.xterm-fg-183 { - color: #d7afff; -} -.xterm-fg-184 { - color: #d7d700; -} -.xterm-fg-185 { - color: #d7d75f; -} -.xterm-fg-186 { - color: #d7d787; -} -.xterm-fg-187 { - color: #d7d7af; -} -.xterm-fg-188 { - color: #d7d7d7; -} -.xterm-fg-189 { - color: #d7d7ff; -} -.xterm-fg-190 { - color: #d7ff00; -} -.xterm-fg-191 { - color: #d7ff5f; -} -.xterm-fg-192 { - color: #d7ff87; -} -.xterm-fg-193 { - color: #d7ffaf; -} -.xterm-fg-194 { - color: #d7ffd7; -} -.xterm-fg-195 { - color: #d7ffff; -} -.xterm-fg-196 { - color: #ff0000; -} -.xterm-fg-197 { - color: #ff005f; -} -.xterm-fg-198 { - color: #ff0087; -} -.xterm-fg-199 { - color: #ff00af; -} -.xterm-fg-200 { - color: #ff00d7; -} -.xterm-fg-201 { - color: #ff00ff; -} -.xterm-fg-202 { - color: #ff5f00; -} -.xterm-fg-203 { - color: #ff5f5f; -} -.xterm-fg-204 { - color: #ff5f87; -} -.xterm-fg-205 { - color: #ff5faf; -} -.xterm-fg-206 { - color: #ff5fd7; -} -.xterm-fg-207 { - color: #ff5fff; -} -.xterm-fg-208 { - color: #ff8700; -} -.xterm-fg-209 { - color: #ff875f; -} -.xterm-fg-210 { - color: #ff8787; -} -.xterm-fg-211 { - color: #ff87af; -} -.xterm-fg-212 { - color: #ff87d7; -} -.xterm-fg-213 { - color: #ff87ff; -} -.xterm-fg-214 { - color: #ffaf00; -} -.xterm-fg-215 { - color: #ffaf5f; -} -.xterm-fg-216 { - color: #ffaf87; -} -.xterm-fg-217 { - color: #ffafaf; -} -.xterm-fg-218 { - color: #ffafd7; -} -.xterm-fg-219 { - color: #ffafff; -} -.xterm-fg-220 { - color: #ffd700; -} -.xterm-fg-221 { - color: #ffd75f; -} -.xterm-fg-222 { - color: #ffd787; -} -.xterm-fg-223 { - color: #ffd7af; -} -.xterm-fg-224 { - color: #ffd7d7; -} -.xterm-fg-225 { - color: #ffd7ff; -} -.xterm-fg-226 { - color: #ffff00; -} -.xterm-fg-227 { - color: #ffff5f; -} -.xterm-fg-228 { - color: #ffff87; -} -.xterm-fg-229 { - color: #ffffaf; -} -.xterm-fg-230 { - color: #ffffd7; -} -.xterm-fg-231 { - color: #ffffff; -} -.xterm-fg-232 { - color: #080808; -} -.xterm-fg-233 { - color: #121212; -} -.xterm-fg-234 { - color: #1c1c1c; -} -.xterm-fg-235 { - color: #262626; -} -.xterm-fg-236 { - color: #303030; -} -.xterm-fg-237 { - color: #3a3a3a; -} -.xterm-fg-238 { - color: #444444; -} -.xterm-fg-239 { - color: #4e4e4e; -} -.xterm-fg-240 { - color: #585858; -} -.xterm-fg-241 { - color: #626262; -} -.xterm-fg-242 { - color: #6c6c6c; -} -.xterm-fg-243 { - color: #767676; -} -.xterm-fg-244 { - color: #808080; -} -.xterm-fg-245 { - color: #8a8a8a; -} -.xterm-fg-246 { - color: #949494; -} -.xterm-fg-247 { - color: #9e9e9e; -} -.xterm-fg-248 { - color: #a8a8a8; -} -.xterm-fg-249 { - color: #b2b2b2; -} -.xterm-fg-250 { - color: #bcbcbc; -} -.xterm-fg-251 { - color: #c6c6c6; -} -.xterm-fg-252 { - color: #d0d0d0; -} -.xterm-fg-253 { - color: #dadada; -} -.xterm-fg-254 { - color: #e4e4e4; -} -.xterm-fg-255 { - color: #eeeeee; + .xterm-fg-0 { + color: #000000; + } + .xterm-fg-1 { + color: #800000; + } + .xterm-fg-2 { + color: #008000; + } + .xterm-fg-3 { + color: #808000; + } + .xterm-fg-4 { + color: #000080; + } + .xterm-fg-5 { + color: #800080; + } + .xterm-fg-6 { + color: #008080; + } + .xterm-fg-7 { + color: #c0c0c0; + } + .xterm-fg-8 { + color: #808080; + } + .xterm-fg-9 { + color: #ff0000; + } + .xterm-fg-10 { + color: #00ff00; + } + .xterm-fg-11 { + color: #ffff00; + } + .xterm-fg-12 { + color: #0000ff; + } + .xterm-fg-13 { + color: #ff00ff; + } + .xterm-fg-14 { + color: #00ffff; + } + .xterm-fg-15 { + color: #ffffff; + } + .xterm-fg-16 { + color: #000000; + } + .xterm-fg-17 { + color: #00005f; + } + .xterm-fg-18 { + color: #000087; + } + .xterm-fg-19 { + color: #0000af; + } + .xterm-fg-20 { + color: #0000d7; + } + .xterm-fg-21 { + color: #0000ff; + } + .xterm-fg-22 { + color: #005f00; + } + .xterm-fg-23 { + color: #005f5f; + } + .xterm-fg-24 { + color: #005f87; + } + .xterm-fg-25 { + color: #005faf; + } + .xterm-fg-26 { + color: #005fd7; + } + .xterm-fg-27 { + color: #005fff; + } + .xterm-fg-28 { + color: #008700; + } + .xterm-fg-29 { + color: #00875f; + } + .xterm-fg-30 { + color: #008787; + } + .xterm-fg-31 { + color: #0087af; + } + .xterm-fg-32 { + color: #0087d7; + } + .xterm-fg-33 { + color: #0087ff; + } + .xterm-fg-34 { + color: #00af00; + } + .xterm-fg-35 { + color: #00af5f; + } + .xterm-fg-36 { + color: #00af87; + } + .xterm-fg-37 { + color: #00afaf; + } + .xterm-fg-38 { + color: #00afd7; + } + .xterm-fg-39 { + color: #00afff; + } + .xterm-fg-40 { + color: #00d700; + } + .xterm-fg-41 { + color: #00d75f; + } + .xterm-fg-42 { + color: #00d787; + } + .xterm-fg-43 { + color: #00d7af; + } + .xterm-fg-44 { + color: #00d7d7; + } + .xterm-fg-45 { + color: #00d7ff; + } + .xterm-fg-46 { + color: #00ff00; + } + .xterm-fg-47 { + color: #00ff5f; + } + .xterm-fg-48 { + color: #00ff87; + } + .xterm-fg-49 { + color: #00ffaf; + } + .xterm-fg-50 { + color: #00ffd7; + } + .xterm-fg-51 { + color: #00ffff; + } + .xterm-fg-52 { + color: #5f0000; + } + .xterm-fg-53 { + color: #5f005f; + } + .xterm-fg-54 { + color: #5f0087; + } + .xterm-fg-55 { + color: #5f00af; + } + .xterm-fg-56 { + color: #5f00d7; + } + .xterm-fg-57 { + color: #5f00ff; + } + .xterm-fg-58 { + color: #5f5f00; + } + .xterm-fg-59 { + color: #5f5f5f; + } + .xterm-fg-60 { + color: #5f5f87; + } + .xterm-fg-61 { + color: #5f5faf; + } + .xterm-fg-62 { + color: #5f5fd7; + } + .xterm-fg-63 { + color: #5f5fff; + } + .xterm-fg-64 { + color: #5f8700; + } + .xterm-fg-65 { + color: #5f875f; + } + .xterm-fg-66 { + color: #5f8787; + } + .xterm-fg-67 { + color: #5f87af; + } + .xterm-fg-68 { + color: #5f87d7; + } + .xterm-fg-69 { + color: #5f87ff; + } + .xterm-fg-70 { + color: #5faf00; + } + .xterm-fg-71 { + color: #5faf5f; + } + .xterm-fg-72 { + color: #5faf87; + } + .xterm-fg-73 { + color: #5fafaf; + } + .xterm-fg-74 { + color: #5fafd7; + } + .xterm-fg-75 { + color: #5fafff; + } + .xterm-fg-76 { + color: #5fd700; + } + .xterm-fg-77 { + color: #5fd75f; + } + .xterm-fg-78 { + color: #5fd787; + } + .xterm-fg-79 { + color: #5fd7af; + } + .xterm-fg-80 { + color: #5fd7d7; + } + .xterm-fg-81 { + color: #5fd7ff; + } + .xterm-fg-82 { + color: #5fff00; + } + .xterm-fg-83 { + color: #5fff5f; + } + .xterm-fg-84 { + color: #5fff87; + } + .xterm-fg-85 { + color: #5fffaf; + } + .xterm-fg-86 { + color: #5fffd7; + } + .xterm-fg-87 { + color: #5fffff; + } + .xterm-fg-88 { + color: #870000; + } + .xterm-fg-89 { + color: #87005f; + } + .xterm-fg-90 { + color: #870087; + } + .xterm-fg-91 { + color: #8700af; + } + .xterm-fg-92 { + color: #8700d7; + } + .xterm-fg-93 { + color: #8700ff; + } + .xterm-fg-94 { + color: #875f00; + } + .xterm-fg-95 { + color: #875f5f; + } + .xterm-fg-96 { + color: #875f87; + } + .xterm-fg-97 { + color: #875faf; + } + .xterm-fg-98 { + color: #875fd7; + } + .xterm-fg-99 { + color: #875fff; + } + .xterm-fg-100 { + color: #878700; + } + .xterm-fg-101 { + color: #87875f; + } + .xterm-fg-102 { + color: #878787; + } + .xterm-fg-103 { + color: #8787af; + } + .xterm-fg-104 { + color: #8787d7; + } + .xterm-fg-105 { + color: #8787ff; + } + .xterm-fg-106 { + color: #87af00; + } + .xterm-fg-107 { + color: #87af5f; + } + .xterm-fg-108 { + color: #87af87; + } + .xterm-fg-109 { + color: #87afaf; + } + .xterm-fg-110 { + color: #87afd7; + } + .xterm-fg-111 { + color: #87afff; + } + .xterm-fg-112 { + color: #87d700; + } + .xterm-fg-113 { + color: #87d75f; + } + .xterm-fg-114 { + color: #87d787; + } + .xterm-fg-115 { + color: #87d7af; + } + .xterm-fg-116 { + color: #87d7d7; + } + .xterm-fg-117 { + color: #87d7ff; + } + .xterm-fg-118 { + color: #87ff00; + } + .xterm-fg-119 { + color: #87ff5f; + } + .xterm-fg-120 { + color: #87ff87; + } + .xterm-fg-121 { + color: #87ffaf; + } + .xterm-fg-122 { + color: #87ffd7; + } + .xterm-fg-123 { + color: #87ffff; + } + .xterm-fg-124 { + color: #af0000; + } + .xterm-fg-125 { + color: #af005f; + } + .xterm-fg-126 { + color: #af0087; + } + .xterm-fg-127 { + color: #af00af; + } + .xterm-fg-128 { + color: #af00d7; + } + .xterm-fg-129 { + color: #af00ff; + } + .xterm-fg-130 { + color: #af5f00; + } + .xterm-fg-131 { + color: #af5f5f; + } + .xterm-fg-132 { + color: #af5f87; + } + .xterm-fg-133 { + color: #af5faf; + } + .xterm-fg-134 { + color: #af5fd7; + } + .xterm-fg-135 { + color: #af5fff; + } + .xterm-fg-136 { + color: #af8700; + } + .xterm-fg-137 { + color: #af875f; + } + .xterm-fg-138 { + color: #af8787; + } + .xterm-fg-139 { + color: #af87af; + } + .xterm-fg-140 { + color: #af87d7; + } + .xterm-fg-141 { + color: #af87ff; + } + .xterm-fg-142 { + color: #afaf00; + } + .xterm-fg-143 { + color: #afaf5f; + } + .xterm-fg-144 { + color: #afaf87; + } + .xterm-fg-145 { + color: #afafaf; + } + .xterm-fg-146 { + color: #afafd7; + } + .xterm-fg-147 { + color: #afafff; + } + .xterm-fg-148 { + color: #afd700; + } + .xterm-fg-149 { + color: #afd75f; + } + .xterm-fg-150 { + color: #afd787; + } + .xterm-fg-151 { + color: #afd7af; + } + .xterm-fg-152 { + color: #afd7d7; + } + .xterm-fg-153 { + color: #afd7ff; + } + .xterm-fg-154 { + color: #afff00; + } + .xterm-fg-155 { + color: #afff5f; + } + .xterm-fg-156 { + color: #afff87; + } + .xterm-fg-157 { + color: #afffaf; + } + .xterm-fg-158 { + color: #afffd7; + } + .xterm-fg-159 { + color: #afffff; + } + .xterm-fg-160 { + color: #d70000; + } + .xterm-fg-161 { + color: #d7005f; + } + .xterm-fg-162 { + color: #d70087; + } + .xterm-fg-163 { + color: #d700af; + } + .xterm-fg-164 { + color: #d700d7; + } + .xterm-fg-165 { + color: #d700ff; + } + .xterm-fg-166 { + color: #d75f00; + } + .xterm-fg-167 { + color: #d75f5f; + } + .xterm-fg-168 { + color: #d75f87; + } + .xterm-fg-169 { + color: #d75faf; + } + .xterm-fg-170 { + color: #d75fd7; + } + .xterm-fg-171 { + color: #d75fff; + } + .xterm-fg-172 { + color: #d78700; + } + .xterm-fg-173 { + color: #d7875f; + } + .xterm-fg-174 { + color: #d78787; + } + .xterm-fg-175 { + color: #d787af; + } + .xterm-fg-176 { + color: #d787d7; + } + .xterm-fg-177 { + color: #d787ff; + } + .xterm-fg-178 { + color: #d7af00; + } + .xterm-fg-179 { + color: #d7af5f; + } + .xterm-fg-180 { + color: #d7af87; + } + .xterm-fg-181 { + color: #d7afaf; + } + .xterm-fg-182 { + color: #d7afd7; + } + .xterm-fg-183 { + color: #d7afff; + } + .xterm-fg-184 { + color: #d7d700; + } + .xterm-fg-185 { + color: #d7d75f; + } + .xterm-fg-186 { + color: #d7d787; + } + .xterm-fg-187 { + color: #d7d7af; + } + .xterm-fg-188 { + color: #d7d7d7; + } + .xterm-fg-189 { + color: #d7d7ff; + } + .xterm-fg-190 { + color: #d7ff00; + } + .xterm-fg-191 { + color: #d7ff5f; + } + .xterm-fg-192 { + color: #d7ff87; + } + .xterm-fg-193 { + color: #d7ffaf; + } + .xterm-fg-194 { + color: #d7ffd7; + } + .xterm-fg-195 { + color: #d7ffff; + } + .xterm-fg-196 { + color: #ff0000; + } + .xterm-fg-197 { + color: #ff005f; + } + .xterm-fg-198 { + color: #ff0087; + } + .xterm-fg-199 { + color: #ff00af; + } + .xterm-fg-200 { + color: #ff00d7; + } + .xterm-fg-201 { + color: #ff00ff; + } + .xterm-fg-202 { + color: #ff5f00; + } + .xterm-fg-203 { + color: #ff5f5f; + } + .xterm-fg-204 { + color: #ff5f87; + } + .xterm-fg-205 { + color: #ff5faf; + } + .xterm-fg-206 { + color: #ff5fd7; + } + .xterm-fg-207 { + color: #ff5fff; + } + .xterm-fg-208 { + color: #ff8700; + } + .xterm-fg-209 { + color: #ff875f; + } + .xterm-fg-210 { + color: #ff8787; + } + .xterm-fg-211 { + color: #ff87af; + } + .xterm-fg-212 { + color: #ff87d7; + } + .xterm-fg-213 { + color: #ff87ff; + } + .xterm-fg-214 { + color: #ffaf00; + } + .xterm-fg-215 { + color: #ffaf5f; + } + .xterm-fg-216 { + color: #ffaf87; + } + .xterm-fg-217 { + color: #ffafaf; + } + .xterm-fg-218 { + color: #ffafd7; + } + .xterm-fg-219 { + color: #ffafff; + } + .xterm-fg-220 { + color: #ffd700; + } + .xterm-fg-221 { + color: #ffd75f; + } + .xterm-fg-222 { + color: #ffd787; + } + .xterm-fg-223 { + color: #ffd7af; + } + .xterm-fg-224 { + color: #ffd7d7; + } + .xterm-fg-225 { + color: #ffd7ff; + } + .xterm-fg-226 { + color: #ffff00; + } + .xterm-fg-227 { + color: #ffff5f; + } + .xterm-fg-228 { + color: #ffff87; + } + .xterm-fg-229 { + color: #ffffaf; + } + .xterm-fg-230 { + color: #ffffd7; + } + .xterm-fg-231 { + color: #ffffff; + } + .xterm-fg-232 { + color: #080808; + } + .xterm-fg-233 { + color: #121212; + } + .xterm-fg-234 { + color: #1c1c1c; + } + .xterm-fg-235 { + color: #262626; + } + .xterm-fg-236 { + color: #303030; + } + .xterm-fg-237 { + color: #3a3a3a; + } + .xterm-fg-238 { + color: #444444; + } + .xterm-fg-239 { + color: #4e4e4e; + } + .xterm-fg-240 { + color: #585858; + } + .xterm-fg-241 { + color: #626262; + } + .xterm-fg-242 { + color: #6c6c6c; + } + .xterm-fg-243 { + color: #767676; + } + .xterm-fg-244 { + color: #808080; + } + .xterm-fg-245 { + color: #8a8a8a; + } + .xterm-fg-246 { + color: #949494; + } + .xterm-fg-247 { + color: #9e9e9e; + } + .xterm-fg-248 { + color: #a8a8a8; + } + .xterm-fg-249 { + color: #b2b2b2; + } + .xterm-fg-250 { + color: #bcbcbc; + } + .xterm-fg-251 { + color: #c6c6c6; + } + .xterm-fg-252 { + color: #d0d0d0; + } + .xterm-fg-253 { + color: #dadada; + } + .xterm-fg-254 { + color: #e4e4e4; + } + .xterm-fg-255 { + color: #eeeeee; + } } diff --git a/app/controllers/ci/builds_controller.rb b/app/controllers/ci/builds_controller.rb index 28fad3671f..9338b37e67 100644 --- a/app/controllers/ci/builds_controller.rb +++ b/app/controllers/ci/builds_controller.rb @@ -7,6 +7,7 @@ module Ci before_filter :authorize_manage_project!, except: [:status, :show, :retry, :cancel] before_filter :authorize_manage_builds!, only: [:retry, :cancel] before_filter :build, except: [:show] + layout 'ci/project' def show if params[:id] =~ /\A\d+\Z/ diff --git a/app/controllers/ci/commits_controller.rb b/app/controllers/ci/commits_controller.rb index 0f7f548566..f0c0ff1bc1 100644 --- a/app/controllers/ci/commits_controller.rb +++ b/app/controllers/ci/commits_controller.rb @@ -6,6 +6,7 @@ module Ci before_filter :authorize_access_project!, except: [:status, :show, :cancel] before_filter :authorize_manage_builds!, only: [:cancel] before_filter :commit, only: :show + layout 'ci/project' def show @builds = @commit.builds diff --git a/app/views/ci/builds/show.html.haml b/app/views/ci/builds/show.html.haml index db8926e30d..1a07feeb20 100644 --- a/app/views/ci/builds/show.html.haml +++ b/app/views/ci/builds/show.html.haml @@ -1,5 +1,5 @@ %h4.page-title - = link_to ci_project_path(@project) + = link_to @project.name, ci_project_path(@project) @ = @commit.short_sha diff --git a/app/views/ci/commits/show.html.haml b/app/views/ci/commits/show.html.haml index 9b597b45aa..72fda8fe94 100644 --- a/app/views/ci/commits/show.html.haml +++ b/app/views/ci/commits/show.html.haml @@ -63,7 +63,7 @@ %i.fa.fa-time #{time_interval_in_words @commit.duration} -%table.builds +%table.table.builds %thead %tr %th Status @@ -81,7 +81,7 @@ %h3 Retried builds - %table.builds + %table.table.builds %thead %tr %th Status diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml index b79ab957ba..6443378af9 100644 --- a/app/views/ci/projects/show.html.haml +++ b/app/views/ci/projects/show.html.haml @@ -16,7 +16,8 @@ %li{class: 'active'} = link_to @ref, ci_project_path(@project, ref: @ref) - + %li.pull-right + = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' ) - if @ref %p @@ -37,7 +38,7 @@ -%table.builds +%table.table.builds %thead %tr %th Status diff --git a/app/views/layouts/ci/_head.html.haml b/app/views/layouts/ci/_head.html.haml deleted file mode 100644 index 871752c981..0000000000 --- a/app/views/layouts/ci/_head.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -%head - %meta{charset: "utf-8"} - %meta{content: "GitLab Continuous Integration", name: "description"} - %title GitLab CI - = stylesheet_link_tag "ci/application", :media => "all" - = javascript_include_tag "ci/application" - = csrf_meta_tags - = favicon_link_tag 'ci/favicon.ico' - :erb - - diff --git a/app/views/layouts/ci/_nav.html.haml b/app/views/layouts/ci/_nav.html.haml deleted file mode 100644 index 3d2c7ce06d..0000000000 --- a/app/views/layouts/ci/_nav.html.haml +++ /dev/null @@ -1,32 +0,0 @@ -.navbar.navbar-static-top.navbar-ci - .container - .navbar-header - %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"} - %span.sr-only Toggle navigation - %i.fa.fa-reorder - - = link_to 'GitLab CI', ci_root_path, class: "navbar-brand" - - .collapse.navbar-collapse - %ul.nav.navbar-nav - - if current_user && current_user.is_admin? - %li - = link_to ci_admin_projects_path do - Admin - %li - = link_to 'Help', ci_help_path - - %ul.nav.navbar-nav.pull-right - - if current_user - %li - = link_to "/profile", no_turbolink do - .profile-holder - = image_tag user_avatar_url(current_user, 64), class: 'avatar s32', alt: '' - %span= current_user.name - %li - = link_to destroy_user_session_path, class: "logout", method: :delete do - %i.fa.fa-signout - Logout - - else - %li - = link_to "Login with GitLab", auth_ci_user_sessions_path, no_turbolink.merge(class: 'btn btn-success btn-login') diff --git a/app/views/layouts/ci/_nav_admin.html.haml b/app/views/layouts/ci/_nav_admin.html.haml index 26eaf4db0e..7d65405740 100644 --- a/app/views/layouts/ci/_nav_admin.html.haml +++ b/app/views/layouts/ci/_nav_admin.html.haml @@ -1,4 +1,11 @@ -%ul.nav.nav-pills.nav-stacked.admin-menu +%ul.nav.nav-sidebar + = nav_link do + = link_to ci_root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do + = icon('caret-square-o-left fw') + %span + Back to Dashboard + + %li.separate-item = nav_link path: 'projects#index' do = link_to ci_admin_projects_path do %i.fa.fa-list-alt @@ -19,8 +26,6 @@ Builds %small.pull-right = Ci::Build.count(:all) - %li - %hr = nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do = link_to ci_admin_application_settings_path do %i.fa.fa-cogs diff --git a/app/views/layouts/ci/_nav_dashboard.html.haml b/app/views/layouts/ci/_nav_dashboard.html.haml new file mode 100644 index 0000000000..202d73d171 --- /dev/null +++ b/app/views/layouts/ci/_nav_dashboard.html.haml @@ -0,0 +1,24 @@ +%ul.nav.nav-sidebar + = nav_link do + = link_to root_path, title: 'Back to dashboard', data: {placement: 'right'}, class: 'back-link' do + = icon('caret-square-o-left fw') + %span + Back to GitLab + %li.separate-item + = nav_link path: 'projects#show' do + = link_to ci_root_path do + %i.fa.fa-home + %span + Projects + - if current_user && current_user.is_admin? + %li + = link_to ci_admin_projects_path do + %i.fa.fa-cogs + %span + Admin + %li + = link_to ci_help_path do + %i.fa.fa-info + %span + Help + diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml index d5b66b92fe..9cef47eb4f 100644 --- a/app/views/layouts/ci/_nav_project.html.haml +++ b/app/views/layouts/ci/_nav_project.html.haml @@ -1,40 +1,48 @@ -%ul.nav.nav-pills.nav-stacked.project-menu +%ul.nav.nav-sidebar = nav_link path: 'projects#show' do = link_to ci_project_path(@project) do %i.fa.fa-list-alt - Commits - %small.pull-right= @project.commits.count + %span + Commits + %small.pull-right= @project.commits.count = nav_link path: 'charts#show' do = link_to ci_project_charts_path(@project) do %i.fa.fa-bar-chart - Charts + %span + Charts = nav_link path: ['runners#index', 'runners#show'] do = link_to ci_project_runners_path(@project) do %i.fa.fa-cog - Runners + %span + Runners = nav_link path: 'variables#show' do = link_to ci_project_variables_path(@project) do %i.fa.fa-code - Variables + %span + Variables = nav_link path: 'web_hooks#index' do = link_to ci_project_web_hooks_path(@project) do %i.fa.fa-link - Web Hooks + %span + Web Hooks = nav_link path: 'triggers#index' do = link_to ci_project_triggers_path(@project) do %i.fa.fa-retweet - Triggers + %span + Triggers = nav_link path: 'services#index' do = link_to ci_project_services_path(@project) do %i.fa.fa-share - Services + %span + Services = nav_link path: 'events#index' do = link_to ci_project_events_path(@project) do %i.fa.fa-book - Events - %li - %hr + %span + Events + %li.separate-item = nav_link path: 'projects#edit' do = link_to edit_ci_project_path(@project) do %i.fa.fa-cogs - Settings + %span + Settings diff --git a/app/views/layouts/ci/_page.html.haml b/app/views/layouts/ci/_page.html.haml new file mode 100644 index 0000000000..c598f63c4c --- /dev/null +++ b/app/views/layouts/ci/_page.html.haml @@ -0,0 +1,26 @@ +.page-with-sidebar{ class: nav_sidebar_class } + = render "layouts/broadcast" + .sidebar-wrapper.nicescroll + .header-logo + = link_to ci_root_path, class: 'home', title: 'Dashboard', id: 'js-shortcuts-home', data: {toggle: 'tooltip', placement: 'bottom'} do + = brand_header_logo + .gitlab-text-container + %h3 GitLab CI + - if defined?(sidebar) && sidebar + = render "layouts/ci/#{sidebar}" + - elsif current_user + = render 'layouts/nav/dashboard' + .collapse-nav + = render partial: 'layouts/collapse_button' + - if current_user + = link_to current_user, class: 'sidebar-user' do + = image_tag avatar_icon(current_user.email, 60), alt: 'User activity', class: 'avatar avatar s36' + .username + = current_user.username + .content-wrapper + = render "layouts/flash" + = render 'layouts/ci/info' + %div{ class: container_class } + .content + .clearfix + = yield diff --git a/app/views/layouts/ci/admin.html.haml b/app/views/layouts/ci/admin.html.haml index cd160a5445..c8cb185d28 100644 --- a/app/views/layouts/ci/admin.html.haml +++ b/app/views/layouts/ci/admin.html.haml @@ -1,18 +1,11 @@ !!! 5 %html{ lang: "en"} - = render 'layouts/ci/head' - %body{ :'data-page' => body_data_page } - = render 'layouts/ci/nav' - = render 'layouts/ci/info' - - if content_for?(:title) - .container.container-title - = yield(:title) - %hr + = render 'layouts/head' + %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} + - header_title = "Admin area" + - if current_user + = render "layouts/header/default", title: header_title + - else + = render "layouts/header/public", title: header_title - .container.container-body - .content - .row - .col-md-2.append-bottom-20 - = render 'layouts/ci/nav_admin' - .col-md-10 - = yield + = render 'layouts/ci/page', sidebar: 'nav_admin' diff --git a/app/views/layouts/ci/application.html.haml b/app/views/layouts/ci/application.html.haml index 8990ffbffe..7fb1a0097b 100644 --- a/app/views/layouts/ci/application.html.haml +++ b/app/views/layouts/ci/application.html.haml @@ -1,14 +1,11 @@ !!! 5 %html{ lang: "en"} - = render 'layouts/ci/head' - %body{ :'data-page' => body_data_page } - = render 'layouts/ci/nav' - = render 'layouts/ci/info' - - if content_for?(:title) - .container.container-title - = yield(:title) - %hr + = render 'layouts/head' + %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} + - header_title = "Projects" + - if current_user + = render "layouts/header/default", title: header_title + - else + = render "layouts/header/public", title: header_title - .container.container-body - .content - = yield + = render 'layouts/ci/page', sidebar: 'nav_dashboard' diff --git a/app/views/layouts/ci/empty.html.haml b/app/views/layouts/ci/empty.html.haml deleted file mode 100644 index bda574c0ed..0000000000 --- a/app/views/layouts/ci/empty.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -!!! 5 -%html{ lang: "en"} - = render 'layouts/ci/head' - %body{ :'data-page' => body_data_page } - = render 'layouts/ci/info' - - if content_for?(:title) - .container.container-title - = yield(:title) - %hr - - .container.container-body - .content - = yield - diff --git a/app/views/layouts/ci/project.html.haml b/app/views/layouts/ci/project.html.haml index 88c21211a5..23a4928fcc 100644 --- a/app/views/layouts/ci/project.html.haml +++ b/app/views/layouts/ci/project.html.haml @@ -1,27 +1,11 @@ !!! 5 %html{ lang: "en"} - = render 'layouts/ci/head' - %body{ :'data-page' => body_data_page } - = render 'layouts/ci/nav' - = render 'layouts/ci/info' - .container - %h3.project-title - = @project.name - - if @project.public - %small - %i.fa.fa-globe - Public + = render 'layouts/head' + %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} + - header_title = @project.name + - if current_user + = render "layouts/header/default", title: header_title + - else + = render "layouts/header/public", title: header_title - .pull-right - = link_to 'View on GitLab', @project.gitlab_url, no_turbolink.merge( class: 'btn btn-sm' ) - %hr - .container.container-body - .content - - if current_user && can?(current_user, :admin_project, gl_project) - .row - .col-md-2.append-bottom-20 - = render 'layouts/ci/nav_project' - .col-md-10 - = yield - - else - = yield + = render 'layouts/ci/page', sidebar: 'nav_project' From 15eeae5fa8f10442617d2edd8fc3d8f5b3f334db Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 11 Sep 2015 19:59:39 +0200 Subject: [PATCH 36/36] Fix 500 when search for gitlab projects --- app/assets/javascripts/ci/pager.js.coffee | 6 +++--- app/controllers/ci/projects_controller.rb | 2 +- app/views/ci/projects/index.html.haml | 9 ++------- app/views/layouts/ci/application.html.haml | 2 +- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/assets/javascripts/ci/pager.js.coffee b/app/assets/javascripts/ci/pager.js.coffee index b57e7c736e..226fbd654a 100644 --- a/app/assets/javascripts/ci/pager.js.coffee +++ b/app/assets/javascripts/ci/pager.js.coffee @@ -16,7 +16,7 @@ complete: => $(".loading").hide() success: (data) => - Pager.append(data.count, data.html) + CiPager.append(data.count, data.html) dataType: "json" append: (count, html) -> @@ -34,9 +34,9 @@ fireDelay: 1000 fireOnce: true ceaseFire: -> - Pager.disable + CiPager.disable callback: (i) => unless $(".loading").is(':visible') $(".loading").show() - Pager.getItems() + CiPager.getItems() diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb index 9074972e94..454810ca01 100644 --- a/app/controllers/ci/projects_controller.rb +++ b/app/controllers/ci/projects_controller.rb @@ -22,7 +22,7 @@ module Ci @page = @offset == 0 ? 1 : (@offset / @limit + 1) @gl_projects = current_user.authorized_projects - @gl_projects = @gl_projects.where("name LIKE %?%", params[:search]) if params[:search] + @gl_projects = @gl_projects.where("name LIKE ?", "%#{params[:search]}%") if params[:search] @gl_projects = @gl_projects.page(@page).per(@limit) @projects = Ci::Project.where(gitlab_id: @gl_projects.map(&:id)).ordered_by_last_commit_date diff --git a/app/views/ci/projects/index.html.haml b/app/views/ci/projects/index.html.haml index 99d07329af..4c74610a57 100644 --- a/app/views/ci/projects/index.html.haml +++ b/app/views/ci/projects/index.html.haml @@ -1,10 +1,5 @@ - if current_user - = content_for :title do - %h3.project-title - Dashboard - .pull-right - = render "search" - + = render "search" .projects %p.fetch-status.light %i.fa.fa-refresh.fa-spin @@ -12,6 +7,6 @@ $.get '#{gitlab_ci_projects_path}', (data) -> $(".projects").html data.html CiPager.init "#{gitlab_ci_projects_path}", #{Ci::ProjectsController::PROJECTS_BATCH}, false - + - else = render 'public' diff --git a/app/views/layouts/ci/application.html.haml b/app/views/layouts/ci/application.html.haml index 7fb1a0097b..b9f871d544 100644 --- a/app/views/layouts/ci/application.html.haml +++ b/app/views/layouts/ci/application.html.haml @@ -2,7 +2,7 @@ %html{ lang: "en"} = render 'layouts/head' %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page} - - header_title = "Projects" + - header_title = "CI Projects" - if current_user = render "layouts/header/default", title: header_title - else