cpee 2.1.129 → 2.1.131
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.md +9 -19
- data/cockpit/compliance.html +34 -23
- data/cockpit/css/compliance.css +70 -2
- data/cockpit/css/llm.css +19 -23
- data/cockpit/css/ui.css +2 -3
- data/cockpit/js/compliance.js +813 -10
- data/cockpit/js/details.js +1 -1
- data/cockpit/js/instance.js +18 -15
- data/cockpit/js/wfadaptor.js +74 -67
- data/cockpit/llm.html +21 -23
- data/cockpit/llmmodel.html +19 -20
- data/cockpit/themes/THEMES.MD +419 -0
- data/cockpit/themes/base.js +21 -5
- data/cockpit/themes/control/symbols/alternative.svg +2 -2
- data/cockpit/themes/control/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/control/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/control/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/control/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/control/symbols/critical.svg +13 -3
- data/cockpit/themes/control/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/control/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/control/symbols/terminate.svg +1 -1
- data/cockpit/themes/dataflow/symbols/alternative.svg +2 -2
- data/cockpit/themes/dataflow/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/dataflow/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/dataflow/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/dataflow/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/dataflow/symbols/critical.svg +13 -3
- data/cockpit/themes/dataflow/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/dataflow/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/dataflow/symbols/terminate.svg +1 -1
- data/cockpit/themes/default/symbols/alternative.svg +2 -2
- data/cockpit/themes/default/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/default/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/default/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/default/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/default/symbols/critical.svg +13 -3
- data/cockpit/themes/default/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/default/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/default/symbols/terminate.svg +1 -1
- data/cockpit/themes/extended/symbols/alternative.svg +2 -2
- data/cockpit/themes/extended/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/extended/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/extended/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/extended/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/extended/symbols/critical.svg +13 -3
- data/cockpit/themes/extended/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/extended/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/extended/symbols/terminate.svg +1 -1
- data/cockpit/themes/felix/symbols/alternative.svg +2 -2
- data/cockpit/themes/felix/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/felix/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/felix/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/felix/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/felix/symbols/critical.svg +13 -3
- data/cockpit/themes/felix/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/felix/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/felix/symbols/terminate.svg +1 -1
- data/cockpit/themes/model/symbols/alternative.svg +2 -2
- data/cockpit/themes/model/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/model/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/model/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/model/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/model/symbols/critical.svg +13 -3
- data/cockpit/themes/model/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/model/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/model/symbols/terminate.svg +1 -1
- data/cockpit/themes/packed/symbols/alternative.svg +2 -2
- data/cockpit/themes/packed/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/packed/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/packed/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/packed/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/packed/symbols/critical.svg +13 -3
- data/cockpit/themes/packed/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/packed/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/packed/symbols/terminate.svg +1 -1
- data/cockpit/themes/preset/symbols/alternative.svg +2 -2
- data/cockpit/themes/preset/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/preset/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/preset/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/preset/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/preset/symbols/critical.svg +13 -3
- data/cockpit/themes/preset/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/preset/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/preset/symbols/terminate.svg +1 -1
- data/cockpit/themes/preset_model/symbols/alternative.svg +2 -2
- data/cockpit/themes/preset_model/symbols/critical.svg +13 -3
- data/cockpit/themes/preset_model/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/preset_model/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/preset_model/symbols/terminate.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/alternative.svg +2 -2
- data/cockpit/themes/presetaltid/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/critical.svg +13 -3
- data/cockpit/themes/presetaltid/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/presetaltid/symbols/terminate.svg +1 -1
- data/cockpit/themes/presetid/symbols/alternative.svg +2 -2
- data/cockpit/themes/presetid/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/presetid/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/presetid/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/presetid/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/presetid/symbols/critical.svg +13 -3
- data/cockpit/themes/presetid/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/presetid/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/presetid/symbols/terminate.svg +1 -1
- data/cockpit/themes/reduced/symbols/alternative.svg +2 -2
- data/cockpit/themes/reduced/symbols/closed_loop.svg +1 -1
- data/cockpit/themes/reduced/symbols/closed_loop_cancel.svg +1 -1
- data/cockpit/themes/reduced/symbols/closed_loop_control.svg +1 -1
- data/cockpit/themes/reduced/symbols/closed_loop_measuring.svg +1 -1
- data/cockpit/themes/reduced/symbols/critical.svg +13 -3
- data/cockpit/themes/reduced/symbols/parallel_branch.svg +1 -1
- data/cockpit/themes/reduced/symbols/parallel_branch_normal.svg +1 -1
- data/cockpit/themes/reduced/symbols/terminate.svg +1 -1
- data/cpee.gemspec +1 -1
- metadata +2 -1
data/cockpit/js/details.js
CHANGED
|
@@ -82,7 +82,7 @@ function do_main_work(svgid) { //{{{
|
|
|
82
82
|
var tnewnode = ttarget.parents('g.element[element-id]');
|
|
83
83
|
var tnewtype = tnewnode.attr('element-type') + '_' + tnewnode.attr('element-endpoint');
|
|
84
84
|
|
|
85
|
-
desc.
|
|
85
|
+
desc.redraw(function(graphrealization){
|
|
86
86
|
var vtarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
|
|
87
87
|
if (vtarget.length > 0) {
|
|
88
88
|
vtarget.parents('g.element[element-id]').addClass('selected');
|
data/cockpit/js/instance.js
CHANGED
|
@@ -193,13 +193,6 @@ function cockpit() { //{{{
|
|
|
193
193
|
},
|
|
194
194
|
complete: function() {
|
|
195
195
|
var q = $.parseQuerySimple();
|
|
196
|
-
if (q.min || q.min == "") {
|
|
197
|
-
uidash_toggle_vis_tab($('#instance'));
|
|
198
|
-
uidash_toggle_vis_tab($('#parameters'));
|
|
199
|
-
}
|
|
200
|
-
if (q.dea || q.dea == "") {
|
|
201
|
-
uidash_toggle_vis_tab($('#instance'));
|
|
202
|
-
}
|
|
203
196
|
if (q.theme) { graph_theme = q.theme; }
|
|
204
197
|
if (q.position) { graph_position = q.position == 'false' ? 'false' : 'true'; }
|
|
205
198
|
if (q.highlight) {
|
|
@@ -256,6 +249,13 @@ function cockpit() { //{{{
|
|
|
256
249
|
uidash_activate_tab("#tabexecution");
|
|
257
250
|
create_instance($("body").attr('current-base'),q.exec,true,true);
|
|
258
251
|
}
|
|
252
|
+
if (q.min || q.min == "") {
|
|
253
|
+
uidash_toggle_vis_tab($('#instance'));
|
|
254
|
+
uidash_toggle_vis_tab($('#parameters'));
|
|
255
|
+
}
|
|
256
|
+
if (q.dea || q.dea == "") {
|
|
257
|
+
uidash_toggle_vis_tab($('#instance'));
|
|
258
|
+
}
|
|
259
259
|
}
|
|
260
260
|
});
|
|
261
261
|
$.ajax({
|
|
@@ -360,6 +360,7 @@ async function sse() { //{{{
|
|
|
360
360
|
case 'description':
|
|
361
361
|
monitor_instance_dsl();
|
|
362
362
|
monitor_graph_change(false);
|
|
363
|
+
document.dispatchEvent(graph_changed);
|
|
363
364
|
break;
|
|
364
365
|
case 'endpoints':
|
|
365
366
|
monitor_instance_values("endpoints");
|
|
@@ -559,7 +560,11 @@ function monitor_instance_values(type,vals) {// {{{
|
|
|
559
560
|
});
|
|
560
561
|
}
|
|
561
562
|
});
|
|
562
|
-
$.when.apply($, deferreds).done()
|
|
563
|
+
$.when.apply($, deferreds).done(function(){
|
|
564
|
+
if (save['graph_adaptor'] && !suspended_redrawing) {
|
|
565
|
+
save['graph_adaptor'].redraw();
|
|
566
|
+
}
|
|
567
|
+
});
|
|
563
568
|
} else if(type == "attributes") {
|
|
564
569
|
$(" > attributes > *",res).each((k,v)=>{
|
|
565
570
|
save['attributes_raw'][v.nodeName] = v.textContent;
|
|
@@ -723,12 +728,10 @@ function adaptor_init(url,theme,dslx) { //{{{
|
|
|
723
728
|
suspended_redrawing = false;
|
|
724
729
|
});
|
|
725
730
|
} else {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
format_instance_pos();
|
|
731
|
-
});
|
|
731
|
+
var svgid = manifestation.selected();
|
|
732
|
+
save['graph_adaptor'].set_description($(dslx));
|
|
733
|
+
manifestation.events.click(svgid);
|
|
734
|
+
format_instance_pos();
|
|
732
735
|
}
|
|
733
736
|
} //}}}
|
|
734
737
|
|
|
@@ -1402,7 +1405,7 @@ function format_visual_remove(what,cls,sum=true) {//{{{
|
|
|
1402
1405
|
|
|
1403
1406
|
function scroll_into_view(what) { //{{{
|
|
1404
1407
|
if (save['state'] != "running") return;
|
|
1405
|
-
var tcontainer = $('#
|
|
1408
|
+
var tcontainer = $('#modelling')[0];
|
|
1406
1409
|
if ($('g[element-id="' + what + '"]').length > 0) {
|
|
1407
1410
|
var telement = $('g[element-id="' + what + '"]')[0].getBBox().y;
|
|
1408
1411
|
if (tcontainer.scrollTop > telement) {
|
data/cockpit/js/wfadaptor.js
CHANGED
|
@@ -191,8 +191,6 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
191
191
|
this.illustrator = illustrator = new WfIllustrator(this);
|
|
192
192
|
this.description = description = new WfDescription(this, this.illustrator);
|
|
193
193
|
|
|
194
|
-
this.update = function(doit){ doit(self); };
|
|
195
|
-
|
|
196
194
|
this.draw_element = function(type,id,label) {
|
|
197
195
|
let pos = {'row': 1,'col': 0};
|
|
198
196
|
let block = { 'max': {'row': pos.row, 'col': pos.col}, 'endnodes': [], 'svg': $X('<g class="group" xmlns="http://www.w3.org/2000/svg"/>') };
|
|
@@ -200,8 +198,8 @@ function WfAdaptor(theme_base,doit) { // Controller {{{
|
|
|
200
198
|
self.illustrator.set_svg(block);
|
|
201
199
|
}
|
|
202
200
|
|
|
203
|
-
this.redraw = function(){
|
|
204
|
-
description.redraw();
|
|
201
|
+
this.redraw = function(doit){
|
|
202
|
+
description.redraw(doit);
|
|
205
203
|
}
|
|
206
204
|
|
|
207
205
|
$.getScript(self.theme_base).done(function() {
|
|
@@ -230,6 +228,7 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
230
228
|
this.width_shift = this.width * 0.39;
|
|
231
229
|
this.width_shift_label = 7;
|
|
232
230
|
this.group_extend = 1;
|
|
231
|
+
this.structural_tighten = 3; // 'structural' borders are smaller in y
|
|
233
232
|
this.elements = {}; // the svgs
|
|
234
233
|
this.svg = {};
|
|
235
234
|
this.draw = {};
|
|
@@ -254,6 +253,9 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
254
253
|
' <marker id="arrow" viewBox="0 0 10 10" refX="28.5" refY="5" orient="auto" markerUnits="strokeWidth" markerWidth="14" markerHeight="3.5">' +
|
|
255
254
|
' <path d="m 2 2 l 6 3 l -6 3 z"/>' +
|
|
256
255
|
' </marker>' +
|
|
256
|
+
' <marker id="endarrow" viewBox="0 0 10 10" refX="7" refY="5" orient="auto" markerUnits="strokeWidth" markerWidth="14" markerHeight="5.2">' +
|
|
257
|
+
' <path d="M 2,2 L 6.21,4.11 Q 8,5 6.21,5.89 L 2,8 Z"/>' +
|
|
258
|
+
' </marker>' +
|
|
257
259
|
' <clipPath id="startclip">' +
|
|
258
260
|
' <rect x="-4" y="-4" width="35" height="38"/>' +
|
|
259
261
|
' </clipPath>' +
|
|
@@ -774,22 +776,23 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
774
776
|
|
|
775
777
|
return g;
|
|
776
778
|
} // }}}
|
|
777
|
-
var draw_border = this.draw.draw_border = function(id, p1, p2, group) { // {{{
|
|
779
|
+
var draw_border = this.draw.draw_border = function(id, p1, p2, group, yshrink) { // {{{
|
|
780
|
+
yshrink = yshrink || 0;
|
|
778
781
|
let bstart = get_x(p1.row,p1.col,'border from');
|
|
779
782
|
let bend = get_x_plus(p1.row,p2.row,p2.col,'border to');
|
|
780
783
|
group.prepend($X('<rect element-id="' + id + '" x="' + (bstart - 1.1 * self.width_shift - self.group_extend) + '" ' +
|
|
781
|
-
'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend) + '" ' +
|
|
784
|
+
'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend+yshrink) + '" ' +
|
|
782
785
|
'width="' + (bend-bstart+2*self.group_extend) + '" ' +
|
|
783
|
-
'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend) + '" ' +
|
|
786
|
+
'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend-2*yshrink) + '" ' +
|
|
784
787
|
'class="block" rx="12" ry="12" xmlns="http://www.w3.org/2000/svg"/>'));
|
|
785
788
|
} // }}}
|
|
786
|
-
var draw_tile = this.draw.draw_tile = function(id, p1, p2, group) { // {{{
|
|
789
|
+
var draw_tile = this.draw.draw_tile = function(id, p1, p2, group, yshrink=0) { // {{{
|
|
787
790
|
let bstart = get_x(p1.row,p1.col,'tile from');
|
|
788
791
|
let bend = get_x_plus(p1.row,p2.row,p2.col,'tile to');
|
|
789
792
|
group.prepend($X('<rect element-id="' + id + '" x="' + (bstart - 1.1 * self.width_shift - self.group_extend) + '" ' +
|
|
790
|
-
'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend) + '" ' +
|
|
793
|
+
'y="' + ((p1.row-1)*self.height+self.height_shift/2-self.group_extend+yshrink) + '" ' +
|
|
791
794
|
'width="' + (bend-bstart+2*self.group_extend) + '" ' +
|
|
792
|
-
'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend) + '" ' +
|
|
795
|
+
'height="' + (((p2.row+1)-p1.row)*self.height+2*self.group_extend-2*yshrink) + '" ' +
|
|
793
796
|
'class="tile" rx="12" ry="12" xmlns="http://www.w3.org/2000/svg"/>'));
|
|
794
797
|
} // }}}
|
|
795
798
|
var draw_connection = this.draw.draw_connection = function(group, start, end, context_row, arrow) { // {{{
|
|
@@ -801,40 +804,40 @@ function WfIllustrator(wf_adaptor) { // View {{{
|
|
|
801
804
|
if(((end['row']-start['row']) == 0) && ((end['col']-start['col']) == 0)) return;
|
|
802
805
|
var line;
|
|
803
806
|
if (arrow)
|
|
804
|
-
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge" marker-end="url(#arrow)"/>');
|
|
807
|
+
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge" marker-end="url(#' + (end.structural ? 'endarrow' : 'arrow') + ')"/>');
|
|
805
808
|
else
|
|
806
809
|
line = $X('<path xmlns="http://www.w3.org/2000/svg" class="edge"/>');
|
|
807
810
|
if (end['row']-start['row'] == 0 || end['col']-start['col'] == 0) { // straight line
|
|
808
|
-
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
809
|
-
String(cend) + "," + String(end['row']*self.height-15)
|
|
811
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
|
|
812
|
+
String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
|
|
810
813
|
);
|
|
811
814
|
} else if (end['row']-start['row'] > 0) { // downwards
|
|
812
815
|
if (end['col']-start['col'] > 0) {// left - right
|
|
813
816
|
if (self.compact) {
|
|
814
|
-
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
817
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
|
|
815
818
|
String(cstart+14) + "," + String((end['row']-1)*self.height) +" "+ // first turn of horizontal-line going away from node
|
|
816
819
|
String(cend) + "," + String((end['row']-1)*self.height) +" "+
|
|
817
|
-
String(cend) + "," + String(end['row']*self.height-15)
|
|
820
|
+
String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
|
|
818
821
|
);
|
|
819
822
|
} else {
|
|
820
|
-
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
821
|
-
String(cend) + "," + String(start['row']*self.height-15) +" "+
|
|
822
|
-
String(cend) + "," + String(end['row']*self.height-15)
|
|
823
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
|
|
824
|
+
String(cend) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
|
|
825
|
+
String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
|
|
823
826
|
);
|
|
824
827
|
}
|
|
825
828
|
} else { // right - left
|
|
826
|
-
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
829
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
|
|
827
830
|
String(cstart) + "," + String(end['row']*self.height-32) +" "+
|
|
828
831
|
String(cend+14) + "," + String(end['row']*self.height-32) +" "+ // last turn of horizontal-line going into the node
|
|
829
|
-
String(cend) + "," + String(end['row']*self.height-15)
|
|
832
|
+
String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
|
|
830
833
|
);
|
|
831
834
|
}
|
|
832
835
|
} else if(end['row']-start['row'] < 0) { // upwards
|
|
833
|
-
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15) +" "+
|
|
836
|
+
line.attr("d", "M " + String(cstart) + "," + String(start['row']*self.height-15+start.yoffset) +" "+
|
|
834
837
|
String(cstart) + "," + String((self.dim.symbols.length-1)*self.height+4) +" "+
|
|
835
838
|
String(cend+15) + "," + String((self.dim.symbols.length-1)*self.height+4) +" "+
|
|
836
839
|
String(cend+15) + "," + String(end['row']*self.height+15)+" "+
|
|
837
|
-
String(cend) + "," + String(end['row']*self.height-15)
|
|
840
|
+
String(cend) + "," + String(end['row']*self.height-15+end.yoffset)
|
|
838
841
|
);
|
|
839
842
|
}
|
|
840
843
|
self.svg.container.append(line);
|
|
@@ -890,7 +893,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
890
893
|
labels = [];
|
|
891
894
|
let start = performance.now();
|
|
892
895
|
illustrator.clear();
|
|
893
|
-
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
|
|
896
|
+
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false,yoffset:0});
|
|
894
897
|
illustrator.set_svg(graph);
|
|
895
898
|
self.set_labels(graph);
|
|
896
899
|
illustrator.set_duration(start);
|
|
@@ -946,53 +949,38 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
946
949
|
used_id_list.push(prefix + id);
|
|
947
950
|
return prefix + id;
|
|
948
951
|
} // }}}
|
|
949
|
-
var
|
|
950
|
-
id_counter = {};
|
|
951
|
-
labels = [];
|
|
952
|
-
let start = performance.now();
|
|
953
|
-
illustrator.clear();
|
|
954
|
-
clean_description();
|
|
955
|
-
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
|
|
956
|
-
illustrator.set_svg(graph);
|
|
957
|
-
self.set_labels(graph);
|
|
958
|
-
illustrator.set_duration(start);
|
|
959
|
-
doit(self);
|
|
960
|
-
}
|
|
961
|
-
var redraw = this.redraw = function(){
|
|
952
|
+
var redraw = this.redraw = function(doit) {
|
|
962
953
|
id_counter = {};
|
|
963
954
|
let start = performance.now();
|
|
964
955
|
labels = [];
|
|
965
956
|
illustrator.clear();
|
|
966
957
|
clean_description();
|
|
967
|
-
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false});
|
|
958
|
+
var graph = parse(description.children('description').get(0), {'row':0,'col':0,final:false,wide:false,yoffset:0});
|
|
968
959
|
illustrator.set_svg(graph);
|
|
969
960
|
self.set_labels(graph);
|
|
970
961
|
illustrator.set_duration(start);
|
|
962
|
+
if (doit) doit(self);
|
|
971
963
|
}
|
|
972
964
|
var update = this.update = function(svgid) { // {{{
|
|
973
965
|
id_counter = {};
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
966
|
+
var notify_target = () => {
|
|
967
|
+
var newn = $('*[new=true]',description);
|
|
968
|
+
newn.removeAttr('new');
|
|
969
|
+
|
|
970
|
+
if (newn.attr('svg-id') != undefined)
|
|
971
|
+
adaptor.notify(newn.attr('svg-id'));
|
|
972
|
+
else if (svgid != undefined)
|
|
973
|
+
adaptor.notify(svgid);
|
|
974
|
+
else if (newn.parents('[svg-id]').length > 0)
|
|
975
|
+
adaptor.notify(newn.parent('[svg-id]').attr('svg-id'));
|
|
976
|
+
else
|
|
977
|
+
console.info('Something went horribly wrong');
|
|
978
|
+
};
|
|
979
|
+
if (update_illustrator) {
|
|
980
|
+
self.redraw(notify_target);
|
|
981
|
+
} else {
|
|
982
|
+
notify_target();
|
|
983
983
|
}
|
|
984
|
-
|
|
985
|
-
var newn = $('*[new=true]',description);
|
|
986
|
-
newn.removeAttr('new');
|
|
987
|
-
|
|
988
|
-
if (newn.attr('svg-id') != undefined)
|
|
989
|
-
adaptor.notify(newn.attr('svg-id'));
|
|
990
|
-
else if (svgid != undefined)
|
|
991
|
-
adaptor.notify(svgid);
|
|
992
|
-
else if (newn.parents('[svg-id]').length > 0)
|
|
993
|
-
adaptor.notify(newn.parent('[svg-id]').attr('svg-id'));
|
|
994
|
-
else
|
|
995
|
-
console.info('Something went horribly wrong');
|
|
996
984
|
} // }}}
|
|
997
985
|
// }}}
|
|
998
986
|
// Adaption functions {{{
|
|
@@ -1180,6 +1168,15 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1180
1168
|
set_details(ctname,csname,pos,context,true);
|
|
1181
1169
|
[undefined, endnodes] = draw_position(ctname,parent_pos,pos,prev,block,[],context,{svg: g, pos: origpos});
|
|
1182
1170
|
}
|
|
1171
|
+
if (illustrator.elements[sname].border == 'structural') {
|
|
1172
|
+
// structural border: outgoing arrow starts at the group border instead of from the icon
|
|
1173
|
+
// small y offset.
|
|
1174
|
+
endnodes = endnodes.map(function(p) {
|
|
1175
|
+
var np = JSON.parse(JSON.stringify(p));
|
|
1176
|
+
np.yoffset = illustrator.height_shift/2 + illustrator.group_extend + 15 - illustrator.structural_tighten;
|
|
1177
|
+
return np;
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1183
1180
|
prev = JSON.parse(JSON.stringify(endnodes));
|
|
1184
1181
|
}
|
|
1185
1182
|
});
|
|
@@ -1255,18 +1252,20 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1255
1252
|
} else { console.log("no icon "+ sname);}
|
|
1256
1253
|
if (illustrator.elements[sname] && illustrator.elements[sname].border) {
|
|
1257
1254
|
let wide = (illustrator.elements[sname].wide == true && block.max.col == pos.col) ? pos.col + 1 : block.max.col;
|
|
1255
|
+
let yshrink = illustrator.elements[sname].border == 'structural' ? illustrator.structural_tighten : 0;
|
|
1258
1256
|
if (illustrator.elements[sname].closing_symbol) {
|
|
1259
|
-
illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg);
|
|
1257
|
+
illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg, yshrink);
|
|
1260
1258
|
} else {
|
|
1261
|
-
illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg);
|
|
1259
|
+
illustrator.draw.draw_border($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg, yshrink);
|
|
1262
1260
|
}
|
|
1263
1261
|
}
|
|
1264
1262
|
if (illustrator.elements[sname] && illustrator.elements[sname].type == 'complex') {
|
|
1265
1263
|
let wide = (illustrator.elements[sname].wide == true && block.max.col == pos.col) ? pos.col + 1 : block.max.col;
|
|
1264
|
+
let yshrink = illustrator.elements[sname].border == 'structural' ? illustrator.structural_tighten : 0;
|
|
1266
1265
|
if (illustrator.elements[sname].closing_symbol) {
|
|
1267
|
-
illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg);
|
|
1266
|
+
illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row + 1 }, block.svg, yshrink);
|
|
1268
1267
|
} else {
|
|
1269
|
-
illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg);
|
|
1268
|
+
illustrator.draw.draw_tile($(context).attr('svg-id'), pos, { col: wide, row: block.max.row }, block.svg, yshrink);
|
|
1270
1269
|
}
|
|
1271
1270
|
}
|
|
1272
1271
|
}
|
|
@@ -1274,6 +1273,14 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1274
1273
|
|
|
1275
1274
|
// Calculate Connection {{{
|
|
1276
1275
|
let connection_case = 0;
|
|
1276
|
+
var conn_target = pos;
|
|
1277
|
+
if (illustrator.elements[sname].border == 'structural' && !second) {
|
|
1278
|
+
// structural border: incoming arrow stops at the group border instead of reaching into the icon
|
|
1279
|
+
// (only a pixel-level yoffset, row/col stay integers so get_x() column lookups stay correct)
|
|
1280
|
+
conn_target = JSON.parse(JSON.stringify(pos));
|
|
1281
|
+
conn_target.yoffset = -illustrator.height + illustrator.height_shift/2 - illustrator.group_extend + 15 + illustrator.structural_tighten;
|
|
1282
|
+
conn_target.structural = true;
|
|
1283
|
+
}
|
|
1277
1284
|
if(illustrator.elements[sname] != undefined && illustrator.elements[sname].closeblock == true) { // Close Block if element e.g. loop
|
|
1278
1285
|
if (second) {
|
|
1279
1286
|
if (second.pos.row+1 < pos.row) { // when no content, dont paint the up arrow
|
|
@@ -1296,7 +1303,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1296
1303
|
} else { endnodes = [JSON.parse(JSON.stringify(pos))]; } // sets this element as only endpoint (aggregate)
|
|
1297
1304
|
if(prev[0].row == 0 || prev[0].col == 0) { // this enforces the connection from description to the first element
|
|
1298
1305
|
connection_case = 3;
|
|
1299
|
-
illustrator.draw.draw_connection(block.svg, { row: 1, col: 1 },
|
|
1306
|
+
illustrator.draw.draw_connection(block.svg, { row: 1, col: 1, yoffset: 0 }, conn_target, 0, true);
|
|
1300
1307
|
} else {
|
|
1301
1308
|
if (illustrator.elements[sname].noarrow == undefined || illustrator.elements[sname].noarrow == false) {
|
|
1302
1309
|
for (let node=0; node < prev.length; node++) {
|
|
@@ -1308,15 +1315,15 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1308
1315
|
}
|
|
1309
1316
|
connection_case = 4;
|
|
1310
1317
|
// console.log('++ case 4',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1311
|
-
illustrator.draw.draw_connection(block.svg, pn,
|
|
1318
|
+
illustrator.draw.draw_connection(block.svg, pn, conn_target, 0, true);
|
|
1312
1319
|
} else {
|
|
1313
1320
|
connection_case = 5;
|
|
1314
1321
|
if (prev.length == 1) {
|
|
1315
1322
|
// console.log('++ case 5a',parent_pos.row, '---', prev[node].row,pos.row,illustrator.dim.debug());
|
|
1316
|
-
illustrator.draw.draw_connection(block.svg, prev[node],
|
|
1323
|
+
illustrator.draw.draw_connection(block.svg, prev[node], conn_target, 0, true);
|
|
1317
1324
|
} else {
|
|
1318
1325
|
// console.log('++ case 5b',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1319
|
-
illustrator.draw.draw_connection(block.svg, prev[node],
|
|
1326
|
+
illustrator.draw.draw_connection(block.svg, prev[node], conn_target, 0, true);
|
|
1320
1327
|
}
|
|
1321
1328
|
}
|
|
1322
1329
|
}
|
|
@@ -1326,7 +1333,7 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
|
1326
1333
|
if (prev[node] && !prev[node].final) {
|
|
1327
1334
|
connection_case = 6;
|
|
1328
1335
|
// console.log('++ case 6',prev[node].row,pos.row,illustrator.dim.debug());
|
|
1329
|
-
illustrator.draw.draw_connection(block.svg, prev[node],
|
|
1336
|
+
illustrator.draw.draw_connection(block.svg, prev[node], conn_target, prev[node].row, false);
|
|
1330
1337
|
}
|
|
1331
1338
|
}
|
|
1332
1339
|
}
|
data/cockpit/llm.html
CHANGED
|
@@ -136,35 +136,35 @@
|
|
|
136
136
|
</svg>
|
|
137
137
|
</template>
|
|
138
138
|
|
|
139
|
+
<div class='hidden' id="areanew"> <!--{{{-->
|
|
140
|
+
<table class='x-ui-layout'>
|
|
141
|
+
<tr>
|
|
142
|
+
<td>Resources:</td>
|
|
143
|
+
<td><input name="res-url" type="text" value=""/></td>
|
|
144
|
+
<td></td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td>Engine:</td>
|
|
148
|
+
<td><input name="base-url" type="text" value=""/></td>
|
|
149
|
+
<td><button name="base">create new instance</button></td>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td>Instance:</td>
|
|
153
|
+
<td><input name="instance-url" type="text" value=""/></td>
|
|
154
|
+
<td><button name="instance">monitor instance</button></td>
|
|
155
|
+
</tr>
|
|
156
|
+
</table>
|
|
157
|
+
</div> <!--}}}-->
|
|
158
|
+
|
|
139
159
|
<ui-tabbed id="instance">
|
|
140
160
|
<ui-tabbar>
|
|
141
161
|
<ui-tab class="switch" ></ui-tab>
|
|
142
|
-
<ui-tab class="" data-tab="new" id="tabnew" >New</ui-tab>
|
|
143
162
|
<ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
|
|
144
163
|
<ui-tab class="inactive hidden" data-tab="execution" id="tabexecution">Execution</ui-tab>
|
|
145
164
|
<ui-behind ><a style='display:none' target='_blank' id='current-instance'></a><a style='display:none' target='_blank' id='current-instance-properties'>P</a><a style='display:none' target='_blank' id='current-instance-subscriptions'>S</a><a style='display:none' target='_blank' id='current-instance-callbacks'>C</a></ui-behind>
|
|
146
165
|
<ui-last ><a class="logo" href=".."></a></ui-last>
|
|
147
166
|
</ui-tabbar>
|
|
148
167
|
<ui-content>
|
|
149
|
-
<ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
|
|
150
|
-
<table class='x-ui-layout'>
|
|
151
|
-
<tr>
|
|
152
|
-
<td>Resources:</td>
|
|
153
|
-
<td><input name="res-url" type="text" value=""/></td>
|
|
154
|
-
<td></td>
|
|
155
|
-
</tr>
|
|
156
|
-
<tr>
|
|
157
|
-
<td>Engine:</td>
|
|
158
|
-
<td><input name="base-url" type="text" value=""/></td>
|
|
159
|
-
<td><button name="base">create new instance</button></td>
|
|
160
|
-
</tr>
|
|
161
|
-
<tr>
|
|
162
|
-
<td>Instance:</td>
|
|
163
|
-
<td><input name="instance-url" type="text" value=""/></td>
|
|
164
|
-
<td><button name="instance">monitor instance</button></td>
|
|
165
|
-
</tr>
|
|
166
|
-
</table>
|
|
167
|
-
</ui-area> <!--}}}-->
|
|
168
168
|
<ui-area data-belongs-to-tab="instance" id="areainstance" class="inactive"> <!--{{{-->
|
|
169
169
|
<div>
|
|
170
170
|
<div class='section'>
|
|
@@ -264,7 +264,6 @@
|
|
|
264
264
|
<ui-tabbar>
|
|
265
265
|
<ui-before ></ui-before>
|
|
266
266
|
<ui-tab class="" data-tab="details" id="tabdetails">Graph</ui-tab>
|
|
267
|
-
<ui-tab class="inactive" data-tab="dsl" id="tabdsl" >Description</ui-tab>
|
|
268
267
|
<ui-tab class="inactive" data-tab="log" id="tablog" >Log</ui-tab>
|
|
269
268
|
<ui-behind ><a style='display:none' target='_blank' id='current-track'>T</a><a style='display:none' target='_blank' id='current-graph'>G</a></ui-behind>
|
|
270
269
|
</ui-tabbar>
|
|
@@ -279,7 +278,7 @@
|
|
|
279
278
|
<ui-resizehandle class='hidden'>drag to resize</ui-resizehandle>
|
|
280
279
|
<ui-part id='input'>
|
|
281
280
|
<div id='status'></div>
|
|
282
|
-
<div id='prompt_container'
|
|
281
|
+
<div id='prompt_container'>
|
|
283
282
|
<div id='prompt' contenteditable="true" title="Please enter your modelling instructions here..." placeholder="Please enter your modelling instructions here..."></div>
|
|
284
283
|
<div id='prompt_submit_container' class="single">
|
|
285
284
|
<select name="generation" id="generation" class='hidden'>
|
|
@@ -315,7 +314,6 @@
|
|
|
315
314
|
<div id="dat_details" class='x-ui-layout'></div>
|
|
316
315
|
</ui-part>
|
|
317
316
|
</ui-area>
|
|
318
|
-
<ui-area data-belongs-to-tab="dsl" id="areadsl" class="inactive"></ui-area>
|
|
319
317
|
<ui-area data-belongs-to-tab="log" id="arealog" class="inactive"> <!--{{{-->
|
|
320
318
|
<div>Persistent Log: <a style='display:none' target='_blank' id='current-log'></a> [<a style='display:none' target='_blank' id='xml-log'>X</a>,<a style='display:none' target='_blank' id='shifted-log'>S</a>]</div>
|
|
321
319
|
<table id="dat_log" class="x-ui-layout"></table>
|
data/cockpit/llmmodel.html
CHANGED
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
|
|
65
65
|
<script type="text/javascript" src="js/llm.js"></script>
|
|
66
66
|
<link rel="stylesheet" href="css/llm.css" type="text/css"/>
|
|
67
|
-
<link rel="stylesheet" href="css/llmmodel.css" type="text/css"/>
|
|
68
67
|
|
|
69
68
|
<link rel="stylesheet" href="css/ui.css" type="text/css"/>
|
|
70
69
|
<link rel="stylesheet" href="css/extended_columns-label.css" type="text/css"/>
|
|
@@ -89,31 +88,31 @@
|
|
|
89
88
|
</svg>
|
|
90
89
|
</template>
|
|
91
90
|
|
|
91
|
+
<div class='hidden' id="areanew"> <!--{{{-->
|
|
92
|
+
<table class='x-ui-layout'>
|
|
93
|
+
<tr>
|
|
94
|
+
<td>Resources:</td>
|
|
95
|
+
<td><input name="res-url" type="text" value=""/></td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr>
|
|
98
|
+
<td>Engine:</td>
|
|
99
|
+
<td><input name="base-url" type="text" value=""/></td>
|
|
100
|
+
</tr>
|
|
101
|
+
<tr>
|
|
102
|
+
<td>Instance:</td>
|
|
103
|
+
<td><input name="instance-url" type="text" value=""/></td>
|
|
104
|
+
</tr>
|
|
105
|
+
</table>
|
|
106
|
+
</div> <!--}}}-->
|
|
107
|
+
|
|
92
108
|
<ui-tabbed id="instance">
|
|
93
109
|
<ui-tabbar>
|
|
94
110
|
<ui-tab class="switch" ></ui-tab>
|
|
95
|
-
<ui-tab class=""
|
|
96
|
-
<ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Instance</ui-tab>
|
|
111
|
+
<ui-tab class="inactive hidden" data-tab="instance" id="tabinstance" >Model</ui-tab>
|
|
97
112
|
<ui-behind ><a style='display:none' target='_blank' id='current-instance'></a><a style='display:none' target='_blank' id='current-instance-properties'>P</a><a style='display:none' target='_blank' id='current-instance-subscriptions'>S</a><a style='display:none' target='_blank' id='current-instance-callbacks'>C</a></ui-behind>
|
|
98
113
|
<ui-last ><a class="logo" href=".."></a></ui-last>
|
|
99
114
|
</ui-tabbar>
|
|
100
115
|
<ui-content>
|
|
101
|
-
<ui-area data-belongs-to-tab="new" id="areanew"> <!--{{{-->
|
|
102
|
-
<table class='x-ui-layout'>
|
|
103
|
-
<tr>
|
|
104
|
-
<td>Resources:</td>
|
|
105
|
-
<td><input name="res-url" type="text" value=""/></td>
|
|
106
|
-
</tr>
|
|
107
|
-
<tr>
|
|
108
|
-
<td>Engine:</td>
|
|
109
|
-
<td><input name="base-url" type="text" value=""/></td>
|
|
110
|
-
</tr>
|
|
111
|
-
<tr>
|
|
112
|
-
<td>Instance:</td>
|
|
113
|
-
<td><input name="instance-url" type="text" value=""/></td>
|
|
114
|
-
</tr>
|
|
115
|
-
</table>
|
|
116
|
-
</ui-area> <!--}}}-->
|
|
117
116
|
<ui-area data-belongs-to-tab="instance" id="areainstance" class="inactive"> <!--{{{-->
|
|
118
117
|
<div>
|
|
119
118
|
<div class='section'>
|
|
@@ -178,7 +177,7 @@
|
|
|
178
177
|
<ui-resizehandle class='hidden'>drag to resize</ui-resizehandle>
|
|
179
178
|
<ui-part id='input'>
|
|
180
179
|
<div id='status'></div>
|
|
181
|
-
<div id='prompt_container'
|
|
180
|
+
<div id='prompt_container'>
|
|
182
181
|
<div id='prompt' contenteditable="true" title="Please enter your modelling instructions here..." placeholder="Please enter your modelling instructions here..."></div>
|
|
183
182
|
<div id='prompt_submit_container' class="single">
|
|
184
183
|
<select name="generation" id="generation" class='hidden'>
|