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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
4317f5a4
Commit
4317f5a4
authored
Feb 22, 2018
by
Clement Ho
Committed by
Jacob Schatz
Feb 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dynamic imports in dispatcher (Part 3)
parent
9251d1f3
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
32 additions
and
131 deletions
+32
-131
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-100
app/assets/javascripts/pages/admin/conversational_development_index/show/index.js
...ages/admin/conversational_development_index/show/index.js
+2
-2
app/assets/javascripts/pages/admin/impersonation_tokens/index.js
...ets/javascripts/pages/admin/impersonation_tokens/index.js
+2
-2
app/assets/javascripts/pages/ci/lints/create/index.js
app/assets/javascripts/pages/ci/lints/create/index.js
+3
-0
app/assets/javascripts/pages/ci/lints/index.js
app/assets/javascripts/pages/ci/lints/index.js
+0
-3
app/assets/javascripts/pages/ci/lints/show/index.js
app/assets/javascripts/pages/ci/lints/show/index.js
+3
-0
app/assets/javascripts/pages/dashboard/groups/index/index.js
app/assets/javascripts/pages/dashboard/groups/index/index.js
+1
-1
app/assets/javascripts/pages/groups/labels/edit/index.js
app/assets/javascripts/pages/groups/labels/edit/index.js
+1
-1
app/assets/javascripts/pages/groups/labels/index/index.js
app/assets/javascripts/pages/groups/labels/index/index.js
+1
-1
app/assets/javascripts/pages/groups/labels/new/index.js
app/assets/javascripts/pages/groups/labels/new/index.js
+1
-1
app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js
...ets/javascripts/pages/groups/settings/ci_cd/show/index.js
+2
-2
app/assets/javascripts/pages/import/fogbugz/new_user_map/index.js
...ts/javascripts/pages/import/fogbugz/new_user_map/index.js
+2
-2
app/assets/javascripts/pages/profiles/personal_access_tokens/index.js
...avascripts/pages/profiles/personal_access_tokens/index.js
+2
-2
app/assets/javascripts/pages/projects/artifacts/browse/index.js
...sets/javascripts/pages/projects/artifacts/browse/index.js
+2
-2
app/assets/javascripts/pages/projects/artifacts/file/index.js
...assets/javascripts/pages/projects/artifacts/file/index.js
+2
-2
app/assets/javascripts/pages/projects/forks/new/index.js
app/assets/javascripts/pages/projects/forks/new/index.js
+1
-3
app/assets/javascripts/pages/projects/labels/edit/index.js
app/assets/javascripts/pages/projects/labels/edit/index.js
+1
-1
app/assets/javascripts/pages/projects/labels/index/index.js
app/assets/javascripts/pages/projects/labels/index/index.js
+1
-1
app/assets/javascripts/pages/projects/labels/new/index.js
app/assets/javascripts/pages/projects/labels/new/index.js
+1
-1
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+2
-2
app/assets/javascripts/pages/projects/settings/repository/show/index.js
...ascripts/pages/projects/settings/repository/show/index.js
+1
-1
app/assets/javascripts/pages/search/show/index.js
app/assets/javascripts/pages/search/show/index.js
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
4317f5a4
...
@@ -61,111 +61,11 @@ var Dispatcher;
...
@@ -61,111 +61,11 @@ var Dispatcher;
case
'
projects:find_file:show
'
:
case
'
projects:find_file:show
'
:
case
'
projects:blob:show
'
:
case
'
projects:blob:show
'
:
case
'
projects:blame:show
'
:
case
'
projects:blame:show
'
:
shortcut_handler
=
true
;
break
;
case
'
groups:labels:new
'
:
import
(
'
./pages/groups/labels/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:labels:edit
'
:
import
(
'
./pages/groups/labels/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:labels:new
'
:
import
(
'
./pages/projects/labels/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:labels:edit
'
:
import
(
'
./pages/projects/labels/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:labels:index
'
:
import
(
'
./pages/groups/labels/index
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:labels:index
'
:
import
(
'
./pages/projects/labels/index
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:network:show
'
:
case
'
projects:network:show
'
:
// Ensure we don't create a particular shortcut handler here. This is
// already created, where the network graph is created.
shortcut_handler
=
true
;
break
;
case
'
projects:forks:new
'
:
import
(
'
./pages/projects/forks/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:artifacts:browse
'
:
case
'
projects:artifacts:browse
'
:
import
(
'
./pages/projects/artifacts/browse
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
break
;
case
'
projects:artifacts:file
'
:
case
'
projects:artifacts:file
'
:
import
(
'
./pages/projects/artifacts/file
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
shortcut_handler
=
true
;
break
;
break
;
case
'
search:show
'
:
import
(
'
./pages/search/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:settings:repository:show
'
:
import
(
'
./pages/projects/settings/repository/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:settings:ci_cd:show
'
:
import
(
'
./pages/projects/settings/ci_cd/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
groups:settings:ci_cd:show
'
:
import
(
'
./pages/groups/settings/ci_cd/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
ci:lints:create
'
:
case
'
ci:lints:show
'
:
import
(
'
./pages/ci/lints
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
admin:conversational_development_index:show
'
:
import
(
'
./pages/admin/conversational_development_index/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
import:fogbugz:new_user_map
'
:
import
(
'
./pages/import/fogbugz/new_user_map
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
profiles:personal_access_tokens:index
'
:
import
(
'
./pages/profiles/personal_access_tokens
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
admin:impersonation_tokens:index
'
:
import
(
'
./pages/admin/impersonation_tokens
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
dashboard:groups:index
'
:
import
(
'
./pages/dashboard/groups/index
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
}
}
switch
(
path
[
0
])
{
switch
(
path
[
0
])
{
case
'
admin
'
:
case
'
admin
'
:
...
...
app/assets/javascripts/pages/admin/conversational_development_index/show/index.js
View file @
4317f5a4
import
UserCallout
from
'
../../../..
/user_callout
'
;
import
UserCallout
from
'
~
/user_callout
'
;
export
default
()
=>
new
UserCallout
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
UserCallout
()
);
app/assets/javascripts/pages/admin/impersonation_tokens/index.js
View file @
4317f5a4
import
DueDateSelectors
from
'
../../..
/due_date_select
'
;
import
DueDateSelectors
from
'
~
/due_date_select
'
;
export
default
()
=>
new
DueDateSelectors
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
DueDateSelectors
()
);
app/assets/javascripts/pages/ci/lints/create/index.js
0 → 100644
View file @
4317f5a4
import
CILintEditor
from
'
../ci_lint_editor
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
CILintEditor
());
app/assets/javascripts/pages/ci/lints/index.js
deleted
100644 → 0
View file @
9251d1f3
import
CILintEditor
from
'
./ci_lint_editor
'
;
export
default
()
=>
new
CILintEditor
();
app/assets/javascripts/pages/ci/lints/show/index.js
0 → 100644
View file @
4317f5a4
import
CILintEditor
from
'
../ci_lint_editor
'
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
CILintEditor
());
app/assets/javascripts/pages/dashboard/groups/index/index.js
View file @
4317f5a4
import
initGroupsList
from
'
~/groups
'
;
import
initGroupsList
from
'
~/groups
'
;
export
default
initGroupsList
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initGroupsList
)
;
app/assets/javascripts/pages/groups/labels/edit/index.js
View file @
4317f5a4
import
Labels
from
'
~/labels
'
;
import
Labels
from
'
~/labels
'
;
export
default
()
=>
new
Labels
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Labels
()
);
app/assets/javascripts/pages/groups/labels/index/index.js
View file @
4317f5a4
import
initLabels
from
'
~/init_labels
'
;
import
initLabels
from
'
~/init_labels
'
;
export
default
initLabels
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initLabels
)
;
app/assets/javascripts/pages/groups/labels/new/index.js
View file @
4317f5a4
import
Labels
from
'
~/labels
'
;
import
Labels
from
'
~/labels
'
;
export
default
()
=>
new
Labels
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Labels
()
);
app/assets/javascripts/pages/groups/settings/ci_cd/show/index.js
View file @
4317f5a4
import
AjaxVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
import
AjaxVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
variableListEl
=
document
.
querySelector
(
'
.js-ci-variable-list-section
'
);
const
variableListEl
=
document
.
querySelector
(
'
.js-ci-variable-list-section
'
);
// eslint-disable-next-line no-new
// eslint-disable-next-line no-new
new
AjaxVariableList
({
new
AjaxVariableList
({
...
@@ -9,4 +9,4 @@ export default () => {
...
@@ -9,4 +9,4 @@ export default () => {
errorBox
:
variableListEl
.
querySelector
(
'
.js-ci-variable-error-box
'
),
errorBox
:
variableListEl
.
querySelector
(
'
.js-ci-variable-error-box
'
),
saveEndpoint
:
variableListEl
.
dataset
.
saveEndpoint
,
saveEndpoint
:
variableListEl
.
dataset
.
saveEndpoint
,
});
});
};
}
)
;
app/assets/javascripts/pages/import/fogbugz/new_user_map/index.js
View file @
4317f5a4
import
UsersSelect
from
'
../../../..
/users_select
'
;
import
UsersSelect
from
'
~
/users_select
'
;
export
default
()
=>
new
UsersSelect
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
UsersSelect
()
);
app/assets/javascripts/pages/profiles/personal_access_tokens/index.js
View file @
4317f5a4
import
DueDateSelectors
from
'
../../..
/due_date_select
'
;
import
DueDateSelectors
from
'
~
/due_date_select
'
;
export
default
()
=>
new
DueDateSelectors
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
DueDateSelectors
()
);
app/assets/javascripts/pages/projects/artifacts/browse/index.js
View file @
4317f5a4
import
BuildArtifacts
from
'
~/build_artifacts
'
;
import
BuildArtifacts
from
'
~/build_artifacts
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
export
default
function
()
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
BuildArtifacts
();
// eslint-disable-line no-new
new
BuildArtifacts
();
// eslint-disable-line no-new
}
}
);
app/assets/javascripts/pages/projects/artifacts/file/index.js
View file @
4317f5a4
import
BlobViewer
from
'
~/blob/viewer/index
'
;
import
BlobViewer
from
'
~/blob/viewer/index
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
export
default
function
()
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
}
}
);
app/assets/javascripts/pages/projects/forks/new/index.js
View file @
4317f5a4
import
ProjectFork
from
'
~/project_fork
'
;
import
ProjectFork
from
'
~/project_fork
'
;
export
default
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
ProjectFork
());
new
ProjectFork
();
// eslint-disable-line no-new
};
app/assets/javascripts/pages/projects/labels/edit/index.js
View file @
4317f5a4
import
Labels
from
'
~/labels
'
;
import
Labels
from
'
~/labels
'
;
export
default
()
=>
new
Labels
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Labels
()
);
app/assets/javascripts/pages/projects/labels/index/index.js
View file @
4317f5a4
import
initLabels
from
'
~/init_labels
'
;
import
initLabels
from
'
~/init_labels
'
;
export
default
initLabels
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initLabels
)
;
app/assets/javascripts/pages/projects/labels/new/index.js
View file @
4317f5a4
import
Labels
from
'
~/labels
'
;
import
Labels
from
'
~/labels
'
;
export
default
()
=>
new
Labels
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Labels
()
);
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
View file @
4317f5a4
...
@@ -2,7 +2,7 @@ import initSettingsPanels from '~/settings_panels';
...
@@ -2,7 +2,7 @@ import initSettingsPanels from '~/settings_panels';
import
SecretValues
from
'
~/behaviors/secret_values
'
;
import
SecretValues
from
'
~/behaviors/secret_values
'
;
import
AjaxVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
import
AjaxVariableList
from
'
~/ci_variable_list/ajax_variable_list
'
;
export
default
function
()
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
// Initialize expandable settings panels
// Initialize expandable settings panels
initSettingsPanels
();
initSettingsPanels
();
...
@@ -22,4 +22,4 @@ export default function () {
...
@@ -22,4 +22,4 @@ export default function () {
errorBox
:
variableListEl
.
querySelector
(
'
.js-ci-variable-error-box
'
),
errorBox
:
variableListEl
.
querySelector
(
'
.js-ci-variable-error-box
'
),
saveEndpoint
:
variableListEl
.
dataset
.
saveEndpoint
,
saveEndpoint
:
variableListEl
.
dataset
.
saveEndpoint
,
});
});
}
}
);
app/assets/javascripts/pages/projects/settings/repository/show/index.js
View file @
4317f5a4
import
initSettingsPanels
from
'
~/settings_panels
'
;
import
initSettingsPanels
from
'
~/settings_panels
'
;
export
default
initSettingsPanels
;
document
.
addEventListener
(
'
DOMContentLoaded
'
,
initSettingsPanels
)
;
app/assets/javascripts/pages/search/show/index.js
View file @
4317f5a4
import
Search
from
'
./search
'
;
import
Search
from
'
./search
'
;
export
default
()
=>
new
Search
(
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
new
Search
()
);
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