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
450d0ce0
Commit
450d0ce0
authored
Jun 02, 2021
by
Nathan Friend
Committed by
Miguel Rincon
Jun 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix variable name typos
This commit fixes some typos in variable names and constants.
parent
6f44f06a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
app/assets/javascripts/releases/components/releases_sort.vue
app/assets/javascripts/releases/components/releases_sort.vue
+3
-3
app/assets/javascripts/releases/constants.js
app/assets/javascripts/releases/constants.js
+3
-3
spec/frontend/releases/components/releases_sort_apollo_client_spec.js
...d/releases/components/releases_sort_apollo_client_spec.js
+2
-2
No files found.
app/assets/javascripts/releases/components/releases_sort.vue
View file @
450d0ce0
<
script
>
import
{
GlSorting
,
GlSortingItem
}
from
'
@gitlab/ui
'
;
import
{
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
ASCENDING_ODER
,
DESCENDING_ORDER
,
SORT_OPTIONS
}
from
'
../constants
'
;
import
{
ASCENDING_O
R
DER
,
DESCENDING_ORDER
,
SORT_OPTIONS
}
from
'
../constants
'
;
export
default
{
name
:
'
ReleasesSort
'
,
...
...
@@ -22,13 +22,13 @@ export default {
return
option
.
label
;
},
isSortAscending
()
{
return
this
.
sort
===
ASCENDING_ODER
;
return
this
.
sort
===
ASCENDING_O
R
DER
;
},
},
methods
:
{
...
mapActions
(
'
index
'
,
[
'
setSorting
'
]),
onDirectionChange
()
{
const
sort
=
this
.
isSortAscending
?
DESCENDING_ORDER
:
ASCENDING_ODER
;
const
sort
=
this
.
isSortAscending
?
DESCENDING_ORDER
:
ASCENDING_O
R
DER
;
this
.
setSorting
({
sort
});
this
.
$emit
(
'
sort:changed
'
);
},
...
...
app/assets/javascripts/releases/constants.js
View file @
450d0ce0
...
...
@@ -15,7 +15,7 @@ export const DEFAULT_ASSET_LINK_TYPE = ASSET_LINK_TYPE.OTHER;
export
const
PAGE_SIZE
=
10
;
export
const
ASCENDING_ODER
=
'
asc
'
;
export
const
ASCENDING_O
R
DER
=
'
asc
'
;
export
const
DESCENDING_ORDER
=
'
desc
'
;
export
const
RELEASED_AT
=
'
released_at
'
;
export
const
CREATED_AT
=
'
created_at
'
;
...
...
@@ -39,11 +39,11 @@ export const ALL_SORTS = [RELEASED_AT_ASC, RELEASED_AT_DESC, CREATED_ASC, CREATE
export
const
SORT_MAP
=
{
[
RELEASED_AT
]:
{
[
ASCENDING_ODER
]:
RELEASED_AT_ASC
,
[
ASCENDING_O
R
DER
]:
RELEASED_AT_ASC
,
[
DESCENDING_ORDER
]:
RELEASED_AT_DESC
,
},
[
CREATED_AT
]:
{
[
ASCENDING_ODER
]:
CREATED_ASC
,
[
ASCENDING_O
R
DER
]:
CREATED_ASC
,
[
DESCENDING_ORDER
]:
CREATED_DESC
,
},
};
spec/frontend/releases/components/releases_sort_apollo_client_spec.js
View file @
450d0ce0
import
{
GlSorting
}
from
'
@gitlab/ui
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
ReleasesSortApollo
c
lient
from
'
~/releases/components/releases_sort_apollo_client.vue
'
;
import
ReleasesSortApollo
C
lient
from
'
~/releases/components/releases_sort_apollo_client.vue
'
;
import
{
RELEASED_AT_ASC
,
RELEASED_AT_DESC
,
CREATED_ASC
,
CREATED_DESC
}
from
'
~/releases/constants
'
;
const
GlSortingItemStub
=
{
...
...
@@ -11,7 +11,7 @@ describe('releases_sort_apollo_client.vue', () => {
let
wrapper
;
const
createComponent
=
(
valueProp
=
RELEASED_AT_ASC
)
=>
{
wrapper
=
shallowMountExtended
(
ReleasesSortApollo
c
lient
,
{
wrapper
=
shallowMountExtended
(
ReleasesSortApollo
C
lient
,
{
propsData
:
{
value
:
valueProp
,
},
...
...
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