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
53a05d34
Commit
53a05d34
authored
Feb 21, 2018
by
Clement Ho
Committed by
Jacob Schatz
Feb 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dynamic imports for project dispatcher paths (EE)
parent
82e2c2e7
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
43 additions
and
73 deletions
+43
-73
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-41
app/assets/javascripts/pages/projects/activity/index.js
app/assets/javascripts/pages/projects/activity/index.js
+2
-2
app/assets/javascripts/pages/projects/commit/pipelines/index.js
...sets/javascripts/pages/projects/commit/pipelines/index.js
+2
-2
app/assets/javascripts/pages/projects/commit/show/index.js
app/assets/javascripts/pages/projects/commit/show/index.js
+2
-2
app/assets/javascripts/pages/projects/commits/show/index.js
app/assets/javascripts/pages/projects/commits/show/index.js
+2
-2
app/assets/javascripts/pages/projects/edit/index.js
app/assets/javascripts/pages/projects/edit/index.js
+2
-2
app/assets/javascripts/pages/projects/imports/show/index.js
app/assets/javascripts/pages/projects/imports/show/index.js
+2
-2
app/assets/javascripts/pages/projects/pipelines/builds/index.js
...sets/javascripts/pages/projects/pipelines/builds/index.js
+2
-15
app/assets/javascripts/pages/projects/pipelines/failures/index.js
...ts/javascripts/pages/projects/pipelines/failures/index.js
+3
-0
app/assets/javascripts/pages/projects/pipelines/init_pipelines.js
...ts/javascripts/pages/projects/pipelines/init_pipelines.js
+16
-0
app/assets/javascripts/pages/projects/pipelines/new/index.js
app/assets/javascripts/pages/projects/pipelines/new/index.js
+3
-3
app/assets/javascripts/pages/projects/pipelines/security/index.js
...ts/javascripts/pages/projects/pipelines/security/index.js
+3
-0
app/assets/javascripts/pages/projects/pipelines/show/index.js
...assets/javascripts/pages/projects/pipelines/show/index.js
+3
-0
ee/app/assets/javascripts/pages/projects/edit/index.js
ee/app/assets/javascripts/pages/projects/edit/index.js
+1
-2
No files found.
app/assets/javascripts/dispatcher.js
View file @
53a05d34
...
...
@@ -52,31 +52,9 @@ var Dispatcher;
case
'
projects:merge_requests:creations:diffs
'
:
case
'
projects:merge_requests:edit
'
:
case
'
projects:merge_requests:show
'
:
shortcut_handler
=
true
;
break
;
case
'
projects:commit:show
'
:
import
(
'
./pages/projects/commit/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:commit:pipelines
'
:
import
(
'
./pages/projects/commit/pipelines
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:activity
'
:
import
(
'
./pages/projects/activity
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:commits:show
'
:
import
(
'
./pages/projects/commits/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:show
'
:
shortcut_handler
=
true
;
break
;
...
...
@@ -85,25 +63,6 @@ var Dispatcher;
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:imports:show
'
:
import
(
'
./pages/projects/imports/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:pipelines:new
'
:
case
'
projects:pipelines:create
'
:
import
(
'
./pages/projects/pipelines/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:pipelines:builds
'
:
case
'
projects:pipelines:failures
'
:
case
'
projects:pipelines:security
'
:
case
'
projects:pipelines:show
'
:
import
(
'
./pages/projects/pipelines/builds
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:activity
'
:
import
(
'
./pages/groups/activity
'
)
.
then
(
callDefault
)
...
...
app/assets/javascripts/pages/projects/activity/index.js
View file @
53a05d34
import
Activities
from
'
~/activities
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
export
default
function
()
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
Activities
();
// eslint-disable-line no-new
new
ShortcutsNavigation
();
// eslint-disable-line no-new
}
}
);
app/assets/javascripts/pages/projects/commit/pipelines/index.js
View file @
53a05d34
import
MiniPipelineGraph
from
'
~/mini_pipeline_graph_dropdown
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
MiniPipelineGraph
({
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
};
}
)
;
app/assets/javascripts/pages/projects/commit/show/index.js
View file @
53a05d34
...
...
@@ -7,7 +7,7 @@ import initNotes from '~/init_notes';
import
initChangesDropdown
from
'
~/init_changes_dropdown
'
;
import
{
fetchCommitMergeRequests
}
from
'
~/commit_merge_requests
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
Diff
();
new
ZenMode
();
new
ShortcutsNavigation
();
...
...
@@ -19,4 +19,4 @@ export default () => {
initChangesDropdown
(
document
.
querySelector
(
'
.navbar-gitlab
'
).
offsetHeight
-
stickyBarPaddingTop
);
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
fetchCommitMergeRequests
();
};
}
)
;
app/assets/javascripts/pages/projects/commits/show/index.js
View file @
53a05d34
...
...
@@ -2,8 +2,8 @@ import CommitsList from '~/commits';
import
GpgBadges
from
'
~/gpg_badges
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
CommitsList
(
document
.
querySelector
(
'
.js-project-commits-show
'
).
dataset
.
commitsLimit
);
// eslint-disable-line no-new
new
ShortcutsNavigation
();
// eslint-disable-line no-new
GpgBadges
.
fetch
();
};
}
)
;
app/assets/javascripts/pages/projects/edit/index.js
View file @
53a05d34
...
...
@@ -5,11 +5,11 @@ import ProjectNew from '../shared/project_new';
import
projectAvatar
from
'
../shared/project_avatar
'
;
import
initProjectPermissionsSettings
from
'
../shared/permissions
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ProjectNew
();
// eslint-disable-line no-new
setupProjectEdit
();
// Initialize expandable settings panels
initSettingsPanels
();
projectAvatar
();
initProjectPermissionsSettings
();
};
}
)
;
app/assets/javascripts/pages/projects/imports/show/index.js
View file @
53a05d34
import
ProjectImport
from
'
~/project_import
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ProjectImport
();
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/projects/pipelines/builds/index.js
View file @
53a05d34
import
Pipelines
from
'
../../../../
pipelines
'
;
import
initPipelines
from
'
../init_
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
'
,
},
});
};
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initPipelines
);
app/assets/javascripts/pages/projects/pipelines/failures/index.js
0 → 100644
View file @
53a05d34
import
initPipelines
from
'
../init_pipelines
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initPipelines
);
app/assets/javascripts/pages/projects/pipelines/init_pipelines.js
0 → 100644
View file @
53a05d34
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
View file @
53a05d34
import
NewBranchForm
from
'
../../../..
/new_branch_form
'
;
import
NewBranchForm
from
'
~
/new_branch_form
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
NewBranchForm
(
$
(
'
.js-new-pipeline-form
'
));
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/projects/pipelines/security/index.js
0 → 100644
View file @
53a05d34
import
initPipelines
from
'
../init_pipelines
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initPipelines
);
app/assets/javascripts/pages/projects/pipelines/show/index.js
0 → 100644
View file @
53a05d34
import
initPipelines
from
'
../init_pipelines
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initPipelines
);
ee/app/assets/javascripts/pages/projects/edit/index.js
View file @
53a05d34
/* eslint-disable no-new */
import
initCePage
from
'
~/pages/projects/edit
'
;
import
'
~/pages/projects/edit
'
;
import
UsersSelect
from
'
~/users_select
'
;
import
UserCallout
from
'
~/user_callout
'
;
import
groupsSelect
from
'
~/groups_select
'
;
...
...
@@ -8,7 +8,6 @@ import ApproversSelect from 'ee/approvers_select';
export
default
()
=>
{
new
UsersSelect
();
groupsSelect
();
initCePage
();
new
UserCallout
({
className
:
'
js-service-desk-callout
'
});
new
UserCallout
({
className
:
'
js-mr-approval-callout
'
});
...
...
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