aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources')
-rw-r--r--src/main/resources/META-INF/resources/designer/menu_simplified.html2
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/menu.html29
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html141
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/Template_model.html33
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/refresh_asdc.html44
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html52
-rw-r--r--src/main/resources/application-noaaf.properties6
-rw-r--r--src/main/resources/application.properties8
-rw-r--r--src/main/resources/boot-message.txt18
-rw-r--r--src/main/resources/clds/camel/routes/flexible-flow.xml5
-rw-r--r--src/main/resources/clds/templates/globalProperties.json17
11 files changed, 124 insertions, 231 deletions
diff --git a/src/main/resources/META-INF/resources/designer/menu_simplified.html b/src/main/resources/META-INF/resources/designer/menu_simplified.html
index 0131015f..530ad61d 100644
--- a/src/main/resources/META-INF/resources/designer/menu_simplified.html
+++ b/src/main/resources/META-INF/resources/designer/menu_simplified.html
@@ -46,7 +46,7 @@
width="234px" style="display: inline-block; float: left">
<div class="navbar-brand logo" ng-href=""
style="display: inline-block; float: left">
- &nbsp;&nbsp;<b>Closed Loop Definition</b>
+ &nbsp;&nbsp;<b>CLAMP</b>
</div>
</div>
diff --git a/src/main/resources/META-INF/resources/designer/partials/menu.html b/src/main/resources/META-INF/resources/designer/partials/menu.html
index 48544dfe..d3ffe386 100644
--- a/src/main/resources/META-INF/resources/designer/partials/menu.html
+++ b/src/main/resources/META-INF/resources/designer/partials/menu.html
@@ -60,35 +60,6 @@
.ThisLink a.blur:hover,.ThisLink a.blur:focus {
color: #933;
}
-
-.fileUpload {
- position: relative;
- overflow: hidden;
- margin: 10px;
-}
-
-.fileUpload input.upload {
- position: absolute;
- top: 0;
- right: 0;
- margin: 0;
- padding: 0;
- font-size: 20px;
- cursor: pointer;
- opacity: 0;
- filter: alpha(opacity = 0);
- float: left;
-}
-
-.fileDisplay {
- display: inline-block;
- overflow: hidden;
- float: right;
- margin-left: 0px;
- z-index: initial;
- text-align: center;
- margin-top: 17px;
-}
</style>
<nav attribute-test="menu" class="navbar navbar-default navbar-fixed-top" role="navigation"
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html
index 5109c1bf..25cc9a02 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html
@@ -32,35 +32,6 @@
background-color: #dddd;
}
-.fileUpload {
- position: relative;
- overflow: hidden;
- margin: 10px;
-}
-
-.fileUpload input.upload {
- position: absolute;
- top: 0;
- right: 0;
- margin: 0;
- padding: 0;
- font-size: 20px;
- cursor: pointer;
- opacity: 0;
- filter: alpha(opacity = 0);
- float: left;
-}
-
-.fileDisplay {
- display: inline-block;
- overflow: hidden;
- float: right;
- margin-left: 0px;
- z-index: initial;
- text-align: center;
- margin-top: 17px;
-}
-
.modelSearchBox {
position: absolute;
padding: 25px 12px;
@@ -141,28 +112,6 @@ label {
}
</style>
-<script type="text/javascript">
- function disablefile() {
-
- document.getElementById("fileUpload").disabled = true;
-
- }
-
- function disableSVN() {
- var selectLength = document.querySelectorAll(".disabled-block-container .tab-close-popup");
- if(selectLength && selectLength.length>0){
- for(var i = 0; i< selectLength.length ; i++){
- selectLength[i].disabled = true;
- }
- }
-
- document.getElementById("schemaLocation").disabled = true;
- document.getElementById("userID").disabled = true;
- document.getElementById("password").disabled = true;
-
- }
-</script>
-
<div attribute-test="policywindowproperties" id="configure-widgets"
class="disabled-block-container">
@@ -306,8 +255,7 @@ label {
<label for="payload" class="col-sm-4 control-label">
Payload</label>
<div class="col-sm-8">
- <textarea class="form-control" id="recipeInput"
- name=recipeInput></textarea >
+ <textarea class="form-control" id="recipeInput" name=recipeInput></textarea>
</div>
</div>
<div class="form-group clearfix">
@@ -331,6 +279,75 @@ label {
<input type="text" style="display: none" class="form-control"
id="targetResourceIdOther" name="targetResourceIdOther" value=""></input>
</div>
+ <div style="border: 2px dotted gray;">
+ <div class="form-group clearfix">
+ <label for="enableGuardPolicy" class="col-sm-4 control-label">
+ Enable Guard Policy</label>
+ <div class="col-sm-8">
+ <input type="checkbox" class="form-control"
+ name="enableGuardPolicy" id="enableGuardPolicy">
+ </div>
+ <div class="col-sm-8">
+ <label for="guardPolicyType" class="col-sm-4 control-label">
+ Guard Policy Type</label>
+ <select class="form-control"
+ name="guardPolicyType" id="guardPolicyType"
+ onchange="changeGuardPolicyType();">
+ <option value="MinMax">MinMax</option>
+ <option value="FrequencyLimiter">FrequencyLimiter</option>
+ </select>
+ </div>
+ <label for="guardTargets" class="col-sm-4 control-label">Guard
+ targets</label>
+ <div class="col-sm-8">
+ <input class="form-control" name="guardTargets"
+ id="guardTargets" />
+ </div>
+ </div>
+
+ <div class="form-group clearfix" id="minMaxGuardPolicyDiv">
+ <label for="minGuard" class="col-sm-4 control-label">
+ Min Guard</label>
+ <div class="col-sm-8">
+ <input class="form-control" name="minGuard" id="minGuard" />
+ </div>
+ <label for="maxGuard" class="col-sm-4 control-label">
+ Max Guard</label>
+ <div class="col-sm-8">
+ <input class="form-control" name="maxGuard" id="maxGuard" />
+ </div>
+ </div>
+ <div class="form-group clearfix"
+ id="frequencyLimiterGuardPolicyDiv" style="display: none">
+ <label for="limitGuard" class="col-sm-4 control-label">Limit</label>
+ <div class="col-sm-8">
+ <input class="form-control" name="limitGuard" id="limitGuard" />
+ </div>
+ <div class="col-sm-8">
+ <select class="form-control" name="timeUnitsGuard"
+ id="timeUnitsGuard" /> <label for="timeWindowGuard"
+ class="col-sm-4 control-label">Time Window</label>
+ </div>
+ <div class="col-sm-8">
+ <input class="form-control" name="timeWindowGuard"
+ id="timeWindowGuard" />
+ </div>
+ </div>
+ <div class="form-group clearfix">
+ <label for="guardActiveStart" class="col-sm-4 control-label">
+ Guard Active Start</label>
+ <div class="col-sm-8">
+ <input class="form-control" name="guardActiveStart"
+ id="guardActiveStart" />
+ </div>
+ <label for="guardActiveEnd" class="col-sm-4 control-label">
+ Guard Active End</label>
+ <div class="col-sm-8">
+ <input class="form-control" name="guardActiveEnd"
+ id="guardActiveEnd" />
+ </div>
+ </div>
+ </div>
</div>
</form>
</span>
@@ -361,6 +378,20 @@ label {
$("#targetResourceIdOther").val("");
}
}
+
+ function changeGuardPolicyType() {
+ console.log("executing GuardPolicyType")
+ console.log("GuardPolicyType value:"+$("#guardPolicyType").val())
+ if ($("#guardPolicyType").val()==="MinMax") {
+ console.log("executing GuardPolicyType")
+ $("#minMaxGuardPolicyDiv").show();
+ $("#frequencyLimiterGuardPolicyDiv").hide();
+ } else if ($("#guardPolicyType").val()==="FrequencyLimiter") {
+ console.log("executing GuardPolicyType")
+ $("#minMaxGuardPolicyDiv").hide();
+ $("#frequencyLimiterGuardPolicyDiv").show();
+ }
+ }
//Basically this method will add a new form. All forms share the same class. When you want one form to show(active form) the other forms get the
// css attribute display:none
$("#add_one_more").click(function(event) {
@@ -466,7 +497,7 @@ label {
});
$('input[value="multiselect-all"]').prop('disabled', true).parent('li').addClass('disabled');
}
-
+ changeGuardPolicyType();
}
function addSelectListen(count) {
@@ -871,6 +902,7 @@ label {
setASDCFields();
initTargetResourceId();
+
//load metrics dropdown
if (elementMap["global"]){
for (var i = 0; i < (elementMap["global"].length); i++){
@@ -889,7 +921,6 @@ label {
};
};
};
-
//Show table panel only
function expandTable() {
$(".policyPanel").css("display", "none");
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/Template_model.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/Template_model.html
index 53204f41..0ca4e7ca 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/Template_model.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/Template_model.html
@@ -21,39 +21,6 @@
-->
-<style>
- .fileUpload {
- position: relative;
- overflow: hidden;
- margin: 10px;
- }
- .fileUpload input.upload {
- position: absolute;
- top: 0;
- right: 0;
- margin: 0;
- padding: 0;
- font-size: 20px;
- cursor: pointer;
- opacity: 0;
- filter: alpha(opacity=0);
- float:left;
- }
- .fileDisplay {
-
- display: inline-block;
- overflow: hidden;
- float: right;
- margin-left: 0px;
- z-index: initial;
- text-align: center;
- margin-top: 17px;
- }
-
-
-</style>
-
-
<div attribute-test="templatemodel" id="configure-widgets" >
<div attribute-test="templatemodelh" class="modal-header">
<button type="button" class="close" ng-click="close(false)" aria-hidden="true" style="margin-top: -3px">&times;</button>
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/refresh_asdc.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/refresh_asdc.html
index 7f6e9e19..441766d4 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/refresh_asdc.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/refresh_asdc.html
@@ -22,56 +22,12 @@
-->
<style>
-.fileUpload {
- position: relative;
- overflow: hidden;
- margin: 10px;
-}
#paramsWarnrefresh {
display: none;
}
-.fileUpload input.upload {
- position: absolute;
- top: 0;
- right: 0;
- margin: 0;
- padding: 0;
- font-size: 20px;
- cursor: pointer;
- opacity: 0;
- filter: alpha(opacity = 0);
- float: left;
-}
-
-.fileDisplay {
- display: inline-block;
- overflow: hidden;
- float: right;
- margin-left: 0px;
- z-index: initial;
- text-align: center;
- margin-top: 17px;
-}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-<script type="text/javascript">
- function disablefile() {
-
- document.getElementById("fileUpload").disabled = true;
-
- }
-
- function disableSVN() {
-
- document.getElementById("schemaLocation").disabled = true;
- document.getElementById("userID").disabled = true;
- document.getElementById("password").disabled = true;
-
- }
-</script>
-
-
<div attribute-test="refreshasdc" id="configure-widgets">
<div attribute-test="refreshasdch" class="modal-header">
<button type="button" class="close" ng-click="close(false)"
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html
index 8332e696..89b13fa1 100644
--- a/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html
+++ b/src/main/resources/META-INF/resources/designer/partials/portfolios/tca_properties.html
@@ -33,35 +33,6 @@
background-color:#dddd;
}
-.fileUpload {
- position: relative;
- overflow: hidden;
- margin: 10px;
-}
-
-.fileUpload input.upload {
- position: absolute;
- top: 0;
- right: 0;
- margin: 0;
- padding: 0;
- font-size: 20px;
- cursor: pointer;
- opacity: 0;
- filter: alpha(opacity = 0);
- float: left;
-}
-
-.fileDisplay {
- display: inline-block;
- overflow: hidden;
- float: right;
- margin-left: 0px;
- z-index: initial;
- text-align: center;
- margin-top: 17px;
-}
-
.form-group {
margin-bottom:15px;
display:-webkit-flex;
@@ -127,29 +98,6 @@
</style>
-<script type="text/javascript">
- function disablefile() {
-
- document.getElementById("fileUpload").disabled = true;
-
- }
-
- function disableSVN() {
- var selectLength = document.querySelectorAll(".disabled-block-container .tab-close-popup");
- if(selectLength && selectLength.length>0){
- for(var i = 0; i< selectLength.length ; i++){
- selectLength[i].disabled = true;
- }
- }
-
- document.getElementById("schemaLocation").disabled = true;
- document.getElementById("userID").disabled = true;
- document.getElementById("password").disabled = true;
-
- }
-</script>
-
-
<div id="configure-widgets" class="disabled-block-container">
<div class="modal-header">
<button type="button" class="close" ng-click="close(false)"
diff --git a/src/main/resources/application-noaaf.properties b/src/main/resources/application-noaaf.properties
index fe7eabc5..0ce8a7b6 100644
--- a/src/main/resources/application-noaaf.properties
+++ b/src/main/resources/application-noaaf.properties
@@ -197,12 +197,12 @@ clamp.config.clds.service.cache.invalidate.after.seconds=120
#DCAE Inventory Url Properties
clamp.config.dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080
clamp.config.dcae.intentory.retry.interval=10000
-clamp.config.dcae.intentory.retry.limit=3
+clamp.config.dcae.intentory.retry.limit=5
#DCAE Dispatcher Url Properties
clamp.config.dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8188
-clamp.config.dcae.dispatcher.retry.interval=10000
-clamp.config.dcae.dispatcher.retry.limit=10
+clamp.config.dcae.dispatcher.retry.interval=20000
+clamp.config.dcae.dispatcher.retry.limit=30
clamp.config.dcae.header.requestId = X-ECOMP-RequestID
#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 9e2e3c97..cdbe6133 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -177,7 +177,7 @@ clamp.config.tca.thresholds.template=classpath:/clds/templates/tca-thresholds-te
#
# Operational Policy request build properties
#
-clamp.config.op.policyDescription=from clds
+clamp.config.op.policyDescription=from CLAMP
# default
clamp.config.op.templateName=ClosedLoopControlName
clamp.config.op.operationTopic=APPC-CL
@@ -214,12 +214,12 @@ clamp.config.clds.service.cache.invalidate.after.seconds=120
#DCAE Inventory Url Properties
clamp.config.dcae.inventory.url=http://dcae.api.simpledemo.onap.org:8080
clamp.config.dcae.intentory.retry.interval=10000
-clamp.config.dcae.intentory.retry.limit=3
+clamp.config.dcae.intentory.retry.limit=5
#DCAE Dispatcher Url Properties
clamp.config.dcae.dispatcher.url=http://dcae.api.simpledemo.onap.org:8188
-clamp.config.dcae.dispatcher.retry.interval=10000
-clamp.config.dcae.dispatcher.retry.limit=10
+clamp.config.dcae.dispatcher.retry.interval=20000
+clamp.config.dcae.dispatcher.retry.limit=30
clamp.config.dcae.header.requestId = X-ECOMP-RequestID
#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
diff --git a/src/main/resources/boot-message.txt b/src/main/resources/boot-message.txt
index d8763e26..eea540be 100644
--- a/src/main/resources/boot-message.txt
+++ b/src/main/resources/boot-message.txt
@@ -1,10 +1,10 @@
+
+
+╔═╗╔╗╔╔═╗╔═╗ ╔═╗┌─┐┌─┐┌─┐┌┐ ┬ ┌─┐┌┐┌┌─┐┌─┐
+║ ║║║║╠═╣╠═╝ ║ ├─┤└─┐├─┤├┴┐│ ├─┤││││ ├─┤
+╚═╝╝╚╝╩ ╩╩ ╚═╝┴ ┴└─┘┴ ┴└─┘┴─┘┴ ┴┘└┘└─┘┴ ┴
+ ╔═╗╦ ╔═╗╔╦╗╔═╗
+ ║ ║ ╠═╣║║║╠═╝
+ ╚═╝╩═╝╩ ╩╩ ╩╩
- __ __ __ __ __ __
-/ \|\ | /\ |__) __ / ` /\ /__` /\ |__)| /\ |\ |/ ` /\
-\__/| \|/~~\| \__,/~~\.__//~~\|__)|___/~~\| \|\__,/~~\
-
-\ __ / __ __ \ __ /
- \ / \ / / `| /\ |\/||__) ||| \ / \ /
- \\__// \__,|___/~~\| || ||| \\__//
-
- Starting :: \ No newline at end of file
+ :: Starting :: \ No newline at end of file
diff --git a/src/main/resources/clds/camel/routes/flexible-flow.xml b/src/main/resources/clds/camel/routes/flexible-flow.xml
index 8305c2e4..c7f7ec3b 100644
--- a/src/main/resources/clds/camel/routes/flexible-flow.xml
+++ b/src/main/resources/clds/camel/routes/flexible-flow.xml
@@ -10,6 +10,7 @@
<constant>30000</constant>
</delay>
<to uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" />
<to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate" />
</when>
<when>
@@ -22,6 +23,7 @@
</delay>
<to
uri="bean:org.onap.clamp.clds.client.OperationalPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDeleteDelegate" />
</when>
<when>
<simple> ${exchangeProperty.actionCd} == 'UPDATE'</simple>
@@ -31,16 +33,19 @@
<constant>30000</constant>
</delay>
<to uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" />
<to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate" />
</when>
<when>
<simple> ${exchangeProperty.actionCd} == 'STOP'</simple>
<to
uri="bean:org.onap.clamp.clds.client.OperationalPolicyDeleteDelegate" />
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDeleteDelegate" />
<to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate" />
</when>
<when>
<simple> ${exchangeProperty.actionCd} == 'RESTART'</simple>
+ <to uri="bean:org.onap.clamp.clds.client.GuardPolicyDelegate" />
<to uri="bean:org.onap.clamp.clds.client.OperationalPolicyDelegate" />
<to uri="bean:org.onap.clamp.clds.client.CldsEventDelegate" />
</when>
diff --git a/src/main/resources/clds/templates/globalProperties.json b/src/main/resources/clds/templates/globalProperties.json
index 880b9927..b6f68f64 100644
--- a/src/main/resources/clds/templates/globalProperties.json
+++ b/src/main/resources/clds/templates/globalProperties.json
@@ -78,7 +78,22 @@
"Failure_Exception": "Failure: Exception",
"Failure": "Failure: Other",
"Success": "Success"
- }
+ },
+ "guardTargets": ".*",
+ "minGuard":1,
+ "maxGuard":1,
+ "limitGuard":1,
+ "timeUnitsGuard":{
+ "minute":"minute",
+ "hour":"hour",
+ "day":"day",
+ "week":"week",
+ "month":"month",
+ "year":"year"
+ },
+ "timeWindowGuard":10,
+ "guardActiveStart":"00:00:01-05:00",
+ "guardActiveEnd":"00:00:00-05:00"
},
"shared": {
"byService": {