cpee 1.5.19 → 1.5.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/css/model.css +24 -0
- data/cockpit/css/ui.css +25 -0
- data/cockpit/index.html +6 -6
- data/cockpit/js/details.js +70 -52
- data/cockpit/js/instance.js +61 -17
- data/cockpit/js/model.js +41 -0
- data/cockpit/js/ui.js +3 -0
- data/cockpit/model.html +191 -0
- data/cockpit/themes/compact/rngs/alternative.rng +1 -0
- data/cockpit/themes/compact/rngs/call.rng +111 -0
- data/cockpit/themes/compact/rngs/callmanipulate.rng +134 -0
- data/cockpit/themes/compact/rngs/choose.rng +1 -0
- data/cockpit/themes/compact/rngs/critical.rng +1 -0
- data/cockpit/themes/compact/rngs/escape.rng +1 -0
- data/cockpit/themes/compact/rngs/group.rng +1 -0
- data/cockpit/themes/compact/rngs/loop.rng +1 -0
- data/cockpit/themes/compact/rngs/manipulate.rng +1 -0
- data/cockpit/themes/compact/rngs/otherwise.rng +1 -0
- data/cockpit/themes/compact/rngs/parallel.rng +1 -0
- data/cockpit/themes/compact/rngs/parallel_branch.rng +1 -0
- data/cockpit/themes/compact/rngs/scripts.rng +24 -0
- data/cockpit/themes/compact/rngs/stop.rng +1 -0
- data/cockpit/themes/compact/rngs/terminate.rng +1 -0
- data/cockpit/themes/compact/symbols/alternative.svg +5 -0
- data/cockpit/themes/compact/symbols/arrow.svg +3 -0
- data/cockpit/themes/compact/symbols/call.svg +6 -0
- data/cockpit/themes/compact/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/compact/symbols/choose.svg +5 -0
- data/cockpit/themes/compact/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/compact/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/compact/symbols/complex.svg +8 -0
- data/cockpit/themes/compact/symbols/critical.svg +4 -0
- data/cockpit/themes/compact/symbols/end.svg +3 -0
- data/cockpit/themes/compact/symbols/escape.svg +5 -0
- data/cockpit/themes/compact/symbols/event_end.svg +3 -0
- data/cockpit/themes/compact/symbols/loop.svg +5 -0
- data/cockpit/themes/compact/symbols/manipulate.svg +4 -0
- data/cockpit/themes/compact/symbols/otherwise.svg +5 -0
- data/cockpit/themes/compact/symbols/parallel.svg +5 -0
- data/cockpit/themes/compact/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/compact/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/compact/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/compact/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/compact/symbols/scripts.svg +4 -0
- data/cockpit/themes/compact/symbols/start.svg +3 -0
- data/cockpit/themes/compact/symbols/stop.svg +5 -0
- data/cockpit/themes/compact/symbols/terminate.svg +4 -0
- data/cockpit/themes/compact/theme.js +30 -18
- data/cockpit/themes/default/rngs/callmanipulate.rng +5 -0
- data/cockpit/themes/default/theme.js +97 -57
- data/cockpit/themes/extended/rngs/alternative.rng +1 -0
- data/cockpit/themes/extended/rngs/call.rng +111 -0
- data/cockpit/themes/extended/rngs/callmanipulate.rng +134 -0
- data/cockpit/themes/extended/rngs/choose.rng +1 -0
- data/cockpit/themes/extended/rngs/critical.rng +1 -0
- data/cockpit/themes/extended/rngs/escape.rng +1 -0
- data/cockpit/themes/extended/rngs/group.rng +1 -0
- data/cockpit/themes/extended/rngs/loop.rng +1 -0
- data/cockpit/themes/extended/rngs/manipulate.rng +1 -0
- data/cockpit/themes/extended/rngs/otherwise.rng +1 -0
- data/cockpit/themes/extended/rngs/parallel.rng +1 -0
- data/cockpit/themes/extended/rngs/parallel_branch.rng +1 -0
- data/cockpit/themes/extended/rngs/scripts.rng +24 -0
- data/cockpit/themes/extended/rngs/stop.rng +1 -0
- data/cockpit/themes/extended/rngs/terminate.rng +1 -0
- data/cockpit/themes/extended/symbols/alternative.svg +5 -0
- data/cockpit/themes/extended/symbols/arrow.svg +3 -0
- data/cockpit/themes/extended/symbols/call.svg +6 -0
- data/cockpit/themes/extended/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/extended/symbols/choose.svg +5 -0
- data/cockpit/themes/extended/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/extended/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/extended/symbols/complex.svg +8 -0
- data/cockpit/themes/extended/symbols/critical.svg +4 -0
- data/cockpit/themes/extended/symbols/end.svg +3 -0
- data/cockpit/themes/extended/symbols/escape.svg +5 -0
- data/cockpit/themes/extended/symbols/event_end.svg +3 -0
- data/cockpit/themes/extended/symbols/loop.svg +5 -0
- data/cockpit/themes/extended/symbols/manipulate.svg +4 -0
- data/cockpit/themes/extended/symbols/otherwise.svg +5 -0
- data/cockpit/themes/extended/symbols/parallel.svg +5 -0
- data/cockpit/themes/extended/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/extended/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/extended/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/extended/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/extended/symbols/scripts.svg +4 -0
- data/cockpit/themes/extended/symbols/start.svg +3 -0
- data/cockpit/themes/extended/symbols/stop.svg +5 -0
- data/cockpit/themes/extended/symbols/terminate.svg +4 -0
- data/cockpit/themes/extended/theme.js +30 -18
- data/cockpit/themes/labels/rngs/alternative.rng +25 -0
- data/cockpit/themes/labels/rngs/call.rng +81 -0
- data/cockpit/themes/labels/rngs/callmanipulate.rng +101 -0
- data/cockpit/themes/labels/rngs/choose.rng +12 -0
- data/cockpit/themes/labels/rngs/critical.rng +5 -0
- data/cockpit/themes/labels/rngs/escape.rng +1 -0
- data/cockpit/themes/labels/rngs/finalize.rng +6 -0
- data/cockpit/themes/labels/rngs/group.rng +3 -0
- data/cockpit/themes/labels/rngs/loop.rng +22 -0
- data/cockpit/themes/labels/rngs/manipulate.rng +9 -0
- data/cockpit/themes/labels/rngs/otherwise.rng +22 -0
- data/cockpit/themes/labels/rngs/parallel.rng +13 -0
- data/cockpit/themes/labels/rngs/parallel_branch.rng +8 -0
- data/cockpit/themes/labels/rngs/stop.rng +5 -0
- data/cockpit/themes/labels/rngs/terminate.rng +1 -0
- data/cockpit/themes/labels/rngs/update.rng +6 -0
- data/cockpit/themes/labels/symbols/alternative.svg +5 -0
- data/cockpit/themes/labels/symbols/arrow.svg +3 -0
- data/cockpit/themes/labels/symbols/call.svg +6 -0
- data/cockpit/themes/labels/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/labels/symbols/choose.svg +5 -0
- data/cockpit/themes/labels/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/labels/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/labels/symbols/complex.svg +8 -0
- data/cockpit/themes/labels/symbols/critical.svg +4 -0
- data/cockpit/themes/labels/symbols/end.svg +3 -0
- data/cockpit/themes/labels/symbols/escape.svg +5 -0
- data/cockpit/themes/labels/symbols/event_end.svg +3 -0
- data/cockpit/themes/labels/symbols/loop.svg +5 -0
- data/cockpit/themes/labels/symbols/manipulate.svg +4 -0
- data/cockpit/themes/labels/symbols/otherwise.svg +5 -0
- data/cockpit/themes/labels/symbols/parallel.svg +5 -0
- data/cockpit/themes/labels/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/labels/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/labels/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/labels/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/labels/symbols/scripts.svg +4 -0
- data/cockpit/themes/labels/symbols/start.svg +3 -0
- data/cockpit/themes/labels/symbols/stop.svg +5 -0
- data/cockpit/themes/labels/symbols/terminate.svg +4 -0
- data/cockpit/themes/model/rngs/alternative.rng +1 -0
- data/cockpit/themes/model/rngs/call.rng +62 -0
- data/cockpit/themes/model/rngs/callmanipulate.rng +67 -0
- data/cockpit/themes/model/rngs/choose.rng +1 -0
- data/cockpit/themes/model/rngs/critical.rng +1 -0
- data/cockpit/themes/model/rngs/escape.rng +1 -0
- data/cockpit/themes/model/rngs/group.rng +1 -0
- data/cockpit/themes/model/rngs/loop.rng +1 -0
- data/cockpit/themes/model/rngs/manipulate.rng +1 -0
- data/cockpit/themes/model/rngs/otherwise.rng +1 -0
- data/cockpit/themes/model/rngs/parallel.rng +1 -0
- data/cockpit/themes/model/rngs/parallel_branch.rng +1 -0
- data/cockpit/themes/model/rngs/scripts.rng +8 -0
- data/cockpit/themes/model/rngs/stop.rng +1 -0
- data/cockpit/themes/model/rngs/terminate.rng +1 -0
- data/cockpit/themes/model/symbols/alternative.svg +5 -0
- data/cockpit/themes/model/symbols/arrow.svg +3 -0
- data/cockpit/themes/model/symbols/call.svg +6 -0
- data/cockpit/themes/model/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/model/symbols/choose.svg +5 -0
- data/cockpit/themes/model/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/model/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/model/symbols/complex.svg +8 -0
- data/cockpit/themes/model/symbols/critical.svg +4 -0
- data/cockpit/themes/model/symbols/end.svg +3 -0
- data/cockpit/themes/model/symbols/escape.svg +5 -0
- data/cockpit/themes/model/symbols/event_end.svg +3 -0
- data/cockpit/themes/model/symbols/loop.svg +5 -0
- data/cockpit/themes/model/symbols/manipulate.svg +4 -0
- data/cockpit/themes/model/symbols/otherwise.svg +5 -0
- data/cockpit/themes/model/symbols/parallel.svg +5 -0
- data/cockpit/themes/model/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/model/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/model/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/model/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/model/symbols/scripts.svg +4 -0
- data/cockpit/themes/model/symbols/start.svg +3 -0
- data/cockpit/themes/model/symbols/stop.svg +5 -0
- data/cockpit/themes/model/symbols/terminate.svg +4 -0
- data/cockpit/themes/model/theme.js +1267 -0
- data/cockpit/themes/packed/rngs/alternative.rng +1 -0
- data/cockpit/themes/packed/rngs/call.rng +111 -0
- data/cockpit/themes/packed/rngs/callmanipulate.rng +134 -0
- data/cockpit/themes/packed/rngs/choose.rng +1 -0
- data/cockpit/themes/packed/rngs/critical.rng +1 -0
- data/cockpit/themes/packed/rngs/escape.rng +1 -0
- data/cockpit/themes/packed/rngs/group.rng +1 -0
- data/cockpit/themes/packed/rngs/loop.rng +1 -0
- data/cockpit/themes/packed/rngs/manipulate.rng +1 -0
- data/cockpit/themes/packed/rngs/otherwise.rng +1 -0
- data/cockpit/themes/packed/rngs/parallel.rng +1 -0
- data/cockpit/themes/packed/rngs/parallel_branch.rng +1 -0
- data/cockpit/themes/packed/rngs/scripts.rng +24 -0
- data/cockpit/themes/packed/rngs/stop.rng +1 -0
- data/cockpit/themes/packed/rngs/terminate.rng +1 -0
- data/cockpit/themes/packed/symbols/alternative.svg +5 -0
- data/cockpit/themes/packed/symbols/arrow.svg +3 -0
- data/cockpit/themes/packed/symbols/call.svg +6 -0
- data/cockpit/themes/packed/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/packed/symbols/choose.svg +5 -0
- data/cockpit/themes/packed/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/packed/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/packed/symbols/complex.svg +8 -0
- data/cockpit/themes/packed/symbols/critical.svg +4 -0
- data/cockpit/themes/packed/symbols/end.svg +3 -0
- data/cockpit/themes/packed/symbols/escape.svg +5 -0
- data/cockpit/themes/packed/symbols/event_end.svg +3 -0
- data/cockpit/themes/packed/symbols/loop.svg +5 -0
- data/cockpit/themes/packed/symbols/manipulate.svg +4 -0
- data/cockpit/themes/packed/symbols/otherwise.svg +5 -0
- data/cockpit/themes/packed/symbols/parallel.svg +5 -0
- data/cockpit/themes/packed/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/packed/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/packed/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/packed/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/packed/symbols/scripts.svg +4 -0
- data/cockpit/themes/packed/symbols/start.svg +3 -0
- data/cockpit/themes/packed/symbols/stop.svg +5 -0
- data/cockpit/themes/packed/symbols/terminate.svg +4 -0
- data/cockpit/themes/packed/theme.js +30 -18
- data/cockpit/themes/preset/rngs/call.rng +0 -10
- data/cockpit/themes/preset/rngs/callmanipulate.rng +0 -13
- data/cockpit/themes/preset/symbols/alternative.svg +5 -0
- data/cockpit/themes/preset/symbols/arrow.svg +3 -0
- data/cockpit/themes/preset/symbols/call.svg +6 -0
- data/cockpit/themes/preset/symbols/callmanipulate.svg +8 -0
- data/cockpit/themes/preset/symbols/choose.svg +5 -0
- data/cockpit/themes/preset/symbols/choose_exclusive.svg +5 -0
- data/cockpit/themes/preset/symbols/choose_inclusive.svg +4 -0
- data/cockpit/themes/preset/symbols/complex.svg +8 -0
- data/cockpit/themes/preset/symbols/critical.svg +4 -0
- data/cockpit/themes/preset/symbols/end.svg +3 -0
- data/cockpit/themes/preset/symbols/escape.svg +5 -0
- data/cockpit/themes/preset/symbols/event_end.svg +3 -0
- data/cockpit/themes/preset/symbols/loop.svg +5 -0
- data/cockpit/themes/preset/symbols/manipulate.svg +4 -0
- data/cockpit/themes/preset/symbols/otherwise.svg +5 -0
- data/cockpit/themes/preset/symbols/parallel.svg +5 -0
- data/cockpit/themes/preset/symbols/parallel_branch.svg +5 -0
- data/cockpit/themes/preset/symbols/parallel_branch_compact.svg +4 -0
- data/cockpit/themes/preset/symbols/parallel_branch_event.svg +14 -0
- data/cockpit/themes/preset/symbols/parallel_branch_normal.svg +5 -0
- data/cockpit/themes/preset/symbols/scripts.svg +4 -0
- data/cockpit/themes/preset/symbols/start.svg +3 -0
- data/cockpit/themes/preset/symbols/stop.svg +5 -0
- data/cockpit/themes/preset/symbols/terminate.svg +4 -0
- data/cockpit/themes/preset/theme.js +30 -18
- data/cpee.gemspec +2 -2
- data/lib/cpee/implementation.rb +28 -0
- data/lib/engine.xml +4 -0
- data/log/azure.rb +1 -1
- metadata +227 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d925f0547195410d0843ebd7b0839a02b396562664f8bddd3b964d2f9d0e8e9
|
4
|
+
data.tar.gz: d8b82a29324ea705feb7108a660425ad2fa460aed9c4c6f557d6797bedbc93ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d949f013965d26f6645982410e7a3544313533edda961581cc1c157dd5b09b605502a1de1975afe2ce3c56eaac1b12534bea64cb31b818d3a7e03c21351d9a9
|
7
|
+
data.tar.gz: 1c6ed6cece7bde67f3df522c51f3ac65f1080493af071927f136597a81679cf83665e1e8a780273088a611632a72cd7a96e0717ec241fa93c196efb308471be2
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#areamodel input[type=file] { display: none; }
|
2
|
+
#areamodel div.section { display: table-cell; vertical-align: middle; }
|
3
|
+
#areamodel div.section:nth-child(1) { padding: 0 0.5em 0 0; white-space: nowrap; }
|
4
|
+
#areamodel div.section:nth-child(2) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0.5em; white-space: nowrap; }
|
5
|
+
#areamodel div.section:nth-child(3) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0.5em; white-space: nowrap; }
|
6
|
+
#areamodel div.section:nth-child(4) { border-left: 1px solid var(--x-ui-border-color); padding: 0 0 0 0.5em; white-space: nowrap; }
|
7
|
+
|
8
|
+
#areamodel div.section:nth-child(1) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
|
9
|
+
#areamodel div.section:nth-child(1) button[name=save] { white-space: normal; width: 10em; height: 5.5em; margin-left: 0.2em; }
|
10
|
+
|
11
|
+
#areamodel div.section:nth-child(2) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
|
12
|
+
#areamodel div.section:nth-child(2) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
|
13
|
+
#areamodel div.section:nth-child(2) div:nth-child(2) { white-space: normal; text-align: right; }
|
14
|
+
#areamodel div.section:nth-child(2) button[name=loadtestsetfile] { white-space: normal; width: 10em; height: 3.5em; margin-left: 0.2em; }
|
15
|
+
#areamodel div.section:nth-child(2) button[name=loadmodelfile] { white-space: normal; width: 10em; height: 2em; margin-top: 0.2em; }
|
16
|
+
|
17
|
+
#areamodel div.section:nth-child(3) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
|
18
|
+
#areamodel div.section:nth-child(3) button { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
|
19
|
+
#areamodel div.section:nth-child(3) div:nth-child(2) { white-space: normal; text-align: right; }
|
20
|
+
#areamodel div.section:nth-child(3) button[name=savetestsetfile] { white-space: normal; width: 10em; height: 3.5em; margin-left: 0.2em; }
|
21
|
+
#areamodel div.section:nth-child(3) button[name=savesvgfile] { white-space: normal; width: 10em; height: 2em; margin-top: 0.2em; }
|
22
|
+
|
23
|
+
#areamodel div.section:nth-child(4) div { white-space: normal; vertical-align: middle; margin: 0; padding: 0; }
|
24
|
+
#areamodel div.section:nth-child(4) button[name=loadmodeltype] { white-space: normal; width: 10em; height: 2em; }
|
data/cockpit/css/ui.css
CHANGED
@@ -7,6 +7,13 @@ body {
|
|
7
7
|
font-size: 1em;
|
8
8
|
}
|
9
9
|
|
10
|
+
@font-face {
|
11
|
+
font-family: 'FontAwesome';
|
12
|
+
src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype');
|
13
|
+
font-weight: normal;
|
14
|
+
font-style: normal;
|
15
|
+
}
|
16
|
+
|
10
17
|
#graphgrid {
|
11
18
|
display: grid;
|
12
19
|
grid-gap: 0;
|
@@ -49,6 +56,24 @@ body {
|
|
49
56
|
color: var(--wfadaptor-selected);
|
50
57
|
}
|
51
58
|
|
59
|
+
#graphgrid .graphlabel.selected a, #graphgrid .graphlabel.hover a {
|
60
|
+
color: var(--wfadaptor-selected);
|
61
|
+
}
|
62
|
+
#graphgrid .graphlabel a {
|
63
|
+
color: var(--x-ui-light-text-color);
|
64
|
+
}
|
65
|
+
#graphgrid .graphlabel a::after {
|
66
|
+
font: normal normal normal 14px/1 FontAwesome;
|
67
|
+
font-size: 0.8em;
|
68
|
+
text-rendering: auto;
|
69
|
+
-webkit-font-smoothing: antialiased;
|
70
|
+
-moz-osx-font-smoothing: grayscale;
|
71
|
+
content: ' ';
|
72
|
+
}
|
73
|
+
#graphgrid .graphlabel.selected a::after, graphgrid .graphlabel.hover a::after {
|
74
|
+
color: var(--wfadaptor-selected);
|
75
|
+
}
|
76
|
+
|
52
77
|
#instance ui-content { height: 7em; }
|
53
78
|
|
54
79
|
#areanew td:nth-child(1) { width: 7em; padding-right: 1em; }
|
data/cockpit/index.html
CHANGED
@@ -149,23 +149,23 @@
|
|
149
149
|
<form id='fuckchrome'>
|
150
150
|
<input type='file' name='testsetfile' id='testsetfile'/>
|
151
151
|
</form>
|
152
|
-
<button title='a testset includes various
|
152
|
+
<button title='a testset includes various settings, subscriptions and a model' name="loadtestset">load predefined testset</button><button title='a testset includes various settings, subscriptions and a model' name="loadtestsetfile">load testset file</button>
|
153
153
|
</div>
|
154
154
|
<div>
|
155
155
|
<input type='file' name='modelfile' id='modelfile'/>
|
156
156
|
<button title='a standalone process model is only loadable if the currently loaded testset sucessfully prepared the current instance for the type of model' name="loadmodelfile">load model</button>
|
157
157
|
</div>
|
158
158
|
</div><div class='section'>
|
159
|
-
<a id="
|
160
|
-
<a id="
|
161
|
-
<button title='a testset includes various
|
162
|
-
<button title='a testset includes various
|
159
|
+
<a id="savetestsetfile" href="" download=""></a>
|
160
|
+
<a id="savesvgfile" href="" download=""></a>
|
161
|
+
<button title='a testset includes various settings, subscriptions and a model' name="savetestsetfile">save testset</button>
|
162
|
+
<button title='a testset includes various settings, subscriptions and a model' name="savesvgfile">save svg graph</button>
|
163
163
|
</div><div class='section'>
|
164
164
|
<div>
|
165
165
|
Current model: <span id='currentmodel'></span>
|
166
166
|
</div>
|
167
167
|
<div>
|
168
|
-
<button title='a testset includes various
|
168
|
+
<button title='a testset includes various settings, subscriptions and a model' name="loadmodeltype">set model type</button>
|
169
169
|
</div>
|
170
170
|
</div>
|
171
171
|
</ui-area> <!--}}}-->
|
data/cockpit/js/details.js
CHANGED
@@ -29,64 +29,82 @@ $(document).ready(function() {
|
|
29
29
|
clearTimeout(timer);
|
30
30
|
do_main_save();
|
31
31
|
});
|
32
|
+
$(document).on('relaxngui_move', '#dat_details', function(e){
|
33
|
+
clearTimeout(timer);
|
34
|
+
do_main_save();
|
35
|
+
});
|
32
36
|
});
|
33
37
|
|
34
38
|
function do_main_save() { //{{{
|
35
39
|
if (save['details'].has_changed()) {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
40
|
+
do_main_work();
|
41
|
+
}
|
42
|
+
} //}}}
|
43
|
+
|
44
|
+
function do_main_work() { //{{{
|
45
|
+
var svgid = save['details_target'].svgid;
|
46
|
+
var desc = save['details_target'].model;
|
47
|
+
var node = desc.get_node_by_svg_id(svgid);
|
48
|
+
var orignode = save['graph_adaptor'].illustrator.get_node_by_svg_id(svgid).parents('g.element[element-id]');
|
49
|
+
var origtype = orignode.attr('element-type') + '_' + orignode.attr('element-endpoint');
|
50
|
+
|
51
|
+
|
52
|
+
var url = $('body').attr('current-instance');
|
53
|
+
$('#main ui-tabbar ui-behind button').removeClass('highlight');
|
54
|
+
save['details'].set_checkpoint();
|
55
|
+
|
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
|
+
var nnew = $(save['details'].save().documentElement);
|
61
|
+
nnew.attr('svg-id',svgid);
|
62
|
+
nnew.attr('trans-xmlns','http://cpee.org/ns/description/1.0');
|
63
|
+
|
64
|
+
if ($('*[svg-id]',node).length > 0) {
|
65
|
+
nnew.append(node.children().filter(function(){ return this.attributes['svg-id'] != undefined; }));
|
66
|
+
}
|
67
|
+
|
68
|
+
var ntxt = nnew.serializeXML();
|
69
|
+
ntxt = ntxt.replace(/trans-xmlns/,'xmlns');
|
70
|
+
|
71
|
+
node.replaceWith($X(ntxt));
|
72
|
+
|
73
|
+
var ttarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
|
74
|
+
var tnewnode = ttarget.parents('g.element[element-id]');
|
75
|
+
var tnewtype = tnewnode.attr('element-type') + '_' + tnewnode.attr('element-endpoint');
|
76
|
+
|
77
|
+
desc.refresh(function(graphrealization){
|
78
|
+
var vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
|
79
|
+
if (vtarget.length > 0) {
|
80
|
+
vtarget.parents('g.element[element-id]').addClass('selected');
|
57
81
|
}
|
82
|
+
manifestation.adaptor.illustrator.get_label_by_svg_id(svgid).addClass('selected');
|
83
|
+
|
84
|
+
|
85
|
+
var newnode = vtarget.parents('g.element[element-id]');
|
86
|
+
var newtype = newnode.attr('element-type') + '_' + newnode.attr('element-endpoint');
|
87
|
+
var g = graphrealization.get_description();
|
88
|
+
save['graph'] = $X(g);
|
89
|
+
save['graph'].find('[xmlns]').removeAttr('xmlns');
|
58
90
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
var newnode = vtarget.parents('g.element[element-id]');
|
72
|
-
var newtype = newnode.attr('element-type') + '_' + newnode.attr('element-endpoint');
|
73
|
-
var g = graphrealization.get_description();
|
74
|
-
save['graph'] = $X(g);
|
75
|
-
save['graph'].find('[xmlns]').removeAttr('xmlns');
|
76
|
-
if (newtype != origtype) {
|
77
|
-
manifestation.update_details(svgid);
|
78
|
-
}
|
91
|
+
if (newtype != origtype) {
|
92
|
+
manifestation.update_details(svgid);
|
93
|
+
do_main_work();
|
94
|
+
} else {
|
95
|
+
$.ajax({
|
96
|
+
type: "PUT",
|
97
|
+
url: url + "/properties/values/description/",
|
98
|
+
headers: {
|
99
|
+
"Event-Source": myid
|
100
|
+
},
|
101
|
+
data: ({'content': '<content>' + desc.get_description() + '</content>'})
|
102
|
+
});
|
79
103
|
adaptor_update();
|
80
104
|
format_instance_pos();
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
headers: {
|
87
|
-
"Event-Source": myid
|
88
|
-
},
|
89
|
-
data: ({'content': '<content>' + desc.get_description() + '</content>'})
|
90
|
-
});
|
91
|
-
}
|
105
|
+
|
106
|
+
document.dispatchEvent(graph_changed);
|
107
|
+
}
|
108
|
+
|
109
|
+
});
|
92
110
|
} //}}}
|
data/cockpit/js/instance.js
CHANGED
@@ -5,6 +5,7 @@ var paths = '#dat_details input, #dat_details textarea, #dat_details select, #da
|
|
5
5
|
var loading = false;
|
6
6
|
var subscription;
|
7
7
|
var subscription_state = 'less';
|
8
|
+
var graph_changed = new Event("graph:changed", {"bubbles":true, "cancelable":false});
|
8
9
|
var save = {};
|
9
10
|
save['state']= undefined;
|
10
11
|
save['dsl'] = undefined;
|
@@ -74,8 +75,8 @@ function cockpit() { //{{{
|
|
74
75
|
$("button[name=loadtestsetfile]").click(load_testsetfile);
|
75
76
|
$("button[name=loadmodelfile]").click(load_modelfile);
|
76
77
|
$("button[name=loadmodeltype]").click(function(e){new CustomMenu(e).menu($('#modeltypes'),load_modeltype, $("button[name=loadmodeltype]")); });
|
77
|
-
$("button[name=
|
78
|
-
$("button[name=
|
78
|
+
$("button[name=savetestsetfile]").click(function(){ save_testsetfile(); });
|
79
|
+
$("button[name=savesvgfile]").click(function(){ save_svgfile(); });
|
79
80
|
$("button[name=state_start]").click(function(){ $(this).attr("disabled","disabled");start_instance(); });
|
80
81
|
$("button[name=state_stop]").click(function(){ $(this).attr("disabled","disabled");stop_instance(); });
|
81
82
|
$("button[name=state_replay]").click(function(){ $(this).attr("disabled","disabled");replay_instance(); });
|
@@ -117,6 +118,13 @@ function cockpit() { //{{{
|
|
117
118
|
}
|
118
119
|
ui_activate_tab("#tabexecution");
|
119
120
|
create_instance($("body").attr('current-base'),q.load,true,false);
|
121
|
+
} else if (q.instantiate) {
|
122
|
+
if (q.instantiate.match(/https?:\/\//)) {
|
123
|
+
ui_activate_tab("#tabexecution");
|
124
|
+
create_instance_from($("body").attr('current-base'),q.instantiate,false);
|
125
|
+
} else {
|
126
|
+
alert('Nope. Url!');
|
127
|
+
}
|
120
128
|
} else if (q.new || q.new == "") {
|
121
129
|
ui_activate_tab("#tabinstance");
|
122
130
|
create_instance($("body").attr('current-base'),"Plain Instance",false,false);
|
@@ -187,6 +195,29 @@ function check_subscription() { // {{{
|
|
187
195
|
}
|
188
196
|
}// }}}
|
189
197
|
|
198
|
+
function create_instance_from(base,url,exec) {// {{{
|
199
|
+
$.get({
|
200
|
+
url: url,
|
201
|
+
dataType: "text",
|
202
|
+
success: function(res) {
|
203
|
+
$.ajax({
|
204
|
+
type: "POST",
|
205
|
+
url: base,
|
206
|
+
contentType: 'application/xml',
|
207
|
+
dataType: "text",
|
208
|
+
headers: { 'CONTENT-ID': 'xml' },
|
209
|
+
data: res,
|
210
|
+
success: function(res){
|
211
|
+
var iu = (base + "//" + res + "/").replace(/\/+/g,"/").replace(/:\//,"://");
|
212
|
+
monitor_instance(iu,$("body").attr('current-resources'),false,exec);
|
213
|
+
},
|
214
|
+
error: function(a,b,c) {
|
215
|
+
alert("No CPEE running.");
|
216
|
+
}
|
217
|
+
});
|
218
|
+
}
|
219
|
+
});
|
220
|
+
}// }}}
|
190
221
|
function create_instance(base,name,load,exec) {// {{{
|
191
222
|
var info = name ? name : prompt("Instance info?", "Enter info here");
|
192
223
|
if (info != null) {
|
@@ -331,8 +362,9 @@ function monitor_instance(cin,rep,load,exec) {// {{{
|
|
331
362
|
});
|
332
363
|
append_to_log("monitoring", "id", subscription);
|
333
364
|
websocket();
|
334
|
-
if (load || exec)
|
365
|
+
if (load || exec) {
|
335
366
|
load_testset(exec);
|
367
|
+
}
|
336
368
|
}
|
337
369
|
});
|
338
370
|
},
|
@@ -480,6 +512,7 @@ function adaptor_init(url,theme,dslx) { //{{{
|
|
480
512
|
var g = graphrealization.get_description();
|
481
513
|
save['graph'] = $X(g);
|
482
514
|
save['graph'].find('[xmlns]').removeAttr('xmlns');
|
515
|
+
document.dispatchEvent(graph_changed);
|
483
516
|
$.ajax({
|
484
517
|
type: "PUT",
|
485
518
|
url: url + "/properties/values/description/",
|
@@ -488,6 +521,9 @@ function adaptor_init(url,theme,dslx) { //{{{
|
|
488
521
|
adaptor_update();
|
489
522
|
manifestation.events.click(svgid);
|
490
523
|
format_instance_pos();
|
524
|
+
if (manifestation.selected() == "unknown") { // nothing selected
|
525
|
+
$('#dat_details').empty();
|
526
|
+
}
|
491
527
|
};
|
492
528
|
adaptor_update();
|
493
529
|
monitor_instance_pos();
|
@@ -728,7 +764,18 @@ function stop_instance() {// {{{
|
|
728
764
|
});
|
729
765
|
}// }}}
|
730
766
|
|
731
|
-
function
|
767
|
+
function save_testsetfile() {// {{{
|
768
|
+
var def = new $.Deferred();
|
769
|
+
def.done(function(name,testset) {
|
770
|
+
var ct = new Date();
|
771
|
+
$('#savetestsetfile').attr('download',name + '_' + ct.strftime("%Y-%m-%dT%H%M%S%z") + '.xml');
|
772
|
+
$('#savetestsetfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(testset.serializePrettyXML()));
|
773
|
+
document.getElementById('savetestsetfile').click();
|
774
|
+
});
|
775
|
+
get_testset(def);
|
776
|
+
}// }}}
|
777
|
+
|
778
|
+
function get_testset(deferred) {// {{{
|
732
779
|
var url = $('body').attr('current-instance');
|
733
780
|
var testset = $X('<testset/>');
|
734
781
|
|
@@ -770,27 +817,24 @@ function save_testset() {// {{{
|
|
770
817
|
pars.append($(res.documentElement).children());
|
771
818
|
pars.find('uuid').remove();
|
772
819
|
testset.append(pars);
|
773
|
-
|
774
|
-
$('#savetestset').attr('download',name + '_' + ct.strftime("%Y-%m-%dT%H%M%S%z") + '.xml');
|
775
|
-
$('#savetestset').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(testset.serializePrettyXML()));
|
776
|
-
document.getElementById('savetestset').click();
|
820
|
+
deferred.resolve(name,testset);
|
777
821
|
},
|
778
|
-
error: report_failure
|
822
|
+
error: function() { deferred.reject(); report_failure(); }
|
779
823
|
});
|
780
824
|
},
|
781
|
-
error: report_failure
|
825
|
+
error: function() { deferred.reject(); report_failure(); }
|
782
826
|
});
|
783
827
|
},
|
784
|
-
error: report_failure
|
828
|
+
error: function() { deferred.reject(); report_failure(); }
|
785
829
|
});
|
786
830
|
},
|
787
|
-
error: report_failure
|
831
|
+
error: function() { deferred.reject(); report_failure(); }
|
788
832
|
});
|
789
833
|
},
|
790
|
-
error: report_failure
|
834
|
+
error: function() { deferred.reject(); report_failure(); }
|
791
835
|
});
|
792
836
|
}// }}}
|
793
|
-
function
|
837
|
+
function save_svgfile() {// {{{
|
794
838
|
var url = $('body').attr('current-instance');
|
795
839
|
|
796
840
|
var gc = $('#graphcanvas').clone();
|
@@ -830,9 +874,9 @@ function save_svg() {// {{{
|
|
830
874
|
success: function(res){
|
831
875
|
var name = $(res.documentElement).text();
|
832
876
|
|
833
|
-
$('#
|
834
|
-
$('#
|
835
|
-
document.getElementById('
|
877
|
+
$('#savesvgfile').attr('download',name + '.svg');
|
878
|
+
$('#savesvgfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(gc.serializeXML()));
|
879
|
+
document.getElementById('savesvgfile').click();
|
836
880
|
},
|
837
881
|
error: report_failure
|
838
882
|
});
|
data/cockpit/js/model.js
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
document.addEventListener('graph:changed', function (e) {
|
2
|
+
$("button[name=save]").prop("disabled",false);
|
3
|
+
}, false);
|
4
|
+
|
5
|
+
$(document).ready(function() {
|
6
|
+
$('#tabmodel').click(function(event){
|
7
|
+
$('#model ui-behind button:nth-child(1)').addClass('hidden');
|
8
|
+
});
|
9
|
+
$('#tabdataelements').click(function(event){
|
10
|
+
$('#model ui-behind button:nth-child(1)').removeClass('hidden');
|
11
|
+
});
|
12
|
+
|
13
|
+
$('#model ui-behind button:nth-child(1)').click(function(event){
|
14
|
+
var but = $(document).find('#model ui-content ui-area:not(.inactive) button');
|
15
|
+
but.click();
|
16
|
+
var are = $(document).find('#model ui-content ui-area:not(.inactive)');
|
17
|
+
var tab = $(document).find('#model ui-content ui-area:not(.inactive) .relaxngui_table');
|
18
|
+
are.animate({ scrollTop: tab.height() }, "slow");
|
19
|
+
});
|
20
|
+
|
21
|
+
$("button[name=save]").click(function(){
|
22
|
+
var def = new $.Deferred();
|
23
|
+
def.done(function(name,testset) {
|
24
|
+
$.ajax({
|
25
|
+
url: $('body').attr('current-save') + name + '.xml',
|
26
|
+
type: 'PUT',
|
27
|
+
contentType: 'application/xml',
|
28
|
+
data: testset.serializePrettyXML(),
|
29
|
+
headers: { 'Content-ID': 'content' },
|
30
|
+
success: function() {
|
31
|
+
$("button[name=save]").prop("disabled",true);
|
32
|
+
$("#lastsavedline").removeClass('hidden');
|
33
|
+
var dt = new Date();
|
34
|
+
var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds();
|
35
|
+
$("#lastsaved").text(time);
|
36
|
+
}
|
37
|
+
});
|
38
|
+
});
|
39
|
+
get_testset(def);
|
40
|
+
});
|
41
|
+
});
|
data/cockpit/js/ui.js
CHANGED
@@ -22,6 +22,7 @@ $(document).ready(function() {
|
|
22
22
|
$("input[name=base-url]").val(res['base-url']);
|
23
23
|
$("body").attr('current-resources',res['res-url']);
|
24
24
|
$("body").attr('current-base',res['base-url']);
|
25
|
+
$("body").attr('current-save',res['save-url']);
|
25
26
|
$("body").attr('current-testsets',res['testsets-url']);
|
26
27
|
cockpit();
|
27
28
|
},
|
@@ -30,9 +31,11 @@ $(document).ready(function() {
|
|
30
31
|
if (location.protocol.match(/^file/)) {
|
31
32
|
$("body").attr('current-resources',"http://localhost:" + $('body').data('res-port'));
|
32
33
|
$("body").attr('current-base',"http://localhost:" + $('body').data('base-port'));
|
34
|
+
$("body").attr('current-save',"http://localhost:" + $('body').data('base-port') + '/design');
|
33
35
|
} else {
|
34
36
|
$("body").attr('current-resources',location.protocol + "//" + location.hostname + ":" + $('body').data('res-port'));
|
35
37
|
$("body").attr('current-base',location.protocol + "//" + location.hostname + ":" + $('body').data('base-port'));
|
38
|
+
$("body").attr('current-save',location.protocol + "//" + location.hostname + ":" + $('body').data('base-port') + '/design');
|
36
39
|
}
|
37
40
|
$("input[name=res-url]").val($("body").attr('current-resources'));
|
38
41
|
$("input[name=base-url]").val($("body").attr('current-base'));
|