From: Eddy Hautot Date: Thu, 7 Sep 2017 08:17:06 +0000 (+0000) Subject: Merge "Integrate docs template" X-Git-Tag: v1.1.0~102 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=00a633630a6fd9404dd78c42c92e9c37bf529fa1;hp=fb622922bc6f67d2c4e4d0d94c240e2726996553;p=clamp.git Merge "Integrate docs template" --- diff --git a/src/main/resources/META-INF/resources/designer/css/app.css b/src/main/resources/META-INF/resources/designer/css/app.css index 44733b6f..333c9666 100644 --- a/src/main/resources/META-INF/resources/designer/css/app.css +++ b/src/main/resources/META-INF/resources/designer/css/app.css @@ -181,6 +181,7 @@ svg:not(:root) { } /* 'î ¡' */ .icon-initial-node:before{ content: url('../images/InitialProcess.png'); } /* 'î ¡' */ .icon-collector-node:before{ content: url('../images/clds-collector-icon.png'); } /* 'î ¡' */ +.icon-holmes-node:before{ content: url('../images/clds-holmes-icon.png'); } /* 'î ¡' */ .icon-ves-collector-node:before{ content: url('../images/clds-ves-collector-icon.png'); } /* 'î ¡' */ .icon-stringmatch-node:before{ content: url('../images/clds-string-match-icon.png'); } /* 'î ¡' */ .icon-tca-node:before{ content: url('../images/clds-tca-icon.png'); } /* 'î ¡' */ diff --git a/src/main/resources/META-INF/resources/designer/css/diagram-js.css b/src/main/resources/META-INF/resources/designer/css/diagram-js.css index 8796603a..77fcd512 100644 --- a/src/main/resources/META-INF/resources/designer/css/diagram-js.css +++ b/src/main/resources/META-INF/resources/designer/css/diagram-js.css @@ -231,7 +231,7 @@ svg.drop-not-ok { x: 400px; y: 10px; height: 50px; - width: 326px; + width: 400px; } .djs-palette:not(.open) { diff --git a/src/main/resources/META-INF/resources/designer/images/clds-holmes-icon.png b/src/main/resources/META-INF/resources/designer/images/clds-holmes-icon.png new file mode 100644 index 00000000..f928ddf9 Binary files /dev/null and b/src/main/resources/META-INF/resources/designer/images/clds-holmes-icon.png differ diff --git a/src/main/resources/META-INF/resources/designer/index.js b/src/main/resources/META-INF/resources/designer/index.js index a0e91873..75c175a8 100644 --- a/src/main/resources/META-INF/resources/designer/index.js +++ b/src/main/resources/META-INF/resources/designer/index.js @@ -1560,6 +1560,45 @@ function visibility_model() return lane; }, + 'bpmn:Holmes': function(p, element) { + var lane = renderer('bpmn:Lane')(p, element, { + fill: 'White' + }); + + var expandedPool = DiUtil.isExpanded(element); + + var instanceName = getSemantic(element).name; + if (expandedPool) { + + if (instanceName == undefined) { + instanceName = 'Holmes'; + } + + // add holmes 'icon' + var attrs = computeStyle({}, { + stroke: 'black', + strokeWidth: 1, + fill: 'white' + }); + p.circle(15, 15, 10).attr(attrs) + textUtil.createText(p, "H", { align: 'left-top', 'padding': { top:6, left:11 } }); + } + + renderLabel(p, instanceName, { + box: element, + align: 'center-middle' + }); + + var participantMultiplicity = !!(getSemantic(element).participantMultiplicity); + + if (participantMultiplicity) { + renderer('ParticipantMultiplicityMarker')(p, element); + } + + return lane; + }, + + 'bpmn:StringMatch': function(p, element) { var lane = renderer('bpmn:Lane')(p, element, { fill: 'White' @@ -3821,7 +3860,22 @@ function visibility_model() } }); } - + if (bpmnElement.$instanceOf('bpmn:Holmes')) { + assign(actions, { + 'Properties': { + group: 'clds', + label: 'Edit Properties', + className: 'clds-edit-properties', + title: 'Properties', + action: { + click: function(event) { + lastElementSelected=bpmnElement.id + HolmesWindow(bpmnElement); + } + } + } + }); + } if (bpmnElement.$instanceOf('bpmn:TCA')) { assign(actions, { 'Properties': { @@ -4961,8 +5015,12 @@ function visibility_model() height: 80 }; } - - + if (semantic.$instanceOf('bpmn:Holmes')) { + return { + width: 120, + height: 80 + }; + } if (semantic.$instanceOf('bpmn:TCA')) { return { width: 120, @@ -6480,7 +6538,11 @@ function visibility_model() ), 'create.ves-collector': createAction( 'bpmn:VesCollector', 'event', 'icon-ves-collector-node', 'Ves Collector' - ), + ), + 'create.holmes': createAction( + 'bpmn:Holmes', 'event', 'icon-holmes-node', 'Holmes' + ), + 'create.TCA': createAction( 'bpmn:TCA', 'event', 'icon-tca-node', 'TCA' @@ -14328,6 +14390,13 @@ function visibility_model() "Activity", "InteractionNode" ] + }, + { + "name": "Holmes", + "superClass": [ + "Activity", + "InteractionNode" + ] }, { diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/holmes_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/holmes_properties.html new file mode 100644 index 00000000..f4c3d676 --- /dev/null +++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/holmes_properties.html @@ -0,0 +1,39 @@ + + + +
+ + + + + +
diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js index 86fedc9a..12d2d05d 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js +++ b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js @@ -31,6 +31,7 @@ app.service('cldsModelService', ['alertService','$http', '$q', function (alertSe 'policy': PolicyWindow, 'collector': CollectorsWindow, 'vescollector': VesCollectorWindow, + 'holmes': HolmesWindow, }; key = name.split('_')[0].toLowerCase() diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js index 3b1ffe94..8c2d3c33 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/app.js +++ b/src/main/resources/META-INF/resources/designer/scripts/app.js @@ -1462,6 +1462,34 @@ var app = angular.module('clds-app', ['ngRoute', } }; + $scope.HolmesWindow = function(holmes) { + + if (isTemplate) { + var partial = 'partials/portfolios/Template_model.html' + } else { + var partial = 'partials/portfolios/holmes_properties.html' + } + + var dlg = dialogs + .create( + partial, + 'ImportSchemaCtrl', + holmes, + { + closable : true, + draggable : true + }, + { + size : 'lg', + keyboard : true, + backdrop : 'static', + windowClass : 'my-class' + }); + + dlg.result() + }; + + $scope.TCAWindow = function(tca) { if (isTemplate) { var dlg = dialogs @@ -1688,6 +1716,11 @@ function VesCollectorWindow(vesCollectorWin) { .VesCollectorWindow(vesCollectorWin); } +function HolmesWindow(holmesWin) { + angular.element(document.getElementById('navbar')).scope() + .HolmesWindow(holmesWin); +} + function F5Window() { angular.element(document.getElementById('navbar')).scope().F5Window();