aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/resources/META-INF/resources/designer/css/app.css1
-rw-r--r--src/main/resources/META-INF/resources/designer/images/clds-ves-collector-icon.pngbin0 -> 513 bytes
-rw-r--r--src/main/resources/META-INF/resources/designer/index.js88
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/vesCollector_properties.html39
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js22
-rw-r--r--src/main/resources/META-INF/resources/designer/scripts/app.js53
6 files changed, 187 insertions, 16 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 95d5d5822..44733b6f2 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-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'); } /* '' */
.icon-policy-node:before{ content: url('../images/clds-policy-icon.png'); } /* '' */
diff --git a/src/main/resources/META-INF/resources/designer/images/clds-ves-collector-icon.png b/src/main/resources/META-INF/resources/designer/images/clds-ves-collector-icon.png
new file mode 100644
index 000000000..c96bf5059
--- /dev/null
+++ b/src/main/resources/META-INF/resources/designer/images/clds-ves-collector-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 15425dd04..a0e918734 100644
--- a/src/main/resources/META-INF/resources/designer/index.js
+++ b/src/main/resources/META-INF/resources/designer/index.js
@@ -1503,7 +1503,64 @@ function visibility_model()
},
- 'bpmn:StringMatch': function(p, element) {
+ 'bpmn:VesCollector': function(p, element) {
+ var lane = renderer('bpmn:Lane')(p, element, {
+ fill: 'White'
+ });
+
+ var expandedPool = DiUtil.isExpanded(element);
+
+ if (expandedPool) {
+ drawLine(p, [{
+ x: element.width,
+ y: 80
+ }, {
+ x: element.width,
+ y: 20
+ }]);
+
+ drawLine(p, [{
+ x: 20,
+ y: 0
+ }, {
+ x: 20,
+ y: element.height
+ }]);
+
+ textUtil.createText(p, "V", { align: 'left-top', 'padding': {top:0, left:5, right:element.width - 20, bottom:0} });
+ textUtil.createText(p, "E", { align: 'left-top', 'padding': {top:12, left:5, right:element.width - 20, bottom:0} });
+ textUtil.createText(p, "S", { align: 'left-top', 'padding': {top:24, left:5, right:element.width - 20, bottom:0} });
+
+ var text2 = getSemantic(element).name;
+ if(text2 == undefined )
+ {
+ text2 = 'VesCollector';
+ }
+
+ renderLabel(p, text2, {
+ box: element,
+ align: 'center-middle'
+ });
+
+ } else {
+ // Collapsed pool draw text inline
+ var text2 = getSemantic(element).name;
+ renderLabel(p, text2, {
+ 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'
});
@@ -1511,8 +1568,6 @@ function visibility_model()
var expandedPool = DiUtil.isExpanded(element);
if (expandedPool) {
-
-
drawLine(p, [{
x: 0,
@@ -1530,7 +1585,7 @@ function visibility_model()
box: element,
align: 'center-middle'
});
-
+
} else {
// Collapsed pool draw text inline
var text2 = getSemantic(element).name;
@@ -1549,7 +1604,8 @@ function visibility_model()
return lane;
- },
+ },
+
'bpmn:TCA': function(p, element) {
var lane = renderer('bpmn:Lane')(p, element, {
fill: 'White'
@@ -3764,7 +3820,8 @@ function visibility_model()
}
}
});
- }
+ }
+
if (bpmnElement.$instanceOf('bpmn:TCA')) {
assign(actions, {
'Properties': {
@@ -4897,7 +4954,14 @@ function visibility_model()
width: 120,
height: 80
};
+ }
+ if (semantic.$instanceOf('bpmn:VesCollector')) {
+ return {
+ width: 120,
+ height: 80
+ };
}
+
if (semantic.$instanceOf('bpmn:TCA')) {
return {
@@ -6413,7 +6477,11 @@ function visibility_model()
),
'create.String-Match': createAction(
'bpmn:StringMatch', 'event', 'icon-stringmatch-node', 'String Match'
+ ),
+ 'create.ves-collector': createAction(
+ 'bpmn:VesCollector', 'event', 'icon-ves-collector-node', 'Ves Collector'
),
+
'create.TCA': createAction(
'bpmn:TCA', 'event', 'icon-tca-node', 'TCA'
),
@@ -14253,7 +14321,15 @@ function visibility_model()
"Activity",
"InteractionNode"
]
+ },
+ {
+ "name": "VesCollector",
+ "superClass": [
+ "Activity",
+ "InteractionNode"
+ ]
},
+
{
"name": "TCA",
"superClass": [
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/vesCollector_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/vesCollector_properties.html
new file mode 100644
index 000000000..eabe35cd3
--- /dev/null
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/vesCollector_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="vescollectorproperties" 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>VES Collector</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 c2b4f6733..86fedc9a2 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js
@@ -24,17 +24,19 @@
app.service('cldsModelService', ['alertService','$http', '$q', function (alertService,$http, $q) {
function checkIfElementType(name){
+ //This will open the methods located in the app.js
+ mapping = {
+ 'stringmatch': StringMatchWindow,
+ 'tca': TCAWindow,
+ 'policy': PolicyWindow,
+ 'collector': CollectorsWindow,
+ 'vescollector': VesCollectorWindow,
+ };
- //This will open the methods located in the app.js
- if (name.toLowerCase().indexOf("stringmatch")>=0)
- StringMatchWindow();
- else if (name.toLowerCase().indexOf("tca")>=0)
- TCAWindow();
- else if(name.toLowerCase().indexOf("policy")>=0)
- PolicyWindow();
- else if(name.toLowerCase().indexOf("collector")>=0)
- CollectorsWindow();
-
+ key = name.split('_')[0].toLowerCase()
+ if (key in mapping) {
+ mapping[key]();
+ }
}
this.toggleDeploy = function (uiAction, modelName, controlNamePrefixIn,
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 401489ca1..3b1ffe941 100644
--- a/src/main/resources/META-INF/resources/designer/scripts/app.js
+++ b/src/main/resources/META-INF/resources/designer/scripts/app.js
@@ -1412,6 +1412,55 @@ var app = angular.module('clds-app', ['ngRoute',
}
};
+ $scope.VesCollectorWindow = function(vesCollector) {
+
+ if (isTemplate) {
+ var dlg = dialogs
+ .create(
+ 'partials/portfolios/Template_model.html',
+ 'ImportSchemaCtrl',
+ vesCollector,
+ {
+ closable : true,
+ draggable : true
+ },
+ {
+ size : 'lg',
+ keyboard : true,
+ backdrop : 'static',
+ windowClass : 'my-class'
+ });
+ dlg.result.then(function(name) {
+
+ }, function() {
+
+
+ });
+ } else { // if (isTemplate)
+
+ var dlg = dialogs
+ .create(
+ 'partials/portfolios/vesCollector_properties.html',
+ 'ImportSchemaCtrl',
+ {
+ closable : true,
+ draggable : true
+ },
+ {
+ size : 'lg',
+ keyboard : true,
+ backdrop : 'static',
+ windowClass : 'my-class'
+ });
+
+ dlg.result.then(function(name) {
+
+ }, function() {
+
+ });
+
+ }
+ };
$scope.TCAWindow = function(tca) {
if (isTemplate) {
@@ -1634,6 +1683,10 @@ function CollectorsWindow(collectorsWin) {
.CollectorsWindow(collectorsWin);
}
+function VesCollectorWindow(vesCollectorWin) {
+ angular.element(document.getElementById('navbar')).scope()
+ .VesCollectorWindow(vesCollectorWin);
+}
function F5Window() {