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
12b16992
Commit
12b16992
authored
Nov 19, 2019
by
Ezekiel Kigbo
Committed by
Martin Wortschack
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace hardcoded projects query param with constant
parent
fc576350
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
ee/app/assets/javascripts/analytics/code_analytics/components/app.vue
...s/javascripts/analytics/code_analytics/components/app.vue
+2
-1
ee/app/assets/javascripts/analytics/cycle_analytics/components/base.vue
...javascripts/analytics/cycle_analytics/components/base.vue
+2
-1
ee/app/assets/javascripts/analytics/productivity_analytics/components/filter_dropdowns.vue
...cs/productivity_analytics/components/filter_dropdowns.vue
+2
-1
ee/app/assets/javascripts/analytics/shared/constants.js
ee/app/assets/javascripts/analytics/shared/constants.js
+2
-0
ee/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js
...lytics/shared/components/projects_dropdown_filter_spec.js
+3
-2
No files found.
ee/app/assets/javascripts/analytics/code_analytics/components/app.vue
View file @
12b16992
...
@@ -7,6 +7,7 @@ import FileQuantityDropdown from './file_quantity_dropdown.vue';
...
@@ -7,6 +7,7 @@ import FileQuantityDropdown from './file_quantity_dropdown.vue';
import
{
featureAccessLevel
}
from
'
~/pages/projects/shared/permissions/constants
'
;
import
{
featureAccessLevel
}
from
'
~/pages/projects/shared/permissions/constants
'
;
import
{
PROJECTS_PER_PAGE
,
DEFAULT_FILE_QUANTITY
}
from
'
../constants
'
;
import
{
PROJECTS_PER_PAGE
,
DEFAULT_FILE_QUANTITY
}
from
'
../constants
'
;
import
createStore
from
'
../store
'
;
import
createStore
from
'
../store
'
;
import
{
LAST_ACTIVITY_AT
}
from
'
../../shared/constants
'
;
export
default
{
export
default
{
name
:
'
CodeAnalytics
'
,
name
:
'
CodeAnalytics
'
,
...
@@ -56,7 +57,7 @@ export default {
...
@@ -56,7 +57,7 @@ export default {
projectsQueryParams
:
{
projectsQueryParams
:
{
per_page
:
PROJECTS_PER_PAGE
,
per_page
:
PROJECTS_PER_PAGE
,
with_shared
:
false
,
with_shared
:
false
,
order_by
:
'
last_activity_at
'
,
order_by
:
LAST_ACTIVITY_AT
,
},
},
};
};
</
script
>
</
script
>
...
...
ee/app/assets/javascripts/analytics/cycle_analytics/components/base.vue
View file @
12b16992
...
@@ -9,6 +9,7 @@ import GroupsDropdownFilter from '../../shared/components/groups_dropdown_filter
...
@@ -9,6 +9,7 @@ import GroupsDropdownFilter from '../../shared/components/groups_dropdown_filter
import
ProjectsDropdownFilter
from
'
../../shared/components/projects_dropdown_filter.vue
'
;
import
ProjectsDropdownFilter
from
'
../../shared/components/projects_dropdown_filter.vue
'
;
import
SummaryTable
from
'
./summary_table.vue
'
;
import
SummaryTable
from
'
./summary_table.vue
'
;
import
StageTable
from
'
./stage_table.vue
'
;
import
StageTable
from
'
./stage_table.vue
'
;
import
{
LAST_ACTIVITY_AT
}
from
'
../../shared/constants
'
;
export
default
{
export
default
{
name
:
'
CycleAnalytics
'
,
name
:
'
CycleAnalytics
'
,
...
@@ -135,7 +136,7 @@ export default {
...
@@ -135,7 +136,7 @@ export default {
projectsQueryParams
:
{
projectsQueryParams
:
{
per_page
:
PROJECTS_PER_PAGE
,
per_page
:
PROJECTS_PER_PAGE
,
with_shared
:
false
,
with_shared
:
false
,
order_by
:
'
last_activity_at
'
,
order_by
:
LAST_ACTIVITY_AT
,
},
},
};
};
</
script
>
</
script
>
...
...
ee/app/assets/javascripts/analytics/productivity_analytics/components/filter_dropdowns.vue
View file @
12b16992
...
@@ -3,6 +3,7 @@ import { mapState, mapActions } from 'vuex';
...
@@ -3,6 +3,7 @@ import { mapState, mapActions } from 'vuex';
import
GroupsDropdownFilter
from
'
../../shared/components/groups_dropdown_filter.vue
'
;
import
GroupsDropdownFilter
from
'
../../shared/components/groups_dropdown_filter.vue
'
;
import
ProjectsDropdownFilter
from
'
../../shared/components/projects_dropdown_filter.vue
'
;
import
ProjectsDropdownFilter
from
'
../../shared/components/projects_dropdown_filter.vue
'
;
import
{
accessLevelReporter
,
projectsPerPage
}
from
'
../constants
'
;
import
{
accessLevelReporter
,
projectsPerPage
}
from
'
../constants
'
;
import
{
LAST_ACTIVITY_AT
}
from
'
../../shared/constants
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -51,7 +52,7 @@ export default {
...
@@ -51,7 +52,7 @@ export default {
projectsQueryParams
:
{
projectsQueryParams
:
{
per_page
:
projectsPerPage
,
per_page
:
projectsPerPage
,
with_shared
:
false
,
// exclude forks
with_shared
:
false
,
// exclude forks
order_by
:
'
last_activity_at
'
,
order_by
:
LAST_ACTIVITY_AT
,
},
},
};
};
</
script
>
</
script
>
...
...
ee/app/assets/javascripts/analytics/shared/constants.js
View file @
12b16992
...
@@ -13,3 +13,5 @@ export const scatterChartLineProps = {
...
@@ -13,3 +13,5 @@ export const scatterChartLineProps = {
zlevel
:
3
,
zlevel
:
3
,
},
},
};
};
export
const
LAST_ACTIVITY_AT
=
'
last_activity_at
'
;
ee/spec/frontend/analytics/shared/components/projects_dropdown_filter_spec.js
View file @
12b16992
...
@@ -3,6 +3,7 @@ import $ from 'jquery';
...
@@ -3,6 +3,7 @@ import $ from 'jquery';
import
'
bootstrap
'
;
import
'
bootstrap
'
;
import
'
~/gl_dropdown
'
;
import
'
~/gl_dropdown
'
;
import
ProjectsDropdownFilter
from
'
ee/analytics/shared/components/projects_dropdown_filter.vue
'
;
import
ProjectsDropdownFilter
from
'
ee/analytics/shared/components/projects_dropdown_filter.vue
'
;
import
{
LAST_ACTIVITY_AT
}
from
'
ee/analytics/shared/constants
'
;
import
Api
from
'
~/api
'
;
import
Api
from
'
~/api
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
import
{
TEST_HOST
}
from
'
helpers/test_constants
'
;
...
@@ -67,7 +68,7 @@ describe('ProjectsDropdownFilter component', () => {
...
@@ -67,7 +68,7 @@ describe('ProjectsDropdownFilter component', () => {
queryParams
:
{
queryParams
:
{
per_page
:
50
,
per_page
:
50
,
with_shared
:
false
,
with_shared
:
false
,
order_by
:
'
last_activity_at
'
,
order_by
:
LAST_ACTIVITY_AT
,
},
},
});
});
...
@@ -80,7 +81,7 @@ describe('ProjectsDropdownFilter component', () => {
...
@@ -80,7 +81,7 @@ describe('ProjectsDropdownFilter component', () => {
expect
(
Api
.
groupProjects
).
toHaveBeenCalledWith
(
expect
(
Api
.
groupProjects
).
toHaveBeenCalledWith
(
expect
.
any
(
Number
),
expect
.
any
(
Number
),
expect
.
any
(
String
),
expect
.
any
(
String
),
expect
.
objectContaining
({
per_page
:
50
,
with_shared
:
false
,
order_by
:
'
last_activity_at
'
}),
expect
.
objectContaining
({
per_page
:
50
,
with_shared
:
false
,
order_by
:
LAST_ACTIVITY_AT
}),
expect
.
any
(
Function
),
expect
.
any
(
Function
),
);
);
});
});
...
...
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