Commit 25149ce4 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g' of...

Merge branch 'ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g' of gitlab.com:gitlab-org/gitlab-ce into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g
parents ad5d2c3e 15eeae5f
Please view this file on the master branch, on stable branches it's out of date. Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased) v 8.0.0 (unreleased)
- 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 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) - Omit filename in Content-Disposition header in raw file download to avoid RFC 6266 encoding issues (Stan HU)
- Fix broken Wiki Page History (Stan Hu) - Fix broken Wiki Page History (Stan Hu)
- Prevent anchors from being hidden by header (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) - Fix bug where only the first 15 Bitbucket issues would be imported (Stan Hu)
- Sort issues by creation date in Bitbucket importer (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) - 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) - 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) - Upgrade browser gem to 1.0.0 to avoid warning in IE11 compatibilty mode (Stan Hu)
...@@ -41,14 +43,23 @@ v 8.0.0 (unreleased) ...@@ -41,14 +43,23 @@ v 8.0.0 (unreleased)
- 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 - Add support for Crowd
- Global Labels that are available to all projects - 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
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 v 7.14.1
- Improve abuse reports management from admin area - Improve abuse reports management from admin area
- Fix "Reload with full diff" URL button in compare branch view (Stan Hu) - Fix "Reload with full diff" URL button in compare branch view (Stan Hu)
- Disabled DNS lookups for SSH in docker image (Rowan Wookey)
- Only include base URL in OmniAuth full_host parameter (Stan Hu) - 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) - Fix Error 500 in API when accessing a group that has an avatar (Stan Hu)
- Ability to enable SSL verification for Webhooks - Ability to enable SSL verification for Webhooks
- Add FogBugz project import (Jared Szechy)
v 7.14.0 v 7.14.0
- Fix bug where non-project members of the target project could set labels on new merge requests. - Fix bug where non-project members of the target project could set labels on new merge requests.
......
...@@ -294,7 +294,7 @@ GEM ...@@ -294,7 +294,7 @@ GEM
github-markup (~> 1.3.3) github-markup (~> 1.3.3)
gollum-grit_adapter (~> 1.0) gollum-grit_adapter (~> 1.0)
nokogiri (~> 1.6.4) nokogiri (~> 1.6.4)
rouge (~> 1.7.4) rouge (~> 1.10.1)
sanitize (~> 2.1.0) sanitize (~> 2.1.0)
stringex (~> 2.5.1) stringex (~> 2.5.1)
gon (5.0.4) gon (5.0.4)
...@@ -565,7 +565,7 @@ GEM ...@@ -565,7 +565,7 @@ GEM
netrc (~> 0.7) netrc (~> 0.7)
rinku (1.7.3) rinku (1.7.3)
rotp (1.6.1) rotp (1.6.1)
rouge (1.7.7) rouge (1.10.1)
rqrcode (0.7.0) rqrcode (0.7.0)
chunky_png chunky_png
rqrcode-rails3 (0.1.7) rqrcode-rails3 (0.1.7)
......
...@@ -10,20 +10,10 @@ ...@@ -10,20 +10,10 @@
# WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD # WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
# GO AFTER THE REQUIRES BELOW. # GO AFTER THE REQUIRES BELOW.
# #
#= require jquery
#= require bootstrap
#= require jquery_ujs
#= require turbolinks
#= require jquery.turbolinks
#= require jquery.endless-scroll
#= require pager #= require pager
#= require nprogress
#= require nprogress-turbolinks
#= require jquery_nested_form #= require jquery_nested_form
#= require_tree . #= require_tree .
# #
#
$(document).on 'click', '.edit-runner-link', (event) -> $(document).on 'click', '.edit-runner-link', (event) ->
event.preventDefault() event.preventDefault()
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
complete: => complete: =>
$(".loading").hide() $(".loading").hide()
success: (data) => success: (data) =>
Pager.append(data.count, data.html) CiPager.append(data.count, data.html)
dataType: "json" dataType: "json"
append: (count, html) -> append: (count, html) ->
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
fireDelay: 1000 fireDelay: 1000
fireOnce: true fireOnce: true
ceaseFire: -> ceaseFire: ->
Pager.disable CiPager.disable
callback: (i) => callback: (i) =>
unless $(".loading").is(':visible') unless $(".loading").is(':visible')
$(".loading").show() $(".loading").show()
Pager.getItems() CiPager.getItems()
...@@ -167,6 +167,7 @@ class @DropzoneInput ...@@ -167,6 +167,7 @@ class @DropzoneInput
dataType: "json" dataType: "json"
).success (data) -> ).success (data) ->
preview.html data.body preview.html data.body
preview.syntaxHighlight()
renderReferencedUsers data.references.users renderReferencedUsers data.references.users
......
...@@ -122,8 +122,9 @@ class @Notes ...@@ -122,8 +122,9 @@ class @Notes
# or skip if rendered # or skip if rendered
if @isNewNote(note) if @isNewNote(note)
@note_ids.push(note.id) @note_ids.push(note.id)
$('ul.main-notes-list').append(note.html) $('ul.main-notes-list').
$('.js-syntax-highlight').syntaxHighlight() append(note.html).
syntaxHighlight()
@initTaskList() @initTaskList()
### ###
......
# Syntax Highlighter
#
# Applies a syntax highlighting color scheme CSS class to any element with the # Applies a syntax highlighting color scheme CSS class to any element with the
# `js-syntax-highlight` class # `js-syntax-highlight` class
# #
...@@ -6,7 +8,13 @@ ...@@ -6,7 +8,13 @@
# <div class="js-syntax-highlight"></div> # <div class="js-syntax-highlight"></div>
# #
$.fn.syntaxHighlight = -> $.fn.syntaxHighlight = ->
if $(this).hasClass('js-syntax-highlight')
# Given the element itself, apply highlighting
$(this).addClass(gon.user_color_scheme) $(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', -> $(document).on 'ready page:load', ->
$('.js-syntax-highlight').syntaxHighlight() $('.js-syntax-highlight').syntaxHighlight()
...@@ -61,3 +61,9 @@ ...@@ -61,3 +61,9 @@
* Styles for JS behaviors. * Styles for JS behaviors.
*/ */
@import "behaviors.scss"; @import "behaviors.scss";
/**
* CI specific styles:
*/
@import "ci/**/*";
...@@ -156,10 +156,16 @@ ...@@ -156,10 +156,16 @@
* Add some extra stuff to panels * Add some extra stuff to panels
* *
*/ */
.container-blank .panel .panel-heading {
font-size: 17px;
line-height: 38px;
}
.panel { .panel {
.panel-heading { box-shadow: none;
font-weight: bold;
.panel-heading {
.panel-head-actions { .panel-head-actions {
position: relative; position: relative;
top: -5px; top: -5px;
...@@ -182,6 +188,10 @@ ...@@ -182,6 +188,10 @@
.pagination { .pagination {
margin: 0; margin: 0;
} }
.btn {
min-width: 124px;
}
} }
&.panel-small { &.panel-small {
...@@ -209,6 +219,12 @@ ...@@ -209,6 +219,12 @@
} }
} }
.alert-help {
background-color: $background-color;
border: 1px solid $border-color;
color: $gl-gray;
}
// Typography ================================================================= // Typography =================================================================
.text-primary, .text-primary,
......
...@@ -114,11 +114,12 @@ $alert-border-radius: 0; ...@@ -114,11 +114,12 @@ $alert-border-radius: 0;
// //
//## //##
$panel-border-radius: 0; $panel-border-radius: 2px;
$panel-default-text: $text-color; $panel-default-text: $text-color;
$panel-default-border: #E7E9ED; $panel-default-border: $border-color;
$panel-default-heading-bg: #F8FAFC; $panel-default-heading-bg: $background-color;
$panel-footer-bg: $background-color;
$panel-inner-border: $border-color;
//== Wells //== Wells
// //
......
...@@ -55,10 +55,10 @@ ...@@ -55,10 +55,10 @@
} }
@mixin md-typography { @mixin md-typography {
color: #444; color: $md-text-color;
a { a {
color: #3084bb; color: $md-link-color;
} }
img { img {
......
...@@ -2,6 +2,8 @@ $hover: #FFFAF1; ...@@ -2,6 +2,8 @@ $hover: #FFFAF1;
$gl-text-color: #54565b; $gl-text-color: #54565b;
$gl-header-color: #4c4e54; $gl-header-color: #4c4e54;
$gl-link-color: #333c48; $gl-link-color: #333c48;
$md-text-color: #444;
$md-link-color: #3084bb;
$nprogress-color: #c0392b; $nprogress-color: #c0392b;
$gl-font-size: 15px; $gl-font-size: 15px;
$list-font-size: 15px; $list-font-size: 15px;
......
/*
* 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;
}
}
.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;
}
}
}
.ci-body {
.incorrect-syntax{
font-size: 19px;
color: red;
}
.correct-syntax{
font-size: 19px;
color: #47a447;
}
}
.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;
}
}
.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;
}
}
}
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;
}
}
.incorrect-syntax{
font-size: 19px;
color: red;
}
.correct-syntax{
font-size: 19px;
color: #47a447;
}
\ No newline at end of file
.login-block {
padding: 15px;
margin: 0 auto;
text-align: center;
p {
font-size: 15px;
}
.btn-login {
padding: 18px 32px;
}
}
.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;
}
.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;
}
.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;
}
}
.welcome-block {
margin-top: 50px;
color: #555;
font-size: 16px;
line-height: 1.5;
h1, h2, h3 {
font-weight: bold;
margin-bottom: 20px;
}
}
// color codes are based on http://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg .ci-body {
// see also: https://gist.github.com/jasonm23/2868981 // 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; $black: #000000;
$red: #cd0000; $red: #cd0000;
$green: #00cd00; $green: #00cd00;
$yellow: #cdcd00; $yellow: #cdcd00;
$blue: #0000ee; // according to wikipedia, this is the xterm standard $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) //$blue: #1e90ff; // this is used by all the terminals I tried (when configured with the xterm color profile)
$magenta: #cd00cd; $magenta: #cd00cd;
$cyan: #00cdcd; $cyan: #00cdcd;
$white: #e5e5e5; $white: #e5e5e5;
$l-black: #7f7f7f; $l-black: #7f7f7f;
$l-red: #ff0000; $l-red: #ff0000;
$l-green: #00ff00; $l-green: #00ff00;
$l-yellow: #ffff00; $l-yellow: #ffff00;
$l-blue: #5c5cff; $l-blue: #5c5cff;
$l-magenta: #ff00ff; $l-magenta: #ff00ff;
$l-cyan: #00ffff; $l-cyan: #00ffff;
$l-white: #ffffff; $l-white: #ffffff;
.term-bold { .term-bold {
font-weight: bold; font-weight: bold;
} }
.term-italic { .term-italic {
font-style: italic; font-style: italic;
} }
.term-conceal { .term-conceal {
visibility: hidden; visibility: hidden;
} }
.term-underline { .term-underline {
text-decoration: underline; text-decoration: underline;
} }
.term-cross { .term-cross {
text-decoration: line-through; text-decoration: line-through;
} }
.term-fg-black { .term-fg-black {
color: $black; color: $black;
} }
.term-fg-red { .term-fg-red {
color: $red; color: $red;
} }
.term-fg-green { .term-fg-green {
color: $green; color: $green;
} }
.term-fg-yellow { .term-fg-yellow {
color: $yellow; color: $yellow;
} }
.term-fg-blue { .term-fg-blue {
color: $blue; color: $blue;
} }
.term-fg-magenta { .term-fg-magenta {
color: $magenta; color: $magenta;
} }
.term-fg-cyan { .term-fg-cyan {
color: $cyan; color: $cyan;
} }
.term-fg-white { .term-fg-white {
color: $white; color: $white;
} }
.term-fg-l-black { .term-fg-l-black {
color: $l-black; color: $l-black;
} }
.term-fg-l-red { .term-fg-l-red {
color: $l-red; color: $l-red;
} }
.term-fg-l-green { .term-fg-l-green {
color: $l-green; color: $l-green;
} }
.term-fg-l-yellow { .term-fg-l-yellow {
color: $l-yellow; color: $l-yellow;
} }
.term-fg-l-blue { .term-fg-l-blue {
color: $l-blue; color: $l-blue;
} }
.term-fg-l-magenta { .term-fg-l-magenta {
color: $l-magenta; color: $l-magenta;
} }
.term-fg-l-cyan { .term-fg-l-cyan {
color: $l-cyan; color: $l-cyan;
} }
.term-fg-l-white { .term-fg-l-white {
color: $l-white; color: $l-white;
} }
.term-bg-black { .term-bg-black {
background-color: $black; background-color: $black;
} }
.term-bg-red { .term-bg-red {
background-color: $red; background-color: $red;
} }
.term-bg-green { .term-bg-green {
background-color: $green; background-color: $green;
} }
.term-bg-yellow { .term-bg-yellow {
background-color: $yellow; background-color: $yellow;
} }
.term-bg-blue { .term-bg-blue {
background-color: $blue; background-color: $blue;
} }
.term-bg-magenta { .term-bg-magenta {
background-color: $magenta; background-color: $magenta;
} }
.term-bg-cyan { .term-bg-cyan {
background-color: $cyan; background-color: $cyan;
} }
.term-bg-white { .term-bg-white {
background-color: $white; background-color: $white;
} }
.term-bg-l-black { .term-bg-l-black {
background-color: $l-black; background-color: $l-black;
} }
.term-bg-l-red { .term-bg-l-red {
background-color: $l-red; background-color: $l-red;
} }
.term-bg-l-green { .term-bg-l-green {
background-color: $l-green; background-color: $l-green;
} }
.term-bg-l-yellow { .term-bg-l-yellow {
background-color: $l-yellow; background-color: $l-yellow;
} }
.term-bg-l-blue { .term-bg-l-blue {
background-color: $l-blue; background-color: $l-blue;
} }
.term-bg-l-magenta { .term-bg-l-magenta {
background-color: $l-magenta; background-color: $l-magenta;
} }
.term-bg-l-cyan { .term-bg-l-cyan {
background-color: $l-cyan; background-color: $l-cyan;
} }
.term-bg-l-white { .term-bg-l-white {
background-color: $l-white; background-color: $l-white;
} }
.xterm-fg-0 { .xterm-fg-0 {
color: #000000; color: #000000;
} }
.xterm-fg-1 { .xterm-fg-1 {
color: #800000; color: #800000;
} }
.xterm-fg-2 { .xterm-fg-2 {
color: #008000; color: #008000;
} }
.xterm-fg-3 { .xterm-fg-3 {
color: #808000; color: #808000;
} }
.xterm-fg-4 { .xterm-fg-4 {
color: #000080; color: #000080;
} }
.xterm-fg-5 { .xterm-fg-5 {
color: #800080; color: #800080;
} }
.xterm-fg-6 { .xterm-fg-6 {
color: #008080; color: #008080;
} }
.xterm-fg-7 { .xterm-fg-7 {
color: #c0c0c0; color: #c0c0c0;
} }
.xterm-fg-8 { .xterm-fg-8 {
color: #808080; color: #808080;
} }
.xterm-fg-9 { .xterm-fg-9 {
color: #ff0000; color: #ff0000;
} }
.xterm-fg-10 { .xterm-fg-10 {
color: #00ff00; color: #00ff00;
} }
.xterm-fg-11 { .xterm-fg-11 {
color: #ffff00; color: #ffff00;
} }
.xterm-fg-12 { .xterm-fg-12 {
color: #0000ff; color: #0000ff;
} }
.xterm-fg-13 { .xterm-fg-13 {
color: #ff00ff; color: #ff00ff;
} }
.xterm-fg-14 { .xterm-fg-14 {
color: #00ffff; color: #00ffff;
} }
.xterm-fg-15 { .xterm-fg-15 {
color: #ffffff; color: #ffffff;
} }
.xterm-fg-16 { .xterm-fg-16 {
color: #000000; color: #000000;
} }
.xterm-fg-17 { .xterm-fg-17 {
color: #00005f; color: #00005f;
} }
.xterm-fg-18 { .xterm-fg-18 {
color: #000087; color: #000087;
} }
.xterm-fg-19 { .xterm-fg-19 {
color: #0000af; color: #0000af;
} }
.xterm-fg-20 { .xterm-fg-20 {
color: #0000d7; color: #0000d7;
} }
.xterm-fg-21 { .xterm-fg-21 {
color: #0000ff; color: #0000ff;
} }
.xterm-fg-22 { .xterm-fg-22 {
color: #005f00; color: #005f00;
} }
.xterm-fg-23 { .xterm-fg-23 {
color: #005f5f; color: #005f5f;
} }
.xterm-fg-24 { .xterm-fg-24 {
color: #005f87; color: #005f87;
} }
.xterm-fg-25 { .xterm-fg-25 {
color: #005faf; color: #005faf;
} }
.xterm-fg-26 { .xterm-fg-26 {
color: #005fd7; color: #005fd7;
} }
.xterm-fg-27 { .xterm-fg-27 {
color: #005fff; color: #005fff;
} }
.xterm-fg-28 { .xterm-fg-28 {
color: #008700; color: #008700;
} }
.xterm-fg-29 { .xterm-fg-29 {
color: #00875f; color: #00875f;
} }
.xterm-fg-30 { .xterm-fg-30 {
color: #008787; color: #008787;
} }
.xterm-fg-31 { .xterm-fg-31 {
color: #0087af; color: #0087af;
} }
.xterm-fg-32 { .xterm-fg-32 {
color: #0087d7; color: #0087d7;
} }
.xterm-fg-33 { .xterm-fg-33 {
color: #0087ff; color: #0087ff;
} }
.xterm-fg-34 { .xterm-fg-34 {
color: #00af00; color: #00af00;
} }
.xterm-fg-35 { .xterm-fg-35 {
color: #00af5f; color: #00af5f;
} }
.xterm-fg-36 { .xterm-fg-36 {
color: #00af87; color: #00af87;
} }
.xterm-fg-37 { .xterm-fg-37 {
color: #00afaf; color: #00afaf;
} }
.xterm-fg-38 { .xterm-fg-38 {
color: #00afd7; color: #00afd7;
} }
.xterm-fg-39 { .xterm-fg-39 {
color: #00afff; color: #00afff;
} }
.xterm-fg-40 { .xterm-fg-40 {
color: #00d700; color: #00d700;
} }
.xterm-fg-41 { .xterm-fg-41 {
color: #00d75f; color: #00d75f;
} }
.xterm-fg-42 { .xterm-fg-42 {
color: #00d787; color: #00d787;
} }
.xterm-fg-43 { .xterm-fg-43 {
color: #00d7af; color: #00d7af;
} }
.xterm-fg-44 { .xterm-fg-44 {
color: #00d7d7; color: #00d7d7;
} }
.xterm-fg-45 { .xterm-fg-45 {
color: #00d7ff; color: #00d7ff;
} }
.xterm-fg-46 { .xterm-fg-46 {
color: #00ff00; color: #00ff00;
} }
.xterm-fg-47 { .xterm-fg-47 {
color: #00ff5f; color: #00ff5f;
} }
.xterm-fg-48 { .xterm-fg-48 {
color: #00ff87; color: #00ff87;
} }
.xterm-fg-49 { .xterm-fg-49 {
color: #00ffaf; color: #00ffaf;
} }
.xterm-fg-50 { .xterm-fg-50 {
color: #00ffd7; color: #00ffd7;
} }
.xterm-fg-51 { .xterm-fg-51 {
color: #00ffff; color: #00ffff;
} }
.xterm-fg-52 { .xterm-fg-52 {
color: #5f0000; color: #5f0000;
} }
.xterm-fg-53 { .xterm-fg-53 {
color: #5f005f; color: #5f005f;
} }
.xterm-fg-54 { .xterm-fg-54 {
color: #5f0087; color: #5f0087;
} }
.xterm-fg-55 { .xterm-fg-55 {
color: #5f00af; color: #5f00af;
} }
.xterm-fg-56 { .xterm-fg-56 {
color: #5f00d7; color: #5f00d7;
} }
.xterm-fg-57 { .xterm-fg-57 {
color: #5f00ff; color: #5f00ff;
} }
.xterm-fg-58 { .xterm-fg-58 {
color: #5f5f00; color: #5f5f00;
} }
.xterm-fg-59 { .xterm-fg-59 {
color: #5f5f5f; color: #5f5f5f;
} }
.xterm-fg-60 { .xterm-fg-60 {
color: #5f5f87; color: #5f5f87;
} }
.xterm-fg-61 { .xterm-fg-61 {
color: #5f5faf; color: #5f5faf;
} }
.xterm-fg-62 { .xterm-fg-62 {
color: #5f5fd7; color: #5f5fd7;
} }
.xterm-fg-63 { .xterm-fg-63 {
color: #5f5fff; color: #5f5fff;
} }
.xterm-fg-64 { .xterm-fg-64 {
color: #5f8700; color: #5f8700;
} }
.xterm-fg-65 { .xterm-fg-65 {
color: #5f875f; color: #5f875f;
} }
.xterm-fg-66 { .xterm-fg-66 {
color: #5f8787; color: #5f8787;
} }
.xterm-fg-67 { .xterm-fg-67 {
color: #5f87af; color: #5f87af;
} }
.xterm-fg-68 { .xterm-fg-68 {
color: #5f87d7; color: #5f87d7;
} }
.xterm-fg-69 { .xterm-fg-69 {
color: #5f87ff; color: #5f87ff;
} }
.xterm-fg-70 { .xterm-fg-70 {
color: #5faf00; color: #5faf00;
} }
.xterm-fg-71 { .xterm-fg-71 {
color: #5faf5f; color: #5faf5f;
} }
.xterm-fg-72 { .xterm-fg-72 {
color: #5faf87; color: #5faf87;
} }
.xterm-fg-73 { .xterm-fg-73 {
color: #5fafaf; color: #5fafaf;
} }
.xterm-fg-74 { .xterm-fg-74 {
color: #5fafd7; color: #5fafd7;
} }
.xterm-fg-75 { .xterm-fg-75 {
color: #5fafff; color: #5fafff;
} }
.xterm-fg-76 { .xterm-fg-76 {
color: #5fd700; color: #5fd700;
} }
.xterm-fg-77 { .xterm-fg-77 {
color: #5fd75f; color: #5fd75f;
} }
.xterm-fg-78 { .xterm-fg-78 {
color: #5fd787; color: #5fd787;
} }
.xterm-fg-79 { .xterm-fg-79 {
color: #5fd7af; color: #5fd7af;
} }
.xterm-fg-80 { .xterm-fg-80 {
color: #5fd7d7; color: #5fd7d7;
} }
.xterm-fg-81 { .xterm-fg-81 {
color: #5fd7ff; color: #5fd7ff;
} }
.xterm-fg-82 { .xterm-fg-82 {
color: #5fff00; color: #5fff00;
} }
.xterm-fg-83 { .xterm-fg-83 {
color: #5fff5f; color: #5fff5f;
} }
.xterm-fg-84 { .xterm-fg-84 {
color: #5fff87; color: #5fff87;
} }
.xterm-fg-85 { .xterm-fg-85 {
color: #5fffaf; color: #5fffaf;
} }
.xterm-fg-86 { .xterm-fg-86 {
color: #5fffd7; color: #5fffd7;
} }
.xterm-fg-87 { .xterm-fg-87 {
color: #5fffff; color: #5fffff;
} }
.xterm-fg-88 { .xterm-fg-88 {
color: #870000; color: #870000;
} }
.xterm-fg-89 { .xterm-fg-89 {
color: #87005f; color: #87005f;
} }
.xterm-fg-90 { .xterm-fg-90 {
color: #870087; color: #870087;
} }
.xterm-fg-91 { .xterm-fg-91 {
color: #8700af; color: #8700af;
} }
.xterm-fg-92 { .xterm-fg-92 {
color: #8700d7; color: #8700d7;
} }
.xterm-fg-93 { .xterm-fg-93 {
color: #8700ff; color: #8700ff;
} }
.xterm-fg-94 { .xterm-fg-94 {
color: #875f00; color: #875f00;
} }
.xterm-fg-95 { .xterm-fg-95 {
color: #875f5f; color: #875f5f;
} }
.xterm-fg-96 { .xterm-fg-96 {
color: #875f87; color: #875f87;
} }
.xterm-fg-97 { .xterm-fg-97 {
color: #875faf; color: #875faf;
} }
.xterm-fg-98 { .xterm-fg-98 {
color: #875fd7; color: #875fd7;
} }
.xterm-fg-99 { .xterm-fg-99 {
color: #875fff; color: #875fff;
} }
.xterm-fg-100 { .xterm-fg-100 {
color: #878700; color: #878700;
} }
.xterm-fg-101 { .xterm-fg-101 {
color: #87875f; color: #87875f;
} }
.xterm-fg-102 { .xterm-fg-102 {
color: #878787; color: #878787;
} }
.xterm-fg-103 { .xterm-fg-103 {
color: #8787af; color: #8787af;
} }
.xterm-fg-104 { .xterm-fg-104 {
color: #8787d7; color: #8787d7;
} }
.xterm-fg-105 { .xterm-fg-105 {
color: #8787ff; color: #8787ff;
} }
.xterm-fg-106 { .xterm-fg-106 {
color: #87af00; color: #87af00;
} }
.xterm-fg-107 { .xterm-fg-107 {
color: #87af5f; color: #87af5f;
} }
.xterm-fg-108 { .xterm-fg-108 {
color: #87af87; color: #87af87;
} }
.xterm-fg-109 { .xterm-fg-109 {
color: #87afaf; color: #87afaf;
} }
.xterm-fg-110 { .xterm-fg-110 {
color: #87afd7; color: #87afd7;
} }
.xterm-fg-111 { .xterm-fg-111 {
color: #87afff; color: #87afff;
} }
.xterm-fg-112 { .xterm-fg-112 {
color: #87d700; color: #87d700;
} }
.xterm-fg-113 { .xterm-fg-113 {
color: #87d75f; color: #87d75f;
} }
.xterm-fg-114 { .xterm-fg-114 {
color: #87d787; color: #87d787;
} }
.xterm-fg-115 { .xterm-fg-115 {
color: #87d7af; color: #87d7af;
} }
.xterm-fg-116 { .xterm-fg-116 {
color: #87d7d7; color: #87d7d7;
} }
.xterm-fg-117 { .xterm-fg-117 {
color: #87d7ff; color: #87d7ff;
} }
.xterm-fg-118 { .xterm-fg-118 {
color: #87ff00; color: #87ff00;
} }
.xterm-fg-119 { .xterm-fg-119 {
color: #87ff5f; color: #87ff5f;
} }
.xterm-fg-120 { .xterm-fg-120 {
color: #87ff87; color: #87ff87;
} }
.xterm-fg-121 { .xterm-fg-121 {
color: #87ffaf; color: #87ffaf;
} }
.xterm-fg-122 { .xterm-fg-122 {
color: #87ffd7; color: #87ffd7;
} }
.xterm-fg-123 { .xterm-fg-123 {
color: #87ffff; color: #87ffff;
} }
.xterm-fg-124 { .xterm-fg-124 {
color: #af0000; color: #af0000;
} }
.xterm-fg-125 { .xterm-fg-125 {
color: #af005f; color: #af005f;
} }
.xterm-fg-126 { .xterm-fg-126 {
color: #af0087; color: #af0087;
} }
.xterm-fg-127 { .xterm-fg-127 {
color: #af00af; color: #af00af;
} }
.xterm-fg-128 { .xterm-fg-128 {
color: #af00d7; color: #af00d7;
} }
.xterm-fg-129 { .xterm-fg-129 {
color: #af00ff; color: #af00ff;
} }
.xterm-fg-130 { .xterm-fg-130 {
color: #af5f00; color: #af5f00;
} }
.xterm-fg-131 { .xterm-fg-131 {
color: #af5f5f; color: #af5f5f;
} }
.xterm-fg-132 { .xterm-fg-132 {
color: #af5f87; color: #af5f87;
} }
.xterm-fg-133 { .xterm-fg-133 {
color: #af5faf; color: #af5faf;
} }
.xterm-fg-134 { .xterm-fg-134 {
color: #af5fd7; color: #af5fd7;
} }
.xterm-fg-135 { .xterm-fg-135 {
color: #af5fff; color: #af5fff;
} }
.xterm-fg-136 { .xterm-fg-136 {
color: #af8700; color: #af8700;
} }
.xterm-fg-137 { .xterm-fg-137 {
color: #af875f; color: #af875f;
} }
.xterm-fg-138 { .xterm-fg-138 {
color: #af8787; color: #af8787;
} }
.xterm-fg-139 { .xterm-fg-139 {
color: #af87af; color: #af87af;
} }
.xterm-fg-140 { .xterm-fg-140 {
color: #af87d7; color: #af87d7;
} }
.xterm-fg-141 { .xterm-fg-141 {
color: #af87ff; color: #af87ff;
} }
.xterm-fg-142 { .xterm-fg-142 {
color: #afaf00; color: #afaf00;
} }
.xterm-fg-143 { .xterm-fg-143 {
color: #afaf5f; color: #afaf5f;
} }
.xterm-fg-144 { .xterm-fg-144 {
color: #afaf87; color: #afaf87;
} }
.xterm-fg-145 { .xterm-fg-145 {
color: #afafaf; color: #afafaf;
} }
.xterm-fg-146 { .xterm-fg-146 {
color: #afafd7; color: #afafd7;
} }
.xterm-fg-147 { .xterm-fg-147 {
color: #afafff; color: #afafff;
} }
.xterm-fg-148 { .xterm-fg-148 {
color: #afd700; color: #afd700;
} }
.xterm-fg-149 { .xterm-fg-149 {
color: #afd75f; color: #afd75f;
} }
.xterm-fg-150 { .xterm-fg-150 {
color: #afd787; color: #afd787;
} }
.xterm-fg-151 { .xterm-fg-151 {
color: #afd7af; color: #afd7af;
} }
.xterm-fg-152 { .xterm-fg-152 {
color: #afd7d7; color: #afd7d7;
} }
.xterm-fg-153 { .xterm-fg-153 {
color: #afd7ff; color: #afd7ff;
} }
.xterm-fg-154 { .xterm-fg-154 {
color: #afff00; color: #afff00;
} }
.xterm-fg-155 { .xterm-fg-155 {
color: #afff5f; color: #afff5f;
} }
.xterm-fg-156 { .xterm-fg-156 {
color: #afff87; color: #afff87;
} }
.xterm-fg-157 { .xterm-fg-157 {
color: #afffaf; color: #afffaf;
} }
.xterm-fg-158 { .xterm-fg-158 {
color: #afffd7; color: #afffd7;
} }
.xterm-fg-159 { .xterm-fg-159 {
color: #afffff; color: #afffff;
} }
.xterm-fg-160 { .xterm-fg-160 {
color: #d70000; color: #d70000;
} }
.xterm-fg-161 { .xterm-fg-161 {
color: #d7005f; color: #d7005f;
} }
.xterm-fg-162 { .xterm-fg-162 {
color: #d70087; color: #d70087;
} }
.xterm-fg-163 { .xterm-fg-163 {
color: #d700af; color: #d700af;
} }
.xterm-fg-164 { .xterm-fg-164 {
color: #d700d7; color: #d700d7;
} }
.xterm-fg-165 { .xterm-fg-165 {
color: #d700ff; color: #d700ff;
} }
.xterm-fg-166 { .xterm-fg-166 {
color: #d75f00; color: #d75f00;
} }
.xterm-fg-167 { .xterm-fg-167 {
color: #d75f5f; color: #d75f5f;
} }
.xterm-fg-168 { .xterm-fg-168 {
color: #d75f87; color: #d75f87;
} }
.xterm-fg-169 { .xterm-fg-169 {
color: #d75faf; color: #d75faf;
} }
.xterm-fg-170 { .xterm-fg-170 {
color: #d75fd7; color: #d75fd7;
} }
.xterm-fg-171 { .xterm-fg-171 {
color: #d75fff; color: #d75fff;
} }
.xterm-fg-172 { .xterm-fg-172 {
color: #d78700; color: #d78700;
} }
.xterm-fg-173 { .xterm-fg-173 {
color: #d7875f; color: #d7875f;
} }
.xterm-fg-174 { .xterm-fg-174 {
color: #d78787; color: #d78787;
} }
.xterm-fg-175 { .xterm-fg-175 {
color: #d787af; color: #d787af;
} }
.xterm-fg-176 { .xterm-fg-176 {
color: #d787d7; color: #d787d7;
} }
.xterm-fg-177 { .xterm-fg-177 {
color: #d787ff; color: #d787ff;
} }
.xterm-fg-178 { .xterm-fg-178 {
color: #d7af00; color: #d7af00;
} }
.xterm-fg-179 { .xterm-fg-179 {
color: #d7af5f; color: #d7af5f;
} }
.xterm-fg-180 { .xterm-fg-180 {
color: #d7af87; color: #d7af87;
} }
.xterm-fg-181 { .xterm-fg-181 {
color: #d7afaf; color: #d7afaf;
} }
.xterm-fg-182 { .xterm-fg-182 {
color: #d7afd7; color: #d7afd7;
} }
.xterm-fg-183 { .xterm-fg-183 {
color: #d7afff; color: #d7afff;
} }
.xterm-fg-184 { .xterm-fg-184 {
color: #d7d700; color: #d7d700;
} }
.xterm-fg-185 { .xterm-fg-185 {
color: #d7d75f; color: #d7d75f;
} }
.xterm-fg-186 { .xterm-fg-186 {
color: #d7d787; color: #d7d787;
} }
.xterm-fg-187 { .xterm-fg-187 {
color: #d7d7af; color: #d7d7af;
} }
.xterm-fg-188 { .xterm-fg-188 {
color: #d7d7d7; color: #d7d7d7;
} }
.xterm-fg-189 { .xterm-fg-189 {
color: #d7d7ff; color: #d7d7ff;
} }
.xterm-fg-190 { .xterm-fg-190 {
color: #d7ff00; color: #d7ff00;
} }
.xterm-fg-191 { .xterm-fg-191 {
color: #d7ff5f; color: #d7ff5f;
} }
.xterm-fg-192 { .xterm-fg-192 {
color: #d7ff87; color: #d7ff87;
} }
.xterm-fg-193 { .xterm-fg-193 {
color: #d7ffaf; color: #d7ffaf;
} }
.xterm-fg-194 { .xterm-fg-194 {
color: #d7ffd7; color: #d7ffd7;
} }
.xterm-fg-195 { .xterm-fg-195 {
color: #d7ffff; color: #d7ffff;
} }
.xterm-fg-196 { .xterm-fg-196 {
color: #ff0000; color: #ff0000;
} }
.xterm-fg-197 { .xterm-fg-197 {
color: #ff005f; color: #ff005f;
} }
.xterm-fg-198 { .xterm-fg-198 {
color: #ff0087; color: #ff0087;
} }
.xterm-fg-199 { .xterm-fg-199 {
color: #ff00af; color: #ff00af;
} }
.xterm-fg-200 { .xterm-fg-200 {
color: #ff00d7; color: #ff00d7;
} }
.xterm-fg-201 { .xterm-fg-201 {
color: #ff00ff; color: #ff00ff;
} }
.xterm-fg-202 { .xterm-fg-202 {
color: #ff5f00; color: #ff5f00;
} }
.xterm-fg-203 { .xterm-fg-203 {
color: #ff5f5f; color: #ff5f5f;
} }
.xterm-fg-204 { .xterm-fg-204 {
color: #ff5f87; color: #ff5f87;
} }
.xterm-fg-205 { .xterm-fg-205 {
color: #ff5faf; color: #ff5faf;
} }
.xterm-fg-206 { .xterm-fg-206 {
color: #ff5fd7; color: #ff5fd7;
} }
.xterm-fg-207 { .xterm-fg-207 {
color: #ff5fff; color: #ff5fff;
} }
.xterm-fg-208 { .xterm-fg-208 {
color: #ff8700; color: #ff8700;
} }
.xterm-fg-209 { .xterm-fg-209 {
color: #ff875f; color: #ff875f;
} }
.xterm-fg-210 { .xterm-fg-210 {
color: #ff8787; color: #ff8787;
} }
.xterm-fg-211 { .xterm-fg-211 {
color: #ff87af; color: #ff87af;
} }
.xterm-fg-212 { .xterm-fg-212 {
color: #ff87d7; color: #ff87d7;
} }
.xterm-fg-213 { .xterm-fg-213 {
color: #ff87ff; color: #ff87ff;
} }
.xterm-fg-214 { .xterm-fg-214 {
color: #ffaf00; color: #ffaf00;
} }
.xterm-fg-215 { .xterm-fg-215 {
color: #ffaf5f; color: #ffaf5f;
} }
.xterm-fg-216 { .xterm-fg-216 {
color: #ffaf87; color: #ffaf87;
} }
.xterm-fg-217 { .xterm-fg-217 {
color: #ffafaf; color: #ffafaf;
} }
.xterm-fg-218 { .xterm-fg-218 {
color: #ffafd7; color: #ffafd7;
} }
.xterm-fg-219 { .xterm-fg-219 {
color: #ffafff; color: #ffafff;
} }
.xterm-fg-220 { .xterm-fg-220 {
color: #ffd700; color: #ffd700;
} }
.xterm-fg-221 { .xterm-fg-221 {
color: #ffd75f; color: #ffd75f;
} }
.xterm-fg-222 { .xterm-fg-222 {
color: #ffd787; color: #ffd787;
} }
.xterm-fg-223 { .xterm-fg-223 {
color: #ffd7af; color: #ffd7af;
} }
.xterm-fg-224 { .xterm-fg-224 {
color: #ffd7d7; color: #ffd7d7;
} }
.xterm-fg-225 { .xterm-fg-225 {
color: #ffd7ff; color: #ffd7ff;
} }
.xterm-fg-226 { .xterm-fg-226 {
color: #ffff00; color: #ffff00;
} }
.xterm-fg-227 { .xterm-fg-227 {
color: #ffff5f; color: #ffff5f;
} }
.xterm-fg-228 { .xterm-fg-228 {
color: #ffff87; color: #ffff87;
} }
.xterm-fg-229 { .xterm-fg-229 {
color: #ffffaf; color: #ffffaf;
} }
.xterm-fg-230 { .xterm-fg-230 {
color: #ffffd7; color: #ffffd7;
} }
.xterm-fg-231 { .xterm-fg-231 {
color: #ffffff; color: #ffffff;
} }
.xterm-fg-232 { .xterm-fg-232 {
color: #080808; color: #080808;
} }
.xterm-fg-233 { .xterm-fg-233 {
color: #121212; color: #121212;
} }
.xterm-fg-234 { .xterm-fg-234 {
color: #1c1c1c; color: #1c1c1c;
} }
.xterm-fg-235 { .xterm-fg-235 {
color: #262626; color: #262626;
} }
.xterm-fg-236 { .xterm-fg-236 {
color: #303030; color: #303030;
} }
.xterm-fg-237 { .xterm-fg-237 {
color: #3a3a3a; color: #3a3a3a;
} }
.xterm-fg-238 { .xterm-fg-238 {
color: #444444; color: #444444;
} }
.xterm-fg-239 { .xterm-fg-239 {
color: #4e4e4e; color: #4e4e4e;
} }
.xterm-fg-240 { .xterm-fg-240 {
color: #585858; color: #585858;
} }
.xterm-fg-241 { .xterm-fg-241 {
color: #626262; color: #626262;
} }
.xterm-fg-242 { .xterm-fg-242 {
color: #6c6c6c; color: #6c6c6c;
} }
.xterm-fg-243 { .xterm-fg-243 {
color: #767676; color: #767676;
} }
.xterm-fg-244 { .xterm-fg-244 {
color: #808080; color: #808080;
} }
.xterm-fg-245 { .xterm-fg-245 {
color: #8a8a8a; color: #8a8a8a;
} }
.xterm-fg-246 { .xterm-fg-246 {
color: #949494; color: #949494;
} }
.xterm-fg-247 { .xterm-fg-247 {
color: #9e9e9e; color: #9e9e9e;
} }
.xterm-fg-248 { .xterm-fg-248 {
color: #a8a8a8; color: #a8a8a8;
} }
.xterm-fg-249 { .xterm-fg-249 {
color: #b2b2b2; color: #b2b2b2;
} }
.xterm-fg-250 { .xterm-fg-250 {
color: #bcbcbc; color: #bcbcbc;
} }
.xterm-fg-251 { .xterm-fg-251 {
color: #c6c6c6; color: #c6c6c6;
} }
.xterm-fg-252 { .xterm-fg-252 {
color: #d0d0d0; color: #d0d0d0;
} }
.xterm-fg-253 { .xterm-fg-253 {
color: #dadada; color: #dadada;
} }
.xterm-fg-254 { .xterm-fg-254 {
color: #e4e4e4; color: #e4e4e4;
} }
.xterm-fg-255 { .xterm-fg-255 {
color: #eeeeee; color: #eeeeee;
}
} }
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
border-bottom: 1px solid #e7e9ed; border-bottom: 1px solid #e7e9ed;
color: $gl-gray; color: $gl-gray;
&.top-block {
border-top: none;
}
&.middle-block { &.middle-block {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
} }
&.btn-save { &.btn-save {
@extend .btn-primary; @extend .btn-success;
} }
&.btn-remove { &.btn-remove {
......
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
* *
*/ */
.file-holder { .file-holder {
border: 1px solid $border-color; margin-left: -$gl-padding;
margin-right: -$gl-padding;
border: none;
border-top: 1px solid #E7E9EE;
border-bottom: 1px solid #E7E9EE;
margin-bottom: 1em; margin-bottom: 1em;
table { table {
...@@ -49,7 +53,7 @@ ...@@ -49,7 +53,7 @@
} }
&.wiki { &.wiki {
padding: 25px; padding: $gl-padding;
.highlight { .highlight {
margin-bottom: 9px; margin-bottom: 9px;
...@@ -90,7 +94,7 @@ ...@@ -90,7 +94,7 @@
border-right: none; border-right: none;
} }
background: #fff; background: #fff;
padding: 8px; padding: 10px $gl-padding;
} }
.lines { .lines {
pre { pre {
...@@ -100,6 +104,33 @@ ...@@ -100,6 +104,33 @@
border: none; 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 { &.logs {
......
...@@ -28,12 +28,18 @@ ...@@ -28,12 +28,18 @@
padding: $gl-padding; padding: $gl-padding;
border: 1px solid #e7e9ed; border: 1px solid #e7e9ed;
min-height: 90vh; min-height: 90vh;
&.container-blank {
background: none;
padding: 0;
border: none;
}
} }
} }
.nav-sidebar { .nav-sidebar {
margin-top: 14 + $header-height; margin-top: 14 + $header-height;
margin-bottom: 50px; margin-bottom: 100px;
transition-duration: .3s; transition-duration: .3s;
list-style: none; list-style: none;
overflow: hidden; overflow: hidden;
......
...@@ -5,15 +5,19 @@ pre.code.highlight.white, ...@@ -5,15 +5,19 @@ pre.code.highlight.white,
background-color: #fff; background-color: #fff;
color: #333; color: #333;
pre.highlight,
.line-numbers, .line-numbers,
.line-numbers a { .line-numbers a {
background-color: $background-color !important;
color: $gl-gray !important;
}
pre.highlight {
background-color: #fff !important; background-color: #fff !important;
color: #333 !important; color: #333 !important;
} }
pre.code { pre.code {
border-left: 1px solid #bbb; border-left: 1px solid $border-color;
} }
// highlight line via anchor // highlight line via anchor
......
.diff-file { .diff-file {
margin-left: -16px; margin-left: -$gl-padding;
margin-right: -16px; margin-right: -$gl-padding;
border: none; border: none;
border-bottom: 1px solid #E7E9EE; border-bottom: 1px solid #E7E9EE;
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
position: relative; position: relative;
background: $background-color; background: $background-color;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
padding: 10px 15px; padding: 10px 16px;
color: #555; color: #555;
z-index: 10; z-index: 10;
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
p { p {
color: #7f8fa4; color: #7f8fa4;
display: inline;
} }
} }
...@@ -204,26 +203,18 @@ ul.nav.nav-projects-tabs { ...@@ -204,26 +203,18 @@ ul.nav.nav-projects-tabs {
} }
.fork-namespaces { .fork-namespaces {
.thumbnail { .fork-thumbnail {
text-align: center;
&.fork-exists-thumbnail { margin-bottom: $gl-padding;
border-color: #EEE;
.caption { .caption {
color: #999; padding: $gl-padding 0;
min-height: 30px;
} }
}
&.fork-thumbnail {
border-color: #AAA;
&:hover { img {
background-color: $hover; @include border-radius(50%);
} max-width: 100px;
}
a {
text-decoration: none;
} }
} }
} }
......
...@@ -78,36 +78,6 @@ ...@@ -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 { .tree-ref-holder {
...@@ -132,17 +102,14 @@ ...@@ -132,17 +102,14 @@
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
margin-bottom: 10px; margin-bottom: 5px;
.commit { .commit {
padding: 10px 15px; padding: $gl-padding 0;
.commit-row-title { .commit-row-title {
font-size: 13px;
.commit-row-message { .commit-row-message {
font-weight: normal; font-weight: normal;
color: #555;
} }
} }
} }
......
...@@ -7,6 +7,7 @@ module Ci ...@@ -7,6 +7,7 @@ module Ci
before_filter :authorize_manage_project!, except: [:status, :show, :retry, :cancel] before_filter :authorize_manage_project!, except: [:status, :show, :retry, :cancel]
before_filter :authorize_manage_builds!, only: [:retry, :cancel] before_filter :authorize_manage_builds!, only: [:retry, :cancel]
before_filter :build, except: [:show] before_filter :build, except: [:show]
layout 'ci/project'
def show def show
if params[:id] =~ /\A\d+\Z/ if params[:id] =~ /\A\d+\Z/
......
...@@ -6,6 +6,7 @@ module Ci ...@@ -6,6 +6,7 @@ module Ci
before_filter :authorize_access_project!, except: [:status, :show, :cancel] before_filter :authorize_access_project!, except: [:status, :show, :cancel]
before_filter :authorize_manage_builds!, only: [:cancel] before_filter :authorize_manage_builds!, only: [:cancel]
before_filter :commit, only: :show before_filter :commit, only: :show
layout 'ci/project'
def show def show
@builds = @commit.builds @builds = @commit.builds
......
...@@ -22,7 +22,7 @@ module Ci ...@@ -22,7 +22,7 @@ module Ci
@page = @offset == 0 ? 1 : (@offset / @limit + 1) @page = @offset == 0 ? 1 : (@offset / @limit + 1)
@gl_projects = current_user.authorized_projects @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) @gl_projects = @gl_projects.page(@page).per(@limit)
@projects = Ci::Project.where(gitlab_id: @gl_projects.map(&:id)).ordered_by_last_commit_date @projects = Ci::Project.where(gitlab_id: @gl_projects.map(&:id)).ordered_by_last_commit_date
......
...@@ -31,4 +31,26 @@ module PageLayoutHelper ...@@ -31,4 +31,26 @@ module PageLayoutHelper
@fluid_layout @fluid_layout
end end
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"
unless fluid_layout
css_class += " container-limited"
end
if blank_container
css_class += " container-blank"
end
css_class
end
end end
%h4.page-title %h4.page-title
= link_to ci_project_path(@project) = link_to @project.name, ci_project_path(@project)
@ @
= @commit.short_sha = @commit.short_sha
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
%i.fa.fa-time %i.fa.fa-time
#{time_interval_in_words @commit.duration} #{time_interval_in_words @commit.duration}
%table.builds %table.table.builds
%thead %thead
%tr %tr
%th Status %th Status
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
%h3 %h3
Retried builds Retried builds
%table.builds %table.table.builds
%thead %thead
%tr %tr
%th Status %th Status
......
%li
= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote
%li.disabled
= link_to raw(t 'views.pagination.truncate'), '#'
%li
= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote}
%li
= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
%li{class: "#{'active' if page.current?}"}
= link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
= 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?
%li
= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
- if current_user - if current_user
= content_for :title do
%h3.project-title
Dashboard
.pull-right
= render "search" = render "search"
.projects .projects
%p.fetch-status.light %p.fetch-status.light
%i.fa.fa-refresh.fa-spin %i.fa.fa-refresh.fa-spin
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +16,8 @@
%li{class: 'active'} %li{class: 'active'}
= link_to @ref, ci_project_path(@project, ref: @ref) = 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 - if @ref
%p %p
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
%table.builds %table.table.builds
%thead %thead
%tr %tr
%th Status %th Status
......
- @blank_container = true
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
%strong= @group.name %strong= @group.name
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
= current_user.username = current_user.username
.content-wrapper .content-wrapper
= render "layouts/flash" = render "layouts/flash"
%div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" } %div{ class: container_class }
.content .content
.clearfix .clearfix
= yield = yield
%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
<meta name="viewport" content="width=device-width, initial-scale=1.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')
%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 = nav_link path: 'projects#index' do
= link_to ci_admin_projects_path do = link_to ci_admin_projects_path do
%i.fa.fa-list-alt %i.fa.fa-list-alt
...@@ -19,8 +26,6 @@ ...@@ -19,8 +26,6 @@
Builds Builds
%small.pull-right %small.pull-right
= Ci::Build.count(:all) = Ci::Build.count(:all)
%li
%hr
= nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do = nav_link(controller: :application_settings, html_options: { class: 'separate-item'}) do
= link_to ci_admin_application_settings_path do = link_to ci_admin_application_settings_path do
%i.fa.fa-cogs %i.fa.fa-cogs
......
%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
%ul.nav.nav-pills.nav-stacked.project-menu %ul.nav.nav-sidebar
= nav_link path: 'projects#show' do = nav_link path: 'projects#show' do
= link_to ci_project_path(@project) do = link_to ci_project_path(@project) do
%i.fa.fa-list-alt %i.fa.fa-list-alt
%span
Commits Commits
%small.pull-right= @project.commits.count %small.pull-right= @project.commits.count
= nav_link path: 'charts#show' do = nav_link path: 'charts#show' do
= link_to ci_project_charts_path(@project) do = link_to ci_project_charts_path(@project) do
%i.fa.fa-bar-chart %i.fa.fa-bar-chart
%span
Charts Charts
= nav_link path: ['runners#index', 'runners#show'] do = nav_link path: ['runners#index', 'runners#show'] do
= link_to ci_project_runners_path(@project) do = link_to ci_project_runners_path(@project) do
%i.fa.fa-cog %i.fa.fa-cog
%span
Runners Runners
= nav_link path: 'variables#show' do = nav_link path: 'variables#show' do
= link_to ci_project_variables_path(@project) do = link_to ci_project_variables_path(@project) do
%i.fa.fa-code %i.fa.fa-code
%span
Variables Variables
= nav_link path: 'web_hooks#index' do = nav_link path: 'web_hooks#index' do
= link_to ci_project_web_hooks_path(@project) do = link_to ci_project_web_hooks_path(@project) do
%i.fa.fa-link %i.fa.fa-link
%span
Web Hooks Web Hooks
= nav_link path: 'triggers#index' do = nav_link path: 'triggers#index' do
= link_to ci_project_triggers_path(@project) do = link_to ci_project_triggers_path(@project) do
%i.fa.fa-retweet %i.fa.fa-retweet
%span
Triggers Triggers
= nav_link path: 'services#index' do = nav_link path: 'services#index' do
= link_to ci_project_services_path(@project) do = link_to ci_project_services_path(@project) do
%i.fa.fa-share %i.fa.fa-share
%span
Services Services
= nav_link path: 'events#index' do = nav_link path: 'events#index' do
= link_to ci_project_events_path(@project) do = link_to ci_project_events_path(@project) do
%i.fa.fa-book %i.fa.fa-book
%span
Events Events
%li %li.separate-item
%hr
= nav_link path: 'projects#edit' do = nav_link path: 'projects#edit' do
= link_to edit_ci_project_path(@project) do = link_to edit_ci_project_path(@project) do
%i.fa.fa-cogs %i.fa.fa-cogs
%span
Settings Settings
.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
!!! 5 !!! 5
%html{ lang: "en"} %html{ lang: "en"}
= render 'layouts/ci/head' = render 'layouts/head'
%body{ :'data-page' => body_data_page } %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
= render 'layouts/ci/nav' - header_title = "Admin area"
= render 'layouts/ci/info' - if current_user
- if content_for?(:title) = render "layouts/header/default", title: header_title
.container.container-title - else
= yield(:title) = render "layouts/header/public", title: header_title
%hr
.container.container-body = render 'layouts/ci/page', sidebar: 'nav_admin'
.content
.row
.col-md-2.append-bottom-20
= render 'layouts/ci/nav_admin'
.col-md-10
= yield
!!! 5 !!! 5
%html{ lang: "en"} %html{ lang: "en"}
= render 'layouts/ci/head' = render 'layouts/head'
%body{ :'data-page' => body_data_page } %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
= render 'layouts/ci/nav' - header_title = "CI Projects"
= render 'layouts/ci/info' - if current_user
- if content_for?(:title) = render "layouts/header/default", title: header_title
.container.container-title - else
= yield(:title) = render "layouts/header/public", title: header_title
%hr
.container.container-body = render 'layouts/ci/page', sidebar: 'nav_dashboard'
.content
= yield
!!! 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
!!! 5 !!! 5
%html{ lang: "en"} %html{ lang: "en"}
= render 'layouts/ci/head' = render 'layouts/head'
%body{ :'data-page' => body_data_page } %body{class: "ci-body #{user_application_theme}", 'data-page' => body_data_page}
= render 'layouts/ci/nav' - header_title = @project.name
= render 'layouts/ci/info' - if current_user
.container = render "layouts/header/default", title: header_title
%h3.project-title
= @project.name
- if @project.public
%small
%i.fa.fa-globe
Public
.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 - else
= yield = render "layouts/header/public", title: header_title
= render 'layouts/ci/page', sidebar: 'nav_project'
...@@ -37,14 +37,15 @@ ...@@ -37,14 +37,15 @@
= icon('clipboard fw') = icon('clipboard fw')
%span %span
Snippets Snippets
= nav_link(controller: :help) do
= link_to help_path, title: 'Help', data: {placement: 'right'} do
= icon('question-circle fw')
%span
Help
- if current_user - if current_user
%li.separate-item
= nav_link(controller: :profile) do = nav_link(controller: :profile) do
= link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do = link_to profile_path, title: 'Profile settings', data: {toggle: 'tooltip', placement: 'bottom'} do
= icon('user fw') = icon('user fw')
%span %span
Profile Settings Profile Settings
= nav_link(controller: :help) do
= link_to help_path, title: 'Help', data: {placement: 'right'} do
= icon('question-circle fw')
%span
Help
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
= link_to profile_path, title: 'Profile', data: {placement: 'right'} do = link_to profile_path, title: 'Profile', data: {placement: 'right'} do
= icon('user fw') = icon('user fw')
%span %span
Profile Profile Settings
= nav_link(controller: [:accounts, :two_factor_auths]) do = nav_link(controller: [:accounts, :two_factor_auths]) do
= link_to profile_account_path, title: 'Account', data: {placement: 'right'} do = link_to profile_account_path, title: 'Account', data: {placement: 'right'} do
= icon('gear fw') = icon('gear fw')
......
- page_title "Profile Settings" - page_title "Profile Settings"
- header_title "Profile Settings", profile_path - unless @header_title
- header_title "Profile Settings", profile_path
- sidebar "profile" - sidebar "profile"
= render template: "layouts/application" = render template: "layouts/application"
- page_title "Account" - page_title "Account"
%h3.page-title - header_title page_title, profile_account_path
= page_title - @blank_container = true
%p.light
Change your username and basic account settings.
%hr
- if current_user.ldap_user? - if current_user.ldap_user?
.alert.alert-info .alert.alert-info
Some options are unavailable for LDAP accounts Some options are unavailable for LDAP accounts
......
- page_title "Applications" - page_title "Applications"
%h3.page-title - header_title page_title, applications_profile_path
= page_title
%p.light .gray-content-block.top-block
- if user_oauth_applications? - 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. and applications that you've authorized to use your account.
- else - else
Manage applications that you've authorized to use your account. Manage applications that you've authorized to use your account.
%hr
- if user_oauth_applications? - if user_oauth_applications?
.oauth-applications .oauth-applications
......
- page_title "Audit Log" - page_title "Audit Log"
%h3.page-title Audit Log - header_title page_title, audit_log_profile_path
%p.light History of authentications
.gray-content-block.top-block
History of authentications
.prepend-top-default
= render 'event_table', events: @events = render 'event_table', events: @events
- page_title "Emails" - page_title "Emails"
%h3.page-title - header_title page_title, profile_emails_path
= page_title
%p.light
Control emails linked to your account
%hr
.gray-content-block.top-block
Control emails linked to your account
%ul %ul.prepend-top-default
%li %li
Your Your
%b Primary Email %b Primary Email
......
- page_title "SSH Keys" - page_title "SSH Keys"
%h3.page-title - header_title page_title, profile_keys_path
= page_title
.gray-content-block.top-block
.pull-right .pull-right
= link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new" = link_to "Add SSH Key", new_profile_key_path, class: "btn btn-new"
%p.light .oneline
Before you can add an SSH key you need to Before you can add an SSH key you need to
= link_to "generate it.", help_page_path("ssh", "README") = link_to "generate it.", help_page_path("ssh", "README")
%hr
.prepend-top-default
= render 'key_table' = render 'key_table'
- page_title "Notifications" - page_title "Notifications"
%h3.page-title - header_title page_title, profile_notifications_path
= page_title
%p.light .gray-content-block.top-block
These are your global notification settings. These are your global notification settings.
%hr
.prepend-top-default
= form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications form-horizontal global-notifications-form' } do |f| = form_for @user, url: profile_notifications_path, method: :put, html: { class: 'update-notifications form-horizontal global-notifications-form' } do |f|
-if @user.errors.any? -if @user.errors.any?
%div.alert.alert-danger %div.alert.alert-danger
......
- page_title "Password" - page_title "Password"
%h3.page-title - header_title page_title, edit_profile_password_path
= page_title
%p.light .gray-content-block.top-block
- if @user.password_automatically_set? - if @user.password_automatically_set?
Set your password. Set your password.
- else - else
Change your password or recover your current one. 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| = form_for @user, url: profile_password_path, method: :put, html: { class: 'form-horizontal' } do |f|
%div %div
%p.slead %p.slead
......
- page_title 'Preferences' - page_title 'Preferences'
%h3.page-title - header_title page_title, profile_preferences_path
= page_title - @blank_container = true
%p.light
.alert.alert-help
These settings allow you to customize the appearance and behavior of the site. 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 They are saved with your account and will persist to any device you use to
access the site. access the site.
%hr
= form_for @user, url: profile_preferences_path, remote: true, method: :put, html: {class: 'js-preferences-form form-horizontal'} do |f| = 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 .panel.panel-default.application-theme
......
- page_title "Profile" .gray-content-block.top-block
%h3.page-title
= page_title
%p.light
This information will appear on your profile. This information will appear on your profile.
- if current_user.ldap_user? - if current_user.ldap_user?
Some options are unavailable for LDAP accounts 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| = 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? -if @user.errors.any?
%div.alert.alert-danger %div.alert.alert-danger
......
...@@ -7,6 +7,13 @@ ...@@ -7,6 +7,13 @@
- if @project.description.present? - if @project.description.present?
= markdown(@project.description, pipeline: :description) = 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 .project-repo-buttons
= render 'projects/buttons/star' = render 'projects/buttons/star'
...@@ -14,12 +21,6 @@ ...@@ -14,12 +21,6 @@
- unless empty_repo - unless empty_repo
= render 'projects/buttons/fork' = 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 - 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 = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: @ref, format: 'zip'), class: 'btn', rel: 'nofollow' do
= icon('download fw') = icon('download fw')
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- else - else
= link_to title, '#' = 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) - blob_commit = @repository.last_commit_for_path(@commit.id, blob.path)
= render blob_commit, project: @project = render blob_commit, project: @project
......
- @blank_container = true
.project-edit-container .project-edit-container
.project-edit-errors .project-edit-errors
.project-edit-content .project-edit-content
%div .panel.panel-default
%h3.page-title .panel-heading
Project settings Project settings
%hr
.panel-body .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| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit_project form-horizontal fieldset-form" }, authenticity_token: true do |f|
......
...@@ -10,21 +10,22 @@ ...@@ -10,21 +10,22 @@
- group.each do |namespace| - group.each do |namespace|
.col-md-2.col-sm-3 .col-md-2.col-sm-3
- if fork = namespace.find_fork_of(@project) - 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 = 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 .caption
%h4=namespace.human_name %strong
%p = namespace.human_name
= namespace.path %div.text-primary
Already forked
- else - 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 = 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 .caption
%h4=namespace.human_name %strong
%p = namespace.human_name
= namespace.path
%p.light %p.light
Fork is a copy of a project repository. Fork is a copy of a project repository.
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
= f.label :title, class: 'control-label' do = f.label :title, class: 'control-label' do
%strong= 'Title *' %strong= 'Title *'
.col-sm-10 .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 class: 'form-control pad js-gfm-input', required: true
- if issuable.is_a?(MergeRequest) - if issuable.is_a?(MergeRequest)
......
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
require 'gitlab/current_settings' require 'gitlab/current_settings'
include Gitlab::CurrentSettings 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( Gitlab::Application.config.session_store(
:redis_store, # Using the cookie_store would enable session replay attacks. :redis_store, # Using the cookie_store would enable session replay attacks.
......
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
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
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
class AddTokenToProject < ActiveRecord::Migration
def change
add_column :projects, :token, :string, null: true
end
end
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
class AddGitlabUrlToProject < ActiveRecord::Migration
def change
add_column :projects, :gitlab_url, :string, null: true
end
end
class AddStartedAtToBuild < ActiveRecord::Migration
def change
add_column :builds, :started_at, :datetime, null: true
end
end
class IncreateTraceColunmLimit < ActiveRecord::Migration
def up
change_column :builds, :trace, :text, :limit => 1073741823
end
def down
end
end
class AddTmpFileToBuild < ActiveRecord::Migration
def change
add_column :builds, :tmp_file, :string
end
end
class AddBeforeShaToBuild < ActiveRecord::Migration
def change
add_column :builds, :before_sha, :string, null: true
end
end
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
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
class AddPublicFlagToProject < ActiveRecord::Migration
def change
add_column :projects, :public, :boolean, null: false, default: false
end
end
class AddDataFieldToBuild < ActiveRecord::Migration
def change
add_column :builds, :push_data, :text
end
end
class RemovePathFieldFromProject < ActiveRecord::Migration
def up
remove_column :projects, :path
end
def down
end
end
class CreateRunners < ActiveRecord::Migration
def change
create_table :runners do |t|
t.string :token
t.text :public_key
t.timestamps
end
end
end
class AddRunnerIdToBuild < ActiveRecord::Migration
def change
add_column :builds, :runner_id, :integer
end
end
class RemoveUsersTable < ActiveRecord::Migration
def up
drop_table :users
end
end
class AddMoreFieldsToProject < ActiveRecord::Migration
def change
add_column :projects, :ssh_url_to_repo, :string
end
end
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
class AddProjectGitlabIdToProject < ActiveRecord::Migration
def change
add_column :projects, :gitlab_id, :integer
end
end
class AddIndexProjectIdToBuilds < ActiveRecord::Migration
def change
add_index :builds, :project_id
end
end
class AddDescriptionToRunner < ActiveRecord::Migration
def change
add_column :runners, :description, :string
end
end
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
class ChangePushDataLimit < ActiveRecord::Migration
def change
change_column :builds, :push_data, :text, :limit => 16777215
end
end
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
class AddAllowGitFetchToProject < ActiveRecord::Migration
def change
add_column :projects, :allow_git_fetch, :boolean, default: true, null: false
end
end
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
class RenameProjectFields < ActiveRecord::Migration
def change
rename_column :projects, :email_all_broken_builds, :email_only_broken_builds
end
end
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
class RemovePublicKeyFromRunner < ActiveRecord::Migration
def change
remove_column :runners, :public_key
end
end
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
class AddSkipRefsToProjects < ActiveRecord::Migration
def change
add_column :projects, :skip_refs, :string
end
end
class AddCoverageParser < ActiveRecord::Migration
def change
add_column :projects, :coverage_regex, :string
end
end
class AddCoverageToBuild < ActiveRecord::Migration
def change
add_column :builds, :coverage, :float
end
end
class AddShaIndexToBuild < ActiveRecord::Migration
def change
add_index :builds, :sha
add_index :builds, [:project_id, :sha]
end
end
class MigrateBuildToCommits < ActiveRecord::Migration
def change
execute <<eos
INSERT INTO commits ( sha, project_id, ref, before_sha, push_data )
SELECT sha, project_id, ref, before_sha, push_data FROM builds
WHERE id IN (SELECT MAX(id) FROM builds GROUP BY sha)
eos
if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL'
execute <<eos
UPDATE builds
SET commit_id = commits.id
FROM commits
WHERE commits.sha = builds.sha
eos
else
execute "UPDATE builds b, commits c SET b.commit_id = c.id WHERE c.sha = b.sha"
end
end
end
class AddCommitIndicies < ActiveRecord::Migration
def change
add_index :commits, :project_id
add_index :commits, :sha, length: 6
add_index :commits, [:project_id, :sha]
add_index :builds, :commit_id
add_index :builds, [:project_id, :commit_id]
end
end
class AddParallelToBuild < ActiveRecord::Migration
def change
create_table :jobs do |t|
t.integer :project_id, null: false
t.text :commands
t.boolean :active, null: false, default: true
t.timestamps
end
add_index :jobs, :project_id
end
end
class AddCommandsToBuild < ActiveRecord::Migration
def change
add_column :builds, :commands, :text
end
end
class AddJobIdToBuild < ActiveRecord::Migration
def change
add_column :builds, :job_id, :integer
end
end
class MigrateJobs < ActiveRecord::Migration
def up
Project.find_each(batch_size: 100) do |project|
job = project.jobs.create(commands: project.scripts)
project.builds.order('id DESC').limit(10).update_all(job_id: job.id)
end
end
def down
Job.destroy_all
end
end
class AddNameToJob < ActiveRecord::Migration
def change
add_column :jobs, :name, :string
end
end
class RemoveScriptsFromProject < ActiveRecord::Migration
def change
remove_column :projects, :scripts
end
end
\ No newline at end of file
class RemoveInvalidBuild < ActiveRecord::Migration
def change
execute "DELETE FROM builds WHERE commit_id is NULL"
end
end
class CreateService < ActiveRecord::Migration
def change
create_table :services, force: true do |t|
t.string :type
t.string :title
t.integer :project_id, null: false
t.datetime :created_at
t.datetime :updated_at
t.boolean :active, default: false, null: false
t.text :properties
end
add_index :services, [:project_id], name: :index_services_on_project_id, using: :btree
end
end
class AddFilterToJobs < ActiveRecord::Migration
def change
add_column :jobs, :build_branches, :boolean, default: true, null: false
add_column :jobs, :build_tags, :boolean, default: false, null: false
end
end
# This migration comes from acts_as_taggable_on_engine (originally 1)
class ActsAsTaggableOnMigration < ActiveRecord::Migration
def self.up
create_table :tags do |t|
t.string :name
end
create_table :taggings do |t|
t.references :tag
# You should make sure that the column created is
# long enough to store the required class names.
t.references :taggable, polymorphic: true
t.references :tagger, polymorphic: true
# Limit is created to prevent MySQL error on index
# length for MyISAM table type: http://bit.ly/vgW2Ql
t.string :context, limit: 128
t.datetime :created_at
end
add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
def self.down
drop_table :taggings
drop_table :tags
end
end
# This migration comes from acts_as_taggable_on_engine (originally 2)
class AddMissingUniqueIndices < ActiveRecord::Migration
def self.up
add_index :tags, :name, unique: true
remove_index :taggings, :tag_id
remove_index :taggings, [:taggable_id, :taggable_type, :context]
add_index :taggings,
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
unique: true, name: 'taggings_idx'
end
def self.down
remove_index :tags, :name
remove_index :taggings, name: 'taggings_idx'
add_index :taggings, :tag_id
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
# This migration comes from acts_as_taggable_on_engine (originally 3)
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
def self.up
add_column :tags, :taggings_count, :integer, default: 0
ActsAsTaggableOn::Tag.reset_column_information
ActsAsTaggableOn::Tag.find_each do |tag|
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
end
end
def self.down
remove_column :tags, :taggings_count
end
end
# This migration comes from acts_as_taggable_on_engine (originally 4)
class AddMissingTaggableIndex < ActiveRecord::Migration
def self.up
add_index :taggings, [:taggable_id, :taggable_type, :context]
end
def self.down
remove_index :taggings, [:taggable_id, :taggable_type, :context]
end
end
class BuildMissingServices < ActiveRecord::Migration
def up
Project.find_each do |project|
# Slack service creation
slack_service = select_one("SELECT id FROM services WHERE type='SlackService' AND project_id = #{project.id}")
unless slack_service
execute("INSERT INTO services (type, project_id, active, properties, created_at, updated_at) \
VALUES ('SlackService', '#{project.id}', false, '{}', NOW(), NOW())")
end
# Mail service creation
mail_service = select_one("SELECT id FROM services WHERE type='MailService' AND project_id = #{project.id}")
unless mail_service
execute("INSERT INTO services (type, project_id, active, properties, created_at, updated_at) \
VALUES ('MailService', '#{project.id}', true, '{}', NOW(), NOW())")
end
end
end
end
class AddJobTypeToJob < ActiveRecord::Migration
def change
add_column :jobs, :job_type, :string, default: 'parallel'
add_column :jobs, :refs, :string
end
end
class AddContactedAtToRunner < ActiveRecord::Migration
def change
add_column :runners, :contacted_at, :datetime, null: true
end
end
class AddActiveToRunner < ActiveRecord::Migration
def change
add_column :runners, :active, :boolean, null: false, default: true
end
end
class RenameCommitterToPusher < ActiveRecord::Migration
def change
rename_column :projects, :email_add_committer, :email_add_pusher
end
end
class CreateEventTable < ActiveRecord::Migration
def change
create_table :events do |t|
t.integer :project_id
t.integer :user_id
t.integer :is_admin
t.text :description
t.timestamps
t.index :created_at
t.index :is_admin
t.index :project_id
end
end
end
class AddSettingsForSharedRunners < ActiveRecord::Migration
def change
add_column :projects, :shared_runners_enabled, :boolean, default: false
add_column :runners, :is_shared, :boolean, default: false
end
end
class MigrateSharedRunners < ActiveRecord::Migration
def up
#all shared runners should remain to be shared
execute("UPDATE runners SET is_shared = true WHERE id NOT IN (SELECT runner_id FROM runner_projects)");
Project.update_all(shared_runners_enabled: true)
end
def down
end
end
class DisableSharedRunners < ActiveRecord::Migration
def up
execute("UPDATE projects SET shared_runners_enabled = false WHERE id IN (SELECT project_id FROM runner_projects)");
end
def down
end
end
class AddDeletedAtToJobs < ActiveRecord::Migration
def change
add_column :jobs, :deleted_at, :datetime
add_index :jobs, :deleted_at
end
end
class CleanupTheBuildModel < ActiveRecord::Migration
def change
remove_column :builds, :push_data, :text
remove_column :builds, :before_sha, :string
remove_column :builds, :ref, :string
remove_column :builds, :sha, :string
remove_column :builds, :tmp_file, :string
end
end
class MigrateUrlToPath < ActiveRecord::Migration
def up
select_all("SELECT id, gitlab_url FROM projects").each do |project|
path = project['gitlab_url'].sub(/.*\/(.*\/.*)$/, '\1')
execute("UPDATE projects SET gitlab_url = '#{path}' WHERE id = '#{project['id']}'")
end
end
def down
end
end
class RenameGitlabUrlToPath < ActiveRecord::Migration
def change
rename_column :projects, :gitlab_url, :path
end
end
class AddInfoFieldsToRunner < ActiveRecord::Migration
def change
add_column :runners, :name, :string
add_column :runners, :version, :string
add_column :runners, :revision, :string
add_column :runners, :platform, :string
add_column :runners, :architecture, :string
end
end
class AddFieldsToBuilds < ActiveRecord::Migration
def change
add_column :builds, :name, :string
add_column :builds, :deploy, :boolean, default: false
end
end
class MoveJobNameToBuild < ActiveRecord::Migration
def up
select_all("SELECT id, name FROM jobs").each do |job|
execute("UPDATE builds SET name = '#{quote_string(job["name"])}' WHERE job_id = #{job["id"]}")
end
end
def down
end
end
class AddTagToCommits < ActiveRecord::Migration
def change
add_column :commits, :tag, :boolean, default: false
end
end
class AddYamlToProjects < ActiveRecord::Migration
def up
add_column :projects, :generated_yaml_config, :text
end
def down
remove_column :projects, :generated_yaml_config
end
end
# Migration tested on MySQL and PostgreSQL.
# Can be performed online without errors.
# This migration will loop through all projects and jobs, so it can take some time.
class MigrateJobsToYaml < ActiveRecord::Migration
def up
select_all("SELECT * FROM projects").each do |project|
config = {}
concatenate_expression = if ActiveRecord::Base.connection.adapter_name == 'PostgreSQL'
"string_agg(tags.name, ',')"
else
"GROUP_CONCAT(tags.name SEPARATOR ',')"
end
sql = "SELECT j.*, #{concatenate_expression} tags
FROM jobs j
LEFT JOIN taggings tgs ON j.id = tgs.taggable_id AND tgs.taggable_type = 'Job'
LEFT JOIN tags ON tgs.tag_id = tags.id
WHERE project_id = #{project['id']}
AND active = true
AND job_type = 'parallel'
GROUP BY j.id"
# skip_refs migrate
skip_refs = []
if project["skip_refs"].present?
skip_refs = project["skip_refs"].split(",").map(&:strip).select{|ref| ref =~ /^[\w-]*\Z/ }
end
# Create Jobs
select_all(sql).each do |job|
config[job["name"].to_s] = {
script: job["commands"] && job["commands"].split("\n").map(&:strip),
tags: job["tags"] && job["tags"].split(",").map(&:strip)
}
except = build_except_param(parse_boolean_value(job["build_branches"]), parse_boolean_value(job["build_tags"]))
except = except + skip_refs
if except.any?
config[job["name"].to_s][:except] = except
end
end
# Create Deploy Jobs
select_all(sql.sub("parallel", 'deploy')).each do |job|
config[job["name"].to_s] = {
script: job["commands"] && job["commands"].split("\n").map(&:strip),
type: "deploy",
tags: job["tags"] && job["tags"].split(",").map(&:strip)
}
if job["refs"].present?
config[job["name"].to_s][:only] = job["refs"].split(",").map(&:strip)
else
except = build_except_param(parse_boolean_value(job["build_branches"]), parse_boolean_value(job["build_tags"]))
except = except + skip_refs
if except.any?
config[job["name"].to_s][:except] = except
end
end
end
yaml_config = YAML.dump(config.deep_stringify_keys)
yaml_config.sub!("---", "# This file is generated by GitLab CI")
execute("UPDATE projects SET generated_yaml_config = '#{quote_string(yaml_config)}' WHERE projects.id = #{project["id"]}")
end
end
def down
end
private
def parse_boolean_value(value)
[ true, 1, '1', 't', 'T', 'true', 'TRUE', 'on', 'ON' ].include?(value)
end
def build_except_param(branches, tags)
unless branches
return ["branches"]
end
unless tags
return ["tags"]
end
[]
end
end
class ChangeDefaultBuildTimeout < ActiveRecord::Migration
def up
change_column :projects, :timeout, :integer, default: 3600, null: false
end
def down
change_column :projects, :timeout, :integer, default: 1800, null: false
end
end
class CreateVariables < ActiveRecord::Migration
def change
create_table :variables do |t|
t.integer :project_id, null: false
t.string :key
t.text :value
end
add_index :variables, :project_id
end
end
\ No newline at end of file
class AddErrorsToCommit < ActiveRecord::Migration
def change
add_column :commits, :yaml_errors, :text
end
end
\ No newline at end of file
class AddOptionsToBuild < ActiveRecord::Migration
def change
add_column :builds, :options, :text
end
end
class AddEncryptedValueToVariables < ActiveRecord::Migration
def change
add_column :variables, :encrypted_value, :text
add_column :variables, :encrypted_value_salt, :string
add_column :variables, :encrypted_value_iv, :string
end
end
class EncryptVariables < ActiveRecord::Migration
def up
Variable.find_each do |variable|
variable.update(value: variable.read_attribute(:value)) unless variable.encrypted_value
end
end
def down
end
end
class AddAllowFailureToBuilds < ActiveRecord::Migration
def change
add_column :builds, :allow_failure, :boolean, default: false, null: false
end
end
class AddJobTypeToBuilds < ActiveRecord::Migration
def change
add_column :builds, :job_type, :string
end
end
class MigrateDeployToJobTypeForBuilds < ActiveRecord::Migration
def up
execute("UPDATE builds SET job_type='test' WHERE NOT deploy")
execute("UPDATE builds SET job_type='deploy' WHERE deploy")
end
end
class TruncateSessions < ActiveRecord::Migration
def up
execute('DELETE FROM sessions')
end
def down
execute('DELETE FROM sessions')
end
end
class CreateApplicationSettings < ActiveRecord::Migration
def change
create_table :application_settings do |t|
t.boolean :all_broken_builds
t.boolean :add_pusher
t.timestamps
end
end
end
class RenameJobTypeToStageBuilds < ActiveRecord::Migration
def up
rename_column :builds, :job_type, :stage
end
def down
rename_column :builds, :stage, :job_type
end
end
class AddCommittedAtToCommits < ActiveRecord::Migration
def up
add_column :commits, :committed_at, :timestamp
add_index :commits, [:project_id, :committed_at]
end
end
class UpdateCommittedAtWithCreatedAt < ActiveRecord::Migration
def up
execute('UPDATE commits SET committed_at=created_at WHERE committed_at IS NULL')
end
end
class CreateTrigger < ActiveRecord::Migration
def up
create_table :triggers do |t|
t.string :token, null: true
t.integer :project_id, null: false
t.datetime :deleted_at
t.timestamps
end
add_index :triggers, :deleted_at
end
end
class AddTriggerToBuilds < ActiveRecord::Migration
def up
add_column :builds, :trigger_request_id, :integer
end
end
class CreateTriggerRequest < ActiveRecord::Migration
def change
create_table :trigger_requests do |t|
t.integer :trigger_id, null: false
t.text :variables
t.timestamps
end
end
end
class AddCommitIdToTriggerRequests < ActiveRecord::Migration
def up
add_column :trigger_requests, :commit_id, :integer
end
def down
end
end
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150819162227) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "ci_application_settings", force: true do |t|
t.boolean "all_broken_builds"
t.boolean "add_pusher"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "ci_builds", force: true do |t|
t.integer "project_id"
t.string "status"
t.datetime "finished_at"
t.text "trace"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "started_at"
t.integer "runner_id"
t.float "coverage"
t.integer "commit_id"
t.text "commands"
t.integer "job_id"
t.string "name"
t.boolean "deploy", default: false
t.text "options"
t.boolean "allow_failure", default: false, null: false
t.string "stage"
t.integer "trigger_request_id"
end
add_index "ci_builds", ["commit_id"], name: "index_builds_on_commit_id", using: :btree
add_index "ci_builds", ["project_id", "commit_id"], name: "index_builds_on_project_id_and_commit_id", using: :btree
add_index "ci_builds", ["project_id"], name: "index_builds_on_project_id", using: :btree
add_index "ci_builds", ["runner_id"], name: "index_builds_on_runner_id", using: :btree
create_table "ci_commits", force: true do |t|
t.integer "project_id"
t.string "ref"
t.string "sha"
t.string "before_sha"
t.text "push_data"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "tag", default: false
t.text "yaml_errors"
t.datetime "committed_at"
end
add_index "ci_commits", ["project_id", "committed_at"], name: "index_commits_on_project_id_and_committed_at", using: :btree
add_index "ci_commits", ["project_id", "sha"], name: "index_commits_on_project_id_and_sha", using: :btree
add_index "ci_commits", ["project_id"], name: "index_commits_on_project_id", using: :btree
add_index "ci_commits", ["sha"], name: "index_commits_on_sha", using: :btree
create_table "ci_events", force: true do |t|
t.integer "project_id"
t.integer "user_id"
t.integer "is_admin"
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "ci_events", ["created_at"], name: "index_events_on_created_at", using: :btree
add_index "ci_events", ["is_admin"], name: "index_events_on_is_admin", using: :btree
add_index "ci_events", ["project_id"], name: "index_events_on_project_id", using: :btree
create_table "ci_jobs", force: true do |t|
t.integer "project_id", null: false
t.text "commands"
t.boolean "active", default: true, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "name"
t.boolean "build_branches", default: true, null: false
t.boolean "build_tags", default: false, null: false
t.string "job_type", default: "parallel"
t.string "refs"
t.datetime "deleted_at"
end
add_index "ci_jobs", ["deleted_at"], name: "index_jobs_on_deleted_at", using: :btree
add_index "ci_jobs", ["project_id"], name: "index_jobs_on_project_id", using: :btree
create_table "ci_projects", force: true do |t|
t.string "name", null: false
t.integer "timeout", default: 3600, null: false
t.datetime "created_at"
t.datetime "updated_at"
t.string "token"
t.string "default_ref"
t.string "path"
t.boolean "always_build", default: false, null: false
t.integer "polling_interval"
t.boolean "public", default: false, null: false
t.string "ssh_url_to_repo"
t.integer "gitlab_id"
t.boolean "allow_git_fetch", default: true, null: false
t.string "email_recipients", default: "", null: false
t.boolean "email_add_pusher", default: true, null: false
t.boolean "email_only_broken_builds", default: true, null: false
t.string "skip_refs"
t.string "coverage_regex"
t.boolean "shared_runners_enabled", default: false
t.text "generated_yaml_config"
end
create_table "ci_runner_projects", force: true do |t|
t.integer "runner_id", null: false
t.integer "project_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "ci_runner_projects", ["project_id"], name: "index_runner_projects_on_project_id", using: :btree
add_index "ci_runner_projects", ["runner_id"], name: "index_runner_projects_on_runner_id", using: :btree
create_table "ci_runners", force: true do |t|
t.string "token"
t.datetime "created_at"
t.datetime "updated_at"
t.string "description"
t.datetime "contacted_at"
t.boolean "active", default: true, null: false
t.boolean "is_shared", default: false
t.string "name"
t.string "version"
t.string "revision"
t.string "platform"
t.string "architecture"
end
create_table "ci_services", force: true do |t|
t.string "type"
t.string "title"
t.integer "project_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "active", default: false, null: false
t.text "properties"
end
add_index "ci_services", ["project_id"], name: "index_services_on_project_id", using: :btree
create_table "ci_sessions", force: true do |t|
t.string "session_id", null: false
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "ci_sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree
add_index "ci_sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
create_table "ci_taggings", force: true do |t|
t.integer "tag_id"
t.integer "taggable_id"
t.string "taggable_type"
t.integer "tagger_id"
t.string "tagger_type"
t.string "context", limit: 128
t.datetime "created_at"
end
add_index "ci_taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree
add_index "ci_taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
create_table "ci_tags", force: true do |t|
t.string "name"
t.integer "taggings_count", default: 0
end
add_index "ci_tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
create_table "ci_trigger_requests", force: true do |t|
t.integer "trigger_id", null: false
t.text "variables"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "commit_id"
end
create_table "ci_triggers", force: true do |t|
t.string "token"
t.integer "project_id", null: false
t.datetime "deleted_at"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "ci_triggers", ["deleted_at"], name: "index_triggers_on_deleted_at", using: :btree
create_table "ci_variables", force: true do |t|
t.integer "project_id", null: false
t.string "key"
t.text "value"
t.text "encrypted_value"
t.string "encrypted_value_salt"
t.string "encrypted_value_iv"
end
add_index "ci_variables", ["project_id"], name: "index_variables_on_project_id", using: :btree
create_table "ci_web_hooks", force: true do |t|
t.string "url", null: false
t.integer "project_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
end
...@@ -27,6 +27,14 @@ Delete Asana service for a project. ...@@ -27,6 +27,14 @@ Delete Asana service for a project.
DELETE /projects/:id/services/asana DELETE /projects/:id/services/asana
``` ```
### Get Asana service settings
Get Asana service settings for a project.
```
GET /projects/:id/services/asana
```
## Assembla ## Assembla
Project Management Software (Source Commits Endpoint) Project Management Software (Source Commits Endpoint)
...@@ -52,6 +60,14 @@ Delete Assembla service for a project. ...@@ -52,6 +60,14 @@ Delete Assembla service for a project.
DELETE /projects/:id/services/assembla DELETE /projects/:id/services/assembla
``` ```
### Get Assembla service settings
Get Assembla service settings for a project.
```
GET /projects/:id/services/assembla
```
## Atlassian Bamboo CI ## Atlassian Bamboo CI
A continuous integration and build server A continuous integration and build server
...@@ -81,6 +97,14 @@ Delete Atlassian Bamboo CI service for a project. ...@@ -81,6 +97,14 @@ Delete Atlassian Bamboo CI service for a project.
DELETE /projects/:id/services/bamboo 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 ## Buildkite
Continuous integration and deployments Continuous integration and deployments
...@@ -107,6 +131,14 @@ Delete Buildkite service for a project. ...@@ -107,6 +131,14 @@ Delete Buildkite service for a project.
DELETE /projects/:id/services/buildkite DELETE /projects/:id/services/buildkite
``` ```
### Get Buildkite service settings
Get Buildkite service settings for a project.
```
GET /projects/:id/services/buildkite
```
## Campfire ## Campfire
Simple web-based real-time group chat Simple web-based real-time group chat
...@@ -133,6 +165,14 @@ Delete Campfire service for a project. ...@@ -133,6 +165,14 @@ Delete Campfire service for a project.
DELETE /projects/:id/services/campfire 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
Custom issue tracker Custom issue tracker
...@@ -161,6 +201,14 @@ Delete Custom Issue Tracker service for a project. ...@@ -161,6 +201,14 @@ Delete Custom Issue Tracker service for a project.
DELETE /projects/:id/services/custom-issue-tracker 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 CI
Drone is a Continuous Integration platform built on Docker, written in Go Drone is a Continuous Integration platform built on Docker, written in Go
...@@ -187,6 +235,14 @@ Delete Drone CI service for a project. ...@@ -187,6 +235,14 @@ Delete Drone CI service for a project.
DELETE /projects/:id/services/drone-ci 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 ## Emails on push
Email the commits and diff of each push to a list of recipients. 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. ...@@ -213,6 +269,14 @@ Delete Emails on push service for a project.
DELETE /projects/:id/services/emails-on-push 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 ## External Wiki
Replaces the link to the internal wiki with a link to an 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. ...@@ -237,6 +301,14 @@ Delete External Wiki service for a project.
DELETE /projects/:id/services/external-wiki 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
Flowdock is a collaboration web app for technical teams. Flowdock is a collaboration web app for technical teams.
...@@ -261,6 +333,14 @@ Delete Flowdock service for a project. ...@@ -261,6 +333,14 @@ Delete Flowdock service for a project.
DELETE /projects/:id/services/flowdock DELETE /projects/:id/services/flowdock
``` ```
### Get Flowdock service settings
Get Flowdock service settings for a project.
```
GET /projects/:id/services/flowdock
```
## Gemnasium ## Gemnasium
Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities. Gemnasium monitors your project dependencies and alerts you about updates and security vulnerabilities.
...@@ -286,6 +366,14 @@ Delete Gemnasium service for a project. ...@@ -286,6 +366,14 @@ Delete Gemnasium service for a project.
DELETE /projects/:id/services/gemnasium DELETE /projects/:id/services/gemnasium
``` ```
### Get Gemnasium service settings
Get Gemnasium service settings for a project.
```
GET /projects/:id/services/gemnasium
```
## GitLab CI ## GitLab CI
Continuous integration server from GitLab Continuous integration server from GitLab
...@@ -312,6 +400,14 @@ Delete GitLab CI service for a project. ...@@ -312,6 +400,14 @@ Delete GitLab CI service for a project.
DELETE /projects/:id/services/gitlab-ci 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 ## HipChat
Private group chat and IM Private group chat and IM
...@@ -341,6 +437,14 @@ Delete HipChat service for a project. ...@@ -341,6 +437,14 @@ Delete HipChat service for a project.
DELETE /projects/:id/services/hipchat DELETE /projects/:id/services/hipchat
``` ```
### Get HipChat service settings
Get HipChat service settings for a project.
```
GET /projects/:id/services/hipchat
```
## Irker (IRC gateway) ## Irker (IRC gateway)
Send IRC messages, on update, to a list of recipients through an Irker 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. ...@@ -371,6 +475,14 @@ Delete Irker (IRC gateway) service for a project.
DELETE /projects/:id/services/irker 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
Jira issue tracker Jira issue tracker
...@@ -400,6 +512,14 @@ Delete JIRA service for a project. ...@@ -400,6 +512,14 @@ Delete JIRA service for a project.
DELETE /projects/:id/services/jira DELETE /projects/:id/services/jira
``` ```
### Get JIRA service settings
Get JIRA service settings for a project.
```
GET /projects/:id/services/jira
```
## PivotalTracker ## PivotalTracker
Project Management Software (Source Commits Endpoint) Project Management Software (Source Commits Endpoint)
...@@ -424,6 +544,14 @@ Delete PivotalTracker service for a project. ...@@ -424,6 +544,14 @@ Delete PivotalTracker service for a project.
DELETE /projects/:id/services/pivotaltracker DELETE /projects/:id/services/pivotaltracker
``` ```
### Get PivotalTracker service settings
Get PivotalTracker service settings for a project.
```
GET /projects/:id/services/pivotaltracker
```
## Pushover ## Pushover
Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop. 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. ...@@ -452,6 +580,14 @@ Delete Pushover service for a project.
DELETE /projects/:id/services/pushover DELETE /projects/:id/services/pushover
``` ```
### Get Pushover service settings
Get Pushover service settings for a project.
```
GET /projects/:id/services/pushover
```
## Redmine ## Redmine
Redmine issue tracker Redmine issue tracker
...@@ -479,6 +615,14 @@ Delete Redmine service for a project. ...@@ -479,6 +615,14 @@ Delete Redmine service for a project.
DELETE /projects/:id/services/redmine DELETE /projects/:id/services/redmine
``` ```
### Get Redmine service settings
Get Redmine service settings for a project.
```
GET /projects/:id/services/redmine
```
## Slack ## Slack
A team communication tool for the 21st century A team communication tool for the 21st century
...@@ -505,6 +649,14 @@ Delete Slack service for a project. ...@@ -505,6 +649,14 @@ Delete Slack service for a project.
DELETE /projects/:id/services/slack DELETE /projects/:id/services/slack
``` ```
### Get Slack service settings
Get Slack service settings for a project.
```
GET /projects/:id/services/slack
```
## JetBrains TeamCity CI ## JetBrains TeamCity CI
A continuous integration and build server A continuous integration and build server
...@@ -534,3 +686,11 @@ Delete JetBrains TeamCity CI service for a project. ...@@ -534,3 +686,11 @@ Delete JetBrains TeamCity CI service for a project.
DELETE /projects/:id/services/teamcity 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
```
...@@ -162,7 +162,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab ...@@ -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: 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. * 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.
......
...@@ -25,6 +25,9 @@ RUN mkdir -p /opt/gitlab/sv/sshd/supervise \ ...@@ -25,6 +25,9 @@ RUN mkdir -p /opt/gitlab/sv/sshd/supervise \
&& ln -s /opt/gitlab/sv/sshd /opt/gitlab/service \ && ln -s /opt/gitlab/sv/sshd /opt/gitlab/service \
&& mkdir -p /var/run/sshd && 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 # Prepare default configuration
RUN ( \ RUN ( \
echo "" && \ echo "" && \
......
...@@ -4,11 +4,13 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps ...@@ -4,11 +4,13 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
include SharedAdmin include SharedAdmin
before do 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 end
after do 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 end
step 'I should see all users' do step 'I should see all users' do
......
...@@ -49,6 +49,16 @@ module API ...@@ -49,6 +49,16 @@ module API
end end
end end
end end
# Get <service_slug> 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 end
end end
...@@ -77,7 +77,7 @@ module Gitlab ...@@ -77,7 +77,7 @@ module Gitlab
pipeline: options[:pipeline], pipeline: options[:pipeline],
# EmojiFilter # EmojiFilter
asset_root: Gitlab.config.gitlab.url, asset_root: Gitlab.config.gitlab.base_url,
asset_host: Gitlab::Application.config.asset_host, asset_host: Gitlab::Application.config.asset_host,
# TableOfContentsFilter # TableOfContentsFilter
......
...@@ -67,12 +67,16 @@ module Gitlab ...@@ -67,12 +67,16 @@ module Gitlab
def clean_spans def clean_spans
lambda do |env| lambda do |env|
return unless env[:node_name] == 'span' node = env[:node]
return unless env[:node].has_attribute?('class')
unless has_ancestor?(env[:node], 'pre') return unless node.name == 'span'
env[:node].remove_attribute('class') return unless node.has_attribute?('class')
unless has_ancestor?(node, 'pre')
node.remove_attribute('class')
end end
{ node_whitelist: [node] }
end end
end end
end end
......
...@@ -21,7 +21,13 @@ module Gitlab ...@@ -21,7 +21,13 @@ module Gitlab
language = node.attr('class') language = node.attr('class')
code = node.text code = node.text
begin
highlighted = block_code(code, language) highlighted = block_code(code, language)
rescue
# Gracefully handle syntax highlighter bugs/errors to ensure
# users can still access an issue/comment/etc.
highlighted = "<pre>#{code}</pre>"
end
# Replace the parent `pre` element with the entire highlighted block # Replace the parent `pre` element with the entire highlighted block
node.parent.replace(highlighted) node.parent.replace(highlighted)
......
...@@ -40,6 +40,15 @@ DELETE /projects/:id/services/<%= service[:dashed_name] %> ...@@ -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 %> <% end %>
ERB ERB
......
#= 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('<div class="js-syntax-highlight"></div>')
it 'applies syntax highlighting', ->
stubUserColorScheme('monokai')
$('.js-syntax-highlight').syntaxHighlight()
expect($('.js-syntax-highlight')).toHaveClass('monokai')
describe 'on a parent element', ->
beforeEach ->
fixture.set """
<div class="parent">
<div class="js-syntax-highlight"></div>
<div class="foo"></div>
<div class="js-syntax-highlight"></div>
</div>
"""
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('<div></div>')
highlight = -> $('div').syntaxHighlight()
expect(highlight).not.toThrow()
require 'spec_helper'
module Gitlab::Markdown
describe SyntaxHighlightFilter do
include FilterSpecHelper
it 'highlights valid code blocks' do
result = filter('<pre><code>def fun end</code>')
expect(result.to_html).to eq("<pre class=\"code highlight js-syntax-highlight plaintext\"><code>def fun end</code></pre>\n")
end
it 'passes through invalid code blocks' do
allow_any_instance_of(SyntaxHighlightFilter).to receive(:block_code).and_raise(StandardError)
result = filter('<pre><code>This is a test</code></pre>')
expect(result.to_html).to eq('<pre>This is a test</pre>')
end
end
end
...@@ -47,5 +47,15 @@ describe API::API, api: true do ...@@ -47,5 +47,15 @@ describe API::API, api: true do
expect(project.send(service_method).activated?).to be_falsey expect(project.send(service_method).activated?).to be_falsey
end end
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
end end
...@@ -28,6 +28,7 @@ RSpec.configure do |config| ...@@ -28,6 +28,7 @@ RSpec.configure do |config|
config.include LoginHelpers, type: :feature config.include LoginHelpers, type: :feature
config.include LoginHelpers, type: :request config.include LoginHelpers, type: :request
config.include StubConfiguration config.include StubConfiguration
config.include RelativeUrl, type: feature
config.include TestEnv config.include TestEnv
config.include StubGitlabCalls config.include StubGitlabCalls
config.include StubGitlabData config.include StubGitlabData
......
...@@ -27,6 +27,9 @@ module MarkdownMatchers ...@@ -27,6 +27,9 @@ module MarkdownMatchers
match do |actual| match do |actual|
expect(actual).to have_selector('img.emoji', count: 10) 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
end end
......
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment