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
6dc3cda2
Commit
6dc3cda2
authored
Nov 06, 2020
by
jakeburden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use constants strings to set state
parent
1c35f0b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
app/assets/javascripts/releases/constants.js
app/assets/javascripts/releases/constants.js
+4
-2
app/assets/javascripts/releases/stores/modules/list/state.js
app/assets/javascripts/releases/stores/modules/list/state.js
+4
-2
No files found.
app/assets/javascripts/releases/constants.js
View file @
6dc3cda2
...
...
@@ -17,14 +17,16 @@ export const PAGE_SIZE = 20;
export
const
ASCENDING_ODER
=
'
asc
'
;
export
const
DESCENDING_ORDER
=
'
desc
'
;
export
const
RELEASED_AT
=
'
released_at
'
;
export
const
CREATED_AT
=
'
created_at
'
;
export
const
SORT_OPTIONS
=
[
{
orderBy
:
'
released_at
'
,
orderBy
:
RELEASED_AT
,
label
:
__
(
'
Released date
'
),
},
{
orderBy
:
'
created_at
'
,
orderBy
:
CREATED_AT
,
label
:
__
(
'
Created date
'
),
},
];
app/assets/javascripts/releases/stores/modules/list/state.js
View file @
6dc3cda2
import
{
DESCENDING_ORDER
,
RELEASED_AT
}
from
'
../../../constants
'
;
export
default
({
projectId
,
projectPath
,
...
...
@@ -17,7 +19,7 @@ export default ({
restPageInfo
:
{},
graphQlPageInfo
:
{},
sorting
:
{
sort
:
'
desc
'
,
orderBy
:
'
released_at
'
,
sort
:
DESCENDING_ORDER
,
orderBy
:
RELEASED_AT
,
},
});
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