Skip to content

Commit f721b9d

Browse files
committed
wip: export broker standalone model
1 parent a0911f3 commit f721b9d

File tree

4 files changed

+574
-499
lines changed

4 files changed

+574
-499
lines changed

devsimpy/Menu.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def __init__(self, shape, event):
10111011
disable=wx.MenuItem(self, ID_DISABLE_SHAPE, _("Disable"), _("Disable the link for the simulation"))
10121012
export=wx.MenuItem(self, ID_EXPORT_SHAPE, _("Export"), _("Export the model"))
10131013
exportAMD=wx.MenuItem(self, ID_EXPORT_AMD_SHAPE, _("AMD"), _("Model exported to a amd file"))
1014-
exportKAFKA_WORKER=wx.MenuItem(self, ID_EXPORT_KAFKA_WORKER_PKG, _("Kafka Worker"), _("Model exported as a standalone package runnable with a Kafka-based simulator."))
1014+
exportKAFKA_WORKER=wx.MenuItem(self, ID_EXPORT_KAFKA_WORKER_PKG, _("Broker Worker"), _("Model exported as a standalone package runnable with a Kafka-based simulator."))
10151015
exportCMD=wx.MenuItem(self, ID_EXPORT_CMD_SHAPE, _("CMD"), _("Model exported to a cmd file"))
10161016
exportXML=wx.MenuItem(self, ID_EXPORT_XML_SHAPE, _("XML"), _("Model exported to a xml file"))
10171017
exportJS=wx.MenuItem(self, ID_EXPORT_JS_SHAPE, _("JS"), _("Model exported to a js (join) file"))
@@ -1148,14 +1148,22 @@ def __init__(self, shape, event):
11481148
if isinstance(shape, Container.CodeBlock):
11491149
AppendMenu(self, -1, _("Export"), export_subMenu)
11501150
Export_SubMenu1 = export_subMenu.Append(exportAMD)
1151+
Export_SubMenu2 = export_subMenu.Append(exportKAFKA_WORKER)
11511152
self.AppendSeparator()
11521153

1153-
if DEFAULT_DEVS_DIRNAME == "BrokerDEVS":
1154-
if shape.isPY():
1155-
### TODO : impelmented but not tested for AMD model
1156-
Export_SubMenu2 = export_subMenu.Append(exportKAFKA_WORKER)
1157-
1158-
if shape.isPYC():
1154+
1155+
if shape.isPY():
1156+
if DEFAULT_DEVS_DIRNAME != "BrokerDEVS":
1157+
Export_SubMenu2.Enable(False)
1158+
1159+
elif shape.isAMD():
1160+
if DEFAULT_DEVS_DIRNAME != "BrokerDEVS":
1161+
Export_SubMenu2.Enable(False)
1162+
else:
1163+
### TODO: need to be implemented
1164+
Export_SubMenu2.Enable(False)
1165+
1166+
elif shape.isPYC():
11591167
Export_SubMenu1.Enable(False)
11601168

11611169

0 commit comments

Comments
 (0)