Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3d0c99c0
Commit
3d0c99c0
authored
Jan 11, 2018
by
Constance Okoghenun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied patch for projects-dispatcher-refactor
parent
b55cb3e9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
167 additions
and
19 deletions
+167
-19
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+9
-19
app/assets/javascripts/dispatcher.js.rej
app/assets/javascripts/dispatcher.js.rej
+9
-0
app/assets/javascripts/pages/projects/pipelines/builds/index.js
...sets/javascripts/pages/projects/pipelines/builds/index.js
+16
-0
app/assets/javascripts/pages/projects/pipelines/new/index.js
app/assets/javascripts/pages/projects/pipelines/new/index.js
+5
-0
app/assets/javascripts/pages/projects/project_members/index.js
...ssets/javascripts/pages/projects/project_members/index.js
+12
-0
projects-dispatcher-refactor.patch
projects-dispatcher-refactor.patch
+116
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
3d0c99c0
...
...
@@ -43,7 +43,6 @@ import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater';
import
BlobForkSuggestion
from
'
./blob/blob_fork_suggestion
'
;
import
UserCallout
from
'
./user_callout
'
;
import
ShortcutsWiki
from
'
./shortcuts_wiki
'
;
import
Pipelines
from
'
./pipelines
'
;
import
BlobViewer
from
'
./blob/viewer/index
'
;
import
AutoWidthDropdownSelect
from
'
./issuable/auto_width_dropdown_select
'
;
import
UsersSelect
from
'
./users_select
'
;
...
...
@@ -440,23 +439,16 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
break
;
case
'
projects:pipelines:new
'
:
case
'
projects:pipelines:create
'
:
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
));
import
(
'
./pages/projects/pipelines/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:pipelines:builds
'
:
case
'
projects:pipelines:failures
'
:
case
'
projects:pipelines:show
'
:
const
{
controllerAction
}
=
document
.
querySelector
(
'
.js-pipeline-container
'
).
dataset
;
const
pipelineStatusUrl
=
`
${
document
.
querySelector
(
'
.js-pipeline-tab-link a
'
).
getAttribute
(
'
href
'
)}
/status.json`
;
new
Pipelines
({
initTabs
:
true
,
pipelineStatusUrl
,
tabsOptions
:
{
action
:
controllerAction
,
defaultAction
:
'
pipelines
'
,
parentEl
:
'
.pipelines-tabs
'
,
},
});
import
(
'
./pages/projects/pipelines/builds
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:activity
'
:
new
Activities
();
...
...
@@ -478,11 +470,9 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
new
UsersSelect
();
break
;
case
'
projects:project_members:index
'
:
memberExpirationDate
(
'
.js-access-expiration-date-groups
'
);
groupsSelect
();
memberExpirationDate
();
new
Members
();
new
UsersSelect
();
import
(
'
./pages/projects/project_members/
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:new
'
:
case
'
admin:groups:new
'
:
...
...
app/assets/javascripts/dispatcher.js.rej
0 → 100644
View file @
3d0c99c0
diff a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js (rejected hunks)
@@ -12,7 +12,6 @@
import notificationsDropdown from './notifications_dropdown';
import groupAvatar from './group_avatar';
import GroupLabelSubscription from './group_label_subscription';
import LineHighlighter from './line_highlighter';
-import groupsSelect from './groups_select';
import Search from './search';
import initAdmin from './admin';
import NamespaceSelect from './namespace_select';
app/assets/javascripts/pages/projects/pipelines/builds/index.js
0 → 100644
View file @
3d0c99c0
import
Pipelines
from
'
../../../../pipelines
'
;
export
default
()
=>
{
const
{
controllerAction
}
=
document
.
querySelector
(
'
.js-pipeline-container
'
).
dataset
;
const
pipelineStatusUrl
=
`
${
document
.
querySelector
(
'
.js-pipeline-tab-link a
'
).
getAttribute
(
'
href
'
)}
/status.json`
;
new
Pipelines
({
// eslint-disable-line no-new
initTabs
:
true
,
pipelineStatusUrl
,
tabsOptions
:
{
action
:
controllerAction
,
defaultAction
:
'
pipelines
'
,
parentEl
:
'
.pipelines-tabs
'
,
},
});
};
app/assets/javascripts/pages/projects/pipelines/new/index.js
0 → 100644
View file @
3d0c99c0
import
NewBranchForm
from
'
../../../../new_branch_form
'
;
export
default
()
=>
{
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
));
// eslint-disable-line no-new
};
app/assets/javascripts/pages/projects/project_members/index.js
0 → 100644
View file @
3d0c99c0
import
memberExpirationDate
from
'
../../../member_expiration_date
'
;
import
UsersSelect
from
'
../../../users_select
'
;
import
groupsSelect
from
'
../../../groups_select
'
;
import
Members
from
'
../../../members
'
;
export
default
()
=>
{
memberExpirationDate
(
'
.js-access-expiration-date-groups
'
);
groupsSelect
();
memberExpirationDate
();
new
Members
();
// eslint-disable-line no-new
new
UsersSelect
();
// eslint-disable-line no-new
};
projects-dispatcher-refactor.patch
0 → 100644
View file @
3d0c99c0
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index 212b6082e..98d6d79c0 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -12,7 +12,6 @@
import notificationsDropdown from './notifications_dropdown';
import groupAvatar from './group_avatar';
import GroupLabelSubscription from './group_label_subscription';
import LineHighlighter from './line_highlighter';
-import groupsSelect from './groups_select';
import Search from './search';
import initAdmin from './admin';
import NamespaceSelect from './namespace_select';
@@ -43,7 +42,6 @@
import BlobLinePermalinkUpdater from './blob/blob_line_permalink_updater';
import BlobForkSuggestion from './blob/blob_fork_suggestion';
import UserCallout from './user_callout';
import ShortcutsWiki from './shortcuts_wiki';
-import Pipelines from './pipelines';
import BlobViewer from './blob/viewer/index';
import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select';
import UsersSelect from './users_select';
@@ -400,23 +398,16 @@
import Activities from './activities';
break;
case 'projects:pipelines:new':
case 'projects:pipelines:create':
- new NewBranchForm($('.js-new-pipeline-form'));
+ import('./pages/projects/pipelines/new')
+ .then(callDefault)
+ .catch(fail);
break;
case 'projects:pipelines:builds':
case 'projects:pipelines:failures':
case 'projects:pipelines:show':
- const { controllerAction } = document.querySelector('.js-pipeline-container').dataset;
- const pipelineStatusUrl = `${document.querySelector('.js-pipeline-tab-link a').getAttribute('href')}/status.json`;
-
- new Pipelines({
- initTabs: true,
- pipelineStatusUrl,
- tabsOptions: {
- action: controllerAction,
- defaultAction: 'pipelines',
- parentEl: '.pipelines-tabs',
- },
- });
+ import('./pages/projects/pipelines/builds')
+ .then(callDefault)
+ .catch(fail);
break;
case 'groups:activity':
new Activities();
@@ -438,11 +429,9 @@
import Activities from './activities';
new UsersSelect();
break;
case 'projects:project_members:index':
- memberExpirationDate('.js-access-expiration-date-groups');
- groupsSelect();
- memberExpirationDate();
- new Members();
- new UsersSelect();
+ import('./pages/projects/project_members/')
+ .then(callDefault)
+ .catch(fail);
break;
case 'groups:new':
case 'admin:groups:new':
diff --git a/app/assets/javascripts/pages/projects/pipelines/builds/index.js b/app/assets/javascripts/pages/projects/pipelines/builds/index.js
new file mode 100644
index 000000000..060a78b42
--- /dev/null
+++ b/app/assets/javascripts/pages/projects/pipelines/builds/index.js
@@ -0,0 +1,16 @@
+import Pipelines from '../../../../pipelines';
+
+export default () => {
+ const { controllerAction } = document.querySelector('.js-pipeline-container').dataset;
+ const pipelineStatusUrl = `${document.querySelector('.js-pipeline-tab-link a').getAttribute('href')}/status.json`;
+
+ new Pipelines({ // eslint-disable-line no-new
+ initTabs: true,
+ pipelineStatusUrl,
+ tabsOptions: {
+ action: controllerAction,
+ defaultAction: 'pipelines',
+ parentEl: '.pipelines-tabs',
+ },
+ });
+};
diff --git a/app/assets/javascripts/pages/projects/pipelines/new/index.js b/app/assets/javascripts/pages/projects/pipelines/new/index.js
new file mode 100644
index 000000000..c54cc62bf
--- /dev/null
+++ b/app/assets/javascripts/pages/projects/pipelines/new/index.js
@@ -0,0 +1,5 @@
+import NewBranchForm from '../../../../new_branch_form';
+
+export default () => {
+ new NewBranchForm($('.js-new-pipeline-form')); // eslint-disable-line no-new
+};
diff --git a/app/assets/javascripts/pages/projects/project_members/index.js b/app/assets/javascripts/pages/projects/project_members/index.js
new file mode 100644
index 000000000..f4643e7db
--- /dev/null
+++ b/app/assets/javascripts/pages/projects/project_members/index.js
@@ -0,0 +1,12 @@
+import memberExpirationDate from '../../../member_expiration_date';
+import UsersSelect from '../../../users_select';
+import groupsSelect from '../../../groups_select';
+import Members from '../../../members';
+
+export default () => {
+ memberExpirationDate('.js-access-expiration-date-groups');
+ groupsSelect();
+ memberExpirationDate();
+ new Members(); // eslint-disable-line no-new
+ new UsersSelect(); // eslint-disable-line no-new
+};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment