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
Léo-Paul Géneau
gitlab-ce
Commits
a607f343
Commit
a607f343
authored
Jan 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin dispatcher JS imports
parent
21bb3933
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
71 additions
and
22 deletions
+71
-22
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+24
-20
app/assets/javascripts/pages/admin/abuse_reports/abuse_reports.js
...ts/javascripts/pages/admin/abuse_reports/abuse_reports.js
+1
-1
app/assets/javascripts/pages/admin/abuse_reports/index.js
app/assets/javascripts/pages/admin/abuse_reports/index.js
+3
-0
app/assets/javascripts/pages/admin/admin.js
app/assets/javascripts/pages/admin/admin.js
+1
-1
app/assets/javascripts/pages/admin/broadcast_messages/broadcast_message.js
...ripts/pages/admin/broadcast_messages/broadcast_message.js
+0
-0
app/assets/javascripts/pages/admin/broadcast_messages/index.js
...ssets/javascripts/pages/admin/broadcast_messages/index.js
+3
-0
app/assets/javascripts/pages/admin/cohorts/index.js
app/assets/javascripts/pages/admin/cohorts/index.js
+3
-0
app/assets/javascripts/pages/admin/cohorts/usage_ping.js
app/assets/javascripts/pages/admin/cohorts/usage_ping.js
+0
-0
app/assets/javascripts/pages/admin/groups/edit/index.js
app/assets/javascripts/pages/admin/groups/edit/index.js
+3
-0
app/assets/javascripts/pages/admin/groups/new/index.js
app/assets/javascripts/pages/admin/groups/new/index.js
+9
-0
app/assets/javascripts/pages/admin/groups/show/index.js
app/assets/javascripts/pages/admin/groups/show/index.js
+3
-0
app/assets/javascripts/pages/admin/impersonation_tokens/index.js
...ets/javascripts/pages/admin/impersonation_tokens/index.js
+3
-0
app/assets/javascripts/pages/admin/index.js
app/assets/javascripts/pages/admin/index.js
+3
-0
app/assets/javascripts/pages/admin/labels/edit/index.js
app/assets/javascripts/pages/admin/labels/edit/index.js
+3
-0
app/assets/javascripts/pages/admin/labels/new/index.js
app/assets/javascripts/pages/admin/labels/new/index.js
+3
-0
app/assets/javascripts/pages/admin/projects/index.js
app/assets/javascripts/pages/admin/projects/index.js
+9
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
a607f343
...
@@ -13,8 +13,6 @@ import groupAvatar from './group_avatar';
...
@@ -13,8 +13,6 @@ import groupAvatar from './group_avatar';
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
groupsSelect
from
'
./groups_select
'
;
import
groupsSelect
from
'
./groups_select
'
;
import
initAdmin
from
'
./admin
'
;
import
NamespaceSelect
from
'
./namespace_select
'
;
import
NewCommitForm
from
'
./new_commit_form
'
;
import
NewCommitForm
from
'
./new_commit_form
'
;
import
Project
from
'
./project
'
;
import
Project
from
'
./project
'
;
import
projectAvatar
from
'
./project_avatar
'
;
import
projectAvatar
from
'
./project_avatar
'
;
...
@@ -51,14 +49,12 @@ import GfmAutoComplete from './gfm_auto_complete';
...
@@ -51,14 +49,12 @@ import GfmAutoComplete from './gfm_auto_complete';
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
Star
from
'
./star
'
;
import
Star
from
'
./star
'
;
import
TreeView
from
'
./tree
'
;
import
TreeView
from
'
./tree
'
;
import
UsagePing
from
'
./usage_ping
'
;
import
VersionCheckImage
from
'
./version_check_image
'
;
import
VersionCheckImage
from
'
./version_check_image
'
;
import
Wikis
from
'
./wikis
'
;
import
Wikis
from
'
./wikis
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
import
PerformanceBar
from
'
./performance_bar
'
;
import
PerformanceBar
from
'
./performance_bar
'
;
import
initBroadcastMessagesForm
from
'
./broadcast_message
'
;
import
initNotes
from
'
./init_notes
'
;
import
initNotes
from
'
./init_notes
'
;
import
initLegacyFilters
from
'
./init_legacy_filters
'
;
import
initLegacyFilters
from
'
./init_legacy_filters
'
;
import
initIssuableSidebar
from
'
./init_issuable_sidebar
'
;
import
initIssuableSidebar
from
'
./init_issuable_sidebar
'
;
...
@@ -66,7 +62,6 @@ import initProjectVisibilitySelector from './project_visibility';
...
@@ -66,7 +62,6 @@ import initProjectVisibilitySelector from './project_visibility';
import
GpgBadges
from
'
./gpg_badges
'
;
import
GpgBadges
from
'
./gpg_badges
'
;
import
initChangesDropdown
from
'
./init_changes_dropdown
'
;
import
initChangesDropdown
from
'
./init_changes_dropdown
'
;
import
NewGroupChild
from
'
./groups/new_group_child
'
;
import
NewGroupChild
from
'
./groups/new_group_child
'
;
import
AbuseReports
from
'
./abuse_reports
'
;
import
{
ajaxGet
,
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
{
ajaxGet
,
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
AjaxLoadingSpinner
from
'
./ajax_loading_spinner
'
;
import
AjaxLoadingSpinner
from
'
./ajax_loading_spinner
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
...
@@ -229,9 +224,6 @@ import Activities from './activities';
...
@@ -229,9 +224,6 @@ import Activities from './activities';
.
then
(
callDefault
)
.
then
(
callDefault
)
.
catch
(
fail
);
.
catch
(
fail
);
break
;
break
;
case
'
admin:projects:index
'
:
new
ProjectsList
();
break
;
case
'
explore:groups:index
'
:
case
'
explore:groups:index
'
:
import
(
'
./pages/explore/groups
'
)
import
(
'
./pages/explore/groups
'
)
.
then
(
callDefault
)
.
then
(
callDefault
)
...
@@ -441,15 +433,19 @@ import Activities from './activities';
...
@@ -441,15 +433,19 @@ import Activities from './activities';
new
UsersSelect
();
new
UsersSelect
();
break
;
break
;
case
'
groups:new
'
:
case
'
groups:new
'
:
case
'
admin:groups:new
'
:
case
'
groups:create
'
:
case
'
groups:create
'
:
case
'
admin:groups:create
'
:
BindInOut
.
initAll
();
BindInOut
.
initAll
();
new
Group
();
new
Group
();
groupAvatar
();
groupAvatar
();
break
;
break
;
case
'
groups:edit
'
:
case
'
admin:groups:create
'
:
case
'
admin:groups:new
'
:
import
(
'
./pages/admin/groups/new
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
admin:groups:edit
'
:
case
'
admin:groups:edit
'
:
import
(
'
./pages/admin/groups/edit
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
groups:edit
'
:
groupAvatar
();
groupAvatar
();
break
;
break
;
case
'
projects:tree:show
'
:
case
'
projects:tree:show
'
:
...
@@ -565,8 +561,10 @@ import Activities from './activities';
...
@@ -565,8 +561,10 @@ import Activities from './activities';
case
'
import:fogbugz:new_user_map
'
:
case
'
import:fogbugz:new_user_map
'
:
import
(
'
./pages/import/fogbugz/new_user_map
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
import
(
'
./pages/import/fogbugz/new_user_map
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
break
;
case
'
profiles:personal_access_tokens:index
'
:
case
'
admin:impersonation_tokens:index
'
:
case
'
admin:impersonation_tokens:index
'
:
import
(
'
./pages/admin/impersonation_tokens
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
profiles:personal_access_tokens:index
'
:
new
DueDateSelectors
();
new
DueDateSelectors
();
break
;
break
;
case
'
projects:clusters:show
'
:
case
'
projects:clusters:show
'
:
...
@@ -601,29 +599,35 @@ import Activities from './activities';
...
@@ -601,29 +599,35 @@ import Activities from './activities';
// needed in rspec
// needed in rspec
gl
.
u2fAuthenticate
=
u2fAuthenticate
;
gl
.
u2fAuthenticate
=
u2fAuthenticate
;
case
'
admin
'
:
case
'
admin
'
:
i
nitAdmin
(
);
i
mport
(
'
./pages/admin
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
switch
(
path
[
1
])
{
switch
(
path
[
1
])
{
case
'
broadcast_messages
'
:
case
'
broadcast_messages
'
:
i
nitBroadcastMessagesForm
(
);
i
mport
(
'
./pages/admin/broadcast_messages
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
break
;
case
'
cohorts
'
:
case
'
cohorts
'
:
new
UsagePing
(
);
import
(
'
./pages/admin/cohorts
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
break
;
case
'
groups
'
:
case
'
groups
'
:
new
UsersSelect
();
switch
(
path
[
2
])
{
case
'
show
'
:
import
(
'
./pages/admin/groups/show
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
}
break
;
break
;
case
'
projects
'
:
case
'
projects
'
:
document
.
querySelectorAll
(
'
.js-namespace-select
'
)
import
(
'
./pages/admin/projects
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
.
forEach
(
dropdown
=>
new
NamespaceSelect
({
dropdown
}));
break
;
break
;
case
'
labels
'
:
case
'
labels
'
:
switch
(
path
[
2
])
{
switch
(
path
[
2
])
{
case
'
new
'
:
case
'
new
'
:
import
(
'
./pages/admin/labels/new
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
edit
'
:
case
'
edit
'
:
new
Labels
();
import
(
'
./pages/admin/labels/edit
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
}
}
case
'
abuse_reports
'
:
case
'
abuse_reports
'
:
new
AbuseReports
(
);
import
(
'
./pages/admin/abuse_reports
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
break
;
}
}
break
;
break
;
...
...
app/assets/javascripts/abuse_reports.js
→
app/assets/javascripts/
pages/admin/abuse_reports/
abuse_reports.js
View file @
a607f343
import
{
truncate
}
from
'
./lib/utils/text_utility
'
;
import
{
truncate
}
from
'
.
./../..
/lib/utils/text_utility
'
;
const
MAX_MESSAGE_LENGTH
=
500
;
const
MAX_MESSAGE_LENGTH
=
500
;
const
MESSAGE_CELL_SELECTOR
=
'
.abuse-reports .message
'
;
const
MESSAGE_CELL_SELECTOR
=
'
.abuse-reports .message
'
;
...
...
app/assets/javascripts/pages/admin/abuse_reports/index.js
0 → 100644
View file @
a607f343
import
AbuseReports
from
'
./abuse_reports
'
;
export
default
()
=>
new
AbuseReports
();
app/assets/javascripts/admin.js
→
app/assets/javascripts/
pages/admin/
admin.js
View file @
a607f343
import
{
refreshCurrentPage
}
from
'
./lib/utils/url_utility
'
;
import
{
refreshCurrentPage
}
from
'
.
./..
/lib/utils/url_utility
'
;
function
showBlacklistType
()
{
function
showBlacklistType
()
{
if
(
$
(
'
input[name="blacklist_type"]:checked
'
).
val
()
===
'
file
'
)
{
if
(
$
(
'
input[name="blacklist_type"]:checked
'
).
val
()
===
'
file
'
)
{
...
...
app/assets/javascripts/broadcast_message.js
→
app/assets/javascripts/
pages/admin/broadcast_messages/
broadcast_message.js
View file @
a607f343
File moved
app/assets/javascripts/pages/admin/broadcast_messages/index.js
0 → 100644
View file @
a607f343
import
initBroadcastMessagesForm
from
'
./broadcast_message
'
;
export
default
()
=>
initBroadcastMessagesForm
();
app/assets/javascripts/pages/admin/cohorts/index.js
0 → 100644
View file @
a607f343
import
initUsagePing
from
'
./usage_ping
'
;
export
default
()
=>
initUsagePing
();
app/assets/javascripts/usage_ping.js
→
app/assets/javascripts/
pages/admin/cohorts/
usage_ping.js
View file @
a607f343
File moved
app/assets/javascripts/pages/admin/groups/edit/index.js
0 → 100644
View file @
a607f343
import
groupAvatar
from
'
../../../../group_avatar
'
;
export
default
()
=>
groupAvatar
();
app/assets/javascripts/pages/admin/groups/new/index.js
0 → 100644
View file @
a607f343
import
BindInOut
from
'
../../../../behaviors/bind_in_out
'
;
import
Group
from
'
../../../../group
'
;
import
groupAvatar
from
'
../../../../group_avatar
'
;
export
default
()
=>
{
BindInOut
.
initAll
();
new
Group
();
// eslint-disable-line no-new
groupAvatar
();
};
app/assets/javascripts/pages/admin/groups/show/index.js
0 → 100644
View file @
a607f343
import
UsersSelect
from
'
../../../../users_select
'
;
export
default
()
=>
new
UsersSelect
();
app/assets/javascripts/pages/admin/impersonation_tokens/index.js
0 → 100644
View file @
a607f343
import
DueDateSelectors
from
'
../../../due_date_select
'
;
export
default
()
=>
new
DueDateSelectors
();
app/assets/javascripts/pages/admin/index.js
0 → 100644
View file @
a607f343
import
initAdmin
from
'
./admin
'
;
export
default
()
=>
initAdmin
();
app/assets/javascripts/pages/admin/labels/edit/index.js
0 → 100644
View file @
a607f343
import
Labels
from
'
../../../../labels
'
;
export
default
()
=>
new
Labels
();
app/assets/javascripts/pages/admin/labels/new/index.js
0 → 100644
View file @
a607f343
import
Labels
from
'
../../../../labels
'
;
export
default
()
=>
new
Labels
();
app/assets/javascripts/pages/admin/projects/index.js
0 → 100644
View file @
a607f343
import
ProjectsList
from
'
../../../projects_list
'
;
import
NamespaceSelect
from
'
../../../namespace_select
'
;
export
default
()
=>
{
new
ProjectsList
();
// eslint-disable-line no-new
document
.
querySelectorAll
(
'
.js-namespace-select
'
)
.
forEach
(
dropdown
=>
new
NamespaceSelect
({
dropdown
}));
};
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