BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
2f2f63a0
Commit
2f2f63a0
authored
Feb 21, 2018
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'more-dispatcher-refactoring' into 'master'
More dispatcher refactoring See merge request gitlab-org/gitlab-ce!17232
parents
715b10bc
ba5ae88a
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
35 additions
and
119 deletions
+35
-119
dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-89
main.js
app/assets/javascripts/main.js
+1
-1
index.js
app/assets/javascripts/pages/admin/index.js
+1
-1
index.js
app/assets/javascripts/pages/dashboard/activity/index.js
+1
-1
index.js
app/assets/javascripts/pages/omniauth_callbacks/index.js
+1
-3
index.js
...sets/javascripts/pages/projects/clusters/destroy/index.js
+5
-0
index.js
...assets/javascripts/pages/projects/clusters/index/index.js
+2
-2
index.js
app/assets/javascripts/pages/projects/clusters/show/index.js
+2
-2
index.js
...ssets/javascripts/pages/projects/clusters/update/index.js
+5
-0
index.js
app/assets/javascripts/pages/projects/releases/edit/index.js
+1
-1
index.js
app/assets/javascripts/pages/projects/services/edit/index.js
+2
-2
index.js
app/assets/javascripts/pages/projects/snippets/edit/index.js
+1
-1
index.js
app/assets/javascripts/pages/projects/snippets/new/index.js
+1
-1
index.js
app/assets/javascripts/pages/projects/snippets/show/index.js
+2
-2
index.js
app/assets/javascripts/pages/projects/tags/new/index.js
+2
-2
index.js
app/assets/javascripts/pages/sessions/index.js
+1
-3
index.js
app/assets/javascripts/pages/snippets/edit/index.js
+1
-1
index.js
app/assets/javascripts/pages/snippets/new/index.js
+1
-1
index.js
app/assets/javascripts/pages/snippets/show/index.js
+5
-6
No files found.
app/assets/javascripts/dispatcher.js
View file @
2f2f63a0
...
...
@@ -51,68 +51,9 @@ var Dispatcher;
case
'projects:merge_requests:creations:new'
:
case
'projects:merge_requests:creations:diffs'
:
case
'projects:merge_requests:edit'
:
shortcut_handler
=
true
;
break
;
case
'projects:tags:new'
:
import
(
'./pages/projects/tags/new'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:snippets:show'
:
import
(
'./pages/projects/snippets/show'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:snippets:new'
:
case
'projects:snippets:create'
:
import
(
'./pages/projects/snippets/new'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:services:edit'
:
import
(
'./pages/projects/services/edit'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:snippets:edit'
:
case
'projects:snippets:update'
:
import
(
'./pages/projects/snippets/edit'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'snippets:new'
:
import
(
'./pages/snippets/new'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'snippets:edit'
:
import
(
'./pages/snippets/edit'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'snippets:create'
:
import
(
'./pages/snippets/new'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'snippets:update'
:
import
(
'./pages/snippets/edit'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:releases:edit'
:
import
(
'./pages/projects/releases/edit'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:merge_requests:show'
:
shortcut_handler
=
true
;
break
;
case
'dashboard:activity'
:
import
(
'./pages/dashboard/activity'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:commit:show'
:
import
(
'./pages/projects/commit/show'
)
.
then
(
callDefault
)
...
...
@@ -314,11 +255,6 @@ var Dispatcher;
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'snippets:show'
:
import
(
'./pages/snippets/show'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'import:fogbugz:new_user_map'
:
import
(
'./pages/import/fogbugz/new_user_map'
)
.
then
(
callDefault
)
...
...
@@ -334,18 +270,6 @@ var Dispatcher;
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:clusters:show'
:
case
'projects:clusters:update'
:
case
'projects:clusters:destroy'
:
import
(
'./pages/projects/clusters/show'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'projects:clusters:index'
:
import
(
'./pages/projects/clusters/index'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'dashboard:groups:index'
:
import
(
'./pages/dashboard/groups/index'
)
.
then
(
callDefault
)
...
...
@@ -353,20 +277,7 @@ var Dispatcher;
break
;
}
switch
(
path
[
0
])
{
case
'sessions'
:
import
(
'./pages/sessions'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'omniauth_callbacks'
:
import
(
'./pages/omniauth_callbacks'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'admin'
:
import
(
'./pages/admin'
)
.
then
(
callDefault
)
.
catch
(
fail
);
switch
(
path
[
1
])
{
case
'broadcast_messages'
:
import
(
'./pages/admin/broadcast_messages'
)
...
...
app/assets/javascripts/main.js
View file @
2f2f63a0
...
...
@@ -61,7 +61,7 @@ gl.lazyLoader = new LazyLoader({
observerNode
:
'#content-body'
,
});
$
(
()
=>
{
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
const
$body
=
$
(
'body'
);
const
$document
=
$
(
document
);
const
$window
=
$
(
window
);
...
...
app/assets/javascripts/pages/admin/index.js
View file @
2f2f63a0
import
initAdmin
from
'./admin'
;
export
default
()
=>
initAdmin
(
);
document
.
addEventListener
(
'DOMContentLoaded'
,
initAdmin
);
app/assets/javascripts/pages/dashboard/activity/index.js
View file @
2f2f63a0
import
Activities
from
'~/activities'
;
export
default
()
=>
new
Activities
(
);
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
new
Activities
()
);
app/assets/javascripts/pages/omniauth_callbacks/index.js
View file @
2f2f63a0
import
initU2F
from
'../../shared/sessions/u2f'
;
export
default
()
=>
{
initU2F
();
};
document
.
addEventListener
(
'DOMContentLoaded'
,
initU2F
);
app/assets/javascripts/pages/projects/clusters/destroy/index.js
0 → 100644
View file @
2f2f63a0
import
ClustersBundle
from
'~/clusters/clusters_bundle'
;
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
ClustersBundle
();
// eslint-disable-line no-new
});
app/assets/javascripts/pages/projects/clusters/index/index.js
View file @
2f2f63a0
import
ClustersIndex
from
'~/clusters/clusters_index'
;
export
default
()
=>
{
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
ClustersIndex
();
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/projects/clusters/show/index.js
View file @
2f2f63a0
import
ClustersBundle
from
'~/clusters/clusters_bundle'
;
export
default
()
=>
{
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
ClustersBundle
();
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/projects/clusters/update/index.js
0 → 100644
View file @
2f2f63a0
import
ClustersBundle
from
'~/clusters/clusters_bundle'
;
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
ClustersBundle
();
// eslint-disable-line no-new
});
app/assets/javascripts/pages/projects/releases/edit/index.js
View file @
2f2f63a0
import
initForm
from
'~/pages/projects/init_form'
;
export
default
initForm
(
$
(
'.release-form'
));
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
initForm
(
$
(
'.release-form'
)
));
app/assets/javascripts/pages/projects/services/edit/index.js
View file @
2f2f63a0
import
IntegrationSettingsForm
from
'~/integrations/integration_settings_form'
;
import
PrometheusMetrics
from
'~/prometheus_metrics/prometheus_metrics'
;
export
default
()
=>
{
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
const
prometheusSettingsWrapper
=
document
.
querySelector
(
'.js-prometheus-metrics-monitoring'
);
const
integrationSettingsForm
=
new
IntegrationSettingsForm
(
'.js-integration-settings-form'
);
integrationSettingsForm
.
init
();
...
...
@@ -10,4 +10,4 @@ export default () => {
const
prometheusMetrics
=
new
PrometheusMetrics
(
'.js-prometheus-metrics-monitoring'
);
prometheusMetrics
.
loadActiveMetrics
();
}
};
}
)
;
app/assets/javascripts/pages/projects/snippets/edit/index.js
View file @
2f2f63a0
import
initForm
from
'~/pages/projects/init_form'
;
export
default
initForm
(
$
(
'.snippet-form'
));
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
initForm
(
$
(
'.snippet-form'
)
));
app/assets/javascripts/pages/projects/snippets/new/index.js
View file @
2f2f63a0
import
initForm
from
'~/pages/projects/init_form'
;
export
default
initForm
(
$
(
'.snippet-form'
));
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
initForm
(
$
(
'.snippet-form'
)
));
app/assets/javascripts/pages/projects/snippets/show/index.js
View file @
2f2f63a0
...
...
@@ -3,9 +3,9 @@ import ZenMode from '~/zen_mode';
import
LineHighlighter
from
'../../../../line_highlighter'
;
import
BlobViewer
from
'../../../../blob/viewer'
;
export
default
function
()
{
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
LineHighlighter
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
initNotes
();
new
ZenMode
();
// eslint-disable-line no-new
}
}
);
app/assets/javascripts/pages/projects/tags/new/index.js
View file @
2f2f63a0
...
...
@@ -2,8 +2,8 @@ import RefSelectDropdown from '../../../../ref_select_dropdown';
import
ZenMode
from
'../../../../zen_mode'
;
import
GLForm
from
'../../../../gl_form'
;
export
default
()
=>
{
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
ZenMode
();
// eslint-disable-line no-new
new
GLForm
(
$
(
'.tag-form'
),
true
);
// eslint-disable-line no-new
new
RefSelectDropdown
(
$
(
'.js-branch-select'
));
// eslint-disable-line no-new
};
}
)
;
app/assets/javascripts/pages/sessions/index.js
View file @
2f2f63a0
import
initU2F
from
'../../shared/sessions/u2f'
;
export
default
()
=>
{
initU2F
();
};
document
.
addEventListener
(
'DOMContentLoaded'
,
initU2F
);
app/assets/javascripts/pages/snippets/edit/index.js
View file @
2f2f63a0
import
form
from
'../form'
;
export
default
form
;
document
.
addEventListener
(
'DOMContentLoaded'
,
form
)
;
app/assets/javascripts/pages/snippets/new/index.js
View file @
2f2f63a0
import
form
from
'../form'
;
export
default
form
;
document
.
addEventListener
(
'DOMContentLoaded'
,
form
)
;
app/assets/javascripts/pages/snippets/show/index.js
View file @
2f2f63a0
/* eslint-disable no-new */
import
LineHighlighter
from
'../../../line_highlighter'
;
import
BlobViewer
from
'../../../blob/viewer'
;
import
ZenMode
from
'../../../zen_mode'
;
import
initNotes
from
'../../../init_notes'
;
export
default
()
=>
{
new
LineHighlighter
();
new
BlobViewer
();
document
.
addEventListener
(
'DOMContentLoaded'
,
()
=>
{
new
LineHighlighter
();
// eslint-disable-line no-new
new
BlobViewer
();
// eslint-disable-line no-new
initNotes
();
new
ZenMode
();
};
new
ZenMode
();
// 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