aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorAnaël Closson <ac2550@intl.att.com>2017-09-05 13:33:34 +0200
committerAnaël Closson <ac2550@intl.att.com>2017-09-05 13:36:02 +0200
commit637af47ad9f91d5b91f742a1eea4041ee1b019c4 (patch)
tree92c6cac2efe3bdacb2ebb7fbd2bd97bae7200d27 /src/main
parent14b66478a7b6622f9249fc8e538f4afb6a501c71 (diff)
Add holmes GUI without properties
Change-Id: Ie961076abf2d57e3e917cab0012f6799bbe7762a Issue-Id: CLAMP-27 Signed-off-by: Anaël Closson <ac2550@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/resources/META-INF/resources/designer/css/app.css1
-rw-r--r--src/main/resources/META-INF/resources/designer/css/diagram-js.css2
-rw-r--r--src/main/resources/META-INF/resources/designer/images/clds-holmes-icon.pngbin0 -> 522 bytes
-rw-r--r--src/main/resources/META-INF/resources/designer/index.js77
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/holmes_properties.html39
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js1
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/app.js33
7 files changed, 148 insertions, 5 deletions
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 44733b6f2..333c96669 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 8796603ae..77fcd5126 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 000000000..f928ddf9d
--- /dev/null
+++ b/src/main/resources/META-INF/resources/designer/images/clds-holmes-icon.png
Binary files differ
diff --git a/src/main/resources/META-INF/resources/designer/index.js b/src/main/resources/META-INF/resources/designer/index.js
index a0e918734..75c175a8a 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 000000000..f4c3d6762
--- /dev/null
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/holmes_properties.html
@@ -0,0 +1,39 @@
+<!--
+ ============LICENSE_START=======================================================
+ ONAP CLAMP
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END============================================
+ ===================================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ -->
+<style>
+</style>
+
+<div attribute-test="holmesproperties" id="configure-widgets" >
+ <div attribute-test="cldsopentemplateh" class="modal-header">
+ <button type="button" class="close" ng-click="close(false)" aria-hidden="true" style="margin-top: -3px">&times;</button>
+ <h4>Holmes</h4>
+ </div>
+
+ <div attribute-test="cldsopentemplateb" class="modal-body" style="height: 280px">
+ No parameter can be configured.
+ </div>
+
+ <div class="modal-footer">
+ <button ng-click="close(true)" id="close_button" class="btn btn-primary">Close</button>
+ </div>
+</div>
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 86fedc9a2..12d2d05d0 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 3b1ffe941..8c2d3c333 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();