Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
022a0ba9
Commit
022a0ba9
authored
Jun 16, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust start dates and duration in GANTT for capacity project
We'll make the time unit a general parameter
parent
96febac7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+10
-4
No files found.
dream/platform/static/src/dream.js
View file @
022a0ba9
...
...
@@ -330,7 +330,7 @@
schedule
[
'
entranceTime
'
]
*
1000
*
3600
);
var
duration
=
0
;
if
(
schedule
[
'
exitTime
'
])
{
duration
=
(
schedule
[
'
exitTime
'
]
-
schedule
[
'
entranceTime
'
]);
duration
=
(
schedule
[
'
exitTime
'
]
-
schedule
[
'
entranceTime
'
])
*
24
;
}
else
{
// When duration is not returned by ManPy, it is calculated by
// difference of entranceTime of this step and entranceTime of the
...
...
@@ -409,7 +409,13 @@
}
function
job_gantt_widget
(
input_data
,
output_data
)
{
// TODO: make this a general parameter
// multiplier to get a day from a time unit
var
time_multiplier
=
24
;
// TODO: use dhx_gantt zoom level feature (
// http://dhtmlx.com/docs/products/dhtmlxGantt/02_features.html )
// temporary hack
var
now
=
new
Date
();
now
.
setHours
(
0
);
...
...
@@ -511,9 +517,9 @@
if
(
duration
>
0.0
)
{
var
task_start_date
=
new
Date
(
start_date
.
getTime
());
// for simulation time unit as days
// task_start_date.setDate(task_start_date.getDate() + schedule['entranceTime']
);
// for simulation time unit as
days
hours
task_start_date
.
setTime
(
task_start_date
.
getTime
()
+
schedule
[
'
entranceTime
'
]
*
1000
*
3600
);
task_start_date
.
setTime
(
task_start_date
.
getTime
()
+
schedule
[
'
entranceTime
'
]
*
1000
*
3600
*
24
);
// for simulation time unit as hours
//
task_start_date.setTime(task_start_date.getTime() + schedule['entranceTime']*1000*3600);
var
job_full_id
=
input_job
.
id
+
"
.
"
+
input_order
.
id
;
if
(
seen_parts
[
job_full_id
]
===
undefined
){
...
...
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