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
7cd70129
Commit
7cd70129
authored
Jan 19, 2018
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor for projects-r*, s* (EE)
parent
92eadbb6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
97 additions
and
39 deletions
+97
-39
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+30
-39
app/assets/javascripts/pages/projects/init_form.js
app/assets/javascripts/pages/projects/init_form.js
+7
-0
app/assets/javascripts/pages/projects/releases/edit/index.js
app/assets/javascripts/pages/projects/releases/edit/index.js
+3
-0
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+18
-0
app/assets/javascripts/pages/projects/settings/repository/show/index.js
...ascripts/pages/projects/settings/repository/show/index.js
+3
-0
app/assets/javascripts/pages/projects/show/index.js
app/assets/javascripts/pages/projects/show/index.js
+23
-0
app/assets/javascripts/pages/projects/snippets/edit/index.js
app/assets/javascripts/pages/projects/snippets/edit/index.js
+3
-0
app/assets/javascripts/pages/projects/snippets/new/index.js
app/assets/javascripts/pages/projects/snippets/new/index.js
+3
-0
app/assets/javascripts/pages/projects/snippets/show/index.js
app/assets/javascripts/pages/projects/snippets/show/index.js
+7
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
7cd70129
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */
import
Milestone
from
'
./milestone
'
;
import
NotificationsForm
from
'
./notifications_form
'
;
import
notificationsDropdown
from
'
./notifications_dropdown
'
;
import
LineHighlighter
from
'
./line_highlighter
'
;
import
MergeRequest
from
'
./merge_request
'
;
import
initCompareAutocomplete
from
'
./compare_autocomplete
'
;
import
Sidebar
from
'
./right_sidebar
'
;
import
Flash
from
'
./flash
'
;
import
SecretValues
from
'
./behaviors/secret_values
'
;
import
UserCallout
from
'
./user_callout
'
;
import
BlobViewer
from
'
./blob/viewer/index
'
;
import
GfmAutoComplete
from
'
./gfm_auto_complete
'
;
import
Star
from
'
./star
'
;
import
TreeView
from
'
./tree
'
;
import
ZenMode
from
'
./zen_mode
'
;
import
initSettingsPanels
from
'
./settings_panels
'
;
import
PerformanceBar
from
'
./performance_bar
'
;
import
initNotes
from
'
./init_notes
'
;
import
initIssuableSidebar
from
'
./init_issuable_sidebar
'
;
import
{
ajaxGet
,
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
{
convertPermissionToBoolean
}
from
'
./lib/utils/common_utils
'
;
import
GlFieldErrors
from
'
./gl_field_errors
'
;
import
GLForm
from
'
./gl_form
'
;
import
Shortcuts
from
'
./shortcuts
'
;
import
ShortcutsNavigation
from
'
./shortcuts_navigation
'
;
import
ShortcutsIssuable
from
'
./shortcuts_issuable
'
;
import
U2FAuthenticate
from
'
./u2f/authenticate
'
;
import
Diff
from
'
./diff
'
;
import
SearchAutocomplete
from
'
./search_autocomplete
'
;
import
Activities
from
'
./activities
'
;
// EE-only
import
UsersSelect
from
'
./users_select
'
;
...
...
@@ -267,15 +260,21 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
.
catch
(
fail
);
break
;
case
'
projects:snippets:show
'
:
initNotes
();
new
ZenMode
();
import
(
'
./pages/projects/snippets/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:snippets:new
'
:
case
'
projects:snippets:edit
'
:
case
'
projects:snippets:create
'
:
import
(
'
./pages/projects/snippets/new
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:snippets:edit
'
:
case
'
projects:snippets:update
'
:
new
GLForm
(
$
(
'
.snippet-form
'
),
true
);
new
ZenMode
();
import
(
'
./pages/projects/snippets/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
snippets:new
'
:
import
(
'
./pages/snippets/new
'
)
...
...
@@ -298,8 +297,9 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
.
catch
(
fail
);
break
;
case
'
projects:releases:edit
'
:
new
ZenMode
();
new
GLForm
(
$
(
'
.release-form
'
),
true
);
import
(
'
./pages/projects/releases/edit
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
break
;
case
'
projects:merge_requests:show
'
:
new
Diff
();
...
...
@@ -343,21 +343,13 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
shortcut_handler
=
true
;
break
;
case
'
projects:show
'
:
shortcut_handler
=
new
ShortcutsNavigation
();
new
NotificationsForm
();
new
UserCallout
({
setCalloutPerProject
:
true
,
className
:
'
js-autodevops-banner
'
,
});
if
(
$
(
'
#tree-slider
'
).
length
)
new
TreeView
();
if
(
$
(
'
.blob-viewer
'
).
length
)
new
BlobViewer
();
if
(
$
(
'
.project-show-activity
'
).
length
)
new
Activities
();
$
(
'
#tree-slider
'
).
waitForImages
(
function
()
{
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
});
import
(
'
./pages/projects/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
shortcut_handler
=
true
;
// ee-start
initGeoInfoModal
();
// ee-end
break
;
case
'
projects:edit
'
:
import
(
'
./pages/projects/edit
'
)
...
...
@@ -525,20 +517,19 @@ import initLDAPGroupsSelect from 'ee/ldap_groups_select'; // eslint-disable-line
import
(
/* webpackChunkName: "ee_audit_logs" */
'
ee/pages/admin/audit_logs
'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
case
'
projects:settings:repository:show
'
:
import
(
'
./pages/projects/settings/repository/show
'
)
.
then
(
callDefault
)
.
catch
(
fail
);
// ee-start
new
UsersSelect
();
new
UserCallout
();
// Initialize expandable settings panels
initSettingsPanels
();
// ee-end
break
;
case
'
projects:settings:ci_cd:show
'
:
// Initialize expandable settings panels
initSettingsPanels
();
const
runnerToken
=
document
.
querySelector
(
'
.js-secret-runner-token
'
);
if
(
runnerToken
)
{
const
runnerTokenSecretValue
=
new
SecretValues
(
runnerToken
);
runnerTokenSecretValue
.
init
();
}
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
)
...
...
app/assets/javascripts/pages/projects/init_form.js
0 → 100644
View file @
7cd70129
import
ZenMode
from
'
~/zen_mode
'
;
import
GLForm
from
'
~/gl_form
'
;
export
default
function
(
$formEl
)
{
new
ZenMode
();
// eslint-disable-line no-new
new
GLForm
(
$formEl
,
true
);
// eslint-disable-line no-new
}
app/assets/javascripts/pages/projects/releases/edit/index.js
0 → 100644
View file @
7cd70129
import
initForm
from
'
~/pages/projects/init_form
'
;
export
default
initForm
(
$
(
'
.release-form
'
));
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
0 → 100644
View file @
7cd70129
import
initSettingsPanels
from
'
~/settings_panels
'
;
import
SecretValues
from
'
~/behaviors/secret_values
'
;
export
default
function
()
{
// Initialize expandable settings panels
initSettingsPanels
();
const
runnerToken
=
document
.
querySelector
(
'
.js-secret-runner-token
'
);
if
(
runnerToken
)
{
const
runnerTokenSecretValue
=
new
SecretValues
(
runnerToken
);
runnerTokenSecretValue
.
init
();
}
const
secretVariableTable
=
document
.
querySelector
(
'
.js-secret-variable-table
'
);
if
(
secretVariableTable
)
{
const
secretVariableTableValues
=
new
SecretValues
(
secretVariableTable
);
secretVariableTableValues
.
init
();
}
}
app/assets/javascripts/pages/projects/settings/repository/show/index.js
0 → 100644
View file @
7cd70129
import
initSettingsPanels
from
'
~/settings_panels
'
;
export
default
initSettingsPanels
;
app/assets/javascripts/pages/projects/show/index.js
0 → 100644
View file @
7cd70129
import
ShortcutsNavigation
from
'
~/shortcuts_navigation
'
;
import
NotificationsForm
from
'
~/notifications_form
'
;
import
UserCallout
from
'
~/user_callout
'
;
import
TreeView
from
'
~/tree
'
;
import
BlobViewer
from
'
~/blob/viewer/index
'
;
import
Activities
from
'
~/activities
'
;
import
{
ajaxGet
}
from
'
~/lib/utils/common_utils
'
;
export
default
()
=>
{
new
ShortcutsNavigation
();
// eslint-disable-line no-new
new
NotificationsForm
();
// eslint-disable-line no-new
new
UserCallout
({
// eslint-disable-line no-new
setCalloutPerProject
:
true
,
className
:
'
js-autodevops-banner
'
,
});
if
(
$
(
'
#tree-slider
'
).
length
)
new
TreeView
();
// eslint-disable-line no-new
if
(
$
(
'
.blob-viewer
'
).
length
)
new
BlobViewer
();
// eslint-disable-line no-new
if
(
$
(
'
.project-show-activity
'
).
length
)
new
Activities
();
// eslint-disable-line no-new
$
(
'
#tree-slider
'
).
waitForImages
(()
=>
{
ajaxGet
(
document
.
querySelector
(
'
.js-tree-content
'
).
dataset
.
logsPath
);
});
};
app/assets/javascripts/pages/projects/snippets/edit/index.js
0 → 100644
View file @
7cd70129
import
initForm
from
'
~/pages/projects/init_form
'
;
export
default
initForm
(
$
(
'
.snippet-form
'
));
app/assets/javascripts/pages/projects/snippets/new/index.js
0 → 100644
View file @
7cd70129
import
initForm
from
'
~/pages/projects/init_form
'
;
export
default
initForm
(
$
(
'
.snippet-form
'
));
app/assets/javascripts/pages/projects/snippets/show/index.js
0 → 100644
View file @
7cd70129
import
initNotes
from
'
~/init_notes
'
;
import
ZenMode
from
'
~/zen_mode
'
;
export
default
function
()
{
initNotes
();
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