Commit 41498864 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'master' into qa/gb/ci-cd-qa-pipelines

* master: (69 commits)

Conflicts:
	qa/qa.rb
parents d327277c 4dc42845
...@@ -290,7 +290,7 @@ flaky-examples-check: ...@@ -290,7 +290,7 @@ flaky-examples-check:
- scripts/merge-reports ${NEW_FLAKY_SPECS_REPORT} rspec_flaky/new_*_*.json - scripts/merge-reports ${NEW_FLAKY_SPECS_REPORT} rspec_flaky/new_*_*.json
- scripts/detect-new-flaky-examples $NEW_FLAKY_SPECS_REPORT - scripts/detect-new-flaky-examples $NEW_FLAKY_SPECS_REPORT
setup-test-env: compile-assets:
<<: *dedicated-runner <<: *dedicated-runner
<<: *except-docs <<: *except-docs
<<: *use-pg <<: *use-pg
...@@ -301,13 +301,25 @@ setup-test-env: ...@@ -301,13 +301,25 @@ setup-test-env:
- node --version - node --version
- yarn install --frozen-lockfile --cache-folder .yarn-cache - yarn install --frozen-lockfile --cache-folder .yarn-cache
- bundle exec rake gitlab:assets:compile - bundle exec rake gitlab:assets:compile
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
- scripts/gitaly-test-build # Do not use 'bundle exec' here
artifacts: artifacts:
expire_in: 7d expire_in: 7d
paths: paths:
- node_modules - node_modules
- public/assets - public/assets
setup-test-env:
<<: *dedicated-runner
<<: *except-docs
<<: *use-pg
stage: prepare
cache:
<<: *default-cache
script:
- bundle exec ruby -Ispec -e 'require "spec_helper" ; TestEnv.init'
- scripts/gitaly-test-build # Do not use 'bundle exec' here
artifacts:
expire_in: 7d
paths:
- tmp/tests - tmp/tests
rspec-pg 0 26: *rspec-metadata-pg rspec-pg 0 26: *rspec-metadata-pg
...@@ -664,6 +676,7 @@ lint:javascript:report: ...@@ -664,6 +676,7 @@ lint:javascript:report:
<<: *pull-cache <<: *pull-cache
stage: post-test stage: post-test
dependencies: dependencies:
- compile-assets
- setup-test-env - setup-test-env
before_script: [] before_script: []
script: script:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -406,7 +406,7 @@ group :ed25519 do ...@@ -406,7 +406,7 @@ group :ed25519 do
end end
# Gitaly GRPC client # Gitaly GRPC client
gem 'gitaly-proto', '~> 0.73.0', require: 'gitaly' gem 'gitaly-proto', '~> 0.74.0', require: 'gitaly'
gem 'toml-rb', '~> 0.3.15', require: false gem 'toml-rb', '~> 0.3.15', require: false
......
...@@ -285,7 +285,7 @@ GEM ...@@ -285,7 +285,7 @@ GEM
po_to_json (>= 1.0.0) po_to_json (>= 1.0.0)
rails (>= 3.2.0) rails (>= 3.2.0)
gherkin-ruby (0.3.2) gherkin-ruby (0.3.2)
gitaly-proto (0.73.0) gitaly-proto (0.74.0)
google-protobuf (~> 3.1) google-protobuf (~> 3.1)
grpc (~> 1.0) grpc (~> 1.0)
github-linguist (4.7.6) github-linguist (4.7.6)
...@@ -1056,7 +1056,7 @@ DEPENDENCIES ...@@ -1056,7 +1056,7 @@ DEPENDENCIES
gettext (~> 3.2.2) gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0) gettext_i18n_rails_js (~> 1.2.0)
gitaly-proto (~> 0.73.0) gitaly-proto (~> 0.74.0)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-markup (~> 1.6.2) gitlab-markup (~> 1.6.2)
......
10.4.0-pre 10.5.0-pre
{"iconCount":189,"spriteSize":85766,"icons":["abuse","account","admin","angle-double-left","angle-double-right","angle-down","angle-left","angle-right","angle-up","appearance","applications","approval","arrow-down","arrow-right","assignee","bold","book","bookmark","branch","bullhorn","calendar","cancel","chart","chevron-down","chevron-left","chevron-right","chevron-up","clock","close","code","collapse","comment-dots","comment-next","comment","comments","commit","credit-card","cut","dashboard","disk","doc_code","doc_image","doc_text","double-headed-arrow","download","duplicate","earth","ellipsis_v","emoji_slightly_smiling_face","emoji_smile","emoji_smiley","epic","external-link","eye-slash","eye","file-addition","file-deletion","file-modified","filter","folder-o-open","folder-o","folder-open","folder","fork","geo-nodes","git-merge","group","history","home","hook","hourglass","image-comment-dark","image-comment-light","import","issue-block","issue-child","issue-close","issue-duplicate","issue-external","issue-new","issue-open-m","issue-open","issue-parent","issues","italic","key-2","key","label","labels","leave","level-up","license","link","list-bulleted","list-numbered","location-dot","location","lock-open","lock","log","mail","menu","merge-request-close","messages","mobile-issue-close","monitor","more","notifications-off","notifications","overview","pencil-square","pencil","pipeline","play","plus-square-o","plus-square","plus","podcast","preferences","profile","project","push-rules","question-o","question","quote","redo","remove","repeat","retry","scale","screen-full","screen-normal","scroll_down","scroll_up","search","settings","shield","slight-frown","slight-smile","smile","smiley","snippet","spam","spinner","staged","star-o","star","status_canceled_borderless","status_canceled","status_closed","status_created_borderless","status_created","status_failed_borderless","status_failed","status_manual_borderless","status_manual","status_notfound_borderless","status_open","status_pending_borderless","status_pending","status_running_borderless","status_running","status_skipped_borderless","status_skipped","status_success_borderless","status_success_solid","status_success","status_warning_borderless","status_warning","stop","task-done","template","terminal","thumb-down","thumb-up","thumbtack","timer","todo-add","todo-done","token","unapproval","unassignee","unlink","unstaged","user","users","volume-up","warning","work"]} {"iconCount":189,"spriteSize":85900,"icons":["abuse","account","admin","angle-double-left","angle-double-right","angle-down","angle-left","angle-right","angle-up","appearance","applications","approval","arrow-down","arrow-right","assignee","bold","book","bookmark","branch","bullhorn","calendar","cancel","chart","chevron-down","chevron-left","chevron-right","chevron-up","clock","close","code","collapse","comment-dots","comment-next","comment","comments","commit","credit-card","cut","dashboard","disk","doc_code","doc_image","doc_text","double-headed-arrow","download","duplicate","earth","ellipsis_v","emoji_slightly_smiling_face","emoji_smile","emoji_smiley","epic","external-link","eye-slash","eye","file-addition","file-deletion","file-modified","filter","folder-o","folder-open","folder","fork","geo-nodes","git-merge","group","history","home","hook","hourglass","image-comment-dark","image-comment-light","import","issue-block","issue-child","issue-close","issue-duplicate","issue-external","issue-new","issue-open-m","issue-open","issue-parent","issues","italic","key-2","key","label","labels","leave","level-up","license","link","list-bulleted","list-numbered","location-dot","location","lock-open","lock","log","mail","menu","merge-request-close","messages","mobile-issue-close","monitor","more","notifications-off","notifications","overview","pencil-square","pencil","pipeline","play","plus-square-o","plus-square","plus","podcast","preferences","profile","project","push-rules","question-o","question","quote","redo","remove","repeat","retry","scale","screen-full","screen-normal","scroll_down","scroll_up","search","settings","shield","slight-frown","slight-smile","smile","smiley","snippet","spam","spinner","staged","star-o","star","status_canceled_borderless","status_canceled","status_closed","status_created_borderless","status_created","status_failed_borderless","status_failed","status_manual_borderless","status_manual","status_notfound_borderless","status_notfound","status_open","status_pending_borderless","status_pending","status_running_borderless","status_running","status_skipped_borderless","status_skipped","status_success_borderless","status_success_solid","status_success","status_warning_borderless","status_warning","stop","task-done","template","terminal","thumb-down","thumb-up","thumbtack","timer","todo-add","todo-done","token","unapproval","unassignee","unlink","unstaged","user","users","volume-up","warning","work"]}
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><g fill="none" fill-rule="evenodd"><path fill="#EEE" d="M44.242 59.348c-3.7 1.576-7.3 1.994-10.902.84a7.002 7.002 0 0 1-9.085-.699l-4.243-4.243a7 7 0 0 1-.238-9.649c-.701-3.024-.419-6.083.646-9.206l-6.287-2.426a5.6 5.6 0 0 1-2.274-8.824l8.233-9.811a5.6 5.6 0 0 1 6.306-1.625l8.045 3.105c.772-.797 1.564-1.6 2.374-2.41C44.841 6.376 55.265 2.135 68.09 1.677a10 10 0 0 1 1.119.023c5.507.42 9.63 5.226 9.209 10.733-.935 12.225-5.373 22.309-13.315 30.25a410.76 410.76 0 0 1-1.661 1.653l3.247 8.412a5.6 5.6 0 0 1-1.625 6.306l-9.81 8.233a5.6 5.6 0 0 1-8.825-2.274l-2.186-5.665zm-22.92-26.923l10.406-12.402-6.822-2.633a1.6 1.6 0 0 0-1.801.464l-8.233 9.811a1.6 1.6 0 0 0 .65 2.521l5.8 2.239zm26.646 25.4l2.239 5.8a1.6 1.6 0 0 0 2.521.649l9.81-8.232a1.6 1.6 0 0 0 .465-1.802l-2.633-6.822-12.402 10.406zm-19.69-5.627c8.751 8.752 16.065 5.587 33.995-12.343 7.25-7.25 11.292-16.433 12.155-27.727a6 6 0 0 0-6.196-6.454c-11.846.423-21.303 4.271-28.586 11.554-17.03 17.03-20.414 25.924-11.368 34.97z"/><path fill="#FDC4A8" fill-rule="nonzero" d="M52.54 28.376a4 4 0 1 0 5.656-5.657 4 4 0 0 0-5.657 5.657zm-2.83 2.829A8 8 0 1 1 61.025 19.89a8 8 0 0 1-11.313 11.314z"/><path fill="#FEE1D3" d="M15.063 54.54a2 2 0 0 1 0 2.828L3.749 68.68A2 2 0 1 1 .92 65.853l11.314-11.314a2 2 0 0 1 2.829 0zm9.899 9.899a2 2 0 0 1 0 2.828l-8.485 8.485a2 2 0 1 1-2.829-2.828l8.486-8.485a2 2 0 0 1 2.828 0z"/><path fill="#FDC4A8" d="M20.012 59.489a2 2 0 0 1 0 2.828L4.456 77.874a2 2 0 0 1-2.829-2.829L17.184 59.49a2 2 0 0 1 2.828 0z"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><g fill="none" fill-rule="evenodd" transform="translate(7 3)"><path fill="#EEE" fill-rule="nonzero" d="M54 18a2 2 0 1 1 0-4h4c.843 0 1.675.105 2.48.31a2 2 0 1 1-.99 3.876A6.015 6.015 0 0 0 58 18h-4zm9.735 4.228a2 2 0 0 1 3.822-1.18A10 10 0 0 1 68 24v3.513a2 2 0 1 1-4 0V24c0-.61-.09-1.204-.265-1.772zM64 35.513a2 2 0 1 1 4 0v6a2 2 0 1 1-4 0v-6zm0 14a2 2 0 1 1 4 0v6a2 2 0 1 1-4 0v-6zm0 14a2 2 0 1 1 4 0V66a9.97 9.97 0 0 1-.963 4.286 2 2 0 1 1-3.613-1.716A5.969 5.969 0 0 0 64 66v-2.487zm-5.255 8.441a2 2 0 1 1 .49 3.97c-.401.05-.806.075-1.218.076h-5.042a2 2 0 1 1 0-4h5.038c.246 0 .49-.016.732-.046zM44.975 72a2 2 0 1 1 0 4h-6a2 2 0 1 1 0-4h6zm-14 0a2 2 0 1 1 0 4H26c-.429 0-.855-.027-1.276-.08a2 2 0 0 1 .506-3.969c.254.033.51.049.77.049h4.975zm-10.438-3.514a2 2 0 1 1-3.64 1.66A9.97 9.97 0 0 1 16 66v-2.538a2 2 0 1 1 4 0V66c0 .871.185 1.713.537 2.486zM8 2a6 6 0 0 0-6 6v42a6 6 0 0 0 6 6h32a6 6 0 0 0 6-6V8a6 6 0 0 0-6-6H8zm0-4h32c5.523 0 10 4.477 10 10v42c0 5.523-4.477 10-10 10H8C2.477 60-2 55.523-2 50V8C-2 2.477 2.477-2 8-2z"/><rect width="10" height="4" x="8" y="16" fill="#EFEDF8" rx="2"/><rect width="10" height="4" x="21" y="16" fill="#6B4FBB" rx="2"/><rect width="10" height="4" x="8" y="32" fill="#E1DBF1" rx="2"/><rect width="6" height="4" x="34" y="16" fill="#EFEDF8" rx="2"/><rect width="6" height="4" x="8" y="24" fill="#6B4FBB" rx="2"/><rect width="6" height="4" x="17" y="24" fill="#EFEDF8" rx="2"/><rect width="6" height="4" x="21" y="32" fill="#6B4FBB" rx="2"/><rect width="6" height="4" x="8" y="40" fill="#6B4FBB" rx="2"/><rect width="6" height="4" x="17" y="40" fill="#EFEDF8" rx="2"/><rect width="6" height="4" x="26" y="40" fill="#C3B8E3" rx="2"/><rect width="10" height="4" x="26" y="24" fill="#C3B8E3" rx="2"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><g fill="none" fill-rule="evenodd" transform="translate(0 3)"><path fill="#EEE" fill-rule="nonzero" d="M40.843 5.864a2 2 0 1 1 .348-3.985l5.977.523a2 2 0 1 1-.348 3.985l-5.977-.523zm13.946 1.22a2 2 0 1 1 .349-3.985l5.977.523a2 2 0 1 1-.348 3.985l-5.978-.523zm13.947 1.22a2 2 0 1 1 .349-3.984 11.952 11.952 0 0 1 6.655 2.75 2 2 0 1 1-2.569 3.066 7.953 7.953 0 0 0-4.435-1.832zm7.28 7.357a2 2 0 1 1 3.99-.301c.048.639.045 1.283-.01 1.934l-.385 4.4a2 2 0 1 1-3.985-.349l.384-4.395c.037-.433.039-.863.007-1.29zm-1.088 13.654a2 2 0 0 1 3.985.348l-.523 5.978a2 2 0 1 1-3.984-.349l.522-5.977zm-1.22 13.947a2 2 0 1 1 3.985.348l-.523 5.977a2 2 0 1 1-3.985-.348l.523-5.977zM72.305 56.7a2 2 0 0 1 3.79 1.282 11.995 11.995 0 0 1-4.253 5.81 2 2 0 0 1-2.373-3.22 7.996 7.996 0 0 0 2.836-3.872zm-9.054 5.33a2 2 0 1 1-.349 3.985l-5.977-.522a2 2 0 1 1 .349-3.985l5.977.523zM32.793 10.675a2 2 0 1 1-3.675-1.579 12.02 12.02 0 0 1 4.696-5.456 2 2 0 0 1 2.112 3.397 8.02 8.02 0 0 0-3.133 3.638z"/><rect width="48" height="58" x="2" y="14" fill="#FAFAFA" rx="10"/><path fill="#EEE" fill-rule="nonzero" d="M12 16a8 8 0 0 0-8 8v38a8 8 0 0 0 8 8h28a8 8 0 0 0 8-8V24a8 8 0 0 0-8-8H12zm0-4h28c6.627 0 12 5.373 12 12v38c0 6.627-5.373 12-12 12H12C5.373 74 0 68.627 0 62V24c0-6.627 5.373-12 12-12z"/><rect width="24" height="4" x="11" y="30" fill="#E5E5E5" rx="2"/><rect width="30" height="4" x="11" y="41" fill="#E5E5E5" rx="2"/><rect width="20" height="4" x="11" y="52" fill="#E5E5E5" rx="2"/></g></svg>
\ No newline at end of file
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */
import Milestone from './milestone'; import Milestone from './milestone';
import NotificationsForm from './notifications_form';
import notificationsDropdown from './notifications_dropdown'; import notificationsDropdown from './notifications_dropdown';
import LineHighlighter from './line_highlighter'; import LineHighlighter from './line_highlighter';
import MergeRequest from './merge_request'; import MergeRequest from './merge_request';
import Sidebar from './right_sidebar'; import Sidebar from './right_sidebar';
import Flash from './flash'; import Flash from './flash';
import SecretValues from './behaviors/secret_values';
import UserCallout from './user_callout';
import BlobViewer from './blob/viewer/index'; import BlobViewer from './blob/viewer/index';
import GfmAutoComplete from './gfm_auto_complete'; import GfmAutoComplete from './gfm_auto_complete';
import Star from './star'; import Star from './star';
import TreeView from './tree';
import ZenMode from './zen_mode'; import ZenMode from './zen_mode';
import initSettingsPanels from './settings_panels';
import PerformanceBar from './performance_bar'; import PerformanceBar from './performance_bar';
import initNotes from './init_notes'; import initNotes from './init_notes';
import initIssuableSidebar from './init_issuable_sidebar'; import initIssuableSidebar from './init_issuable_sidebar';
import { ajaxGet, convertPermissionToBoolean } from './lib/utils/common_utils'; import { convertPermissionToBoolean } from './lib/utils/common_utils';
import GlFieldErrors from './gl_field_errors'; import GlFieldErrors from './gl_field_errors';
import GLForm from './gl_form';
import Shortcuts from './shortcuts'; import Shortcuts from './shortcuts';
import ShortcutsNavigation from './shortcuts_navigation';
import ShortcutsIssuable from './shortcuts_issuable'; import ShortcutsIssuable from './shortcuts_issuable';
import U2FAuthenticate from './u2f/authenticate';
import Diff from './diff'; import Diff from './diff';
import SearchAutocomplete from './search_autocomplete'; import SearchAutocomplete from './search_autocomplete';
import Activities from './activities';
(function() { (function() {
var Dispatcher; var Dispatcher;
...@@ -131,7 +122,9 @@ import Activities from './activities'; ...@@ -131,7 +122,9 @@ import Activities from './activities';
.catch(fail); .catch(fail);
break; break;
case 'dashboard:todos:index': case 'dashboard:todos:index':
import('./pages/dashboard/todos/index').then(callDefault).catch(fail); import('./pages/dashboard/todos/index')
.then(callDefault)
.catch(fail);
break; break;
case 'admin:jobs:index': case 'admin:jobs:index':
import('./pages/admin/jobs/index') import('./pages/admin/jobs/index')
...@@ -234,15 +227,21 @@ import Activities from './activities'; ...@@ -234,15 +227,21 @@ import Activities from './activities';
.catch(fail); .catch(fail);
break; break;
case 'projects:snippets:show': case 'projects:snippets:show':
initNotes(); import('./pages/projects/snippets/show')
new ZenMode(); .then(callDefault)
.catch(fail);
break; break;
case 'projects:snippets:new': case 'projects:snippets:new':
case 'projects:snippets:edit':
case 'projects:snippets:create': case 'projects:snippets:create':
import('./pages/projects/snippets/new')
.then(callDefault)
.catch(fail);
break;
case 'projects:snippets:edit':
case 'projects:snippets:update': case 'projects:snippets:update':
new GLForm($('.snippet-form'), true); import('./pages/projects/snippets/edit')
new ZenMode(); .then(callDefault)
.catch(fail);
break; break;
case 'snippets:new': case 'snippets:new':
import('./pages/snippets/new') import('./pages/snippets/new')
...@@ -265,8 +264,9 @@ import Activities from './activities'; ...@@ -265,8 +264,9 @@ import Activities from './activities';
.catch(fail); .catch(fail);
break; break;
case 'projects:releases:edit': case 'projects:releases:edit':
new ZenMode(); import('./pages/projects/releases/edit')
new GLForm($('.release-form'), true); .then(callDefault)
.catch(fail);
break; break;
case 'projects:merge_requests:show': case 'projects:merge_requests:show':
new Diff(); new Diff();
...@@ -310,19 +310,10 @@ import Activities from './activities'; ...@@ -310,19 +310,10 @@ import Activities from './activities';
shortcut_handler = true; shortcut_handler = true;
break; break;
case 'projects:show': case 'projects:show':
shortcut_handler = new ShortcutsNavigation(); import('./pages/projects/show')
new NotificationsForm(); .then(callDefault)
new UserCallout({ .catch(fail);
setCalloutPerProject: true, shortcut_handler = true;
className: 'js-autodevops-banner',
});
if ($('#tree-slider').length) new TreeView();
if ($('.blob-viewer').length) new BlobViewer();
if ($('.project-show-activity').length) new Activities();
$('#tree-slider').waitForImages(function() {
ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath);
});
break; break;
case 'projects:edit': case 'projects:edit':
import('./pages/projects/edit') import('./pages/projects/edit')
...@@ -477,18 +468,15 @@ import Activities from './activities'; ...@@ -477,18 +468,15 @@ import Activities from './activities';
.catch(fail); .catch(fail);
break; break;
case 'projects:settings:repository:show': case 'projects:settings:repository:show':
// Initialize expandable settings panels import('./pages/projects/settings/repository/show')
initSettingsPanels(); .then(callDefault)
.catch(fail);
break; break;
case 'projects:settings:ci_cd:show': case 'projects:settings:ci_cd:show':
// Initialize expandable settings panels import('./pages/projects/settings/ci_cd/show')
initSettingsPanels(); .then(callDefault)
.catch(fail);
const runnerToken = document.querySelector('.js-secret-runner-token'); break;
if (runnerToken) {
const runnerTokenSecretValue = new SecretValues(runnerToken);
runnerTokenSecretValue.init();
}
case 'groups:settings:ci_cd:show': case 'groups:settings:ci_cd:show':
import('./pages/groups/settings/ci_cd/show') import('./pages/groups/settings/ci_cd/show')
.then(callDefault) .then(callDefault)
...@@ -496,13 +484,19 @@ import Activities from './activities'; ...@@ -496,13 +484,19 @@ import Activities from './activities';
break; break;
case 'ci:lints:create': case 'ci:lints:create':
case 'ci:lints:show': case 'ci:lints:show':
import('./pages/ci/lints').then(m => m.default()).catch(fail); import('./pages/ci/lints')
.then(callDefault)
.catch(fail);
break; break;
case 'users:show': case 'users:show':
import('./pages/users/show').then(callDefault).catch(fail); import('./pages/users/show')
.then(callDefault)
.catch(fail);
break; break;
case 'admin:conversational_development_index:show': case 'admin:conversational_development_index:show':
import('./pages/admin/conversational_development_index/show').then(m => m.default()).catch(fail); import('./pages/admin/conversational_development_index/show')
.then(callDefault)
.catch(fail);
break; break;
case 'snippets:show': case 'snippets:show':
import('./pages/snippets/show') import('./pages/snippets/show')
...@@ -510,7 +504,9 @@ import Activities from './activities'; ...@@ -510,7 +504,9 @@ import Activities from './activities';
.catch(fail); .catch(fail);
break; break;
case 'import:fogbugz:new_user_map': case 'import:fogbugz:new_user_map':
import('./pages/import/fogbugz/new_user_map').then(m => m.default()).catch(fail); import('./pages/import/fogbugz/new_user_map')
.then(callDefault)
.catch(fail);
break; break;
case 'profiles:personal_access_tokens:index': case 'profiles:personal_access_tokens:index':
import('./pages/profiles/personal_access_tokens') import('./pages/profiles/personal_access_tokens')
...@@ -537,18 +533,15 @@ import Activities from './activities'; ...@@ -537,18 +533,15 @@ import Activities from './activities';
} }
switch (path[0]) { switch (path[0]) {
case 'sessions': case 'sessions':
import('./pages/sessions')
.then(callDefault)
.catch(fail);
break;
case 'omniauth_callbacks': case 'omniauth_callbacks':
if (!gon.u2f) break; import('./pages/omniauth_callbacks')
const u2fAuthenticate = new U2FAuthenticate( .then(callDefault)
$('#js-authenticate-u2f'), .catch(fail);
'#js-login-u2f-form', break;
gon.u2f,
document.querySelector('#js-login-2fa-device'),
document.querySelector('.js-2fa-form'),
);
u2fAuthenticate.start();
// needed in rspec
gl.u2fAuthenticate = u2fAuthenticate;
case 'admin': case 'admin':
import('./pages/admin') import('./pages/admin')
.then(callDefault) .then(callDefault)
...@@ -598,10 +591,6 @@ import Activities from './activities'; ...@@ -598,10 +591,6 @@ import Activities from './activities';
break; break;
} }
break; break;
case 'dashboard':
case 'root':
new UserCallout();
break;
case 'profiles': case 'profiles':
import('./pages/profiles/index/') import('./pages/profiles/index/')
.then(callDefault) .then(callDefault)
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
> >
<div <div
v-if="model.isLoadingFolderContent" v-if="model.isLoadingFolderContent"
:key="i"> :key="`loading-item-${i}`">
<loading-icon size="2" /> <loading-icon size="2" />
</div> </div>
...@@ -110,10 +110,10 @@ export default { ...@@ -110,10 +110,10 @@ export default {
:model="children" :model="children"
:can-create-deployment="canCreateDeployment" :can-create-deployment="canCreateDeployment"
:can-read-environment="canReadEnvironment" :can-read-environment="canReadEnvironment"
:key="index" :key="`env-item-${i}-${index}`"
/> />
<div :key="i"> <div :key="`sub-div-${i}`">
<div class="text-center prepend-top-10"> <div class="text-center prepend-top-10">
<a <a
:href="folderUrl(model)" :href="folderUrl(model)"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
> >
<repo-tab <repo-tab
v-for="tab in openFiles" v-for="tab in openFiles"
:key="tab.id" :key="tab.key"
:tab="tab" :tab="tab"
/> />
</ul> </ul>
......
import initU2F from '../../shared/sessions/u2f';
export default () => {
initU2F();
};
import ZenMode from '~/zen_mode';
import GLForm from '~/gl_form';
export default function ($formEl) {
new ZenMode(); // eslint-disable-line no-new
new GLForm($formEl, true); // eslint-disable-line no-new
}
import initForm from '~/pages/projects/init_form';
export default initForm($('.release-form'));
import initSettingsPanels from '~/settings_panels';
import SecretValues from '~/behaviors/secret_values';
export default function () {
// Initialize expandable settings panels
initSettingsPanels();
const runnerToken = document.querySelector('.js-secret-runner-token');
if (runnerToken) {
const runnerTokenSecretValue = new SecretValues(runnerToken);
runnerTokenSecretValue.init();
}
const secretVariableTable = document.querySelector('.js-secret-variable-table');
if (secretVariableTable) {
const secretVariableTableValues = new SecretValues(secretVariableTable);
secretVariableTableValues.init();
}
}
import initSettingsPanels from '~/settings_panels';
export default initSettingsPanels;
import ShortcutsNavigation from '~/shortcuts_navigation';
import NotificationsForm from '~/notifications_form';
import UserCallout from '~/user_callout';
import TreeView from '~/tree';
import BlobViewer from '~/blob/viewer/index';
import Activities from '~/activities';
import { ajaxGet } from '~/lib/utils/common_utils';
export default () => {
new ShortcutsNavigation(); // eslint-disable-line no-new
new NotificationsForm(); // eslint-disable-line no-new
new UserCallout({ // eslint-disable-line no-new
setCalloutPerProject: true,
className: 'js-autodevops-banner',
});
if ($('#tree-slider').length) new TreeView(); // eslint-disable-line no-new
if ($('.blob-viewer').length) new BlobViewer(); // eslint-disable-line no-new
if ($('.project-show-activity').length) new Activities(); // eslint-disable-line no-new
$('#tree-slider').waitForImages(() => {
ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath);
});
};
import initForm from '~/pages/projects/init_form';
export default initForm($('.snippet-form'));
import initForm from '~/pages/projects/init_form';
export default initForm($('.snippet-form'));
import initNotes from '~/init_notes';
import ZenMode from '~/zen_mode';
export default function () {
initNotes();
new ZenMode(); // eslint-disable-line no-new
}
import initU2F from '../../shared/sessions/u2f';
export default () => {
initU2F();
};
import U2FAuthenticate from '../../u2f/authenticate';
export default () => {
if (!gon.u2f) return;
const u2fAuthenticate = new U2FAuthenticate(
$('#js-authenticate-u2f'),
'#js-login-u2f-form',
gon.u2f,
document.querySelector('#js-login-2fa-device'),
document.querySelector('.js-2fa-form'),
);
u2fAuthenticate.start();
// needed in rspec
gl.u2fAuthenticate = u2fAuthenticate;
};
...@@ -32,8 +32,8 @@ export default class IssuableTemplateSelector extends TemplateSelector { ...@@ -32,8 +32,8 @@ export default class IssuableTemplateSelector extends TemplateSelector {
this.startLoadingSpinner(); this.startLoadingSpinner();
Api.issueTemplate(this.namespacePath, this.projectPath, query.name, this.issuableType, (err, currentTemplate) => { Api.issueTemplate(this.namespacePath, this.projectPath, query.name, this.issuableType, (err, currentTemplate) => {
this.currentTemplate = currentTemplate; this.currentTemplate = currentTemplate;
if (err) return; // Error handled by global AJAX error handler
this.stopLoadingSpinner(); this.stopLoadingSpinner();
if (err) return; // Error handled by global AJAX error handler
this.setInputValueToTemplateContent(); this.setInputValueToTemplateContent();
}); });
return; return;
......
import eventHub from '../../event_hub';
import statusIcon from '../mr_widget_status_icon';
export default {
name: 'MRWidgetAutoMergeFailed',
props: {
mr: { type: Object, required: true },
},
data() {
return {
isRefreshing: false,
};
},
components: {
statusIcon,
},
methods: {
refreshWidget() {
this.isRefreshing = true;
eventHub.$emit('MRWidgetUpdateRequested', () => {
this.isRefreshing = false;
});
},
},
template: `
<div class="mr-widget-body media">
<status-icon status="failed" />
<div class="media-body space-children">
<span class="bold">
<template v-if="mr.mergeError">{{mr.mergeError}}.</template>
This merge request failed to be merged automatically
</span>
<button
@click="refreshWidget"
:disabled="isRefreshing"
type="button"
class="btn btn-xs btn-default">
<i
v-if="isRefreshing"
class="fa fa-spinner fa-spin"
aria-hidden="true" />
Refresh
</button>
</div>
</div>
`,
};
<script>
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import eventHub from '../../event_hub';
import statusIcon from '../mr_widget_status_icon';
export default {
name: 'MRWidgetAutoMergeFailed',
components: {
statusIcon,
loadingIcon,
},
props: {
mr: {
type: Object,
required: true,
},
},
data() {
return {
isRefreshing: false,
};
},
methods: {
refreshWidget() {
this.isRefreshing = true;
eventHub.$emit('MRWidgetUpdateRequested', () => {
this.isRefreshing = false;
});
},
},
};
</script>
<template>
<div class="mr-widget-body media">
<status-icon status="warning" />
<div class="media-body space-children">
<span class="bold">
<template v-if="mr.mergeError">{{ mr.mergeError }}.</template>
{{ s__("mrWidget|This merge request failed to be merged automatically") }}
</span>
<button
@click="refreshWidget"
:disabled="isRefreshing"
type="button"
class="btn btn-xs btn-default"
>
<loading-icon v-if="isRefreshing" />
{{ s__("mrWidget|Refresh") }}
</button>
</div>
</div>
</template>
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" /> <status-icon status="warning" />
<div class="media-body"> <div class="media-body">
<mr-widget-author-and-time <mr-widget-author-and-time
actionText="Closed by" actionText="Closed by"
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon <status-icon
status="failed" status="warning"
:show-disabled-button="true" /> :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span <span
......
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
</span> </span>
</template> </template>
<template v-else> <template v-else>
<status-icon status="failed" :show-disabled-button="true" /> <status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold"> <span class="bold">
<span <span
......
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" :show-disabled-button="true" /> <status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold js-branch-text"> <span class="bold js-branch-text">
<span class="capitalize"> <span class="capitalize">
......
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" :show-disabled-button="true" /> <status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold"> <span class="bold">
Pipeline blocked. The pipeline for this merge request requires a manual action to proceed Pipeline blocked. The pipeline for this merge request requires a manual action to proceed
......
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" :show-disabled-button="true" /> <status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold"> <span class="bold">
The pipeline for this merge request failed. Please retry the job or push a new commit to fix the failure The pipeline for this merge request failed. Please retry the job or push a new commit to fix the failure
......
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
}, },
iconClass() { iconClass() {
if (this.status === 'failed' || !this.commitMessage.length || !this.mr.isMergeAllowed || this.mr.preventMerge) { if (this.status === 'failed' || !this.commitMessage.length || !this.mr.isMergeAllowed || this.mr.preventMerge) {
return 'failed'; return 'warning';
} }
return 'success'; return 'success';
}, },
......
...@@ -7,7 +7,7 @@ export default { ...@@ -7,7 +7,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" :show-disabled-button="true" /> <status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold"> <span class="bold">
The source branch HEAD has recently changed. Please reload the page and review the changes before merging The source branch HEAD has recently changed. Please reload the page and review the changes before merging
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" :show-disabled-button="true" /> <status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold"> <span class="bold">
There are unresolved discussions. Please resolve these discussions There are unresolved discussions. Please resolve these discussions
......
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
}, },
template: ` template: `
<div class="mr-widget-body media"> <div class="mr-widget-body media">
<status-icon status="failed" :show-disabled-button="Boolean(mr.removeWIPPath)" /> <status-icon status="warning" :show-disabled-button="Boolean(mr.removeWIPPath)" />
<div class="media-body space-children"> <div class="media-body space-children">
<span class="bold"> <span class="bold">
This is a Work in Progress This is a Work in Progress
......
...@@ -33,7 +33,7 @@ export { default as PipelineBlockedState } from './components/states/mr_widget_p ...@@ -33,7 +33,7 @@ export { default as PipelineBlockedState } from './components/states/mr_widget_p
export { default as PipelineFailedState } from './components/states/mr_widget_pipeline_failed'; export { default as PipelineFailedState } from './components/states/mr_widget_pipeline_failed';
export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds'; export { default as MergeWhenPipelineSucceedsState } from './components/states/mr_widget_merge_when_pipeline_succeeds';
export { default as RebaseState } from './components/states/mr_widget_rebase.vue'; export { default as RebaseState } from './components/states/mr_widget_rebase.vue';
export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed'; export { default as AutoMergeFailed } from './components/states/mr_widget_auto_merge_failed.vue';
export { default as CheckingState } from './components/states/mr_widget_checking'; export { default as CheckingState } from './components/states/mr_widget_checking';
export { default as MRWidgetStore } from './stores/mr_widget_store'; export { default as MRWidgetStore } from './stores/mr_widget_store';
export { default as MRWidgetService } from './services/mr_widget_service'; export { default as MRWidgetService } from './services/mr_widget_service';
......
...@@ -26,15 +26,15 @@ ...@@ -26,15 +26,15 @@
} }
.ci-status-icon-canceled, .ci-status-icon-canceled,
.ci-status-icon-disabled, .ci-status-icon-disabled {
.ci-status-icon-not-found {
svg { svg {
fill: $gl-text-color; fill: $gl-text-color;
} }
} }
.ci-status-icon-created, .ci-status-icon-created,
.ci-status-icon-skipped { .ci-status-icon-skipped,
.ci-status-icon-notfound {
svg { svg {
fill: $gray-darkest; fill: $gray-darkest;
} }
......
html { html {
overflow-y: scroll; overflow-y: scroll;
&.touch .tooltip { display: none !important; } &.touch .tooltip {
display: none !important;
}
} }
body { body {
// Improves readability for dyslexic users; supported only in Chrome/Safari so far
// scss-lint:disable PropertySpelling
text-decoration-skip: ink;
// scss-lint:enable PropertySpelling
&.navless { &.navless {
background-color: $white-light !important; background-color: $white-light !important;
} }
......
...@@ -2,7 +2,11 @@ module GroupTree ...@@ -2,7 +2,11 @@ module GroupTree
# rubocop:disable Gitlab/ModuleWithInstanceVariables # rubocop:disable Gitlab/ModuleWithInstanceVariables
def render_group_tree(groups) def render_group_tree(groups)
@groups = if params[:filter].present? @groups = if params[:filter].present?
Gitlab::GroupHierarchy.new(groups.search(params[:filter])) # We find the ancestors by ID of the search results here.
# Otherwise the ancestors would also have filters applied,
# which would cause them not to be preloaded.
group_ids = groups.search(params[:filter]).select(:id)
Gitlab::GroupHierarchy.new(Group.where(id: group_ids))
.base_and_ancestors .base_and_ancestors
else else
# Only show root groups if no parent-id is given # Only show root groups if no parent-id is given
......
...@@ -27,12 +27,16 @@ class GroupDescendantsFinder ...@@ -27,12 +27,16 @@ class GroupDescendantsFinder
end end
def execute def execute
# The children array might be extended with the ancestors of projects when # The children array might be extended with the ancestors of projects and
# filtering. In that case, take the maximum so the array does not get limited # subgroups when filtering. In that case, take the maximum so the array does
# Otherwise, allow paginating through all results # not get limited otherwise, allow paginating through all results.
# #
all_required_elements = children all_required_elements = children
all_required_elements |= ancestors_for_projects if params[:filter] if params[:filter]
all_required_elements |= ancestors_of_filtered_subgroups
all_required_elements |= ancestors_of_filtered_projects
end
total_count = [all_required_elements.size, paginator.total_count].max total_count = [all_required_elements.size, paginator.total_count].max
Kaminari.paginate_array(all_required_elements, total_count: total_count) Kaminari.paginate_array(all_required_elements, total_count: total_count)
...@@ -49,8 +53,11 @@ class GroupDescendantsFinder ...@@ -49,8 +53,11 @@ class GroupDescendantsFinder
end end
def paginator def paginator
@paginator ||= Gitlab::MultiCollectionPaginator.new(subgroups, projects, @paginator ||= Gitlab::MultiCollectionPaginator.new(
per_page: params[:per_page]) subgroups,
projects.with_route,
per_page: params[:per_page]
)
end end
def direct_child_groups def direct_child_groups
...@@ -94,15 +101,21 @@ class GroupDescendantsFinder ...@@ -94,15 +101,21 @@ class GroupDescendantsFinder
# #
# So when searching 'project', on the 'subgroup' page we want to preload # So when searching 'project', on the 'subgroup' page we want to preload
# 'nested-group' but not 'subgroup' or 'root' # 'nested-group' but not 'subgroup' or 'root'
def ancestors_for_groups(base_for_ancestors) def ancestors_of_groups(base_for_ancestors)
Gitlab::GroupHierarchy.new(base_for_ancestors) group_ids = base_for_ancestors.except(:select, :sort).select(:id)
Gitlab::GroupHierarchy.new(Group.where(id: group_ids))
.base_and_ancestors(upto: parent_group.id) .base_and_ancestors(upto: parent_group.id)
end end
def ancestors_for_projects def ancestors_of_filtered_projects
projects_to_load_ancestors_of = projects.where.not(namespace: parent_group) projects_to_load_ancestors_of = projects.where.not(namespace: parent_group)
groups_to_load_ancestors_of = Group.where(id: projects_to_load_ancestors_of.select(:namespace_id)) groups_to_load_ancestors_of = Group.where(id: projects_to_load_ancestors_of.select(:namespace_id))
ancestors_for_groups(groups_to_load_ancestors_of) ancestors_of_groups(groups_to_load_ancestors_of)
.with_selects_for_list(archived: params[:archived])
end
def ancestors_of_filtered_subgroups
ancestors_of_groups(subgroups)
.with_selects_for_list(archived: params[:archived]) .with_selects_for_list(archived: params[:archived])
end end
...@@ -112,7 +125,7 @@ class GroupDescendantsFinder ...@@ -112,7 +125,7 @@ class GroupDescendantsFinder
# When filtering subgroups, we want to find all matches withing the tree of # When filtering subgroups, we want to find all matches withing the tree of
# descendants to show to the user # descendants to show to the user
groups = if params[:filter] groups = if params[:filter]
ancestors_for_groups(subgroups_matching_filter) subgroups_matching_filter
else else
direct_child_groups direct_child_groups
end end
...@@ -121,8 +134,10 @@ class GroupDescendantsFinder ...@@ -121,8 +134,10 @@ class GroupDescendantsFinder
end end
def direct_child_projects def direct_child_projects
GroupProjectsFinder.new(group: parent_group, current_user: current_user, params: params) GroupProjectsFinder.new(group: parent_group,
.execute current_user: current_user,
options: { only_owned: true },
params: params).execute
end end
# Finds all projects nested under `parent_group` or any of its descendant # Finds all projects nested under `parent_group` or any of its descendant
......
...@@ -1032,6 +1032,8 @@ class Project < ActiveRecord::Base ...@@ -1032,6 +1032,8 @@ class Project < ActiveRecord::Base
end end
def fork_source def fork_source
return nil unless forked?
forked_from_project || fork_network&.root_project forked_from_project || fork_network&.root_project
end end
...@@ -1438,7 +1440,7 @@ class Project < ActiveRecord::Base ...@@ -1438,7 +1440,7 @@ class Project < ActiveRecord::Base
# We'd need to keep track of project full path otherwise directory tree # We'd need to keep track of project full path otherwise directory tree
# created with hashed storage enabled cannot be usefully imported using # created with hashed storage enabled cannot be usefully imported using
# the import rake task. # the import rake task.
repository.rugged.config['gitlab.fullpath'] = gl_full_path repository.raw_repository.write_config(full_path: gl_full_path)
rescue Gitlab::Git::Repository::NoRepository => e rescue Gitlab::Git::Repository::NoRepository => e
Rails.logger.error("Error writing to .git/config for project #{full_path} (#{id}): #{e.message}.") Rails.logger.error("Error writing to .git/config for project #{full_path} (#{id}): #{e.message}.")
nil nil
......
...@@ -259,15 +259,7 @@ class Repository ...@@ -259,15 +259,7 @@ class Repository
return if kept_around?(sha) return if kept_around?(sha)
# This will still fail if the file is corrupted (e.g. 0 bytes) # This will still fail if the file is corrupted (e.g. 0 bytes)
begin
raw_repository.write_ref(keep_around_ref_name(sha), sha, shell: false) raw_repository.write_ref(keep_around_ref_name(sha), sha, shell: false)
rescue Rugged::ReferenceError => ex
Rails.logger.error "Unable to create #{REF_KEEP_AROUND} reference for repository #{path}: #{ex}"
rescue Rugged::OSError => ex
raise unless ex.message =~ /Failed to create locked file/ && ex.message =~ /File exists/
Rails.logger.error "Unable to create #{REF_KEEP_AROUND} reference for repository #{path}: #{ex}"
end
end end
def kept_around?(sha) def kept_around?(sha)
......
...@@ -318,6 +318,8 @@ class User < ActiveRecord::Base ...@@ -318,6 +318,8 @@ class User < ActiveRecord::Base
# #
# Returns an ActiveRecord::Relation. # Returns an ActiveRecord::Relation.
def search(query) def search(query)
return none if query.blank?
query = query.downcase query = query.downcase
order = <<~SQL order = <<~SQL
...@@ -341,6 +343,8 @@ class User < ActiveRecord::Base ...@@ -341,6 +343,8 @@ class User < ActiveRecord::Base
# This method uses ILIKE on PostgreSQL and LIKE on MySQL. # This method uses ILIKE on PostgreSQL and LIKE on MySQL.
def search_with_secondary_emails(query) def search_with_secondary_emails(query)
return none if query.blank?
query = query.downcase query = query.downcase
email_table = Email.arel_table email_table = Email.arel_table
......
xml.entry do xml.entry do
xml.id project_commit_url(@project, id: commit.id) xml.id project_commit_url(@project, id: commit.id)
xml.link href: project_commit_url(@project, id: commit.id) xml.link href: project_commit_url(@project, id: commit.id)
xml.title truncate(commit.title, length: 80) xml.title truncate(commit.title, length: 80, escape: false)
xml.updated commit.committed_date.xmlschema xml.updated commit.committed_date.xmlschema
xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(commit.author_email)) xml.media :thumbnail, width: "40", height: "40", url: image_url(avatar_icon(commit.author_email))
...@@ -10,5 +10,5 @@ xml.entry do ...@@ -10,5 +10,5 @@ xml.entry do
xml.email commit.author_email xml.email commit.author_email
end end
xml.summary markdown(commit.description, pipeline: :single_line) xml.summary markdown(commit.description, pipeline: :single_line), type: 'html'
end end
- illustration = local_assigns.fetch(:illustration) - illustration = local_assigns.fetch(:illustration)
- illustration_size = local_assigns.fetch(:illustration_size) - illustration_size = local_assigns.fetch(:illustration_size)
- title = local_assigns.fetch(:title) - title = local_assigns.fetch(:title)
- content = local_assigns.fetch(:content, nil) - content = local_assigns.fetch(:content)
- action = local_assigns.fetch(:action, nil) - action = local_assigns.fetch(:action, nil)
.row.empty-state .row.empty-state
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
.col-xs-12 .col-xs-12
.text-content .text-content
%h4.text-center= title %h4.text-center= title
- if content
%p= content %p= content
- if action - if action
.text-center .text-center
......
...@@ -95,12 +95,18 @@ ...@@ -95,12 +95,18 @@
title: _('This job requires a manual action'), title: _('This job requires a manual action'),
content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments'), content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments'),
action: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), method: :post, class: 'btn btn-primary', title: _('Trigger this manual action') ) action: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), method: :post, class: 'btn btn-primary', title: _('Trigger this manual action') )
- elsif @build.created?
= render 'empty_state',
illustration: 'illustrations/job_not_triggered.svg',
illustration_size: 'svg-306',
title: _('This job has not been triggered yet'),
content: _('This job depends on upstream jobs that need to succeed in order for this job to be triggered')
- else - else
= render 'empty_state', = render 'empty_state',
illustration: 'illustrations/job_not_triggered.svg', illustration: 'illustrations/job_not_triggered.svg',
illustration_size: 'svg-306', illustration_size: 'svg-306',
title: _('This job has not been triggered yet') title: _('This job has not started yet'),
content: _('This job is in pending state and is waiting to be picked by a runner')
= render "sidebar" = render "sidebar"
.js-build-options{ data: javascript_build_options } .js-build-options{ data: javascript_build_options }
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
.add-to-tree-dropdown .add-to-tree-dropdown
%ul.dropdown-menu %ul.dropdown-menu
- if can_edit_tree? - if can_edit_tree?
%li.dropdown-header
#{ _('This directory') }
%li %li
= link_to project_new_blob_path(@project, @id) do = link_to project_new_blob_path(@project, @id) do
#{ _('New file') } #{ _('New file') }
...@@ -60,6 +62,8 @@ ...@@ -60,6 +62,8 @@
#{ _('New directory') } #{ _('New directory') }
%li.divider %li.divider
%li.dropdown-header
#{ _('This repository') }
%li %li
= link_to new_project_branch_path(@project) do = link_to new_project_branch_path(@project) do
#{ _('New branch') } #{ _('New branch') }
......
#!/usr/bin/env ruby
require 'optparse'
options = {}
opt_parser = OptionParser.new do |opt|
opt.banner = <<DOCSTRING
Profile a URL on this GitLab instance.
Usage:
#{__FILE__} url --output=<profile-html> --sql=<sql-log> [--user=<user>] [--post=<post-data>]
Example:
#{__FILE__} /dashboard/issues --output=dashboard-profile.html --sql=dashboard.log --user=root
DOCSTRING
opt.separator ''
opt.separator 'Options:'
opt.on('-o', '--output=/tmp/profile.html', 'profile output filename') do |output|
options[:profile_output] = output
end
opt.on('-s', '--sql=/tmp/profile_sql.txt', 'SQL output filename') do |sql|
options[:sql_output] = sql
end
opt.on('-u', '--user=root', 'User to authenticate as') do |username|
options[:username] = username
end
opt.on('-p', "--post='user=john&pass=test'", 'Send HTTP POST data') do |post_data|
options[:post_data] = post_data
end
end
opt_parser.parse!
options[:url] = ARGV[0]
if options[:url].nil? ||
options[:profile_output].nil? ||
options[:sql_output].nil?
puts opt_parser
exit
end
require File.expand_path('../config/environment', File.dirname(__FILE__))
result = Gitlab::Profiler.profile(options[:url],
logger: Logger.new(options[:sql_output]),
post_data: options[:post_data],
user: User.find_by_username(options[:username]),
private_token: ENV['PRIVATE_TOKEN'])
printer = RubyProf::CallStackPrinter.new(result)
file = File.open(options[:profile_output], 'w')
printer.print(file)
file.close
This source diff could not be displayed because it is too large. You can view the blob instead.
---
title: Adds ordering to projects contributors in API
merge_request: 15469
author: Jacopo Beschi @jacopo-beschi
type: added
---
title: Fix error that was preventing users to change the access level of access requests for Groups or Projects
merge_request: 15832
author:
type: fixed
---
title: 'Validate file status when commiting multiple files'
merge_request: 15922
author:
type: added
---
title: Improve search query for merge requests.
merge_request:
author:
type: performance
---
title: "Ignore lost+found folder during backup on a volume"
merge_request: 16036
author: Julien Millau
type: fixed
\ No newline at end of file
---
title: Improve search query for issues.
merge_request:
author:
type: performance
---
title: Add pause/resume button to project runners
merge_request: 16032
author: Mario de la Ossa
type: added
---
title: Fix when branch creation fails don't post system note
merge_request:
author: Mateusz Bajorski
type: fixed
---
title: Show authored date rather than committed date on the commit list
merge_request:
author:
type: fixed
---
title: Refactor member view using a Presenter
merge_request: 9645
author: TM Lee
---
title: User#projects_limit remove DB default and added NOT NULL constraint
merge_request: 16165
author: Mario de la Ossa
type: fixed
---
title: Support new chat notifications parameters in Services API
merge_request: 11435
author:
type: added
---
title: Fix tags in the Activity tab not being clickable
merge_request: 15996
author: Mario de la Ossa
type: fixed
---
title: Disable Vue pagination when only one page of content is available
merge_request: 15999
author: Mario de la Ossa
type: fixed
---
title: Update issuable status icons
merge_request: 15898
author:
type: changed
---
title: Fix some POST/DELETE requests in IE by switching some bundles to Axios for Ajax requests
merge_request: 15951
author:
type: fixed
---
title: Do not generate NPM links for private NPM modules in blob view
merge_request: 16002
author: Mario de la Ossa
type: added
---
title: Default merge request title is set correctly again when external issue tracker is activated
merge_request: 16356
author: Ben305
type: fixed
---
title: Replace '.team << [user, role]' with 'add_role(user)' in specs
merge_request: 16069
author: "@blackst0ne"
type: other
---
title: Enable ordering of groups and their children by name
merge_request:
author:
type: added
---
title: Hide runner token in CI/CD settings page
merge_request:
author:
type: added
---
title: Display graph values on hover within monitoring page
merge_request: 16261
author:
type: changed
---
title: Fixes the wording of headers in system info page
merge_request: 15802
author: Gilbert Roulot
type: fixed
---
title: Update feature toggle design to use icons and make it i18n friendly
merge_request: 15904
author:
type: changed
---
title: fix button alignment on MWPS component
merge_request:
author:
type: fixed
---
title: Clears visual token on second backspace
merge_request:
author: Martin Wortschack
type: fixed
---
title: Use relative URLs when linking to uploaded files
merge_request: 15751
author:
type: other
---
title: Only mark import and fork jobs as failed once all Sidekiq retries get exhausted
merge_request: 15844
author:
type: changed
---
title: Update comment on image cursor and icons
merge_request: 15760
author:
type: fixed
---
title: Protected branch is now created for default branch on import
merge_request: 16198
author:
type: fixed
---
title: Implement checking GCP project billing status in cluster creation form.
merge_request: 15665
author:
type: changed
---
title: Stop loading spinner on error of issuable templates
merge_request: 16600
author: Takuya Noguchi
type: fixed
---
title: Add assets_sync gem to Gemfile
merge_request: 15734
author:
type: added
---
title: Adds the multi file editor as a new beta feature
merge_request: 15430
author:
type: feature
---
title: Hide markdown toolbar in preview mode
merge_request:
author:
type: changed
---
title: "Fix slash commands dropdown description mis-alignment on Firefox"
merge_request: 16125
author: Maurizio De Santis
type: fixed
---
title: Fix gitlab-rake gitlab:import:repos import schedule
merge_request: 15931
author:
type: fixed
---
title: Fix breadcrumbs in User Settings
merge_request: 16172
author: rfwatson
type: fixed
---
title: Allow user to rebase merge requests.
merge_request:
author:
type: added
---
title: Migrate existing data from KubernetesService to Clusters::Platforms::Kubernetes
merge_request: 15589
author:
type: changed
---
title: Fix API endpoints to edit wiki pages where project belongs to a group
merge_request: 16170
author:
type: fixed
---
title: add support for sorting in tags api
merge_request: 15772
author: haseebeqx
type: added
---
title: Update groups tree to use GitLab SVG icons, add last updated at information
for projects
merge_request: 15980
author:
type: changed
---
title: Rendering of emoji's in Group-Overview
merge_request: 16098
author: Jacopo Beschi @jacopo-beschi
type: added
---
title: Fix bug in which projects with forks could not change visibility settings from
Private to Public
merge_request: 16595
author:
type: fixed
---
title: Improve the performance for counting diverging commits. Show 999+
if it is more than 1000 commits
merge_request: 15963
author:
type: performance
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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