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
3c0ca0e7
Commit
3c0ca0e7
authored
Feb 08, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Roadmap app root
parent
1541556b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
ee/app/assets/javascripts/roadmap/index.js
ee/app/assets/javascripts/roadmap/index.js
+60
-0
No files found.
ee/app/assets/javascripts/roadmap/index.js
0 → 100644
View file @
3c0ca0e7
import
Vue
from
'
vue
'
;
import
Translate
from
'
~/vue_shared/translate
'
;
import
{
getTimeframeWindow
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
TIMEFRAME_LENGTH
}
from
'
./constants
'
;
import
RoadmapStore
from
'
./store/roadmap_store
'
;
import
RoadmapService
from
'
./service/roadmap_service
'
;
import
roadmapApp
from
'
./components/app.vue
'
;
Vue
.
use
(
Translate
);
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
el
=
document
.
getElementById
(
'
js-roadmap
'
);
if
(
!
el
)
{
return
false
;
}
return
new
Vue
({
el
,
components
:
{
roadmapApp
,
},
data
()
{
const
dataset
=
this
.
$options
.
el
.
dataset
;
// Construct Epic API path to include
// `start_date` & `end_date` query params to get list of
// epics only for current timeframe.
const
timeframe
=
getTimeframeWindow
(
TIMEFRAME_LENGTH
);
const
start
=
timeframe
[
0
];
const
end
=
timeframe
[
TIMEFRAME_LENGTH
-
1
];
const
startDate
=
`
${
start
.
getFullYear
()}
-
${
start
.
getMonth
()
+
1
}
-
${
start
.
getDate
()}
`
;
const
endDate
=
`
${
end
.
getFullYear
()}
-
${
end
.
getMonth
()
+
1
}
-
${
end
.
getDate
()}
`
;
const
epicsPath
=
`
${
dataset
.
epicsPath
}
?start_date=
${
startDate
}
&end_date=
${
endDate
}
`
;
const
store
=
new
RoadmapStore
(
parseInt
(
dataset
.
groupId
,
0
),
timeframe
);
const
service
=
new
RoadmapService
(
epicsPath
);
return
{
store
,
service
,
emptyStateIllustrationPath
:
dataset
.
emptyStateIllustration
,
};
},
render
(
createElement
)
{
return
createElement
(
'
roadmap-app
'
,
{
props
:
{
store
:
this
.
store
,
service
:
this
.
service
,
emptyStateIllustrationPath
:
this
.
emptyStateIllustrationPath
,
},
});
},
});
});
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