cpee 1.5.25 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{FEATURES → FEATURES.md} +7 -6
- data/INSTALL.md +1 -0
- data/{README → README.md} +3 -3
- data/Rakefile +1 -0
- data/cockpit/index.html +7 -7
- data/cockpit/js/details.js +13 -14
- data/cockpit/js/instance.js +191 -284
- data/cockpit/js/parameters.js +13 -3
- data/cockpit/js/ui.js +2 -2
- data/cockpit/model.html +1 -0
- data/cockpit/rngs/attributes.rng +1 -1
- data/cockpit/rngs/dataelements.rng +1 -1
- data/cockpit/rngs/endpoints.rng +1 -1
- data/cockpit/templates.legacy/Async.xml +7 -7
- data/cockpit/templates.legacy/BCO.xml +7 -10
- data/cockpit/templates.legacy/BCS.xml +7 -10
- data/cockpit/templates.legacy/Centurio.xml +6 -6
- data/cockpit/templates.legacy/Concurrent.xml +6 -6
- data/cockpit/templates.legacy/Coopis Testset.xml +6 -6
- data/cockpit/templates.legacy/Endpoints and Data Manipulation.xml +6 -6
- data/cockpit/templates.legacy/ICSOC Testset.xml +6 -6
- data/cockpit/templates.legacy/Infinity.xml +3 -3
- data/cockpit/templates.legacy/Lego Boxer.xml +7 -7
- data/cockpit/templates.legacy/Lego Conveyor.xml +7 -7
- data/cockpit/templates.legacy/Lego Crane.xml +7 -7
- data/cockpit/templates.legacy/Lego Ejector.xml +7 -7
- data/cockpit/templates.legacy/Lego Full.xml +7 -7
- data/cockpit/templates.legacy/Lego Liddy.xml +7 -7
- data/cockpit/templates.legacy/Lego Plate.xml +7 -7
- data/cockpit/templates.legacy/Lego Transporter.xml +7 -7
- data/cockpit/templates.legacy/Lego_Part_1.xml +7 -7
- data/cockpit/templates.legacy/LgLinear.xml +6 -10
- data/cockpit/templates.legacy/Linear.xml +7 -7
- data/cockpit/templates.legacy/Log.xml +7 -7
- data/cockpit/templates.legacy/Mangler 1.xml +6 -6
- data/cockpit/templates.legacy/Mangler 2.xml +6 -6
- data/cockpit/templates.legacy/Manuel Labels.xml +7 -7
- data/cockpit/templates.legacy/Promise.xml +7 -7
- data/cockpit/templates.legacy/SOPROMO Test Sonification.xml +6 -6
- data/cockpit/templates.legacy/Subprocess.xml +56 -0
- data/cockpit/templates.legacy/Syncing P34 1.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34 2.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34 3.xml +8 -11
- data/cockpit/templates.legacy/Syncing P34.xml +8 -11
- data/cockpit/templates.legacy/TEST - Bad Loop.xml +6 -6
- data/cockpit/templates.legacy/TEST - Wrong Positions.xml +6 -6
- data/cockpit/templates.legacy/Take_5.xml +48 -0
- data/cockpit/templates.legacy/Update.xml +7 -7
- data/cockpit/templates.legacy/Worklist Parallel.xml +7 -7
- data/cockpit/templates.legacy/Worklist Test CPEE.xml +7 -7
- data/cockpit/templates.legacy/Worklist Test.xml +7 -7
- data/cockpit/templates.legacy/Worklist Test2.xml +7 -7
- data/cockpit/templates.legacy/convert_cpee2.rb +15 -0
- data/cockpit/templates.legacy/testsets.xml +1 -1
- data/cockpit/templates/BPM 2020 Manual Adjust.xml +18 -71
- data/cockpit/templates/BPM 2020 Solution Baseline.xml +17 -71
- data/cockpit/templates/BPM 2020 Solution NN.xml +25 -71
- data/cockpit/templates/BPM 2020 Solution View.xml +15 -71
- data/cockpit/templates/BPM 2020.xml +17 -6
- data/cockpit/templates/Coopis 2010.xml +7 -7
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml +7 -10
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml +7 -10
- data/cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml +7 -10
- data/cockpit/templates/Worklist.xml +7 -7
- data/cockpit/templates/convert_cpee2.rb +15 -0
- data/cockpit/themes/compact/rngs/alternative.rng +25 -0
- data/cockpit/themes/compact/rngs/call.rng +17 -17
- data/cockpit/themes/compact/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/compact/rngs/choose.rng +14 -0
- data/cockpit/themes/compact/rngs/critical.rng +5 -0
- data/cockpit/themes/compact/rngs/escape.rng +1 -0
- data/cockpit/themes/compact/rngs/group.rng +3 -0
- data/cockpit/themes/compact/rngs/loop.rng +22 -0
- data/cockpit/themes/compact/rngs/manipulate.rng +9 -0
- data/cockpit/themes/compact/rngs/otherwise.rng +22 -0
- data/cockpit/themes/compact/rngs/parallel.rng +21 -0
- data/cockpit/themes/compact/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/compact/rngs/scripts.rng +10 -11
- data/cockpit/themes/compact/rngs/stop.rng +5 -0
- data/cockpit/themes/compact/rngs/terminate.rng +1 -0
- data/cockpit/themes/convert_cpee2.rb +8 -0
- data/cockpit/themes/default/rngs/alternative.rng +8 -8
- data/cockpit/themes/default/rngs/call.rng +84 -48
- data/cockpit/themes/default/rngs/callmanipulate.rng +103 -64
- data/cockpit/themes/default/rngs/choose.rng +5 -3
- data/cockpit/themes/default/rngs/critical.rng +2 -2
- data/cockpit/themes/default/rngs/escape.rng +1 -1
- data/cockpit/themes/default/rngs/group.rng +3 -3
- data/cockpit/themes/default/rngs/loop.rng +8 -8
- data/cockpit/themes/default/rngs/manipulate.rng +3 -3
- data/cockpit/themes/default/rngs/otherwise.rng +8 -8
- data/cockpit/themes/default/rngs/parallel.rng +14 -6
- data/cockpit/themes/default/rngs/parallel_branch.rng +2 -2
- data/cockpit/themes/default/rngs/scripts.rng +23 -0
- data/cockpit/themes/default/rngs/stop.rng +2 -2
- data/cockpit/themes/default/rngs/terminate.rng +1 -1
- data/cockpit/themes/extended/rngs/alternative.rng +25 -0
- data/cockpit/themes/extended/rngs/call.rng +17 -17
- data/cockpit/themes/extended/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/extended/rngs/choose.rng +14 -0
- data/cockpit/themes/extended/rngs/critical.rng +5 -0
- data/cockpit/themes/extended/rngs/escape.rng +1 -0
- data/cockpit/themes/extended/rngs/group.rng +3 -0
- data/cockpit/themes/extended/rngs/loop.rng +22 -0
- data/cockpit/themes/extended/rngs/manipulate.rng +9 -0
- data/cockpit/themes/extended/rngs/otherwise.rng +22 -0
- data/cockpit/themes/extended/rngs/parallel.rng +21 -0
- data/cockpit/themes/extended/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/extended/rngs/scripts.rng +10 -11
- data/cockpit/themes/extended/rngs/stop.rng +5 -0
- data/cockpit/themes/extended/rngs/terminate.rng +1 -0
- data/cockpit/themes/extended/theme.js +7 -6
- data/cockpit/themes/model/rngs/alternative.rng +1 -1
- data/cockpit/themes/model/rngs/call.rng +16 -16
- data/cockpit/themes/model/rngs/callmanipulate.rng +17 -17
- data/cockpit/themes/model/rngs/choose.rng +1 -1
- data/cockpit/themes/model/rngs/critical.rng +1 -1
- data/cockpit/themes/model/rngs/escape.rng +1 -1
- data/cockpit/themes/model/rngs/group.rng +1 -1
- data/cockpit/themes/model/rngs/loop.rng +1 -1
- data/cockpit/themes/model/rngs/manipulate.rng +1 -1
- data/cockpit/themes/model/rngs/otherwise.rng +1 -1
- data/cockpit/themes/model/rngs/parallel.rng +1 -1
- data/cockpit/themes/model/rngs/parallel_branch.rng +1 -1
- data/cockpit/themes/model/rngs/scripts.rng +3 -4
- data/cockpit/themes/model/rngs/stop.rng +1 -1
- data/cockpit/themes/model/rngs/terminate.rng +1 -1
- data/cockpit/themes/model/theme.js +7 -6
- data/cockpit/themes/packed/rngs/alternative.rng +25 -0
- data/cockpit/themes/packed/rngs/call.rng +17 -17
- data/cockpit/themes/packed/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/packed/rngs/choose.rng +14 -0
- data/cockpit/themes/packed/rngs/critical.rng +5 -0
- data/cockpit/themes/packed/rngs/escape.rng +1 -0
- data/cockpit/themes/packed/rngs/group.rng +3 -0
- data/cockpit/themes/packed/rngs/loop.rng +22 -0
- data/cockpit/themes/packed/rngs/manipulate.rng +9 -0
- data/cockpit/themes/packed/rngs/otherwise.rng +22 -0
- data/cockpit/themes/packed/rngs/parallel.rng +21 -0
- data/cockpit/themes/packed/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/packed/rngs/scripts.rng +10 -11
- data/cockpit/themes/packed/rngs/stop.rng +5 -0
- data/cockpit/themes/packed/rngs/terminate.rng +1 -0
- data/cockpit/themes/packed/theme.js +7 -6
- data/cockpit/themes/preset/rngs/alternative.rng +25 -0
- data/cockpit/themes/preset/rngs/call.rng +17 -17
- data/cockpit/themes/preset/rngs/callmanipulate.rng +26 -26
- data/cockpit/themes/preset/rngs/choose.rng +14 -0
- data/cockpit/themes/preset/rngs/critical.rng +5 -0
- data/cockpit/themes/preset/rngs/escape.rng +1 -0
- data/cockpit/themes/preset/rngs/group.rng +3 -0
- data/cockpit/themes/preset/rngs/loop.rng +22 -0
- data/cockpit/themes/preset/rngs/manipulate.rng +9 -0
- data/cockpit/themes/preset/rngs/otherwise.rng +22 -0
- data/cockpit/themes/preset/rngs/parallel.rng +21 -0
- data/cockpit/themes/preset/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/preset/rngs/scripts.rng +10 -11
- data/cockpit/themes/preset/rngs/stop.rng +5 -0
- data/cockpit/themes/preset/rngs/terminate.rng +1 -0
- data/cockpit/themes/preset/theme.js +7 -6
- data/cpee.gemspec +10 -11
- data/{log/topics.xml → lib/callbacks.xml} +16 -6
- data/lib/{engine → callbacks}/callbacks.rng +2 -8
- data/lib/cpee.xml +10 -4
- data/lib/cpee/attributes_helper.rb +27 -0
- data/lib/cpee/controller.rb +113 -596
- data/lib/cpee/implementation.rb +167 -191
- data/lib/cpee/implementation_callbacks.rb +77 -0
- data/lib/cpee/implementation_notifications.rb +189 -0
- data/lib/cpee/implementation_properties.rb +714 -0
- data/lib/cpee/{callback.rb → message.rb} +20 -18
- data/lib/cpee/persistence.rb +135 -0
- data/lib/cpee/statemachine.rb +20 -0
- data/lib/cpee/transform.rb +95 -0
- data/lib/engine.xml +1 -59
- data/lib/properties.xml +236 -0
- data/lib/properties/arbitrary.rng +26 -0
- data/lib/properties/attributes.rng +10 -0
- data/lib/properties/dataelements.rng +10 -0
- data/lib/properties/description.rng +8 -0
- data/lib/properties/dsl.rng +7 -0
- data/lib/properties/dslx.rng +8 -0
- data/lib/properties/endpoints.rng +10 -0
- data/lib/properties/handlerwrapper.rng +9 -0
- data/lib/properties/position.rng +15 -0
- data/lib/properties/positions.rng +10 -0
- data/lib/properties/properties.rng +29 -0
- data/lib/properties/set-properties.rng +25 -0
- data/lib/properties/set-some-properties.rng +45 -0
- data/lib/properties/simple.rng +8 -0
- data/lib/properties/state.rng +33 -0
- data/lib/properties/status.rng +12 -0
- data/lib/properties/t_attributes.rng +7 -0
- data/lib/properties/t_dataelements.rng +7 -0
- data/lib/properties/t_endpoints.rng +7 -0
- data/lib/properties/t_position.rng +7 -0
- data/lib/properties/t_positions.rng +7 -0
- data/lib/properties/t_simple.rng +7 -0
- data/lib/properties/t_status.rng +7 -0
- data/lib/properties/t_transformation.rng +7 -0
- data/lib/properties/transformation.rng +40 -0
- data/server/dev.rb +1 -0
- data/server/handlerwrappers/default.rb +40 -38
- data/server/resources/backend/README.md +17 -0
- data/server/resources/backend/instance.rb +23 -0
- data/server/resources/backend/instance.template +19 -0
- data/server/resources/backend/opts.yaml +6 -0
- data/server/resources/backend/run +33 -0
- data/server/resources/notifications/logging/subscription.xml +19 -0
- data/server/resources/properties.empty +38 -0
- data/server/resources/properties.init +11 -11
- data/server/resources/states.dot +19 -0
- data/server/resources/states.xml +49 -0
- data/server/resources/transformation_dslx.xsl +12 -3
- data/server/routing/end.rb +44 -0
- data/server/routing/forward-events.rb +59 -0
- data/server/routing/forward-votes.rb +108 -0
- data/server/routing/persist.rb +155 -0
- data/server/server.rb +1 -0
- data/tools/cpee +46 -15
- data/tools/instantiation/instantiation +0 -1
- data/tools/server/server.rb +0 -1
- metadata +78 -132
- data/INSTALL +0 -23
- data/cockpit/templates/convert_preset.rb +0 -32
- data/cockpit/templates/testsets.xml +0 -11
- data/cockpit/templates/transformations.xml +0 -4
- data/cockpit/themes/compact/rngs/alternative.rng +0 -1
- data/cockpit/themes/compact/rngs/choose.rng +0 -1
- data/cockpit/themes/compact/rngs/critical.rng +0 -1
- data/cockpit/themes/compact/rngs/escape.rng +0 -1
- data/cockpit/themes/compact/rngs/group.rng +0 -1
- data/cockpit/themes/compact/rngs/loop.rng +0 -1
- data/cockpit/themes/compact/rngs/manipulate.rng +0 -1
- data/cockpit/themes/compact/rngs/otherwise.rng +0 -1
- data/cockpit/themes/compact/rngs/parallel.rng +0 -1
- data/cockpit/themes/compact/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/compact/rngs/stop.rng +0 -1
- data/cockpit/themes/compact/rngs/terminate.rng +0 -1
- data/cockpit/themes/default/rngs/finalize.rng +0 -6
- data/cockpit/themes/default/rngs/update.rng +0 -6
- data/cockpit/themes/default/theme.js +0 -1286
- data/cockpit/themes/extended/rngs/alternative.rng +0 -1
- data/cockpit/themes/extended/rngs/choose.rng +0 -1
- data/cockpit/themes/extended/rngs/critical.rng +0 -1
- data/cockpit/themes/extended/rngs/escape.rng +0 -1
- data/cockpit/themes/extended/rngs/group.rng +0 -1
- data/cockpit/themes/extended/rngs/loop.rng +0 -1
- data/cockpit/themes/extended/rngs/manipulate.rng +0 -1
- data/cockpit/themes/extended/rngs/otherwise.rng +0 -1
- data/cockpit/themes/extended/rngs/parallel.rng +0 -1
- data/cockpit/themes/extended/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/extended/rngs/stop.rng +0 -1
- data/cockpit/themes/extended/rngs/terminate.rng +0 -1
- data/cockpit/themes/labels/rngs/alternative.rng +0 -25
- data/cockpit/themes/labels/rngs/call.rng +0 -81
- data/cockpit/themes/labels/rngs/callmanipulate.rng +0 -101
- data/cockpit/themes/labels/rngs/choose.rng +0 -12
- data/cockpit/themes/labels/rngs/critical.rng +0 -5
- data/cockpit/themes/labels/rngs/escape.rng +0 -1
- data/cockpit/themes/labels/rngs/finalize.rng +0 -6
- data/cockpit/themes/labels/rngs/group.rng +0 -3
- data/cockpit/themes/labels/rngs/loop.rng +0 -22
- data/cockpit/themes/labels/rngs/manipulate.rng +0 -9
- data/cockpit/themes/labels/rngs/otherwise.rng +0 -22
- data/cockpit/themes/labels/rngs/parallel.rng +0 -13
- data/cockpit/themes/labels/rngs/parallel_branch.rng +0 -8
- data/cockpit/themes/labels/rngs/stop.rng +0 -5
- data/cockpit/themes/labels/rngs/terminate.rng +0 -1
- data/cockpit/themes/labels/rngs/update.rng +0 -6
- data/cockpit/themes/labels/symbols/alternative.svg +0 -5
- data/cockpit/themes/labels/symbols/arrow.svg +0 -3
- data/cockpit/themes/labels/symbols/call.svg +0 -6
- data/cockpit/themes/labels/symbols/callmanipulate.svg +0 -8
- data/cockpit/themes/labels/symbols/choose.svg +0 -5
- data/cockpit/themes/labels/symbols/choose_exclusive.svg +0 -5
- data/cockpit/themes/labels/symbols/choose_inclusive.svg +0 -4
- data/cockpit/themes/labels/symbols/complex.svg +0 -8
- data/cockpit/themes/labels/symbols/critical.svg +0 -4
- data/cockpit/themes/labels/symbols/end.svg +0 -3
- data/cockpit/themes/labels/symbols/escape.svg +0 -5
- data/cockpit/themes/labels/symbols/event_end.svg +0 -3
- data/cockpit/themes/labels/symbols/loop.svg +0 -5
- data/cockpit/themes/labels/symbols/manipulate.svg +0 -4
- data/cockpit/themes/labels/symbols/otherwise.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel_branch.svg +0 -5
- data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +0 -4
- data/cockpit/themes/labels/symbols/parallel_branch_event.svg +0 -14
- data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +0 -5
- data/cockpit/themes/labels/symbols/scripts.svg +0 -4
- data/cockpit/themes/labels/symbols/start.svg +0 -3
- data/cockpit/themes/labels/symbols/stop.svg +0 -5
- data/cockpit/themes/labels/symbols/terminate.svg +0 -4
- data/cockpit/themes/packed/rngs/alternative.rng +0 -1
- data/cockpit/themes/packed/rngs/choose.rng +0 -1
- data/cockpit/themes/packed/rngs/critical.rng +0 -1
- data/cockpit/themes/packed/rngs/escape.rng +0 -1
- data/cockpit/themes/packed/rngs/group.rng +0 -1
- data/cockpit/themes/packed/rngs/loop.rng +0 -1
- data/cockpit/themes/packed/rngs/manipulate.rng +0 -1
- data/cockpit/themes/packed/rngs/otherwise.rng +0 -1
- data/cockpit/themes/packed/rngs/parallel.rng +0 -1
- data/cockpit/themes/packed/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/packed/rngs/stop.rng +0 -1
- data/cockpit/themes/packed/rngs/terminate.rng +0 -1
- data/cockpit/themes/preset/rngs/alternative.rng +0 -1
- data/cockpit/themes/preset/rngs/choose.rng +0 -1
- data/cockpit/themes/preset/rngs/critical.rng +0 -1
- data/cockpit/themes/preset/rngs/escape.rng +0 -1
- data/cockpit/themes/preset/rngs/group.rng +0 -1
- data/cockpit/themes/preset/rngs/loop.rng +0 -1
- data/cockpit/themes/preset/rngs/manipulate.rng +0 -1
- data/cockpit/themes/preset/rngs/otherwise.rng +0 -1
- data/cockpit/themes/preset/rngs/parallel.rng +0 -1
- data/cockpit/themes/preset/rngs/parallel_branch.rng +0 -1
- data/cockpit/themes/preset/rngs/stop.rng +0 -1
- data/cockpit/themes/preset/rngs/terminate.rng +0 -1
- data/lib/cpee/empty_workflow.rb +0 -28
- data/lib/cpee/handler_notifications.rb +0 -47
- data/lib/cpee/handler_properties.rb +0 -50
- data/lib/cpee/instantiation.rb +0 -369
- data/lib/cpee/processtransformation/bpel/Repository/booking.bpel +0 -125
- data/lib/cpee/processtransformation/bpel/Repository/booking.wsdl +0 -72
- data/lib/cpee/processtransformation/bpel/Repository/booking/airline.wsdl +0 -71
- data/lib/cpee/processtransformation/bpel/Repository/booking/hotel.wsdl +0 -64
- data/lib/cpee/processtransformation/bpel/Repository/booking/report.wsdl +0 -71
- data/lib/cpee/processtransformation/bpel/bpel2wee.rb +0 -34
- data/lib/cpee/processtransformation/bpel/bpelserver.ru +0 -64
- data/lib/cpee/processtransformation/bpel/bpelserver.xml +0 -70
- data/lib/cpee/processtransformation/bpel/lib/BPEL_Transform.rb +0 -367
- data/lib/cpee/processtransformation/bpmn2.rb +0 -297
- data/lib/cpee/processtransformation/cpee.rb +0 -119
- data/lib/cpee/processtransformation/structures.rb +0 -465
- data/lib/cpee/processtransformation/target.rb +0 -50
- data/log/azure.rb +0 -10
- data/log/azure_logger.rb +0 -136
- data/log/chain.xml +0 -27
- data/log/elasticsearch.rb +0 -15
- data/log/elasticsearch_logging.rb +0 -377
- data/log/legacy/test_es.rb +0 -26
- data/log/legacy/test_split.rb +0 -211
- data/log/log.xml +0 -13
- data/log/non_tamp.rb +0 -156
- data/log/sic.rb +0 -64
- data/log/template.xes_xml +0 -23
- data/log/template.xes_yaml +0 -28
- data/log/trace.yaml +0 -17717
- data/log/trace_sic.yaml +0 -18343
- data/log/xes_xml.rb +0 -121
- data/log/xes_yaml.rb +0 -96
- data/server/handlerwrappers/soap.rb +0 -146
- data/server/resources/properties.schema.active +0 -139
- data/server/resources/properties.schema.finished +0 -139
- data/server/resources/properties.schema.inactive +0 -136
- data/test/callback.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b71f98dc26ff6f1cfed69fc184651d7fd01175bee56c77df2f92df10a8db1a3e
|
|
4
|
+
data.tar.gz: 6b023b74f885fc91e81b1ad27040998eea19e7098cb899f3555e5c1c3e11cf38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd458b2163ef367cde6ac05fa4e178b93f0ad06d5a01cbfc44bf32d921e7675e667a13fd7956e19eac89b064b47908beb815f23d127201d3bf6ac5e7a081c7cd
|
|
7
|
+
data.tar.gz: f003121ae2244ba0e0608d56cc628f99a05a57e101fb806d1adce44225cc762fc7bb7354c51e3f2bee3bcabb46cfe6200fb7f6a0a3599b16c0a75ffd1f83c7d4
|
data/{FEATURES → FEATURES.md}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
CPEE Features
|
|
1
|
+
# CPEE Features
|
|
2
2
|
* The engine itself is a RESTful web service for simple integration into
|
|
3
3
|
websites and existing information systems.
|
|
4
4
|
* Instances can be created, started, stopped, and modified through simple HTTP
|
|
@@ -12,18 +12,19 @@ CPEE Features
|
|
|
12
12
|
* It provides better coverage of workflow patterns compared to Oracle BPELPM,
|
|
13
13
|
jBOSS jBPM, and Apache Ode.
|
|
14
14
|
|
|
15
|
-
CPEE Technical Details
|
|
15
|
+
# CPEE Technical Details
|
|
16
16
|
* Reuses an existing virtual machine for executing control flow
|
|
17
17
|
* Supports BPEL and other languages through transformation to a directly
|
|
18
18
|
executable DSL.
|
|
19
19
|
* The engine (named WEEL and available as a separate package) has a core size
|
|
20
|
-
of ~
|
|
21
|
-
*
|
|
20
|
+
of ~ 1110 LOC.
|
|
21
|
+
* Each instance runs in its own OS process, can be seperately monitored and killed.
|
|
22
|
+
* Uses ~ 50 MiB of RAM per instance (depending on storage backend and data
|
|
22
23
|
available in instance)
|
|
23
24
|
* Can utilize multiple threads per instance.
|
|
24
|
-
*
|
|
25
|
+
* Can be restarted in while instances are running.
|
|
25
26
|
|
|
26
|
-
CPEE Applied Benefits
|
|
27
|
+
# CPEE Applied Benefits
|
|
27
28
|
* Interprocess Synchronization as a Service
|
|
28
29
|
* Service Replacement (Repair) Service
|
|
29
30
|
* Plain HTML & JavaScript instance editor that allows to modify all aspects of
|
data/INSTALL.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TODO
|
data/{README → README.md}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
All code in this package is provided under the LGPL-3 license.
|
|
2
|
-
Please read the file COPYING.
|
|
2
|
+
Please read the file COPYING in the main directory.
|
|
3
3
|
|
|
4
|
-
Tested for MRI
|
|
4
|
+
Tested for MRI 2.6, 2.7
|
|
5
5
|
|
|
6
6
|
Searching for mem-leaks:
|
|
7
|
-
valgrind --num-callers=50 --error-limit=no --partial-loads-ok=yes --undef-value-errors=no ./server.rb -v start
|
|
7
|
+
valgrind --num-callers=50 --error-limit=no --partial-loads-ok=yes --undef-value-errors=no ./server/server.rb -v start
|
data/Rakefile
CHANGED
data/cockpit/index.html
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
<form id='fuckchrome'>
|
|
150
150
|
<input type='file' name='testsetfile' id='testsetfile'/>
|
|
151
151
|
</form>
|
|
152
|
-
<button title='a
|
|
152
|
+
<button title='a template includes various settings, subscriptions or a (partial) model' name="loadtestset">load template</button><button title='a testset includes various settings, subscriptions or a model' name="loadtestsetfile">load testset</button>
|
|
153
153
|
</div>
|
|
154
154
|
<div>
|
|
155
155
|
<input type='file' name='modelfile' id='modelfile'/>
|
|
@@ -182,15 +182,15 @@
|
|
|
182
182
|
<td>State:</td>
|
|
183
183
|
<td id='state'>
|
|
184
184
|
<span id="state_text"></span>
|
|
185
|
-
<span id="state_any">
|
|
185
|
+
<span id="state_any" style='display:none'>
|
|
186
186
|
<span> ⇒ </span>
|
|
187
|
-
<button name="state_start" title='start'>Start</button>
|
|
188
|
-
<button name="state_stop" title='stop'>Stop</button>
|
|
189
|
-
<span id="state_extended">
|
|
187
|
+
<button name="state_start" title='start' style='display:none'>Start</button>
|
|
188
|
+
<button name="state_stop" title='stop' style='display:none'>Stop</button>
|
|
189
|
+
<span id="state_extended" style='display:none'>
|
|
190
190
|
<span> / </span>
|
|
191
|
-
<button name="state_replay" title='replay'>Replay</button>
|
|
191
|
+
<button name="state_replay" title='replay' style='display:none'>Replay</button>
|
|
192
192
|
<span> / </span>
|
|
193
|
-
<button name="state_abandon" title='abandon'>Abandon</button>
|
|
193
|
+
<button name="state_abandon" title='abandon' style='display:none'>Abandon</button>
|
|
194
194
|
</span>
|
|
195
195
|
</span>
|
|
196
196
|
</td>
|
data/cockpit/js/details.js
CHANGED
|
@@ -48,27 +48,21 @@ function do_main_work() { //{{{
|
|
|
48
48
|
var orignode = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]');
|
|
49
49
|
var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
|
|
50
50
|
|
|
51
|
-
|
|
52
51
|
var url = $('body').attr('current-instance');
|
|
53
52
|
$('#main ui-tabbar ui-behind button').removeClass('highlight');
|
|
54
53
|
save['details'].set_checkpoint();
|
|
55
54
|
|
|
56
|
-
// pull out xml and add XMLNS
|
|
57
|
-
// sadly we have to serialze, add in string and then parse again
|
|
58
|
-
// as adding namespaces to nodes is not supported
|
|
59
|
-
// serialization and reparsing is faster and more robust than xslt option
|
|
60
55
|
var nnew = $(save['details'].save().documentElement);
|
|
61
56
|
nnew.attr('svg-id',svgid);
|
|
62
|
-
nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
|
|
63
57
|
|
|
64
58
|
if ($('*[svg-id]',node).length > 0) {
|
|
65
59
|
nnew.append(node.children().filter(function(){ return this.attributes['svg-id'] != undefined; }));
|
|
66
60
|
}
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
node.replaceWith(
|
|
62
|
+
if (node[0].namespaceURI == nnew.attr('xmlns')) { // remove xmlns when it is the same as in the parent node
|
|
63
|
+
nnew[0].removeAttribute('xmlns');
|
|
64
|
+
}
|
|
65
|
+
node.replaceWith(nnew);
|
|
72
66
|
|
|
73
67
|
var ttarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
|
|
74
68
|
var tnewnode = ttarget.parents('g.element[element-id]');
|
|
@@ -86,7 +80,10 @@ function do_main_work() { //{{{
|
|
|
86
80
|
var newtype = newnode.attr('element-type') + '_' + newnode.attr('element-endpoint');
|
|
87
81
|
var g = graphrealization.get_description();
|
|
88
82
|
save['graph'] = $X(g);
|
|
89
|
-
save['graph'].
|
|
83
|
+
save['graph'].removeAttr('svg-id');
|
|
84
|
+
save['graph'].removeAttr('svg-type');
|
|
85
|
+
save['graph'].removeAttr('svg-subtype');
|
|
86
|
+
save['graph'].removeAttr('svg-label');
|
|
90
87
|
|
|
91
88
|
if (newtype != origtype) {
|
|
92
89
|
manifestation.update_details(svgid);
|
|
@@ -94,11 +91,13 @@ function do_main_work() { //{{{
|
|
|
94
91
|
} else {
|
|
95
92
|
$.ajax({
|
|
96
93
|
type: "PUT",
|
|
97
|
-
url: url + "/properties/
|
|
94
|
+
url: url + "/properties/description/",
|
|
95
|
+
contentType: 'text/xml',
|
|
98
96
|
headers: {
|
|
99
|
-
|
|
97
|
+
'Content-ID': 'description',
|
|
98
|
+
'CPEE-Event-Source': myid
|
|
100
99
|
},
|
|
101
|
-
data:
|
|
100
|
+
data: desc.get_description()
|
|
102
101
|
});
|
|
103
102
|
adaptor_update();
|
|
104
103
|
format_instance_pos();
|
data/cockpit/js/instance.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var es;
|
|
2
2
|
var suspended_monitoring = false;
|
|
3
3
|
var myid = ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
|
|
4
4
|
var paths = '#dat_details input, #dat_details textarea, #dat_details select, #dat_details button, #dat_details [contenteditable], #dat_dataelements input, #dat_dataelements textarea, #dat_dataelements select, #dat_dataelements button, #dat_dataelements [contenteditable], #dat_endpoints input, #dat_endpoints textarea, #dat_endpoints select, #dat_endpoints button, #dat_endpoints [contenteditable], #dat_attributes input, #dat_attributes textarea, #dat_attributes select, #dat_attributes button, #dat_attributes [contenteditable]';
|
|
@@ -7,20 +7,32 @@ var subscription;
|
|
|
7
7
|
var subscription_state = 'less';
|
|
8
8
|
var graph_changed = new Event("graph:changed", {"bubbles":true, "cancelable":false});
|
|
9
9
|
var save = {};
|
|
10
|
-
save['state']= undefined;
|
|
11
|
-
save['dsl'] = undefined;
|
|
12
|
-
save['graph'] = undefined;
|
|
13
|
-
save['graph_theme'] = undefined;
|
|
14
|
-
save['graph_adaptor'] = undefined;
|
|
15
10
|
save['endpoints'] = undefined;
|
|
16
|
-
save['endpoints_cache'] = {};
|
|
17
|
-
save['endpoints_list'] = {};
|
|
18
11
|
save['dataelements'] = undefined;
|
|
19
12
|
save['attributes'] = undefined;
|
|
20
|
-
save['details'] = undefined;
|
|
21
|
-
save['details_target'] = undefined;
|
|
22
|
-
save['instance_pos'] = [];
|
|
23
13
|
var node_state = {};
|
|
14
|
+
|
|
15
|
+
function global_init() {
|
|
16
|
+
suspended_monitoring = false;
|
|
17
|
+
loading = false;
|
|
18
|
+
subscription = undefined;
|
|
19
|
+
subscription_state = 'less';
|
|
20
|
+
save['state']= undefined;
|
|
21
|
+
save['dsl'] = undefined;
|
|
22
|
+
save['activity_states'] = {}
|
|
23
|
+
save['graph'] = undefined;
|
|
24
|
+
save['graph_theme'] = undefined;
|
|
25
|
+
save['graph_adaptor'] = undefined;
|
|
26
|
+
save['endpoints_cache'] = {};
|
|
27
|
+
save['endpoints_list'] = {};
|
|
28
|
+
save['details'] = undefined;
|
|
29
|
+
save['details_target'] = undefined;
|
|
30
|
+
save['instance_pos'] = [];
|
|
31
|
+
node_state = {};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
global_init();
|
|
35
|
+
|
|
24
36
|
var sub_more = 'topic' + '=' + 'activity' + '&' +// {{{
|
|
25
37
|
'events' + '=' + 'calling,status,manipulating,failed,done' + '&' +
|
|
26
38
|
'topic' + '=' + 'activity' + '&' +
|
|
@@ -77,16 +89,16 @@ function cockpit() { //{{{
|
|
|
77
89
|
$("button[name=loadmodeltype]").click(function(e){new CustomMenu(e).menu($('#modeltypes'),load_modeltype, $("button[name=loadmodeltype]")); });
|
|
78
90
|
$("button[name=savetestsetfile]").click(function(){ save_testsetfile(); });
|
|
79
91
|
$("button[name=savesvgfile]").click(function(){ save_svgfile(); });
|
|
80
|
-
$("button[name=state_start]").click(function(){ $(this).attr("disabled","disabled");start_instance(); });
|
|
81
|
-
$("button[name=state_stop]").click(function(){ $(this).attr("disabled","disabled");stop_instance(); });
|
|
82
|
-
$("button[name=state_replay]").click(function(){ $(this).attr("disabled","disabled");replay_instance(); });
|
|
92
|
+
$("button[name=state_start]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");start_instance(); });
|
|
93
|
+
$("button[name=state_stop]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");stop_instance(); });
|
|
94
|
+
$("button[name=state_replay]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");replay_instance(); });
|
|
83
95
|
$("button[name=state_abandon]").click(function(){ aba_instance(); });
|
|
84
96
|
$("input[name=votecontinue]").click(check_subscription);
|
|
85
97
|
$("input[name=testsetfile]").change(load_testsetfile_after);
|
|
86
98
|
$("input[name=modelfile]").change(load_modelfile_after);
|
|
87
99
|
|
|
88
100
|
$.ajax({
|
|
89
|
-
url: $('body').attr('current-
|
|
101
|
+
url: $('body').attr('current-templates') + ".templates.xml",
|
|
90
102
|
dataType: 'xml',
|
|
91
103
|
success: function(res){
|
|
92
104
|
$('testset',res).each(function(){
|
|
@@ -145,7 +157,7 @@ function cockpit() { //{{{
|
|
|
145
157
|
}
|
|
146
158
|
});
|
|
147
159
|
$.ajax({
|
|
148
|
-
url: $('body').attr('current-
|
|
160
|
+
url: $('body').attr('current-templates') + ".transformations.xml",
|
|
149
161
|
dataType: 'xml',
|
|
150
162
|
success: function(res){
|
|
151
163
|
$('transformation',res).each(function(){
|
|
@@ -171,27 +183,18 @@ function check_subscription() { // {{{
|
|
|
171
183
|
if (num > 0 && subscription_state == 'less') {
|
|
172
184
|
$.ajax({
|
|
173
185
|
type: "PUT",
|
|
174
|
-
url: url + "/notifications/subscriptions/" + subscription,
|
|
175
|
-
data:
|
|
176
|
-
sub_more + '&' +
|
|
177
|
-
'message-uid' + '=' + 'xxx' + '&' +
|
|
178
|
-
'fingerprint-with-producer-secret' + '=' + 'xxx'
|
|
179
|
-
)
|
|
186
|
+
url: url + "/notifications/subscriptions/" + subscription + '/',
|
|
187
|
+
data: sub_more
|
|
180
188
|
});
|
|
181
189
|
subscription_state = 'more';
|
|
182
190
|
}
|
|
183
191
|
if (num == 0 && subscription_state == 'more') {
|
|
184
192
|
$.ajax({
|
|
185
193
|
type: "PUT",
|
|
186
|
-
url: url + "/notifications/subscriptions/" + subscription,
|
|
187
|
-
data:
|
|
188
|
-
sub_less + '&' +
|
|
189
|
-
'message-uid' + '=' + 'xxx' + '&' +
|
|
190
|
-
'fingerprint-with-producer-secret' + '=' + 'xxx'
|
|
191
|
-
)
|
|
194
|
+
url: url + "/notifications/subscriptions/" + subscription + '/',
|
|
195
|
+
data: sub_less
|
|
192
196
|
});
|
|
193
197
|
subscription_state = 'less';
|
|
194
|
-
format_visual_vote_clear();
|
|
195
198
|
}
|
|
196
199
|
}// }}}
|
|
197
200
|
|
|
@@ -246,18 +249,16 @@ function create_instance(base,name,load,exec) {// {{{
|
|
|
246
249
|
}
|
|
247
250
|
}// }}}
|
|
248
251
|
|
|
249
|
-
function
|
|
252
|
+
function sse() { //{{{
|
|
250
253
|
var url = $('body').attr('current-instance');
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
ws = new Socket(url.replace(/http/,'ws') + "/notifications/subscriptions/" + subscription + "/ws/");
|
|
254
|
-
ws.onopen = function() {
|
|
254
|
+
es = new EventSource(url + "/notifications/subscriptions/" + subscription + "/sse/");
|
|
255
|
+
es.onopen = function() {
|
|
255
256
|
append_to_log("monitoring", "opened", "");
|
|
256
257
|
};
|
|
257
|
-
|
|
258
|
-
data =
|
|
259
|
-
if (
|
|
260
|
-
switch(
|
|
258
|
+
es.onmessage = function(e) {
|
|
259
|
+
data = JSON.parse(e.data);
|
|
260
|
+
if (data['type'] == 'event') {
|
|
261
|
+
switch(data['topic']) {
|
|
261
262
|
case 'dataelements':
|
|
262
263
|
monitor_instance_values("dataelements");
|
|
263
264
|
break;
|
|
@@ -270,39 +271,34 @@ function websocket() { //{{{
|
|
|
270
271
|
case 'attributes':
|
|
271
272
|
monitor_instance_values("attributes");
|
|
272
273
|
monitor_instance_transformation();
|
|
273
|
-
if (!suspended_monitoring) { // or else it would load twice, because dsl changes also
|
|
274
|
+
if (!suspended_monitoring) { // or else it would load twice, because dsl changes also trigger
|
|
274
275
|
monitor_graph_change(true);
|
|
275
276
|
}
|
|
276
277
|
break;
|
|
277
278
|
case 'task':
|
|
278
279
|
if ($('#trackcolumn').length > 0) {
|
|
279
|
-
|
|
280
|
-
$('#trackcolumn').append($('<iframe src="track.html?monitor=' + details.received['CPEE-INSTANCE-URL'].replace(/\/*$/,'/') + '"></iframe>'));
|
|
280
|
+
$('#trackcolumn').append($('<iframe src="track.html?monitor=' + data.content.received['CPEE-INSTANCE-URL'].replace(/\/*$/,'/') + '"></iframe>'));
|
|
281
281
|
}
|
|
282
282
|
break;
|
|
283
283
|
case 'state':
|
|
284
|
-
monitor_instance_state_change(
|
|
284
|
+
monitor_instance_state_change(data['content']['state']);
|
|
285
285
|
break;
|
|
286
286
|
case 'position':
|
|
287
|
-
monitor_instance_pos_change(
|
|
288
|
-
break;
|
|
289
|
-
case 'transformation':
|
|
290
|
-
monitor_instance_transformation();
|
|
287
|
+
monitor_instance_pos_change(data['content']);
|
|
291
288
|
break;
|
|
292
289
|
case 'activity':
|
|
293
|
-
monitor_instance_running(
|
|
290
|
+
monitor_instance_running(data['content'],data['name']);
|
|
294
291
|
break;
|
|
295
292
|
}
|
|
296
|
-
append_to_log("event", $('event > topic',data).text() + "/" + $('event > event',data).text(), $('event > notification',data).text());
|
|
297
293
|
}
|
|
298
|
-
if (
|
|
299
|
-
|
|
300
|
-
append_to_log("vote", $('vote > topic',data).text() + "/" + $('vote > vote',data).text(), notification);
|
|
301
|
-
monitor_instance_vote_add(notification);
|
|
294
|
+
if (data['type'] == 'vote') {
|
|
295
|
+
monitor_instance_vote_add(data['content']);
|
|
302
296
|
}
|
|
297
|
+
append_to_log(data['type'], data['topic'] + '/' + data['name'], JSON.stringify(data['content']));
|
|
303
298
|
};
|
|
304
|
-
|
|
299
|
+
es.onerror = function() {
|
|
305
300
|
append_to_log("monitoring", "closed", "server down i assume.");
|
|
301
|
+
// setTimeout(sse,10000);
|
|
306
302
|
};
|
|
307
303
|
|
|
308
304
|
monitor_instance_values("dataelements");
|
|
@@ -314,6 +310,10 @@ function websocket() { //{{{
|
|
|
314
310
|
} //}}}
|
|
315
311
|
|
|
316
312
|
function monitor_instance(cin,rep,load,exec) {// {{{
|
|
313
|
+
global_init();
|
|
314
|
+
format_visual_clear();
|
|
315
|
+
format_visual_vote_clear();
|
|
316
|
+
|
|
317
317
|
$("body").attr('current-instance',sanitize_url(cin));
|
|
318
318
|
$("body").attr('current-resources',sanitize_url(rep));
|
|
319
319
|
|
|
@@ -327,7 +327,7 @@ function monitor_instance(cin,rep,load,exec) {// {{{
|
|
|
327
327
|
|
|
328
328
|
$.ajax({
|
|
329
329
|
type: "GET",
|
|
330
|
-
url: url
|
|
330
|
+
url: url,
|
|
331
331
|
success: function(res){
|
|
332
332
|
$("ui-tabbed.hidden, ui-rest.hidden").removeClass("hidden");
|
|
333
333
|
$("ui-resizehandle.hidden").removeClass("hidden");
|
|
@@ -347,21 +347,15 @@ function monitor_instance(cin,rep,load,exec) {// {{{
|
|
|
347
347
|
|
|
348
348
|
// Change url to return to current instance when reloading (because new subscription is made)
|
|
349
349
|
$("input[name=votecontinue]").prop( "checked", false );
|
|
350
|
-
subscription_state = 'less';
|
|
351
350
|
|
|
352
351
|
$.ajax({
|
|
353
352
|
type: "POST",
|
|
354
353
|
url: url + "/notifications/subscriptions/",
|
|
355
354
|
data: sub_less,
|
|
356
355
|
success: function(res){
|
|
357
|
-
|
|
358
|
-
$.each(res,function(a,b){
|
|
359
|
-
if (b[0] == 'key') {
|
|
360
|
-
subscription = b[1];
|
|
361
|
-
}
|
|
362
|
-
});
|
|
356
|
+
subscription = res;
|
|
363
357
|
append_to_log("monitoring", "id", subscription);
|
|
364
|
-
|
|
358
|
+
sse();
|
|
365
359
|
if (load || exec) {
|
|
366
360
|
load_testset(exec);
|
|
367
361
|
}
|
|
@@ -382,13 +376,13 @@ function monitor_instance_values(val) {// {{{
|
|
|
382
376
|
|
|
383
377
|
$.ajax({
|
|
384
378
|
type: "GET",
|
|
385
|
-
url: url + "/properties/
|
|
379
|
+
url: url + "/properties/" + val + "/",
|
|
386
380
|
success: function(res){
|
|
387
381
|
save[val].content(res);
|
|
388
382
|
if (val == "endpoints") {
|
|
389
383
|
save['endpoints_list'] = {};
|
|
390
384
|
var tmp = {};
|
|
391
|
-
$(res).find(" >
|
|
385
|
+
$(res).find(" > endpoints > *").each(function(k,v) {
|
|
392
386
|
save['endpoints_list'][v.localName] = v.lastChild.nodeValue;
|
|
393
387
|
$.ajax({
|
|
394
388
|
url: rep + encodeURIComponent($(v).text()),
|
|
@@ -429,7 +423,7 @@ function monitor_instance_values(val) {// {{{
|
|
|
429
423
|
});
|
|
430
424
|
});
|
|
431
425
|
} else if(val == "attributes") {
|
|
432
|
-
var text = $(" >
|
|
426
|
+
var text = $(" > attributes > info",res).text() + " (" + url.replace(/\/$/,'').split(/[\\/]/).pop() + ")";
|
|
433
427
|
$('#title').text(text);
|
|
434
428
|
document.title = text;
|
|
435
429
|
}
|
|
@@ -511,12 +505,21 @@ function adaptor_init(url,theme,dslx) { //{{{
|
|
|
511
505
|
graphrealization.notify = function(svgid) {
|
|
512
506
|
var g = graphrealization.get_description();
|
|
513
507
|
save['graph'] = $X(g);
|
|
514
|
-
save['graph'].
|
|
508
|
+
save['graph'].removeAttr('svg-id');
|
|
509
|
+
save['graph'].removeAttr('svg-type');
|
|
510
|
+
save['graph'].removeAttr('svg-subtype');
|
|
511
|
+
save['graph'].removeAttr('svg-label');
|
|
515
512
|
document.dispatchEvent(graph_changed);
|
|
516
513
|
$.ajax({
|
|
517
514
|
type: "PUT",
|
|
518
|
-
url: url + "/properties/
|
|
519
|
-
|
|
515
|
+
url: url + "/properties/description/",
|
|
516
|
+
contentType: 'text/xml',
|
|
517
|
+
headers: {
|
|
518
|
+
'Content-ID': 'description',
|
|
519
|
+
'CPEE-Event-Source': myid
|
|
520
|
+
},
|
|
521
|
+
data: g,
|
|
522
|
+
error: report_failure
|
|
520
523
|
});
|
|
521
524
|
adaptor_update();
|
|
522
525
|
manifestation.events.click(svgid);
|
|
@@ -544,14 +547,14 @@ function monitor_graph_change(force) { //{{{
|
|
|
544
547
|
var url = $('body').attr('current-instance');
|
|
545
548
|
$.ajax({
|
|
546
549
|
type: "GET",
|
|
547
|
-
url: url + "/properties/
|
|
550
|
+
url: url + "/properties/dslx/",
|
|
548
551
|
success: function(dslx){
|
|
549
|
-
if (force || !save['graph'] || (save['graph'] && save['graph'].serializePrettyXML() != $(dslx).serializePrettyXML())) {
|
|
552
|
+
if (force || !save['graph'] || (save['graph'] && save['graph'].serializePrettyXML() != $(dslx.documentElement).serializePrettyXML())) {
|
|
550
553
|
$.ajax({
|
|
551
554
|
type: "GET",
|
|
552
|
-
url: url + "/properties/
|
|
555
|
+
url: url + "/properties/attributes/theme/",
|
|
553
556
|
success: function(res){
|
|
554
|
-
adaptor_init(url
|
|
557
|
+
adaptor_init(url,res,dslx);
|
|
555
558
|
},
|
|
556
559
|
error: function() {
|
|
557
560
|
adaptor_init(url,'preset',dslx);
|
|
@@ -567,7 +570,7 @@ function monitor_instance_dsl() {// {{{
|
|
|
567
570
|
$.ajax({
|
|
568
571
|
type: "GET",
|
|
569
572
|
dataType: "text",
|
|
570
|
-
url: url + "/properties/
|
|
573
|
+
url: url + "/properties/dsl/",
|
|
571
574
|
success: function(res){
|
|
572
575
|
if (res != save['dsl']) {
|
|
573
576
|
save['dsl'] = res;
|
|
@@ -589,7 +592,7 @@ function monitor_instance_state() {// {{{
|
|
|
589
592
|
var url = $('body').attr('current-instance');
|
|
590
593
|
$.ajax({
|
|
591
594
|
type: "GET",
|
|
592
|
-
url: url + "/properties/
|
|
595
|
+
url: url + "/properties/state/",
|
|
593
596
|
dataType: "text",
|
|
594
597
|
success: function(res){
|
|
595
598
|
monitor_instance_state_change(res);
|
|
@@ -600,9 +603,9 @@ function monitor_instance_transformation() {// {{{
|
|
|
600
603
|
var url = $('body').attr('current-instance');
|
|
601
604
|
$.ajax({
|
|
602
605
|
type: "GET",
|
|
603
|
-
url: url + "/properties/
|
|
606
|
+
url: url + "/properties/attributes/modeltype",
|
|
604
607
|
success: function(res){
|
|
605
|
-
$("#currentmodel").text(
|
|
608
|
+
$("#currentmodel").text(res);
|
|
606
609
|
},
|
|
607
610
|
error: function() {
|
|
608
611
|
$("#currentmodel").text('???');
|
|
@@ -614,22 +617,30 @@ function monitor_instance_pos() {// {{{
|
|
|
614
617
|
var url = $('body').attr('current-instance');
|
|
615
618
|
$.ajax({
|
|
616
619
|
type: "GET",
|
|
617
|
-
url: url + "/properties/
|
|
620
|
+
url: url + "/properties/positions/",
|
|
618
621
|
success: function(res){
|
|
619
|
-
save['instance_pos'] = $("
|
|
622
|
+
save['instance_pos'] = $("positions > *",res);
|
|
620
623
|
format_visual_clear();
|
|
621
624
|
format_instance_pos();
|
|
622
625
|
}
|
|
623
626
|
});
|
|
624
627
|
}// }}}
|
|
625
628
|
|
|
626
|
-
function monitor_instance_running(
|
|
629
|
+
function monitor_instance_running(content,event) {// {{{
|
|
627
630
|
if (save['state'] == "stopping") return;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
format_visual_add(
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
if (event == "calling") {
|
|
632
|
+
save['activity_states'][content.activity_uuid] = true
|
|
633
|
+
format_visual_add(content.activity,"active")
|
|
634
|
+
}
|
|
635
|
+
if (event == "manipulating") {
|
|
636
|
+
if (!save['activity_states'][content.activity_uuid]) {
|
|
637
|
+
format_visual_add(content.activity,"active")
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
if (event == "done") {
|
|
641
|
+
delete save['activity_states'][content.activity_uuid];
|
|
642
|
+
format_visual_remove(content.activity,"active")
|
|
643
|
+
}
|
|
633
644
|
} // }}}
|
|
634
645
|
function monitor_instance_state_change(notification) { //{{{
|
|
635
646
|
if ($('#trackcolumn').length > 0) {
|
|
@@ -668,6 +679,12 @@ function monitor_instance_state_change(notification) { //{{{
|
|
|
668
679
|
$("button[name=state_stop]").show();
|
|
669
680
|
$("button[name=state_replay]").hide();
|
|
670
681
|
$("button[name=state_abandon]").hide();
|
|
682
|
+
} else {
|
|
683
|
+
$('#state_extended').hide();
|
|
684
|
+
$("button[name=state_start]").hide();
|
|
685
|
+
$("button[name=state_stop]").hide();
|
|
686
|
+
$("button[name=state_replay]").hide();
|
|
687
|
+
$("button[name=state_abandon]").hide();
|
|
671
688
|
}
|
|
672
689
|
|
|
673
690
|
// disable all input, also check themes
|
|
@@ -677,40 +694,39 @@ function monitor_instance_state_change(notification) { //{{{
|
|
|
677
694
|
save['graph_adaptor'].illustrator.get_elements().removeClass('marked');
|
|
678
695
|
}
|
|
679
696
|
|
|
680
|
-
if (notification
|
|
697
|
+
if (notification != "ready" && notification != "stopped" && notification != "running") {
|
|
681
698
|
$('.tabbehind button').hide();
|
|
682
699
|
$('#state_any').hide();
|
|
683
700
|
} else {
|
|
684
701
|
$('#parameters .tabbehind button').show();
|
|
702
|
+
$('#state_any').show();
|
|
685
703
|
}
|
|
686
704
|
|
|
687
705
|
$("#state_text").text(notification);
|
|
688
706
|
}
|
|
689
707
|
} //}}}
|
|
690
|
-
function monitor_instance_pos_change(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
$.each(parts['unmark'],function(a,b){
|
|
708
|
+
function monitor_instance_pos_change(content) {// {{{
|
|
709
|
+
if (content['unmark']) {
|
|
710
|
+
$.each(content['unmark'],function(a,b){
|
|
694
711
|
format_visual_remove(b.position,"passive")
|
|
695
712
|
});
|
|
696
713
|
}
|
|
697
|
-
if (
|
|
698
|
-
$.each(
|
|
699
|
-
format_visual_add(b.position,"passive")
|
|
714
|
+
if (content['at']) {
|
|
715
|
+
$.each(content['at'],function(a,b){
|
|
716
|
+
format_visual_add(b.position,"passive");
|
|
700
717
|
});
|
|
701
718
|
}
|
|
702
|
-
if (!
|
|
719
|
+
if (!content['at'] && !content['unmark'] && !content['after'] && !content['wait']) {
|
|
703
720
|
monitor_instance_pos();
|
|
704
721
|
}
|
|
705
722
|
} // }}}
|
|
706
723
|
|
|
707
|
-
function monitor_instance_vote_add(
|
|
708
|
-
var parts = JSON.parse(notification);
|
|
724
|
+
function monitor_instance_vote_add(parts) {// {{{
|
|
709
725
|
var ctv = $("#votes");
|
|
710
726
|
|
|
711
727
|
astr = '';
|
|
712
728
|
if ($("input[name=votecontinue]").is(':checked'))
|
|
713
|
-
astr += "<button id='vote_to_continue-" + parts.activity + "-" + parts.
|
|
729
|
+
astr += "<button id='vote_to_continue-" + parts.activity + "-" + parts.key + "' onclick='$(this).attr(\"disabled\",\"disabled\");monitor_instance_vote_remove(\"" + parts.activity + "\",\"" + parts.key + "\",\"true\");'>" + parts.activity + "</button>";
|
|
714
730
|
ctv.append(astr);
|
|
715
731
|
format_visual_add(parts.activity,"vote")
|
|
716
732
|
}// }}}
|
|
@@ -730,7 +746,7 @@ function start_instance() {// {{{
|
|
|
730
746
|
var url = $('body').attr('current-instance');
|
|
731
747
|
$.ajax({
|
|
732
748
|
type: "PUT",
|
|
733
|
-
url: url + "/properties/
|
|
749
|
+
url: url + "/properties/state",
|
|
734
750
|
data: ({value: "running"}),
|
|
735
751
|
error: report_failure
|
|
736
752
|
});
|
|
@@ -739,7 +755,7 @@ function replay_instance() {// {{{
|
|
|
739
755
|
var url = $('body').attr('current-instance');
|
|
740
756
|
$.ajax({
|
|
741
757
|
type: "PUT",
|
|
742
|
-
url: url + "/properties/
|
|
758
|
+
url: url + "/properties/state",
|
|
743
759
|
data: ({value: "replaying"}),
|
|
744
760
|
error: report_failure
|
|
745
761
|
});
|
|
@@ -749,7 +765,7 @@ function aba_instance() {// {{{
|
|
|
749
765
|
var url = $('body').attr('current-instance');
|
|
750
766
|
$.ajax({
|
|
751
767
|
type: "PUT",
|
|
752
|
-
url: url + "/properties/
|
|
768
|
+
url: url + "/properties/state",
|
|
753
769
|
data: ({value: "abandoned"}),
|
|
754
770
|
error: report_failure
|
|
755
771
|
});
|
|
@@ -758,7 +774,7 @@ function stop_instance() {// {{{
|
|
|
758
774
|
var url = $('body').attr('current-instance');
|
|
759
775
|
$.ajax({
|
|
760
776
|
type: "PUT",
|
|
761
|
-
url: url + "/properties/
|
|
777
|
+
url: url + "/properties/state",
|
|
762
778
|
data: ({value: "stopping"}),
|
|
763
779
|
error: report_failure
|
|
764
780
|
});
|
|
@@ -768,7 +784,7 @@ function save_testsetfile() {// {{{
|
|
|
768
784
|
var def = new $.Deferred();
|
|
769
785
|
def.done(function(name,testset) {
|
|
770
786
|
var ct = new Date();
|
|
771
|
-
$('#savetestsetfile').attr('download',name + '
|
|
787
|
+
$('#savetestsetfile').attr('download',name + '.xml');
|
|
772
788
|
$('#savetestsetfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(testset.serializePrettyXML()));
|
|
773
789
|
document.getElementById('savetestsetfile').click();
|
|
774
790
|
});
|
|
@@ -777,59 +793,30 @@ function save_testsetfile() {// {{{
|
|
|
777
793
|
|
|
778
794
|
function get_testset(deferred) {// {{{
|
|
779
795
|
var url = $('body').attr('current-instance');
|
|
780
|
-
var testset = $X('<testset/>');
|
|
781
796
|
|
|
782
797
|
$.ajax({
|
|
783
798
|
type: "GET",
|
|
784
|
-
url: url + "/properties/
|
|
799
|
+
url: url + "/properties/",
|
|
785
800
|
success: function(res){
|
|
786
|
-
var
|
|
787
|
-
|
|
788
|
-
testset.
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
type: "GET",
|
|
804
|
-
url: url + "/properties/values/dslx/",
|
|
805
|
-
success: function(res){
|
|
806
|
-
var pars = $X('<description/>');
|
|
807
|
-
pars.append($(res.documentElement));
|
|
808
|
-
testset.append(pars);
|
|
809
|
-
pars = $X("<transformation><description type='copy'/><dataelements type='none'/><endpoints type='none'/></transformation>");
|
|
810
|
-
testset.append(pars);
|
|
811
|
-
$.ajax({
|
|
812
|
-
type: "GET",
|
|
813
|
-
url: url + "/properties/values/attributes/",
|
|
814
|
-
success: function(res){
|
|
815
|
-
var name = $("value > info",res).text();
|
|
816
|
-
var pars = $X('<attributes/>');
|
|
817
|
-
pars.append($(res.documentElement).children());
|
|
818
|
-
pars.find('uuid').remove();
|
|
819
|
-
testset.append(pars);
|
|
820
|
-
deferred.resolve(name,testset);
|
|
821
|
-
},
|
|
822
|
-
error: function() { deferred.reject(); report_failure(); }
|
|
823
|
-
});
|
|
824
|
-
},
|
|
825
|
-
error: function() { deferred.reject(); report_failure(); }
|
|
826
|
-
});
|
|
827
|
-
},
|
|
828
|
-
error: function() { deferred.reject(); report_failure(); }
|
|
829
|
-
});
|
|
830
|
-
},
|
|
831
|
-
error: function() { deferred.reject(); report_failure(); }
|
|
801
|
+
var testset = $X('<testset xmlns="http://cpee.org/ns/properties/2.0"/>');
|
|
802
|
+
testset.append($(res.documentElement).children());
|
|
803
|
+
$('testset > state',testset).remove();
|
|
804
|
+
$('testset > status',testset).remove();
|
|
805
|
+
$('testset > positions',testset).remove();
|
|
806
|
+
$('testset > dsl',testset).remove();
|
|
807
|
+
$('testset > description > *',testset).remove();
|
|
808
|
+
$('testset > description',testset).append($('testset > dslx',testset).children());
|
|
809
|
+
$('testset > transformation',testset).remove();
|
|
810
|
+
$('testset > dsl',testset).remove();
|
|
811
|
+
$('testset > dslx',testset).remove();
|
|
812
|
+
testset.append($X('<transformation xmlns="http://cpee.org/ns/properties/2.0"><description type="copy"/><dataelements type="none"/><endpoints type="none"/></transformation>'));
|
|
813
|
+
var name = $('testset > attributes > info',testset).text();
|
|
814
|
+
$('[xmlns]',testset).each((idx,ele) => {
|
|
815
|
+
if (ele.parentNode.namespaceURI == ele.getAttribute('xmlns')) {
|
|
816
|
+
ele.removeAttribute('xmlns');
|
|
817
|
+
}
|
|
832
818
|
});
|
|
819
|
+
deferred.resolve(name,testset);
|
|
833
820
|
},
|
|
834
821
|
error: function() { deferred.reject(); report_failure(); }
|
|
835
822
|
});
|
|
@@ -870,7 +857,7 @@ function save_svgfile() {// {{{
|
|
|
870
857
|
});
|
|
871
858
|
$.ajax({
|
|
872
859
|
type: "GET",
|
|
873
|
-
url: url + "/properties/
|
|
860
|
+
url: url + "/properties/attributes/info/",
|
|
874
861
|
success: function(res){
|
|
875
862
|
var name = $(res.documentElement).text();
|
|
876
863
|
|
|
@@ -889,6 +876,15 @@ async function set_testset(testset,exec) {// {{{
|
|
|
889
876
|
|
|
890
877
|
var promises = [];
|
|
891
878
|
|
|
879
|
+
var tset = $X('<properties xmlns="http://cpee.org/ns/properties/2.0"/>');
|
|
880
|
+
tset.append($("testset > handlerwrapper",testset));
|
|
881
|
+
tset.append($("testset > positions",testset));
|
|
882
|
+
tset.append($("testset > dataelements",testset));
|
|
883
|
+
tset.append($("testset > endpoints",testset));
|
|
884
|
+
tset.append($("testset > attributes",testset));
|
|
885
|
+
tset.append($("testset > description",testset));
|
|
886
|
+
tset.append($("testset > transformation",testset));
|
|
887
|
+
|
|
892
888
|
promises.push(
|
|
893
889
|
$.ajax({
|
|
894
890
|
type: "GET",
|
|
@@ -903,44 +899,32 @@ async function set_testset(testset,exec) {// {{{
|
|
|
903
899
|
});
|
|
904
900
|
await load_testset_handlers(url,testset,vals);
|
|
905
901
|
})
|
|
906
|
-
)
|
|
907
|
-
promises.push(
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
type: "PUT",
|
|
921
|
-
url: url + "/properties/values/transformation",
|
|
922
|
-
data: ({content: val}),
|
|
923
|
-
error: report_failure
|
|
924
|
-
}).then(async function(){
|
|
925
|
-
await load_testset_des(url,testset);
|
|
926
|
-
})
|
|
927
|
-
);
|
|
928
|
-
} else {
|
|
929
|
-
promises.push(load_testset_des(url,testset));
|
|
930
|
-
}
|
|
902
|
+
);
|
|
903
|
+
promises.push(
|
|
904
|
+
$.ajax({
|
|
905
|
+
type: 'PATCH',
|
|
906
|
+
url: url + "/properties/",
|
|
907
|
+
contentType: 'text/xml',
|
|
908
|
+
headers: {
|
|
909
|
+
'Content-ID': 'properties',
|
|
910
|
+
'CPEE-Event-Source': myid
|
|
911
|
+
},
|
|
912
|
+
data: tset.serializeXML(),
|
|
913
|
+
error: report_failure
|
|
914
|
+
})
|
|
915
|
+
);
|
|
931
916
|
|
|
932
|
-
promises.push(load_testset_hw(url,testset));
|
|
933
917
|
await Promise.all(promises);
|
|
934
918
|
suspended_monitoring = false;
|
|
935
919
|
|
|
936
920
|
$.ajax({
|
|
937
921
|
type: "GET",
|
|
938
|
-
url: url + "/properties/
|
|
922
|
+
url: url + "/properties/state/",
|
|
939
923
|
dataType: "text",
|
|
940
924
|
success: function(res){
|
|
941
925
|
$.ajax({
|
|
942
926
|
type: "PUT",
|
|
943
|
-
url: url + "/properties/
|
|
927
|
+
url: url + "/properties/state",
|
|
944
928
|
data: ({value: res}),
|
|
945
929
|
error: report_failure,
|
|
946
930
|
success: function(res){
|
|
@@ -1004,7 +988,7 @@ function load_testset(exec) {// {{{
|
|
|
1004
988
|
var name = $("#templates div.menuitem[data-selected=selected]").text();
|
|
1005
989
|
var url;
|
|
1006
990
|
if (name) {
|
|
1007
|
-
url = $('body').attr('current-
|
|
991
|
+
url = $('body').attr('current-templates') + name + ".xml";
|
|
1008
992
|
} else {
|
|
1009
993
|
if ($('body').attr('load-testset').length > 0) {
|
|
1010
994
|
url = $('body').attr('load-testset');
|
|
@@ -1038,11 +1022,11 @@ function load_modeltype() {// {{{
|
|
|
1038
1022
|
$.ajax({
|
|
1039
1023
|
cache: false,
|
|
1040
1024
|
dataType: 'xml',
|
|
1041
|
-
url: $('body').attr('current-
|
|
1025
|
+
url: $('body').attr('current-templates') + "." + name + ".xml",
|
|
1042
1026
|
success: function(res){
|
|
1043
1027
|
$.ajax({
|
|
1044
1028
|
type: "PUT",
|
|
1045
|
-
url: url + "/properties/
|
|
1029
|
+
url: url + "/properties/attributes/modeltype",
|
|
1046
1030
|
data: ({value: name}),
|
|
1047
1031
|
success: function(){
|
|
1048
1032
|
set_testset(res,false);
|
|
@@ -1057,116 +1041,25 @@ function load_modeltype() {// {{{
|
|
|
1057
1041
|
}// }}}
|
|
1058
1042
|
|
|
1059
1043
|
async function load_des(url,model) { //{{{
|
|
1060
|
-
model = model.replace(/<\?[^\?]+\?>/,'');
|
|
1061
|
-
var val = "<content>" + model + "</content>";
|
|
1062
1044
|
return $.ajax({
|
|
1063
1045
|
type: "PUT",
|
|
1064
|
-
url: url + "/properties/
|
|
1065
|
-
|
|
1046
|
+
url: url + "/properties/description/",
|
|
1047
|
+
contentType: 'text/xml',
|
|
1048
|
+
headers: {
|
|
1049
|
+
'Content-ID': 'description',
|
|
1050
|
+
'CPEE-Event-Source': myid
|
|
1051
|
+
},
|
|
1052
|
+
data: model,
|
|
1066
1053
|
error: report_failure
|
|
1067
1054
|
});
|
|
1068
1055
|
} //}}}
|
|
1069
|
-
|
|
1070
|
-
async function load_testset_des(url,testset) {// {{{
|
|
1071
|
-
if ($("testset > description",testset).length == 0) { return; }
|
|
1072
|
-
var ser = '';
|
|
1073
|
-
$("testset > description > *",testset).each(function(){
|
|
1074
|
-
ser += $(this).serializeXML() + "\n";
|
|
1075
|
-
});
|
|
1076
|
-
return load_des(url,ser);
|
|
1077
|
-
} // }}}
|
|
1078
|
-
async function load_testset_hw(url,testset) {// {{{
|
|
1079
|
-
var promises = [];
|
|
1080
|
-
$("testset > handlerwrapper",testset).each(function(){
|
|
1081
|
-
var val = $(this).text();
|
|
1082
|
-
promises.push(
|
|
1083
|
-
$.ajax({
|
|
1084
|
-
type: "PUT",
|
|
1085
|
-
url: url + "/properties/values/handlerwrapper",
|
|
1086
|
-
data: ({value: val}),
|
|
1087
|
-
error: report_failure
|
|
1088
|
-
})
|
|
1089
|
-
);
|
|
1090
|
-
});
|
|
1091
|
-
return Promise.all(promises);
|
|
1092
|
-
} // }}}
|
|
1093
|
-
async function load_testset_dataelements(url,testset) {// {{{
|
|
1094
|
-
if ($("testset > dataelements",testset).length == 0) { return; }
|
|
1095
|
-
var ser = '';
|
|
1096
|
-
$("testset > dataelements > *",testset).each(function(){
|
|
1097
|
-
ser += $(this).serializeXML() + "\n";
|
|
1098
|
-
});
|
|
1099
|
-
var val = "<content>" + ser + "</content>";
|
|
1100
|
-
return $.ajax({
|
|
1101
|
-
type: "PUT",
|
|
1102
|
-
url: url + "/properties/values/dataelements",
|
|
1103
|
-
data: ({content: val}),
|
|
1104
|
-
error: report_failure
|
|
1105
|
-
});
|
|
1106
|
-
}// }}}
|
|
1107
|
-
async function load_testset_attributes(url,testset) {// {{{
|
|
1108
|
-
var promises = [];
|
|
1109
|
-
if ($("testset > attributes",testset).length == 0) { return; }
|
|
1110
|
-
var ser = '';
|
|
1111
|
-
$.ajax({
|
|
1112
|
-
type: "GET",
|
|
1113
|
-
url: url + "/properties/values/attributes/uuid",
|
|
1114
|
-
success: function(res){
|
|
1115
|
-
var uuid = $X('<uuid xmlns="http://riddl.org/ns/common-patterns/properties/1.0"/>');
|
|
1116
|
-
uuid.text($('value',res).text());
|
|
1117
|
-
$("testset > attributes",testset).prepend(uuid);
|
|
1118
|
-
$("testset > attributes > *",testset).each(function(){
|
|
1119
|
-
ser += $(this).serializeXML() + "\n";
|
|
1120
|
-
});
|
|
1121
|
-
var val = "<content>" + ser + "</content>";
|
|
1122
|
-
promises.push(
|
|
1123
|
-
$.ajax({
|
|
1124
|
-
type: "PUT",
|
|
1125
|
-
url: url + "/properties/values/attributes",
|
|
1126
|
-
data: ({content: val}),
|
|
1127
|
-
error: report_failure
|
|
1128
|
-
})
|
|
1129
|
-
);
|
|
1130
|
-
}
|
|
1131
|
-
});
|
|
1132
|
-
return Promise.all(promises);
|
|
1133
|
-
}// }}}
|
|
1134
|
-
async function load_testset_endpoints(url,testset) {// {{{
|
|
1135
|
-
if ($("testset > endpoints",testset).length == 0) { return; }
|
|
1136
|
-
var ser = '';
|
|
1137
|
-
$("testset > endpoints > *",testset).each(function(){
|
|
1138
|
-
ser += $(this).serializeXML() + "\n";
|
|
1139
|
-
});
|
|
1140
|
-
var val = "<content>" + ser + "</content>";
|
|
1141
|
-
return $.ajax({
|
|
1142
|
-
type: "PUT",
|
|
1143
|
-
url: url + "/properties/values/endpoints/",
|
|
1144
|
-
data: ({content: val}),
|
|
1145
|
-
error: report_failure
|
|
1146
|
-
});
|
|
1147
|
-
}// }}}
|
|
1148
|
-
async function load_testset_pos(url,testset) {// {{{
|
|
1149
|
-
if ($("testset > positions",testset).length == 0) { return; }
|
|
1150
|
-
var ser = '';
|
|
1151
|
-
$("testset > positions > *",testset).each(function(){
|
|
1152
|
-
ser += $(this).serializeXML() + "\n";
|
|
1153
|
-
});
|
|
1154
|
-
var val = "<content>" + ser + "</content>";
|
|
1155
|
-
return $.ajax({
|
|
1156
|
-
type: "PUT",
|
|
1157
|
-
url: url + "/properties/values/positions/",
|
|
1158
|
-
data: ({content: val}),
|
|
1159
|
-
success: monitor_instance_pos,
|
|
1160
|
-
error: report_failure
|
|
1161
|
-
});
|
|
1162
|
-
}// }}}
|
|
1163
1056
|
async function load_testset_handlers(url,testset,vals) {// {{{
|
|
1164
1057
|
var promises = [];
|
|
1165
1058
|
$("testset > handlers > *",testset).each(async function(){
|
|
1166
1059
|
var han = this;
|
|
1167
1060
|
var suburl = $(han).attr('url');
|
|
1168
1061
|
if ($.inArray(suburl,vals) == -1) {
|
|
1169
|
-
var inp = "url="+encodeURIComponent(suburl);
|
|
1062
|
+
var inp = "url="+encodeURIComponent(suburl).replace(/~/,'%7E');
|
|
1170
1063
|
$("*",han).each(function(){
|
|
1171
1064
|
inp += "&topic=" + $(this).attr('topic');
|
|
1172
1065
|
inp += "&" + this.nodeName + "=" + $(this).text();
|
|
@@ -1197,6 +1090,8 @@ function format_visual_remove(what,cls) {//{{{
|
|
|
1197
1090
|
if (node_state[what][cls] == undefined)
|
|
1198
1091
|
node_state[what][cls] = 0;
|
|
1199
1092
|
node_state[what][cls] -= 1;
|
|
1093
|
+
if (node_state[what][cls] < 0)
|
|
1094
|
+
node_state[what][cls] = 0;
|
|
1200
1095
|
format_visual_set(what);
|
|
1201
1096
|
}//}}}
|
|
1202
1097
|
|
|
@@ -1280,6 +1175,7 @@ function format_visual_clear() {//{{{
|
|
|
1280
1175
|
}
|
|
1281
1176
|
});
|
|
1282
1177
|
$('#votes').empty();
|
|
1178
|
+
|
|
1283
1179
|
}//}}}
|
|
1284
1180
|
function format_visual_vote_clear() {//{{{
|
|
1285
1181
|
node_state = {};
|
|
@@ -1371,7 +1267,13 @@ function append_to_log(what,type,message) {//{{{
|
|
|
1371
1267
|
message = message.replace(/:\"/g,': "');
|
|
1372
1268
|
message = message.replace(/:\{/g,': {');
|
|
1373
1269
|
message = message.replace(/:\[/g,': [');
|
|
1374
|
-
$("#dat_log").
|
|
1270
|
+
$("#dat_log").prepend("<tr><td class='fixed'><a title=\"" + d.strftime("[%d/%b/%Y %H:%M:%S]") + "\">D</a></td><td class='fixed'> - </td><td class='fixed'><a title=\"" + what + "\">T</a></td><td class='fixed'> - </td><td class='fixed'>" + type + "</td><td class='fixed'> - </td><td class='long'>" + message + "</td></tr>");
|
|
1271
|
+
var dle = $("#dat_log").children();
|
|
1272
|
+
if (dle.length > 100) {
|
|
1273
|
+
dle.slice(100).each((k,ele) => {
|
|
1274
|
+
$(ele).remove();
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1375
1277
|
}//}}}
|
|
1376
1278
|
|
|
1377
1279
|
function report_failure(){}
|
|
@@ -1387,11 +1289,16 @@ function ui_pos(e,bl) {
|
|
|
1387
1289
|
$(coll).each(function(k,ele){
|
|
1388
1290
|
vals += "<" + ele + ">at</" + ele + ">";
|
|
1389
1291
|
});
|
|
1390
|
-
vals = "<
|
|
1292
|
+
vals = "<positions xmlns='http://cpee.org/ns/properties/2.0'>" + vals + "</positions>";
|
|
1391
1293
|
$.ajax({
|
|
1392
1294
|
type: "PUT",
|
|
1393
|
-
url: url + "/properties/
|
|
1394
|
-
|
|
1295
|
+
url: url + "/properties/positions/",
|
|
1296
|
+
contentType: 'application/xml',
|
|
1297
|
+
headers: {
|
|
1298
|
+
'Content-ID': 'positions',
|
|
1299
|
+
'CPEE-Event-Source': myid
|
|
1300
|
+
},
|
|
1301
|
+
data: vals,
|
|
1395
1302
|
success: monitor_instance_pos,
|
|
1396
1303
|
error: report_failure
|
|
1397
1304
|
});
|