Commit cf6e9df5 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'ce-to-ee-2018-10-01' into 'master'

CE upstream - 2018-10-01 09:21 UTC

See merge request gitlab-org/gitlab-ee!7710
parents 71937c6d 421ea021
...@@ -115,9 +115,6 @@ gem 'hamlit', '~> 2.8.8' ...@@ -115,9 +115,6 @@ gem 'hamlit', '~> 2.8.8'
gem 'carrierwave', '= 1.2.3' gem 'carrierwave', '= 1.2.3'
gem 'mini_magick' gem 'mini_magick'
# Drag and Drop UI
gem 'dropzonejs-rails', '~> 0.7.1'
# for backups # for backups
gem 'fog-aws', '~> 2.0.1' gem 'fog-aws', '~> 2.0.1'
gem 'fog-core', '~> 1.44' gem 'fog-core', '~> 1.44'
......
...@@ -183,8 +183,6 @@ GEM ...@@ -183,8 +183,6 @@ GEM
doorkeeper-openid_connect (1.5.0) doorkeeper-openid_connect (1.5.0)
doorkeeper (~> 4.3) doorkeeper (~> 4.3)
json-jwt (~> 1.6) json-jwt (~> 1.6)
dropzonejs-rails (0.7.2)
rails (> 3.1)
ed25519 (1.2.4) ed25519 (1.2.4)
elasticsearch (5.0.3) elasticsearch (5.0.3)
elasticsearch-api (= 5.0.3) elasticsearch-api (= 5.0.3)
...@@ -1036,7 +1034,6 @@ DEPENDENCIES ...@@ -1036,7 +1034,6 @@ DEPENDENCIES
diffy (~> 3.1.0) diffy (~> 3.1.0)
doorkeeper (~> 4.3) doorkeeper (~> 4.3)
doorkeeper-openid_connect (~> 1.5) doorkeeper-openid_connect (~> 1.5)
dropzonejs-rails (~> 0.7.1)
ed25519 (~> 1.2) ed25519 (~> 1.2)
elasticsearch-api (= 5.0.3) elasticsearch-api (= 5.0.3)
elasticsearch-model (~> 0.1.9) elasticsearch-model (~> 0.1.9)
......
...@@ -186,8 +186,6 @@ GEM ...@@ -186,8 +186,6 @@ GEM
doorkeeper-openid_connect (1.5.0) doorkeeper-openid_connect (1.5.0)
doorkeeper (~> 4.3) doorkeeper (~> 4.3)
json-jwt (~> 1.6) json-jwt (~> 1.6)
dropzonejs-rails (0.7.2)
rails (> 3.1)
ed25519 (1.2.4) ed25519 (1.2.4)
elasticsearch (5.0.3) elasticsearch (5.0.3)
elasticsearch-api (= 5.0.3) elasticsearch-api (= 5.0.3)
...@@ -1045,7 +1043,6 @@ DEPENDENCIES ...@@ -1045,7 +1043,6 @@ DEPENDENCIES
diffy (~> 3.1.0) diffy (~> 3.1.0)
doorkeeper (~> 4.3) doorkeeper (~> 4.3)
doorkeeper-openid_connect (~> 1.5) doorkeeper-openid_connect (~> 1.5)
dropzonejs-rails (~> 0.7.1)
ed25519 (~> 1.2) ed25519 (~> 1.2)
elasticsearch-api (= 5.0.3) elasticsearch-api (= 5.0.3)
elasticsearch-model (~> 0.1.9) elasticsearch-model (~> 0.1.9)
......
import Api from '~/api'; import Api from '~/api';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { normalizeHeaders } from '~/lib/utils/common_utils';
import * as types from './mutation_types'; import * as types from './mutation_types';
import eventHub from '../../../eventhub'; import eventHub from '../../../eventhub';
...@@ -22,13 +23,21 @@ export const receiveTemplateTypesError = ({ commit, dispatch }) => { ...@@ -22,13 +23,21 @@ export const receiveTemplateTypesError = ({ commit, dispatch }) => {
export const receiveTemplateTypesSuccess = ({ commit }, templates) => export const receiveTemplateTypesSuccess = ({ commit }, templates) =>
commit(types.RECEIVE_TEMPLATE_TYPES_SUCCESS, templates); commit(types.RECEIVE_TEMPLATE_TYPES_SUCCESS, templates);
export const fetchTemplateTypes = ({ dispatch, state }) => { export const fetchTemplateTypes = ({ dispatch, state }, page = 1) => {
if (!Object.keys(state.selectedTemplateType).length) return Promise.reject(); if (!Object.keys(state.selectedTemplateType).length) return Promise.reject();
dispatch('requestTemplateTypes'); dispatch('requestTemplateTypes');
return Api.templates(state.selectedTemplateType.key) return Api.templates(state.selectedTemplateType.key, { page })
.then(({ data }) => dispatch('receiveTemplateTypesSuccess', data)) .then(({ data, headers }) => {
const nextPage = parseInt(normalizeHeaders(headers)['X-NEXT-PAGE'], 10);
dispatch('receiveTemplateTypesSuccess', data);
if (nextPage) {
dispatch('fetchTemplateTypes', nextPage);
}
})
.catch(() => dispatch('receiveTemplateTypesError')); .catch(() => dispatch('receiveTemplateTypesError'));
}; };
......
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
}, },
[types.RECEIVE_TEMPLATE_TYPES_SUCCESS](state, templates) { [types.RECEIVE_TEMPLATE_TYPES_SUCCESS](state, templates) {
state.isLoading = false; state.isLoading = false;
state.templates = templates; state.templates = state.templates.concat(templates);
}, },
[types.SET_SELECTED_TEMPLATE_TYPE](state, type) { [types.SET_SELECTED_TEMPLATE_TYPE](state, type) {
state.selectedTemplateType = type; state.selectedTemplateType = type;
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
*= require jquery.atwho *= require jquery.atwho
*= require select2 *= require select2
*= require_self *= require_self
*= require dropzone/basic
*= require cropper.css *= require cropper.css
*/ */
...@@ -18,6 +17,7 @@ ...@@ -18,6 +17,7 @@
*/ */
@import "../../../node_modules/pikaday/scss/pikaday"; @import "../../../node_modules/pikaday/scss/pikaday";
@import "../../../node_modules/dropzone/dist/basic.css";
/* /*
* GitLab UI framework * GitLab UI framework
......
---
title: Skip creating auto devops jobs for sast, container_scanning, dast, dependency_scanning
when not licensed
merge_request: 21959
author:
type: performance
---
title: Fixed file templates not fully being fetched in Web IDE
merge_request:
author:
type: fixed
...@@ -208,5 +208,9 @@ module ActiveRecord ...@@ -208,5 +208,9 @@ module ActiveRecord
index_parts << "comment: #{index.comment.inspect}" if Gitlab.rails5? && index.comment index_parts << "comment: #{index.comment.inspect}" if Gitlab.rails5? && index.comment
index_parts index_parts
end end
def format_options(options)
options.map { |key, value| "#{key}: #{value.inspect}" }.join(", ")
end
end end
end end
...@@ -90,6 +90,8 @@ Like [Get file from repository](repository_files.md#get-file-from-repository) yo ...@@ -90,6 +90,8 @@ Like [Get file from repository](repository_files.md#get-file-from-repository) yo
## Create new file in repository ## Create new file in repository
This allows you to create a single file. For creating multiple files with a single request see the [commits API](commits.html#create-a-commit-with-multiple-files-and-actions).
``` ```
POST /projects/:id/repository/files/:file_path POST /projects/:id/repository/files/:file_path
``` ```
...@@ -120,6 +122,8 @@ Parameters: ...@@ -120,6 +122,8 @@ Parameters:
## Update existing file in repository ## Update existing file in repository
This allows you to update a single file. For updating multiple files with a single request see the [commits API](commits.html#create-a-commit-with-multiple-files-and-actions).
``` ```
PUT /projects/:id/repository/files/:file_path PUT /projects/:id/repository/files/:file_path
``` ```
...@@ -160,6 +164,8 @@ Currently gitlab-shell has a boolean return code, preventing GitLab from specify ...@@ -160,6 +164,8 @@ Currently gitlab-shell has a boolean return code, preventing GitLab from specify
## Delete existing file in repository ## Delete existing file in repository
This allows you to delete a single file. For deleting multiple files with a singleh request see the [commits API](commits.html#create-a-commit-with-multiple-files-and-actions).
``` ```
DELETE /projects/:id/repository/files/:file_path DELETE /projects/:id/repository/files/:file_path
``` ```
......
...@@ -162,7 +162,10 @@ sast: ...@@ -162,7 +162,10 @@ sast:
artifacts: artifacts:
paths: [gl-sast-report.json] paths: [gl-sast-report.json]
only: only:
- branches refs:
- branches
variables:
- $GITLAB_FEATURES =~ /\bsast\b/
except: except:
variables: variables:
- $SAST_DISABLED - $SAST_DISABLED
...@@ -179,7 +182,10 @@ dependency_scanning: ...@@ -179,7 +182,10 @@ dependency_scanning:
artifacts: artifacts:
paths: [gl-dependency-scanning-report.json] paths: [gl-dependency-scanning-report.json]
only: only:
- branches refs:
- branches
variables:
- $GITLAB_FEATURES =~ /\bdependency_scanning\b/
except: except:
variables: variables:
- $DEPENDENCY_SCANNING_DISABLED - $DEPENDENCY_SCANNING_DISABLED
...@@ -196,7 +202,10 @@ container_scanning: ...@@ -196,7 +202,10 @@ container_scanning:
artifacts: artifacts:
paths: [gl-container-scanning-report.json] paths: [gl-container-scanning-report.json]
only: only:
- branches refs:
- branches
variables:
- $GITLAB_FEATURES =~ /\bsast_container\b/
except: except:
variables: variables:
- $CONTAINER_SCANNING_DISABLED - $CONTAINER_SCANNING_DISABLED
...@@ -215,6 +224,8 @@ dast: ...@@ -215,6 +224,8 @@ dast:
refs: refs:
- branches - branches
kubernetes: active kubernetes: active
variables:
- $GITLAB_FEATURES =~ /\bdast\b/
except: except:
refs: refs:
- master - master
......
...@@ -69,11 +69,17 @@ describe('IDE file templates actions', () => { ...@@ -69,11 +69,17 @@ describe('IDE file templates actions', () => {
describe('fetchTemplateTypes', () => { describe('fetchTemplateTypes', () => {
describe('success', () => { describe('success', () => {
let nextPage;
beforeEach(() => { beforeEach(() => {
mock.onGet(/api\/(.*)\/templates\/licenses/).replyOnce(200, [ mock.onGet(/api\/(.*)\/templates\/licenses/).replyOnce(() => [
{ 200,
name: 'MIT', [
}, {
name: 'MIT',
},
],
{ 'X-NEXT-PAGE': nextPage },
]); ]);
}); });
...@@ -116,6 +122,38 @@ describe('IDE file templates actions', () => { ...@@ -116,6 +122,38 @@ describe('IDE file templates actions', () => {
done, done,
); );
}); });
it('dispatches actions for next page', done => {
nextPage = '2';
state.selectedTemplateType = {
key: 'licenses',
};
testAction(
actions.fetchTemplateTypes,
null,
state,
[],
[
{
type: 'requestTemplateTypes',
},
{
type: 'receiveTemplateTypesSuccess',
payload: [
{
name: 'MIT',
},
],
},
{
type: 'fetchTemplateTypes',
payload: 2,
},
],
done,
);
});
}); });
describe('error', () => { describe('error', () => {
......
...@@ -336,7 +336,6 @@ doorkeeper,4.3.2,MIT ...@@ -336,7 +336,6 @@ doorkeeper,4.3.2,MIT
doorkeeper-openid_connect,1.5.0,MIT doorkeeper-openid_connect,1.5.0,MIT
dot-prop,4.2.0,MIT dot-prop,4.2.0,MIT
dropzone,4.2.0,MIT dropzone,4.2.0,MIT
dropzonejs-rails,0.7.2,MIT
duplexer,0.1.1,MIT duplexer,0.1.1,MIT
duplexer3,0.1.4,New BSD duplexer3,0.1.4,New BSD
duplexify,3.5.3,MIT duplexify,3.5.3,MIT
......
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