Commit d0c4ee4a authored by Nick Thomas's avatar Nick Thomas

Resolve JS conflicts

parent 5bffed65
<<<<<<< HEAD
/* eslint-disable func-names, space-before-function-paren, quotes, object-shorthand, camelcase, no-var, comma-dangle, prefer-arrow-callback, quote-props, no-param-reassign, max-len */
var Api = {
=======
import $ from 'jquery'; import $ from 'jquery';
const Api = { const Api = {
>>>>>>> ce/master
groupsPath: '/api/:version/groups.json', groupsPath: '/api/:version/groups.json',
groupPath: '/api/:version/groups/:id.json', groupPath: '/api/:version/groups/:id.json',
namespacesPath: '/api/:version/namespaces.json', namespacesPath: '/api/:version/namespaces.json',
...@@ -16,20 +10,20 @@ const Api = { ...@@ -16,20 +10,20 @@ const Api = {
licensePath: '/api/:version/templates/licenses/:key', licensePath: '/api/:version/templates/licenses/:key',
gitignorePath: '/api/:version/templates/gitignores/:key', gitignorePath: '/api/:version/templates/gitignores/:key',
gitlabCiYmlPath: '/api/:version/templates/gitlab_ci_ymls/:key', gitlabCiYmlPath: '/api/:version/templates/gitlab_ci_ymls/:key',
<<<<<<< HEAD
ldapGroupsPath: '/api/:version/ldap/:provider/groups.json', ldapGroupsPath: '/api/:version/ldap/:provider/groups.json',
dockerfilePath: '/api/:version/templates/dockerfiles/:key', dockerfilePath: '/api/:version/templates/dockerfiles/:key',
issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key', issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key',
group: function(group_id, callback) { usersPath: '/api/:version/users.json',
var url = Api.buildUrl(Api.groupPath) group(groupId, callback) {
.replace(':id', group_id); const url = Api.buildUrl(Api.groupPath)
.replace(':id', groupId);
return $.ajax({ return $.ajax({
url: url, url,
dataType: 'json' dataType: 'json',
}).done(function(group) { })
return callback(group); .done(group => callback(group));
});
}, },
users: function(search, options, callback = $.noop) { users: function(search, options, callback = $.noop) {
var url = Api.buildUrl('/autocomplete/users.json'); var url = Api.buildUrl('/autocomplete/users.json');
return $.ajax({ return $.ajax({
...@@ -41,44 +35,19 @@ const Api = { ...@@ -41,44 +35,19 @@ const Api = {
dataType: 'json' dataType: 'json'
}).done(callback); }).done(callback);
}, },
// Return groups list. Filtered by query
groups: function(query, options, callback = $.noop) {
var url = Api.buildUrl(Api.groupsPath);
=======
dockerfilePath: '/api/:version/templates/dockerfiles/:key',
issuableTemplatePath: '/:namespace_path/:project_path/templates/:type/:key',
usersPath: '/api/:version/users.json',
group(groupId, callback) {
const url = Api.buildUrl(Api.groupPath)
.replace(':id', groupId);
return $.ajax({
url,
dataType: 'json',
})
.done(group => callback(group));
},
// Return groups list. Filtered by query // Return groups list. Filtered by query
groups(query, options, callback) { groups(query, options, callback) {
const url = Api.buildUrl(Api.groupsPath); const url = Api.buildUrl(Api.groupsPath);
>>>>>>> ce/master
return $.ajax({ return $.ajax({
url, url,
data: Object.assign({ data: Object.assign({
search: query, search: query,
per_page: 20, per_page: 20,
}, options), }, options),
<<<<<<< HEAD
dataType: 'json'
}).done(function(groups) {
return callback(groups);
});
=======
dataType: 'json', dataType: 'json',
}) })
.done(groups => callback(groups)); .done(groups => callback(groups));
>>>>>>> ce/master
}, },
// Return namespaces list. Filtered by query // Return namespaces list. Filtered by query
...@@ -90,15 +59,8 @@ const Api = { ...@@ -90,15 +59,8 @@ const Api = {
search: query, search: query,
per_page: 20, per_page: 20,
}, },
<<<<<<< HEAD
dataType: 'json'
}).done(function(namespaces) {
return callback(namespaces);
});
=======
dataType: 'json', dataType: 'json',
}).done(namespaces => callback(namespaces)); }).done(namespaces => callback(namespaces));
>>>>>>> ce/master
}, },
// Return projects list. Filtered by query // Return projects list. Filtered by query
...@@ -111,16 +73,9 @@ const Api = { ...@@ -111,16 +73,9 @@ const Api = {
per_page: 20, per_page: 20,
membership: true, membership: true,
}, options), }, options),
<<<<<<< HEAD
dataType: 'json'
}).done(function(projects) {
return callback(projects);
});
=======
dataType: 'json', dataType: 'json',
}) })
.done(projects => callback(projects)); .done(projects => callback(projects));
>>>>>>> ce/master
}, },
newLabel(namespacePath, projectPath, data, callback) { newLabel(namespacePath, projectPath, data, callback) {
...@@ -128,17 +83,6 @@ const Api = { ...@@ -128,17 +83,6 @@ const Api = {
.replace(':namespace_path', namespacePath) .replace(':namespace_path', namespacePath)
.replace(':project_path', projectPath); .replace(':project_path', projectPath);
return $.ajax({ return $.ajax({
<<<<<<< HEAD
url: url,
type: 'POST',
data: { 'label': data },
dataType: 'json'
}).done(function(label) {
return callback(label);
}).error(function(message) {
return callback(message.responseJSON);
});
=======
url, url,
type: 'POST', type: 'POST',
data: { label: data }, data: { label: data },
...@@ -146,7 +90,6 @@ const Api = { ...@@ -146,7 +90,6 @@ const Api = {
}) })
.done(label => callback(label)) .done(label => callback(label))
.error(message => callback(message.responseJSON)); .error(message => callback(message.responseJSON));
>>>>>>> ce/master
}, },
// Return group projects list. Filtered by query // Return group projects list. Filtered by query
...@@ -159,16 +102,9 @@ const Api = { ...@@ -159,16 +102,9 @@ const Api = {
search: query, search: query,
per_page: 20, per_page: 20,
}, },
<<<<<<< HEAD
dataType: 'json'
}).done(function(projects) {
return callback(projects);
});
=======
dataType: 'json', dataType: 'json',
}) })
.done(projects => callback(projects)); .done(projects => callback(projects));
>>>>>>> ce/master
}, },
// Return text for a specific license // Return text for a specific license
...@@ -230,29 +166,24 @@ const Api = { ...@@ -230,29 +166,24 @@ const Api = {
if (gon.relative_url_root != null) { if (gon.relative_url_root != null) {
urlRoot = gon.relative_url_root; urlRoot = gon.relative_url_root;
} }
<<<<<<< HEAD return urlRoot + url.replace(':version', gon.api_version);
return url.replace(':version', gon.api_version);
}, },
ldap_groups: function(query, provider, callback) {
var url; ldap_groups(query, provider, callback) {
url = Api.buildUrl(Api.ldapGroupsPath); const url = Api.buildUrl(this.ldapGroupsPath);
url = url.replace(':provider', provider); url = url.replace(':provider', provider);
return $.ajax({ return Api.wrapAjaxCall({
url: url, url: url,
data: { data: Object.assign({
private_token: gon.api_token, private_token: gon.api_token,
search: query, search: query,
per_page: 20, per_page: 20,
active: true active: true
}, }),
dataType: 'json' dataType: 'json'
}).done(function(groups) { })
return callback(groups); .done(groups => callback(groups));
});
} }
=======
return urlRoot + url.replace(':version', gon.api_version);
},
wrapAjaxCall(options) { wrapAjaxCall(options) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -267,7 +198,6 @@ const Api = { ...@@ -267,7 +198,6 @@ const Api = {
); );
}); });
}, },
>>>>>>> ce/master
}; };
export default Api; export default Api;
...@@ -22,13 +22,10 @@ import './components/board_sidebar'; ...@@ -22,13 +22,10 @@ import './components/board_sidebar';
import './components/new_list_dropdown'; import './components/new_list_dropdown';
import './components/modal/index'; import './components/modal/index';
import '../vue_shared/vue_resource_interceptor'; import '../vue_shared/vue_resource_interceptor';
<<<<<<< HEAD
import './components/boards_selector'; import './components/boards_selector';
import collapseIcon from './icons/fullscreen_collapse.svg'; import collapseIcon from './icons/fullscreen_collapse.svg';
import expandIcon from './icons/fullscreen_expand.svg'; import expandIcon from './icons/fullscreen_expand.svg';
=======
>>>>>>> ce/master
Vue.use(VueResource); Vue.use(VueResource);
......
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
import Vue from 'vue'; import Vue from 'vue';
import queryData from '../../utils/query_data'; import queryData from '../../utils/query_data';
import loadingIcon from '../../../vue_shared/components/loading_icon.vue'; import loadingIcon from '../../../vue_shared/components/loading_icon.vue';
<<<<<<< HEAD
=======
>>>>>>> ce/master
import './header'; import './header';
import './list'; import './list';
import './footer'; import './footer';
......
...@@ -59,12 +59,9 @@ import UsersSelect from './users_select'; ...@@ -59,12 +59,9 @@ import UsersSelect from './users_select';
import RefSelectDropdown from './ref_select_dropdown'; import RefSelectDropdown from './ref_select_dropdown';
import GfmAutoComplete from './gfm_auto_complete'; import GfmAutoComplete from './gfm_auto_complete';
import ShortcutsBlob from './shortcuts_blob'; import ShortcutsBlob from './shortcuts_blob';
<<<<<<< HEAD
// EE-only // EE-only
import ApproversSelect from './approvers_select'; import ApproversSelect from './approvers_select';
=======
>>>>>>> ce/master
(function() { (function() {
var Dispatcher; var Dispatcher;
......
...@@ -56,11 +56,7 @@ class DropdownHint extends gl.FilteredSearchDropdown { ...@@ -56,11 +56,7 @@ class DropdownHint extends gl.FilteredSearchDropdown {
} }
renderContent() { renderContent() {
<<<<<<< HEAD
const dropdownData = this.tokenKeys.get() const dropdownData = this.tokenKeys.get()
=======
const dropdownData = gl.FilteredSearchTokenKeys.get()
>>>>>>> ce/master
.map(tokenKey => ({ .map(tokenKey => ({
icon: `fa-${tokenKey.icon}`, icon: `fa-${tokenKey.icon}`,
hint: tokenKey.key, hint: tokenKey.key,
......
...@@ -8,9 +8,6 @@ import './filtered_search_manager'; ...@@ -8,9 +8,6 @@ import './filtered_search_manager';
import './filtered_search_token_keys'; import './filtered_search_token_keys';
import './filtered_search_tokenizer'; import './filtered_search_tokenizer';
import './filtered_search_visual_tokens'; import './filtered_search_visual_tokens';
<<<<<<< HEAD
// EE-only // EE-only
import './filtered_search_token_keys_with_weights'; import './filtered_search_token_keys_with_weights';
=======
>>>>>>> ce/master
...@@ -454,10 +454,6 @@ class FilteredSearchManager { ...@@ -454,10 +454,6 @@ class FilteredSearchManager {
const { tokens, searchToken } const { tokens, searchToken }
= this.tokenizer.processTokens(searchQuery, this.filteredSearchTokenKeys.getKeys()); = this.tokenizer.processTokens(searchQuery, this.filteredSearchTokenKeys.getKeys());
<<<<<<< HEAD
=======
>>>>>>> ce/master
const currentState = gl.utils.getParameterByName('state') || 'opened'; const currentState = gl.utils.getParameterByName('state') || 'opened';
paths.push(`state=${currentState}`); paths.push(`state=${currentState}`);
......
...@@ -170,7 +170,6 @@ import './visibility_select'; ...@@ -170,7 +170,6 @@ import './visibility_select';
import './wikis'; import './wikis';
import './zen_mode'; import './zen_mode';
<<<<<<< HEAD
// EE-only scripts // EE-only scripts
import './admin_email_select'; import './admin_email_select';
import './application_settings'; import './application_settings';
...@@ -179,8 +178,6 @@ import './ldap_groups_select'; ...@@ -179,8 +178,6 @@ import './ldap_groups_select';
import './path_locks'; import './path_locks';
import './weight_select'; import './weight_select';
=======
>>>>>>> ce/master
// eslint-disable-next-line global-require, import/no-commonjs // eslint-disable-next-line global-require, import/no-commonjs
if (process.env.NODE_ENV !== 'production') require('./test_utils/'); if (process.env.NODE_ENV !== 'production') require('./test_utils/');
......
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