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
dbb5e014
Commit
dbb5e014
authored
Sep 09, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: new widget to download demandPlanningOutput.xls
parent
2ff9cce1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
1 deletion
+75
-1
dream/platform/src/dream/Output_viewDownloadExcelSpreadsheet.html
...atform/src/dream/Output_viewDownloadExcelSpreadsheet.html
+18
-0
dream/platform/src/dream/Output_viewDownloadExcelSpreadsheet.js
...platform/src/dream/Output_viewDownloadExcelSpreadsheet.js
+44
-0
dream/platform/src/dream/index.js
dream/platform/src/dream/index.js
+9
-0
dream/simulation/GUI/Default.py
dream/simulation/GUI/Default.py
+1
-0
dream/simulation/GUI/DemandPlanning.py
dream/simulation/GUI/DemandPlanning.py
+3
-1
No files found.
dream/platform/src/dream/Output_viewDownloadExcelSpreadsheet.html
0 → 100644
View file @
dbb5e014
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
Download Excel Spreadsheet
</title>
<script
src=
"../<%= copy.rsvp.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= copy.renderjs.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"../<%= curl.jquery.relative_dest %>"
type=
"text/javascript"
></script>
<script
src=
"mixin_gadget.js"
type=
"text/javascript"
></script>
<script
src=
"Output_viewDownloadExcelSpreadsheet.js"
type=
"text/javascript"
></script>
</head>
<body>
<a
class=
"download_link ui-btn ui-btn-inline ui-icon-action ui-btn-icon-right"
>
Download
</a>
</body>
</html>
dream/platform/src/dream/Output_viewDownloadExcelSpreadsheet.js
0 → 100644
View file @
dbb5e014
/*global rJS, RSVP, jQuery, initGadgetMixin */
/*jslint nomen: true, unparam: true */
(
function
(
window
,
rJS
,
RSVP
,
$
,
initGadgetMixin
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
initGadgetMixin
(
gadget_klass
);
gadget_klass
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
aq_getAttachment
"
,
"
jio_getAttachment
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
jio_key
=
options
.
id
,
gadget
=
this
;
gadget
.
props
.
jio_key
=
jio_key
;
gadget
.
props
.
result
=
options
.
result
;
return
gadget
.
aq_getAttachment
({
"
_id
"
:
gadget
.
props
.
jio_key
,
"
_attachment
"
:
"
simulation.json
"
})
.
push
(
function
(
simulation_json
)
{
var
result
=
JSON
.
parse
(
simulation_json
)[
0
].
result
,
download_link
=
gadget
.
props
.
element
.
querySelector
(
"
.download_link
"
);
download_link
.
download
=
"
demandPlannerOutput.xls
"
;
download_link
.
href
=
"
data:application/excel;base64,
"
+
result
[
'
demandPlannerOutput.xls
'
];
});
})
.
declareMethod
(
"
startService
"
,
function
()
{
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
// Infinite wait, until cancelled
return
(
new
RSVP
.
defer
()).
promise
;
});
});
}(
window
,
rJS
,
RSVP
,
jQuery
,
initGadgetMixin
));
dream/platform/src/dream/index.js
View file @
dbb5e014
...
...
@@ -114,6 +114,15 @@
.
gui
.
station_utilisation_graph
);
}
},
"
download_excel_spreadsheet
"
:
{
"
gadget
"
:
"
Output_viewDownloadExcelSpreadsheet
"
,
"
type
"
:
"
object_view
"
,
"
title
"
:
"
Download Excel Spreadsheet
"
,
"
condition
"
:
function
(
gadget
)
{
return
(
gadget
.
props
.
configuration_dict
[
'
Dream-Configuration
'
]
.
gui
.
download_excel_spreadsheet
);
}
},
"
view_capacity_utilization
"
:
{
"
gadget
"
:
"
Output_viewCapacityUtilisationGraph
"
,
"
type
"
:
"
object_view
"
,
...
...
dream/simulation/GUI/Default.py
View file @
dbb5e014
...
...
@@ -358,6 +358,7 @@ class Simulation(object):
'station_utilisation_graph'
:
1
,
'job_schedule_spreadsheet'
:
0
,
'download_excel_spreadsheet'
:
0
,
'job_gantt'
:
0
,
'exit_stat'
:
1
,
'queue_stat'
:
1
,
...
...
dream/simulation/GUI/DemandPlanning.py
View file @
dbb5e014
...
...
@@ -276,11 +276,13 @@ class Simulation(DefaultSimulation):
DefaultSimulation
.
getConfigurationDict
(
self
)[
'Dream-Configuration'
]}
conf
[
"Dream-Configuration"
][
"gui"
][
"exit_stat"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"debug_json"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"debug_json"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"graph_editor"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"station_utilisation_graph"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"exit_stat"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"queue_stat"
]
=
0
conf
[
"Dream-Configuration"
][
"gui"
][
"download_excel_spreadsheet"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"dp_capacity_spreadsheet"
]
=
1
conf
[
"Dream-Configuration"
][
"gui"
][
"dp_route_spreadsheet"
]
=
1
...
...
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