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
1094e881
Commit
1094e881
authored
Dec 19, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
display gantt by job & by station
parent
6ed9db92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
9 deletions
+48
-9
dream/platform/static/src/dream_launcher.js
dream/platform/static/src/dream_launcher.js
+48
-9
No files found.
dream/platform/static/src/dream_launcher.js
View file @
1094e881
...
...
@@ -330,6 +330,13 @@
// display demo graph.
$
(
"
#graph_zone
"
).
show
();
// temporary hack
var
now
=
new
Date
();
now
.
setHours
(
0
);
now
.
setMinutes
(
0
);
now
.
setSeconds
(
0
);
var
blockage_data
=
[],
waiting_data
=
[],
failure_data
=
[],
...
...
@@ -349,16 +356,29 @@
"
Step No.
"
]
],
start_date
=
new
Date
(
now
.
getTime
()),
gantt_data
=
{
data
:
[],
data
:
[
{
id
:
"
by_job
"
,
text
:
"
By Job
"
,
start_date
:
start_date
,
duration
:
0
,
project
:
1
,
open
:
true
},
{
id
:
"
by_station
"
,
text
:
"
By Station
"
,
start_date
:
start_date
,
duration
:
0
,
project
:
1
,
open
:
true
}
],
link
:
[]
};
// temporary hack
var
now
=
new
Date
();
now
.
setHours
(
0
);
now
.
setMinutes
(
0
);
now
.
setSeconds
(
0
);
$
.
each
(
data
[
'
success
'
].
elementList
,
function
(
idx
,
obj
)
{
if
(
obj
.
results
.
working_ratio
!==
undefined
)
{
...
...
@@ -392,14 +412,14 @@
if
(
obj
.
_class
===
'
Dream.Job
'
)
{
var
property_dict
=
obj
.
extraPropertyDict
;
var
duration
=
0
;
var
start_date
=
new
Date
(
now
.
getTime
());
gantt_data
.
data
.
push
({
id
:
obj
[
'
id
'
],
text
:
property_dict
[
'
name
'
],
start_date
:
start_date
,
duration
:
obj
[
'
results
'
].
completionTime
,
project
:
1
,
open
:
true
open
:
false
,
parent
:
"
by_job
"
});
$
.
each
(
obj
[
'
results
'
][
'
schedule
'
],
function
(
i
,
schedule
)
{
spreadsheet_data
.
push
([
...
...
@@ -428,7 +448,25 @@
duration
:
duration
,
parent
:
obj
[
'
id
'
]
});
}
gantt_data
.
data
.
push
({
id
:
'
job.
'
+
obj
[
'
id
'
]
+
'
.
'
+
schedule
[
'
stepNumber
'
],
text
:
obj
[
'
id
'
],
start_date
:
task_start_date
,
duration
:
duration
,
parent
:
schedule
[
'
stationId
'
],
by_station
:
1
,
});
};
});
}
else
{
gantt_data
.
data
.
push
({
id
:
obj
[
'
id
'
],
text
:
obj
[
'
id
'
],
start_date
:
now
,
duration
:
0
,
project
:
1
,
open
:
false
,
parent
:
"
by_station
"
});
}
});
...
...
@@ -480,6 +518,7 @@
try
{
gantt
.
clearAll
();
}
catch
(
e
)
{}
var
gantt_output_height
=
35
*
(
gantt_data
.
data
.
length
+
1
)
+
1
;
$
(
'
#gantt_output
'
).
height
(
gantt_output_height
).
show
().
dhx_gantt
({
data
:
gantt_data
,
...
...
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