Commit f3fa909f authored by Jérome Perrin's avatar Jérome Perrin

Allow to set alternate names on tools and use it for batches as an example

parent 4a391f74
......@@ -36,12 +36,13 @@
priv.displayTool = function () {
var render_element = $("#tools-container");
for (var key in configuration) {
$.each(configuration, function(key, val) {
var name = val["name"] || key.split('-')[1];
if (key !== 'Dream-Configuration') {
render_element.append('<div id="' + key + '" class="tool ' + key + '">' +
key.split('-')[1] + "<ul/></div>");
name + "<ul/></div>");
}
}
});
};
priv.initDialog = function () {
......
......@@ -7,32 +7,37 @@ import operator
from dream.simulation.GUI.Default import Simulation as DefaultSimulation
from dream.simulation.GUI.Default import schema
class Simulation(DefaultSimulation):
def getConfigurationDict(self):
conf = DefaultSimulation.getConfigurationDict(self)
conf['Dream-LineClearance'] = {
"_class": "Dream.LineClearance",
"name": "Clearance",
"property_list": conf['Dream-Queue']['property_list']}
conf['Dream-BatchSource'] = {
"_class": "Dream.BatchSource",
"name": "Source",
"property_list": conf['Dream-Source']['property_list']\
+ [schema['batchNumberOfUnits']]
}
conf['Dream-BatchDecomposition'] = {
"_class": "Dream.BatchDecomposition",
"name": "Decomposition",
"property_list": [schema['processingTime'], schema['numberOfSubBatches'] ]
}
conf['Dream-BatchReassembly'] = {
"_class": "Dream.BatchReassembly",
"name": "Reassembly",
"property_list": [schema['processingTime'], schema['numberOfSubBatches'] ]
}
conf['Dream-BatchScrapMachine'] = {
"_class": "Dream.BatchScrapMachine",
"name": "Station",
"property_list": conf['Dream-Machine']['property_list']
}
conf['Dream-EventGenerator'] = {
"_class": "Dream.EventGenerator",
"name": "Attainment",
"property_list": [schema['start'], schema['stop'], schema['duration'],
schema['method'], schema['argumentDict']]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment