Commit de10011c authored by GitLab Bot's avatar GitLab Bot

Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-02-27

# Conflicts:
#	app/assets/javascripts/boards/components/board_new_issue.vue
#	app/assets/javascripts/boards/index.js
#	app/assets/javascripts/boards/stores/boards_store.js
#	app/assets/javascripts/environments/components/environments_table.vue
#	app/assets/javascripts/ide/components/repo_file.vue
#	app/assets/javascripts/ide/components/repo_tab.vue
#	app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue
#	config/webpack.config.js
#	spec/javascripts/environments/environment_table_spec.js
#	spec/javascripts/repo/components/repo_commit_section_spec.js
#	spec/javascripts/vue_mr_widget/components/mr_widget_pipeline_spec.js

[ci skip]
parents 565b9786 d22466ab
......@@ -398,9 +398,9 @@ For issues related to the open source stewardship of GitLab,
there is the ~"stewardship" label.
This label is to be used for issues in which the stewardship of GitLab
is a topic of discussion. For instance if GitLab Inc. is planning to remove
features from GitLab CE to make exclusive in GitLab EE, related issues
would be labelled with ~"stewardship".
is a topic of discussion. For instance if GitLab Inc. is planning to add
features from GitLab EE to GitLab CE, related issues would be labelled with
~"stewardship".
A recent example of this was the issue for
[bringing the time tracking API to GitLab CE][time-tracking-issue].
......
......@@ -426,7 +426,7 @@ group :ed25519 do
end
# Gitaly GRPC client
gem 'gitaly-proto', '~> 0.84.0', require: 'gitaly'
gem 'gitaly-proto', '~> 0.85.0', require: 'gitaly'
# Locked until https://github.com/google/protobuf/issues/4210 is closed
gem 'google-protobuf', '= 3.5.1'
......
......@@ -309,7 +309,7 @@ GEM
po_to_json (>= 1.0.0)
rails (>= 3.2.0)
gherkin-ruby (0.3.2)
gitaly-proto (0.84.0)
gitaly-proto (0.85.0)
google-protobuf (~> 3.1)
grpc (~> 1.0)
github-linguist (5.3.3)
......@@ -1091,7 +1091,7 @@ DEPENDENCIES
gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.2.0)
gitaly-proto (~> 0.84.0)
gitaly-proto (~> 0.85.0)
github-linguist (~> 5.3.3)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-license (~> 1.0)
......
<script>
import eventHub from '../eventhub';
<<<<<<< HEAD:app/assets/javascripts/boards/components/board_new_issue.vue
import ProjectSelect from 'ee/boards/components/project_select.vue'; // eslint-disable-line import/first
=======
>>>>>>> upstream/master:app/assets/javascripts/boards/components/board_new_issue.vue
import ListIssue from '../models/issue';
const Store = gl.issueBoards.BoardsStore;
......@@ -28,6 +31,7 @@ export default {
selectedProject: {},
};
},
<<<<<<< HEAD:app/assets/javascripts/boards/components/board_new_issue.vue
computed: {
disabled() {
if (this.groupId) {
......@@ -39,6 +43,10 @@ export default {
mounted() {
this.$refs.input.focus();
eventHub.$on('setSelectedProject', this.setSelectedProject);
=======
mounted() {
this.$refs.input.focus();
>>>>>>> upstream/master:app/assets/javascripts/boards/components/board_new_issue.vue
},
methods: {
submit(e) {
......@@ -90,6 +98,7 @@ export default {
</script>
<template>
<<<<<<< HEAD:app/assets/javascripts/boards/components/board_new_issue.vue
<div class="board-new-issue-form">
<div class="card">
<form @submit="submit($event)">
......@@ -138,5 +147,49 @@ export default {
</div>
</form>
</div>
=======
<div class="card board-new-issue-form">
<form @submit="submit($event)">
<div
class="flash-container"
v-if="error"
>
<div class="flash-alert">
An error occurred. Please try again.
</div>
</div>
<label
class="label-light"
:for="list.id + '-title'"
>
Title
</label>
<input
class="form-control"
type="text"
v-model="title"
ref="input"
autocomplete="off"
:id="list.id + '-title'"
/>
<div class="clearfix prepend-top-10">
<button
class="btn btn-success pull-left"
type="submit"
:disabled="title === ''"
ref="submit-button"
>
Submit issue
</button>
<button
class="btn btn-default pull-right"
type="button"
@click="cancel"
>
Cancel
</button>
</div>
</form>
>>>>>>> upstream/master:app/assets/javascripts/boards/components/board_new_issue.vue
</div>
</template>
......@@ -25,12 +25,15 @@ import './components/board_sidebar';
import './components/new_list_dropdown';
import './components/modal/index';
import '~/vue_shared/vue_resource_interceptor'; // eslint-disable-line import/first
<<<<<<< HEAD
import 'ee/boards/models/project'; // eslint-disable-line import/first
import 'ee/boards/components/boards_selector'; // eslint-disable-line import/first
import collapseIcon from 'ee/boards/icons/fullscreen_collapse.svg'; // eslint-disable-line import/first
import expandIcon from 'ee/boards/icons/fullscreen_expand.svg'; // eslint-disable-line import/first
import tooltip from '~/vue_shared/directives/tooltip'; // eslint-disable-line import/first
=======
>>>>>>> upstream/master
export default () => {
const $boardApp = document.getElementById('board-app');
......
......@@ -2,7 +2,10 @@
/* global List */
import _ from 'underscore';
import Cookies from 'js-cookie';
<<<<<<< HEAD
import boardsStoreEE from 'ee/boards/stores/boards_store_ee';
=======
>>>>>>> upstream/master
import { getUrlParamsArray } from '~/lib/utils/common_utils';
window.gl = window.gl || {};
......
......@@ -4,8 +4,11 @@
*/
import loadingIcon from '~/vue_shared/components/loading_icon.vue';
import environmentItem from './environment_item.vue';
<<<<<<< HEAD
import deployBoard from 'ee/environments/components/deploy_board_component.vue'; // eslint-disable-line import/first
=======
>>>>>>> upstream/master
export default {
components: {
......
<script>
import { mapState } from 'vuex';
<<<<<<< HEAD
=======
>>>>>>> upstream/master
import timeAgoMixin from '~/vue_shared/mixins/timeago';
import skeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue';
import fileIcon from '~/vue_shared/components/file_icon.vue';
import newDropdown from './new_dropdown/index.vue';
<<<<<<< HEAD
import fileStatusIcon from 'ee/ide/components/repo_file_status_icon.vue'; // eslint-disable-line import/first
import changedFileIcon from 'ee/ide/components/changed_file_icon.vue'; // eslint-disable-line import/first
=======
>>>>>>> upstream/master
export default {
components: {
......
<script>
import { mapActions } from 'vuex';
<<<<<<< HEAD
import fileIcon from '~/vue_shared/components/file_icon.vue';
import icon from '~/vue_shared/components/icon.vue';
import fileStatusIcon from 'ee/ide/components/repo_file_status_icon.vue';
import changedFileIcon from 'ee/ide/components/changed_file_icon.vue';
=======
import fileIcon from '~/vue_shared/components/file_icon.vue';
>>>>>>> upstream/master
export default {
components: {
......
......@@ -9,13 +9,12 @@ export default class ShortcutsIssuable extends Shortcuts {
super();
this.$replyField = isMergeRequest ? $('.js-main-target-form #note_note') : $('.js-main-target-form .js-vue-comment-form');
this.editBtn = document.querySelector('.js-issuable-edit');
Mousetrap.bind('a', () => ShortcutsIssuable.openSidebarDropdown('assignee'));
Mousetrap.bind('m', () => ShortcutsIssuable.openSidebarDropdown('milestone'));
Mousetrap.bind('l', () => ShortcutsIssuable.openSidebarDropdown('labels'));
Mousetrap.bind('r', this.replyWithSelectedText.bind(this));
Mousetrap.bind('e', this.editIssue.bind(this));
Mousetrap.bind('e', ShortcutsIssuable.editIssue);
if (isMergeRequest) {
this.enabledHelp.push('.hidden-shortcut.merge_requests');
......@@ -58,10 +57,10 @@ export default class ShortcutsIssuable extends Shortcuts {
return false;
}
editIssue() {
static editIssue() {
// Need to click the element as on issues, editing is inline
// on merge request, editing is on a different page
this.editBtn.click();
document.querySelector('.js-issuable-edit').click();
return false;
}
......
......@@ -3,7 +3,10 @@
import pipelineStage from '~/pipelines/components/stage.vue';
import ciIcon from '~/vue_shared/components/ci_icon.vue';
import icon from '~/vue_shared/components/icon.vue';
<<<<<<< HEAD
import linkedPipelinesMiniList from 'ee/vue_shared/components/linked_pipelines_mini_list.vue';
=======
>>>>>>> upstream/master
export default {
name: 'MRWidgetPipeline',
......
......@@ -9,10 +9,9 @@ class Tree
@repository = repository
@sha = sha
@path = path
@recursive = recursive
git_repo = @repository.raw_repository
@entries = get_entries(git_repo, @sha, @path, recursive: @recursive)
@entries = Gitlab::Git::Tree.where(git_repo, @sha, @path, recursive)
end
def readme
......@@ -58,21 +57,4 @@ class Tree
def sorted_entries
trees + blobs + submodules
end
private
def get_entries(git_repo, sha, path, recursive: false)
current_path_entries = Gitlab::Git::Tree.where(git_repo, sha, path)
ordered_entries = []
current_path_entries.each do |entry|
ordered_entries << entry
if recursive && entry.dir?
ordered_entries.concat(get_entries(git_repo, sha, entry.path, recursive: true))
end
end
ordered_entries
end
end
%h4
= s_('PrometheusService|Auto configuration')
- if service.manual_configuration?
.well
= s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration below')
- else
.container-fluid
.row
- if service.prometheus_installed?
.col-sm-2
.svg-container
= image_tag 'illustrations/monitoring/getting_started.svg'
.col-sm-10
%p.text-success.prepend-top-default
= s_('PrometheusService|Prometheus is being automatically managed on your clusters')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
.col-sm-10
%p.prepend-top-default
= s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments')
= link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn btn-success'
%hr
%h4
= s_('PrometheusService|Auto configuration')
- if @service.manual_configuration?
.well
= s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration below')
- else
.container-fluid
.row
- if @service.prometheus_installed?
.col-sm-2
.svg-container
= image_tag 'illustrations/monitoring/getting_started.svg'
.col-sm-10
%p.text-success.prepend-top-default
= s_('PrometheusService|Prometheus is being automatically managed on your clusters')
= link_to s_('PrometheusService|Manage clusters'), project_clusters_path(@project), class: 'btn'
- else
.col-sm-2
= image_tag 'illustrations/monitoring/loading.svg'
.col-sm-10
%p.prepend-top-default
= s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments')
= link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(@project), class: 'btn btn-success'
%hr
- if @project
= render 'projects/services/prometheus/configuration_banner', project: @project, service: @service
%h4.append-bottom-default
= s_('PrometheusService|Manual configuration')
......
---
title: Fixes Prometheus admin configuration page
merge_request: 17377
author:
type: fixed
---
title: Fixed issue edit shortcut not opening edit form
merge_request:
author:
type: fixed
---
title: Move BoardNewIssue vue component
merge_request: 16947
author: George Tsiolis
type: performance
......@@ -49,7 +49,6 @@ var config = {
context: path.join(ROOT_PATH, 'app/assets/javascripts'),
entry: {
balsamiq_viewer: './blob/balsamiq_viewer.js',
blob: './blob_edit/blob_bundle.js',
common: './commons/index.js',
common_vue: './vue_shared/vue_resource_interceptor.js',
cycle_analytics: './cycle_analytics/cycle_analytics_bundle.js',
......@@ -326,12 +325,15 @@ var config = {
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.esm.js',
'spec': path.join(ROOT_PATH, 'spec/javascripts'),
<<<<<<< HEAD
// EE-only
'ee': path.join(ROOT_PATH, 'ee/app/assets/javascripts'),
'ee_empty_states': path.join(ROOT_PATH, 'ee/app/views/shared/empty_states'),
'ee_icons': path.join(ROOT_PATH, 'ee/app/views/shared/icons'),
'ee_images': path.join(ROOT_PATH, 'ee/app/assets/images'),
=======
>>>>>>> upstream/master
}
}
}
......
......@@ -14,14 +14,14 @@ module Gitlab
# Uses rugged for raw objects
#
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/320
def where(repository, sha, path = nil)
def where(repository, sha, path = nil, recursive = false)
path = nil if path == '' || path == '/'
Gitlab::GitalyClient.migrate(:tree_entries) do |is_enabled|
if is_enabled
repository.gitaly_commit_client.tree_entries(repository, sha, path)
repository.gitaly_commit_client.tree_entries(repository, sha, path, recursive)
else
tree_entries_from_rugged(repository, sha, path)
tree_entries_from_rugged(repository, sha, path, recursive)
end
end
end
......@@ -57,7 +57,22 @@ module Gitlab
end
end
def tree_entries_from_rugged(repository, sha, path)
def tree_entries_from_rugged(repository, sha, path, recursive)
current_path_entries = get_tree_entries_from_rugged(repository, sha, path)
ordered_entries = []
current_path_entries.each do |entry|
ordered_entries << entry
if recursive && entry.dir?
ordered_entries.concat(tree_entries_from_rugged(repository, sha, entry.path, true))
end
end
ordered_entries
end
def get_tree_entries_from_rugged(repository, sha, path)
commit = repository.lookup(sha)
root_tree = commit.tree
......
......@@ -105,11 +105,12 @@ module Gitlab
entry unless entry.oid.blank?
end
def tree_entries(repository, revision, path)
def tree_entries(repository, revision, path, recursive)
request = Gitaly::GetTreeEntriesRequest.new(
repository: @gitaly_repo,
revision: encode_binary(revision),
path: path.present? ? encode_binary(path) : '.'
path: path.present? ? encode_binary(path) : '.',
recursive: recursive
)
response = GitalyClient.call(@repository.storage, :commit_service, :get_tree_entries, request, timeout: GitalyClient.medium_timeout)
......
require 'spec_helper'
describe 'Admin activates Prometheus' do
let(:admin) { create(:user, :admin) }
before do
sign_in(admin)
visit(admin_application_settings_services_path)
click_link('Prometheus')
end
it 'activates service' do
check('Active')
fill_in('API URL', with: 'http://prometheus.example.com')
click_button('Save')
expect(page).to have_content('Application settings saved successfully')
end
end
......@@ -275,6 +275,18 @@ describe 'New/edit issue', :js do
end
end
context 'inline edit' do
before do
visit project_issue_path(project, issue)
end
it 'opens inline edit form with shortcut' do
find('body').send_keys('e')
expect(page).to have_selector('.detail-page-description form')
end
end
describe 'sub-group project' do
let(:group) { create(:group) }
let(:nested_group_1) { create(:group, parent: group) }
......
require 'spec_helper'
describe 'User activates Prometheus' do
let(:project) { create(:project) }
let(:user) { create(:user) }
before do
project.add_master(user)
sign_in(user)
visit(project_settings_integrations_path(project))
click_link('Prometheus')
end
it 'activates service' do
check('Active')
fill_in('API URL', with: 'http://prometheus.example.com')
click_button('Save changes')
expect(page).to have_content('Prometheus activated.')
end
end
import Vue from 'vue';
import environmentTableComp from '~/environments/components/environments_table.vue';
<<<<<<< HEAD
import eventHub from '~/environments/event_hub';
import mountComponent from 'spec/helpers/vue_mount_component_helper';
import { deployBoardMockData } from './mock_data';
=======
import mountComponent from 'spec/helpers/vue_mount_component_helper';
>>>>>>> upstream/master
describe('Environment table', () => {
let Component;
......
......@@ -2,7 +2,10 @@ import Vue from 'vue';
import store from '~/ide/stores';
import service from '~/ide/services';
import repoCommitSection from '~/ide/components/repo_commit_section.vue';
<<<<<<< HEAD
import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper';
=======
>>>>>>> upstream/master
import getSetTimeoutPromise from 'spec/helpers/set_timeout_promise_helper';
import { file, resetStore } from '../helpers';
......
import Vue from 'vue';
import pipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue';
<<<<<<< HEAD
import mountComponent from 'spec/helpers/vue_mount_component_helper'; // eslint-disable-line import/first
=======
import mountComponent from 'spec/helpers/vue_mount_component_helper';
>>>>>>> upstream/master
import mockData from '../mock_data';
import mockLinkedPipelines from 'spec/pipelines/graph/linked_pipelines_mock_data'; // eslint-disable-line import/first
......
......@@ -113,7 +113,7 @@ describe Gitlab::GitalyClient::CommitService do
.with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash))
.and_return([])
client.tree_entries(repository, revision, path)
client.tree_entries(repository, revision, path, false)
end
context 'with UTF-8 params strings' do
......@@ -126,7 +126,7 @@ describe Gitlab::GitalyClient::CommitService do
.with(gitaly_request_with_path(storage_name, relative_path), kind_of(Hash))
.and_return([])
client.tree_entries(repository, revision, path)
client.tree_entries(repository, revision, path, false)
end
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