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
b45c06fe
Commit
b45c06fe
authored
Dec 09, 2021
by
Coung Ngo
Committed by
Jacques Erasmus
Dec 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Organise ~/milestones code
parent
e242de4a
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
67 additions
and
75 deletions
+67
-75
app/assets/javascripts/filtered_search/available_dropdown_mappings.js
...avascripts/filtered_search/available_dropdown_mappings.js
+1
-1
app/assets/javascripts/milestones/form.js
app/assets/javascripts/milestones/form.js
+0
-22
app/assets/javascripts/milestones/index.js
app/assets/javascripts/milestones/index.js
+50
-2
app/assets/javascripts/milestones/init_milestones_show.js
app/assets/javascripts/milestones/init_milestones_show.js
+0
-11
app/assets/javascripts/milestones/milestone_select.js
app/assets/javascripts/milestones/milestone_select.js
+1
-1
app/assets/javascripts/milestones/promote_milestone_modal_init.js
...ts/javascripts/milestones/promote_milestone_modal_init.js
+0
-19
app/assets/javascripts/milestones/utils.js
app/assets/javascripts/milestones/utils.js
+0
-0
app/assets/javascripts/pages/groups/milestones/edit/index.js
app/assets/javascripts/pages/groups/milestones/edit/index.js
+1
-1
app/assets/javascripts/pages/groups/milestones/new/index.js
app/assets/javascripts/pages/groups/milestones/new/index.js
+1
-1
app/assets/javascripts/pages/groups/milestones/show/index.js
app/assets/javascripts/pages/groups/milestones/show/index.js
+2
-3
app/assets/javascripts/pages/projects/milestones/edit/index.js
...ssets/javascripts/pages/projects/milestones/edit/index.js
+1
-1
app/assets/javascripts/pages/projects/milestones/index/index.js
...sets/javascripts/pages/projects/milestones/index/index.js
+1
-2
app/assets/javascripts/pages/projects/milestones/new/index.js
...assets/javascripts/pages/projects/milestones/new/index.js
+1
-1
app/assets/javascripts/pages/projects/milestones/show/index.js
...ssets/javascripts/pages/projects/milestones/show/index.js
+2
-4
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
...components/filtered_search_bar/tokens/milestone_token.vue
+1
-1
ee/app/assets/javascripts/filtered_search/available_dropdown_mappings.js
...avascripts/filtered_search/available_dropdown_mappings.js
+1
-1
spec/frontend/milestones/components/milestone_combobox_spec.js
...frontend/milestones/components/milestone_combobox_spec.js
+1
-1
spec/frontend/milestones/utils_spec.js
spec/frontend/milestones/utils_spec.js
+1
-1
spec/frontend/vue_shared/components/filtered_search_bar/tokens/milestone_token_spec.js
...onents/filtered_search_bar/tokens/milestone_token_spec.js
+2
-2
No files found.
app/assets/javascripts/filtered_search/available_dropdown_mappings.js
View file @
b45c06fe
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/
milestone_
utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/utils
'
;
import
{
mergeUrlParams
}
from
'
../lib/utils/url_utility
'
;
import
{
mergeUrlParams
}
from
'
../lib/utils/url_utility
'
;
import
DropdownAjaxFilter
from
'
./dropdown_ajax_filter
'
;
import
DropdownAjaxFilter
from
'
./dropdown_ajax_filter
'
;
import
DropdownEmoji
from
'
./dropdown_emoji
'
;
import
DropdownEmoji
from
'
./dropdown_emoji
'
;
...
...
app/assets/javascripts/milestones/form.js
deleted
100644 → 0
View file @
e242de4a
import
$
from
'
jquery
'
;
import
initDatePicker
from
'
~/behaviors/date_picker
'
;
import
GLForm
from
'
~/gl_form
'
;
import
ZenMode
from
'
~/zen_mode
'
;
export
default
(
initGFM
=
true
)
=>
{
new
ZenMode
();
// eslint-disable-line no-new
initDatePicker
();
// eslint-disable-next-line no-new
new
GLForm
(
$
(
'
.milestone-form
'
),
{
emojis
:
true
,
members
:
initGFM
,
issues
:
initGFM
,
mergeRequests
:
initGFM
,
epics
:
initGFM
,
milestones
:
initGFM
,
labels
:
initGFM
,
snippets
:
initGFM
,
vulnerabilities
:
initGFM
,
});
};
app/assets/javascripts/milestones/
delete_milestone_modal_init
.js
→
app/assets/javascripts/milestones/
index
.js
View file @
b45c06fe
import
$
from
'
jquery
'
;
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
initDatePicker
from
'
~/behaviors/date_picker
'
;
import
GLForm
from
'
~/gl_form
'
;
import
{
BV_SHOW_MODAL
}
from
'
~/lib/utils/constants
'
;
import
{
BV_SHOW_MODAL
}
from
'
~/lib/utils/constants
'
;
import
Milestone
from
'
~/milestones/milestone
'
;
import
Sidebar
from
'
~/right_sidebar
'
;
import
MountMilestoneSidebar
from
'
~/sidebar/mount_milestone_sidebar
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
ZenMode
from
'
~/zen_mode
'
;
import
DeleteMilestoneModal
from
'
./components/delete_milestone_modal.vue
'
;
import
DeleteMilestoneModal
from
'
./components/delete_milestone_modal.vue
'
;
import
PromoteMilestoneModal
from
'
./components/promote_milestone_modal.vue
'
;
import
eventHub
from
'
./event_hub
'
;
import
eventHub
from
'
./event_hub
'
;
export
default
()
=>
{
export
function
initForm
(
initGFM
=
true
)
{
new
ZenMode
();
// eslint-disable-line no-new
initDatePicker
();
// eslint-disable-next-line no-new
new
GLForm
(
$
(
'
.milestone-form
'
),
{
emojis
:
true
,
members
:
initGFM
,
issues
:
initGFM
,
mergeRequests
:
initGFM
,
epics
:
initGFM
,
milestones
:
initGFM
,
labels
:
initGFM
,
snippets
:
initGFM
,
vulnerabilities
:
initGFM
,
});
}
export
function
initShow
()
{
new
Milestone
();
// eslint-disable-line no-new
new
Sidebar
();
// eslint-disable-line no-new
new
MountMilestoneSidebar
();
// eslint-disable-line no-new
}
export
function
initPromoteMilestoneModal
()
{
Vue
.
use
(
Translate
);
const
promoteMilestoneModal
=
document
.
getElementById
(
'
promote-milestone-modal
'
);
if
(
!
promoteMilestoneModal
)
{
return
null
;
}
return
new
Vue
({
el
:
promoteMilestoneModal
,
render
(
createElement
)
{
return
createElement
(
PromoteMilestoneModal
);
},
});
}
export
function
initDeleteMilestoneModal
()
{
Vue
.
use
(
Translate
);
Vue
.
use
(
Translate
);
const
onRequestFinished
=
({
milestoneUrl
,
successful
})
=>
{
const
onRequestFinished
=
({
milestoneUrl
,
successful
})
=>
{
...
@@ -72,4 +120,4 @@ export default () => {
...
@@ -72,4 +120,4 @@ export default () => {
});
});
},
},
});
});
}
;
}
app/assets/javascripts/milestones/init_milestones_show.js
deleted
100644 → 0
View file @
e242de4a
/* eslint-disable no-new */
import
Milestone
from
'
~/milestones/milestone
'
;
import
Sidebar
from
'
~/right_sidebar
'
;
import
MountMilestoneSidebar
from
'
~/sidebar/mount_milestone_sidebar
'
;
export
default
()
=>
{
new
Milestone
();
new
Sidebar
();
new
MountMilestoneSidebar
();
};
app/assets/javascripts/milestones/milestone_select.js
View file @
b45c06fe
...
@@ -6,7 +6,7 @@ import { template, escape } from 'lodash';
...
@@ -6,7 +6,7 @@ import { template, escape } from 'lodash';
import
Api
from
'
~/api
'
;
import
Api
from
'
~/api
'
;
import
initDeprecatedJQueryDropdown
from
'
~/deprecated_jquery_dropdown
'
;
import
initDeprecatedJQueryDropdown
from
'
~/deprecated_jquery_dropdown
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/
milestone_
utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
timeFor
,
parsePikadayDate
,
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
timeFor
,
parsePikadayDate
,
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
...
...
app/assets/javascripts/milestones/promote_milestone_modal_init.js
deleted
100644 → 0
View file @
e242de4a
import
Vue
from
'
vue
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
PromoteMilestoneModal
from
'
./components/promote_milestone_modal.vue
'
;
Vue
.
use
(
Translate
);
export
default
()
=>
{
const
promoteMilestoneModal
=
document
.
getElementById
(
'
promote-milestone-modal
'
);
if
(
!
promoteMilestoneModal
)
{
return
null
;
}
return
new
Vue
({
el
:
promoteMilestoneModal
,
render
(
createElement
)
{
return
createElement
(
PromoteMilestoneModal
);
},
});
};
app/assets/javascripts/milestones/
milestone_
utils.js
→
app/assets/javascripts/milestones/utils.js
View file @
b45c06fe
File moved
app/assets/javascripts/pages/groups/milestones/edit/index.js
View file @
b45c06fe
import
initForm
from
'
~/milestones/form
'
;
import
{
initForm
}
from
'
~/milestones
'
;
initForm
();
initForm
();
app/assets/javascripts/pages/groups/milestones/new/index.js
View file @
b45c06fe
import
initForm
from
'
~/milestones/form
'
;
import
{
initForm
}
from
'
~/milestones
'
;
initForm
();
initForm
();
app/assets/javascripts/pages/groups/milestones/show/index.js
View file @
b45c06fe
import
initDeleteMilestoneModal
from
'
~/milestones/delete_milestone_modal_init
'
;
import
{
initDeleteMilestoneModal
,
initShow
}
from
'
~/milestones
'
;
import
initMilestonesShow
from
'
~/milestones/init_milestones_show
'
;
init
Milestones
Show
();
initShow
();
initDeleteMilestoneModal
();
initDeleteMilestoneModal
();
app/assets/javascripts/pages/projects/milestones/edit/index.js
View file @
b45c06fe
import
initForm
from
'
~/milestones/form
'
;
import
{
initForm
}
from
'
~/milestones
'
;
initForm
();
initForm
();
app/assets/javascripts/pages/projects/milestones/index/index.js
View file @
b45c06fe
import
initDeleteMilestoneModal
from
'
~/milestones/delete_milestone_modal_init
'
;
import
{
initDeleteMilestoneModal
,
initPromoteMilestoneModal
}
from
'
~/milestones
'
;
import
initPromoteMilestoneModal
from
'
~/milestones/promote_milestone_modal_init
'
;
initDeleteMilestoneModal
();
initDeleteMilestoneModal
();
initPromoteMilestoneModal
();
initPromoteMilestoneModal
();
app/assets/javascripts/pages/projects/milestones/new/index.js
View file @
b45c06fe
import
initForm
from
'
~/milestones/form
'
;
import
{
initForm
}
from
'
~/milestones
'
;
initForm
();
initForm
();
app/assets/javascripts/pages/projects/milestones/show/index.js
View file @
b45c06fe
import
initMilestonesShow
from
'
~/milestones/init_milestones_show
'
;
import
{
initDeleteMilestoneModal
,
initPromoteMilestoneModal
,
initShow
}
from
'
~/milestones
'
;
import
initDeleteMilestoneModal
from
'
~/milestones/delete_milestone_modal_init
'
;
import
initPromoteMilestoneModal
from
'
~/milestones/promote_milestone_modal_init
'
;
init
Milestones
Show
();
initShow
();
initDeleteMilestoneModal
();
initDeleteMilestoneModal
();
initPromoteMilestoneModal
();
initPromoteMilestoneModal
();
app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
View file @
b45c06fe
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
import
{
GlFilteredSearchSuggestion
}
from
'
@gitlab/ui
'
;
import
{
GlFilteredSearchSuggestion
}
from
'
@gitlab/ui
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/
milestone_
utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/utils
'
;
import
BaseToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/base_token.vue
'
;
import
BaseToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/base_token.vue
'
;
import
{
DEFAULT_MILESTONES
}
from
'
../constants
'
;
import
{
DEFAULT_MILESTONES
}
from
'
../constants
'
;
import
{
stripQuotes
}
from
'
../filtered_search_utils
'
;
import
{
stripQuotes
}
from
'
../filtered_search_utils
'
;
...
...
ee/app/assets/javascripts/filtered_search/available_dropdown_mappings.js
View file @
b45c06fe
...
@@ -2,7 +2,7 @@ import AvailableDropdownMappingsCE from '~/filtered_search/available_dropdown_ma
...
@@ -2,7 +2,7 @@ import AvailableDropdownMappingsCE from '~/filtered_search/available_dropdown_ma
import
DropdownAjaxFilter
from
'
~/filtered_search/dropdown_ajax_filter
'
;
import
DropdownAjaxFilter
from
'
~/filtered_search/dropdown_ajax_filter
'
;
import
DropdownNonUser
from
'
~/filtered_search/dropdown_non_user
'
;
import
DropdownNonUser
from
'
~/filtered_search/dropdown_non_user
'
;
import
DropdownUser
from
'
~/filtered_search/dropdown_user
'
;
import
DropdownUser
from
'
~/filtered_search/dropdown_user
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/
milestone_
utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/utils
'
;
import
DropdownWeight
from
'
./dropdown_weight
'
;
import
DropdownWeight
from
'
./dropdown_weight
'
;
export
default
class
AvailableDropdownMappings
{
export
default
class
AvailableDropdownMappings
{
...
...
spec/frontend/milestones/milestone_combobox_spec.js
→
spec/frontend/milestones/
components/
milestone_combobox_spec.js
View file @
b45c06fe
...
@@ -7,7 +7,7 @@ import Vuex from 'vuex';
...
@@ -7,7 +7,7 @@ import Vuex from 'vuex';
import
{
ENTER_KEY
}
from
'
~/lib/utils/keys
'
;
import
{
ENTER_KEY
}
from
'
~/lib/utils/keys
'
;
import
MilestoneCombobox
from
'
~/milestones/components/milestone_combobox.vue
'
;
import
MilestoneCombobox
from
'
~/milestones/components/milestone_combobox.vue
'
;
import
createStore
from
'
~/milestones/stores/
'
;
import
createStore
from
'
~/milestones/stores/
'
;
import
{
projectMilestones
,
groupMilestones
}
from
'
./mock_data
'
;
import
{
projectMilestones
,
groupMilestones
}
from
'
.
.
/mock_data
'
;
const
extraLinks
=
[
const
extraLinks
=
[
{
text
:
'
Create new
'
,
url
:
'
http://127.0.0.1:3000/h5bp/html5-boilerplate/-/milestones/new
'
},
{
text
:
'
Create new
'
,
url
:
'
http://127.0.0.1:3000/h5bp/html5-boilerplate/-/milestones/new
'
},
...
...
spec/frontend/milestones/
milestone_
utils_spec.js
→
spec/frontend/milestones/utils_spec.js
View file @
b45c06fe
import
{
useFakeDate
}
from
'
helpers/fake_date
'
;
import
{
useFakeDate
}
from
'
helpers/fake_date
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/
milestone_
utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/utils
'
;
describe
(
'
sortMilestonesByDueDate
'
,
()
=>
{
describe
(
'
sortMilestonesByDueDate
'
,
()
=>
{
useFakeDate
(
2021
,
6
,
22
);
useFakeDate
(
2021
,
6
,
22
);
...
...
spec/frontend/vue_shared/components/filtered_search_bar/tokens/milestone_token_spec.js
View file @
b45c06fe
...
@@ -9,7 +9,7 @@ import MockAdapter from 'axios-mock-adapter';
...
@@ -9,7 +9,7 @@ import MockAdapter from 'axios-mock-adapter';
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
import
createFlash
from
'
~/flash
'
;
import
createFlash
from
'
~/flash
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/
milestone_
utils
'
;
import
{
sortMilestonesByDueDate
}
from
'
~/milestones/utils
'
;
import
{
DEFAULT_MILESTONES
}
from
'
~/vue_shared/components/filtered_search_bar/constants
'
;
import
{
DEFAULT_MILESTONES
}
from
'
~/vue_shared/components/filtered_search_bar/constants
'
;
import
MilestoneToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
'
;
import
MilestoneToken
from
'
~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue
'
;
...
@@ -17,7 +17,7 @@ import MilestoneToken from '~/vue_shared/components/filtered_search_bar/tokens/m
...
@@ -17,7 +17,7 @@ import MilestoneToken from '~/vue_shared/components/filtered_search_bar/tokens/m
import
{
mockMilestoneToken
,
mockMilestones
,
mockRegularMilestone
}
from
'
../mock_data
'
;
import
{
mockMilestoneToken
,
mockMilestones
,
mockRegularMilestone
}
from
'
../mock_data
'
;
jest
.
mock
(
'
~/flash
'
);
jest
.
mock
(
'
~/flash
'
);
jest
.
mock
(
'
~/milestones/
milestone_
utils
'
);
jest
.
mock
(
'
~/milestones/utils
'
);
const
defaultStubs
=
{
const
defaultStubs
=
{
Portal
:
true
,
Portal
:
true
,
...
...
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