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
5ac9990b
Commit
5ac9990b
authored
Feb 25, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow all keyword in operators shift
parent
5476bd27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
dream/plugins/BatchesShift.py
dream/plugins/BatchesShift.py
+15
-2
No files found.
dream/plugins/BatchesShift.py
View file @
5ac9990b
...
...
@@ -19,6 +19,7 @@ class BatchesShift(ReadShiftFromSpreadsheet):
def
preprocess
(
self
,
data
):
nodes
=
data
[
'graph'
][
'node'
]
machineshiftData
=
data
[
'input'
].
get
(
'machine_shift_spreadsheet'
,
None
)
operatorshiftData
=
data
[
'input'
].
get
(
'operator_shift_spreadsheet'
,
None
)
# create a string with all station ids separated by commas
allString
=
''
...
...
@@ -31,6 +32,18 @@ class BatchesShift(ReadShiftFromSpreadsheet):
if
element
[
1
]
in
[
'ALL'
,
'All'
,
'all'
]:
element
[
1
]
=
allString
# create a string with all operator ids separated by commas
allString
=
''
for
node_id
,
node
in
nodes
.
iteritems
():
if
node
[
'_class'
]
==
'Dream.Operator'
:
allString
+=
node_id
allString
+=
','
print
allString
# if in machine shift there is a
for
element
in
operatorshiftData
:
if
element
[
1
]
in
[
'ALL'
,
'All'
,
'all'
]:
element
[
1
]
=
allString
# run the standard shift plugin
data
=
ReadShiftFromSpreadsheet
.
preprocess
(
self
,
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