summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebdet <sd378r@intl.att.com>2018-09-12 18:51:27 +0200
committersebdet <sd378r@intl.att.com>2018-09-12 18:51:27 +0200
commitc95cc5530f73b67537cedec962803b8c3522b3de (patch)
tree3b517bc1e0ce70f927d65fa0db4c8e3d5bb2392c
parent74533a8b7abb3f9181a175d80847e651dedda586 (diff)
Introduce new changes to UI
Introduce changes to support Guard policy Issue-ID: CLAMP-190 Change-Id: I4bffd2ee2a777ee43884fbf03b6128c0198f98ba Signed-off-by: sebdet <sd378r@intl.att.com>
-rw-r--r--src/main/resources/META-INF/resources/designer/partials/portfolios/PolicyWindow_properties.html141
-rw-r--r--src/main/resources/boot-message.txt18
2 files changed, 95 insertions, 64 deletions
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 5109c1bfe..25cc9a028 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/boot-message.txt b/src/main/resources/boot-message.txt
index d8763e269..eea540beb 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