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
b22c6902
Commit
b22c6902
authored
Jan 09, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EE port of admin-dispatcher
parent
b55cb3e9
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
97 additions
and
41 deletions
+97
-41
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+26
-38
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
ee/app/assets/javascripts/pages/admin/audit_logs/audit_logs.js
...p/assets/javascripts/pages/admin/audit_logs/audit_logs.js
+0
-0
ee/app/assets/javascripts/pages/admin/audit_logs/index.js
ee/app/assets/javascripts/pages/admin/audit_logs/index.js
+3
-0
ee/app/assets/javascripts/pages/admin/emails/show/admin_email_select.js
...javascripts/pages/admin/emails/show/admin_email_select.js
+0
-0
ee/app/assets/javascripts/pages/admin/emails/show/index.js
ee/app/assets/javascripts/pages/admin/emails/show/index.js
+3
-0
ee/app/assets/javascripts/pages/admin/groups/edit/index.js
ee/app/assets/javascripts/pages/admin/groups/edit/index.js
+3
-0
ee/app/assets/javascripts/pages/admin/licenses/new/index.js
ee/app/assets/javascripts/pages/admin/licenses/new/index.js
+14
-0
spec/javascripts/pages/admin/abuse_reports/abuse_reports_spec.js
...vascripts/pages/admin/abuse_reports/abuse_reports_spec.js
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
b22c6902
...
...
@@ -13,8 +13,6 @@ import groupAvatar from './group_avatar';
import
GroupLabelSubscription
from
'
./group_label_subscription
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
groupsSelect
from
'
./groups_select
'
;
import
initAdmin
from
'
./admin
'
;
import
NamespaceSelect
from
'
./namespace_select
'
;
import
NewCommitForm
from
'
./new_commit_form
'
;
import
Project
from
'
./project
'
;
import
projectAvatar
from
'
./project_avatar
'
;
...
...
@@ -52,14 +50,12 @@ import GfmAutoComplete from './gfm_auto_complete';
import
ShortcutsBlob
from
'
./shortcuts_blob
'
;
import
Star
from
'
./star
'
;
import
TreeView
from
'
./tree
'
;
import
UsagePing
from
'
./usage_ping
'
;
import
VersionCheckImage
from
'
./version_check_image
'
;
import
Wikis
from
'
./wikis
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
initExperimentalFlags
from
'
./experimental_flags
'
;
import
PerformanceBar
from
'
./performance_bar
'
;
import
initBroadcastMessagesForm
from
'
./broadcast_message
'
;
import
initNotes
from
'
./init_notes
'
;
import
initLegacyFilters
from
'
./init_legacy_filters
'
;
import
initIssuableSidebar
from
'
./init_issuable_sidebar
'
;
...
...
@@ -67,7 +63,6 @@ import initProjectVisibilitySelector from './project_visibility';
import
GpgBadges
from
'
./gpg_badges
'
;
import
initChangesDropdown
from
'
./init_changes_dropdown
'
;
import
NewGroupChild
from
'
./groups/new_group_child
'
;
import
AbuseReports
from
'
./abuse_reports
'
;
import
{
ajaxGet
,
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
AjaxLoadingSpinner
from
'
./ajax_loading_spinner
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
...
...
@@ -87,10 +82,8 @@ import Activities from './activities';
// EE-only
import
ApproversSelect
from
'
ee/approvers_select
'
;
// eslint-disable-line import/first
import
AuditLogs
from
'
ee/audit_logs
'
;
// eslint-disable-line import/first
import
initGeoInfoModal
from
'
ee/init_geo_info_modal
'
;
// eslint-disable-line import/first
import
initGroupAnalytics
from
'
ee/init_group_analytics
'
;
// eslint-disable-line import/first
import
AdminEmailSelect
from
'
ee/admin_email_select
'
;
// eslint-disable-line import/first
import
initPathLocks
from
'
ee/path_locks
'
;
// eslint-disable-line import/first
import
WeightSelect
from
'
ee/weight_select
'
;
// eslint-disable-line import/first
import
initApprovals
from
'
ee/approvals
'
;
// eslint-disable-line import/first
...
...
@@ -257,9 +250,6 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
admin:projects:index
'
:
new
ProjectsList
();
break
;
case
'
explore:groups:index
'
:
import
(
'
./pages/explore/groups
'
)
.
then
(
callDefault
)
...
...
@@ -485,15 +475,19 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
new
UsersSelect
();
break
;
case
'
groups:new
'
:
case
'
admin:groups:new
'
:
case
'
groups:create
'
:
case
'
admin:groups:create
'
:
BindInOut
.
initAll
();
new
Group
();
groupAvatar
();
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
'
:
import
(
'
./pages/admin/groups/edit
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
groups:edit
'
:
groupAvatar
();
break
;
case
'
projects:tree:show
'
:
...
...
@@ -587,10 +581,10 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
new
UsersSelect
();
break
;
case
'
admin:emails:show
'
:
new
AdminEmailSelect
(
);
import
(
/* webpackChunkName: "ee_admin_emails_show" */
'
ee/pages/admin/emails/show
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
admin:audit_logs:index
'
:
new
AuditLogs
(
);
import
(
/* webpackChunkName: "ee_audit_logs" */
'
ee/pages/admin/audit_logs
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
projects:settings:repository:show
'
:
new
UsersSelect
();
...
...
@@ -630,8 +624,10 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
case
'
import:fogbugz:new_user_map
'
:
import
(
'
./pages/import/fogbugz/new_user_map
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
profiles:personal_access_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
();
break
;
case
'
projects:clusters:show
'
:
...
...
@@ -651,18 +647,7 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
});
break
;
case
'
admin:licenses:new
'
:
const
$licenseFile
=
$
(
'
.license-file
'
);
const
$licenseKey
=
$
(
'
.license-key
'
);
const
showLicenseType
=
()
=>
{
const
$checkedFile
=
$
(
'
input[name="license_type"]:checked
'
).
val
()
===
'
file
'
;
$licenseFile
.
toggle
(
$checkedFile
);
$licenseKey
.
toggle
(
!
$checkedFile
);
};
$
(
'
input[name="license_type"]
'
).
on
(
'
change
'
,
showLicenseType
);
showLicenseType
();
import
(
/* webpackChunkName: "admin_licenses" */
'
ee/pages/admin/licenses/new
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
groups:analytics:show
'
:
initGroupAnalytics
();
...
...
@@ -686,36 +671,39 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
// needed in rspec
gl
.
u2fAuthenticate
=
u2fAuthenticate
;
case
'
admin
'
:
i
nitAdmin
(
);
i
mport
(
'
./pages/admin
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
switch
(
path
[
1
])
{
case
'
broadcast_messages
'
:
i
nitBroadcastMessagesForm
(
);
i
mport
(
'
./pages/admin/broadcast_messages
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
cohorts
'
:
new
UsagePing
(
);
import
(
'
./pages/admin/cohorts
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
groups
'
:
new
UsersSelect
();
switch
(
path
[
2
])
{
case
'
show
'
:
import
(
'
./pages/admin/groups/show
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
edit
'
:
i
nitLDAPGroupsSelect
(
);
i
mport
(
/* webpackChunkName: "ee_admin_groups_edit" */
'
ee/pages/admin/groups/edit
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
}
break
;
case
'
projects
'
:
document
.
querySelectorAll
(
'
.js-namespace-select
'
)
.
forEach
(
dropdown
=>
new
NamespaceSelect
({
dropdown
}));
import
(
'
./pages/admin/projects
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
labels
'
:
switch
(
path
[
2
])
{
case
'
new
'
:
import
(
'
./pages/admin/labels/new
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
edit
'
:
new
Labels
();
import
(
'
./pages/admin/labels/edit
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
}
case
'
abuse_reports
'
:
new
AbuseReports
(
);
import
(
'
./pages/admin/abuse_reports
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
geo_nodes
'
:
import
(
/* webpackChunkName: 'geo_node_form' */
'
./geo/geo_node_form
'
)
...
...
app/assets/javascripts/abuse_reports.js
→
app/assets/javascripts/
pages/admin/abuse_reports/
abuse_reports.js
View file @
b22c6902
import
{
truncate
}
from
'
./lib/utils/text_utility
'
;
import
{
truncate
}
from
'
.
./../..
/lib/utils/text_utility
'
;
const
MAX_MESSAGE_LENGTH
=
500
;
const
MESSAGE_CELL_SELECTOR
=
'
.abuse-reports .message
'
;
...
...
app/assets/javascripts/pages/admin/abuse_reports/index.js
0 → 100644
View file @
b22c6902
import
AbuseReports
from
'
./abuse_reports
'
;
export
default
()
=>
new
AbuseReports
();
app/assets/javascripts/admin.js
→
app/assets/javascripts/
pages/admin/
admin.js
View file @
b22c6902
import
{
refreshCurrentPage
}
from
'
./lib/utils/url_utility
'
;
import
{
refreshCurrentPage
}
from
'
.
./..
/lib/utils/url_utility
'
;
function
showBlacklistType
()
{
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 @
b22c6902
File moved
app/assets/javascripts/pages/admin/broadcast_messages/index.js
0 → 100644
View file @
b22c6902
import
initBroadcastMessagesForm
from
'
./broadcast_message
'
;
export
default
()
=>
initBroadcastMessagesForm
();
app/assets/javascripts/pages/admin/cohorts/index.js
0 → 100644
View file @
b22c6902
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 @
b22c6902
File moved
app/assets/javascripts/pages/admin/groups/edit/index.js
0 → 100644
View file @
b22c6902
import
groupAvatar
from
'
../../../../group_avatar
'
;
export
default
()
=>
groupAvatar
();
app/assets/javascripts/pages/admin/groups/new/index.js
0 → 100644
View file @
b22c6902
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 @
b22c6902
import
UsersSelect
from
'
../../../../users_select
'
;
export
default
()
=>
new
UsersSelect
();
app/assets/javascripts/pages/admin/impersonation_tokens/index.js
0 → 100644
View file @
b22c6902
import
DueDateSelectors
from
'
../../../due_date_select
'
;
export
default
()
=>
new
DueDateSelectors
();
app/assets/javascripts/pages/admin/index.js
0 → 100644
View file @
b22c6902
import
initAdmin
from
'
./admin
'
;
export
default
()
=>
initAdmin
();
app/assets/javascripts/pages/admin/labels/edit/index.js
0 → 100644
View file @
b22c6902
import
Labels
from
'
../../../../labels
'
;
export
default
()
=>
new
Labels
();
app/assets/javascripts/pages/admin/labels/new/index.js
0 → 100644
View file @
b22c6902
import
Labels
from
'
../../../../labels
'
;
export
default
()
=>
new
Labels
();
app/assets/javascripts/pages/admin/projects/index.js
0 → 100644
View file @
b22c6902
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
}));
};
ee/app/assets/javascripts/audit_logs.js
→
ee/app/assets/javascripts/
pages/admin/audit_logs/
audit_logs.js
View file @
b22c6902
File moved
ee/app/assets/javascripts/pages/admin/audit_logs/index.js
0 → 100644
View file @
b22c6902
import
AuditLogs
from
'
./audit_logs
'
;
export
default
()
=>
new
AuditLogs
();
ee/app/assets/javascripts/admin_email_select.js
→
ee/app/assets/javascripts/
pages/admin/emails/show/
admin_email_select.js
View file @
b22c6902
File moved
ee/app/assets/javascripts/pages/admin/emails/show/index.js
0 → 100644
View file @
b22c6902
import
AdminEmailSelect
from
'
./admin_email_select
'
;
export
default
()
=>
new
AdminEmailSelect
();
ee/app/assets/javascripts/pages/admin/groups/edit/index.js
0 → 100644
View file @
b22c6902
import
initLDAPGroupsSelect
from
'
../../../../ldap_groups_select
'
;
export
default
()
=>
initLDAPGroupsSelect
();
ee/app/assets/javascripts/pages/admin/licenses/new/index.js
0 → 100644
View file @
b22c6902
export
default
()
=>
{
const
$licenseFile
=
$
(
'
.license-file
'
);
const
$licenseKey
=
$
(
'
.license-key
'
);
const
showLicenseType
=
()
=>
{
const
$checkedFile
=
$
(
'
input[name="license_type"]:checked
'
).
val
()
===
'
file
'
;
$licenseFile
.
toggle
(
$checkedFile
);
$licenseKey
.
toggle
(
!
$checkedFile
);
};
$
(
'
input[name="license_type"]
'
).
on
(
'
change
'
,
showLicenseType
);
showLicenseType
();
};
spec/javascripts/abuse_reports_spec.js
→
spec/javascripts/
pages/admin/abuse_reports/
abuse_reports_spec.js
View file @
b22c6902
import
'
~/lib/utils/text_utility
'
;
import
AbuseReports
from
'
~/abuse_reports
'
;
import
AbuseReports
from
'
~/
pages/admin/abuse_reports/
abuse_reports
'
;
describe
(
'
Abuse Reports
'
,
()
=>
{
const
FIXTURE
=
'
abuse_reports/abuse_reports_list.html.raw
'
;
...
...
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